Soft Skills Engineering - Episode 233: Manual unit testing and WFH demotivation

Episode Date: October 26, 2020

In this episode, Dave and Jamison answer these questions: Questions My (very large) company has an alternative definition of “unit testing”. Unit testing at this company refers to when a... developer manually tests their code in whatever interface the code is associated with after they write it. An example usage would be a standup status update such as “I finished writing the code for ticket x I am just doing unit testing to make sure my code works”. My concern is that there is very little real unit testing at this company and the I think the misuse of this term makes it harder for real unit testing to become more prevalent. Is this worth speaking up about? Feeling Isolated and demotivated while working from home. With COVID 19 pandemic we have been working from for more than six months and looks like it will be another six months at least before we get back to work. We are already a geographically distributed team and with work from home the interactions within team have become harder. We do have once week team meeting but there are more than 20 people and it is usually a tech talk. Sometimes I go days without interacting with the team outside of slack/email. I have realized this tends to make me more distracted or demotivated. Interacting with team members and seniors within team gives big picture information, ongoing projects etc. that helps keep me motivated. I have tried proposing virtual happy hours or even meetings within small groups who working closely once a week or so. Understandably not everyone is enthused about virtual happy hours. Do you guys have any other suggestions? Show Notes https://www.martinfowler.com/bliki/UnitTest.html https://www.amazon.com/Art-Gathering-How-Meet-Matters/dp/1594634920 https://threadreaderapp.com/thread/1304143989939949568.html

Transcript
Discussion (0)
Starting point is 00:00:00 it takes more than adding a field called comment to your json to make up for json not allowing comments to be a great software engineer this is episode 233 of the soft skills engineering podcast i'm your host jameson dance i'm your host dave smith soft skills engineering is a weekly advice show where we answer your non-technical questions about software development i guess you could say we comment on them we that's true we annotate them with data metadata i did appreciate json more after reading a lot of rants about yaml over the week though oh yeah it could be worse i guess that's json it could be worse yeah it's true i mean the difference between different config files json i used to use xml a
Starting point is 00:00:53 json the spec is 10 times smaller than yaml yeah dave do you want to thank our patrons i do thank you to those who are contributing at the level that gets them a weekly shout out they are oladapofadiyi, kiarensfainton, olexander, microconfig.io, nick hathaway, travis sanders, dennis bogdanov, brayden kane, steven armand lee, john grant, vinlock, the agile ventures charity, nick kantar, and philip john basile. if you would like to support the show and join this list or not join this list at a you know whatever amount you feel comfortable with go to softskills.audio and click support us on patreon if you do that we will send you an invitation to our slack community where you can join some hilarious and fun and insightful and educational chats about all kinds
Starting point is 00:01:38 of topics and that's it it includes everything that's all i already said everything about all topics it does yeah every every topic fridge repair yeah i mean that's that is french philosophy fun dip flavors they're on an f kick this week french fun dipping what was the other one fridges fridge repair freon gas disposal i guess that's related to fridge repair oh my gosh this episode is sponsored by monday.com which is a visual teamwork platform that you will hear more about later thank you to monday all right should i read our first question yes please this comes from a listener named john john says my very large company has an alternative definition
Starting point is 00:02:29 of unit testing unit testing at this company refers to when a developer manually tests their code in whatever interface the code is associated with after they write it. An example usage would be a stand-up status update such as, quote, I finished writing the code for ticket X and now I am just doing unit testing to make sure my code works. My concern is that there is very little real unit testing at this company and then I think the misuse of this term makes it even harder for real unit testing practice to become prevalent. Is this worth speaking up about? See, and I always thought unit testing was the act of writing even more code until this code coverage report turns green yeah did you ever hear about the sorting algorithm like ai that they used and i'm trying
Starting point is 00:03:18 to remember the exact story it was something about how it figured out that it could like crash the test program by feeding it a certain set of instructions and so it never actually sorted stuff it just like broke the program to crash quickly but a crash was like success yeah like the wrong measuring criteria so i guess it's like that they're optimizing for you could be optimizing for code coverage and you can sure do a lot of bad stuff if you unroll all your loops your code coverage numbers go up oh yeah just make that array of test inputs longer yeah i mean coverage is a ratio and ratios are just a great great metric to use for performance or like when you're measuring a team
Starting point is 00:04:03 because you know you can manipulate the numerator and manipulate the denominator it's fantastic oh yeah i like this question because it's sort of like the logical end to the disagreement about unit testing and testing terminology you ask like five developers what a functional test is or an end-to-end test or like an integration test you'll get just tons of different definitions yeah and someone was like screw it unit testing doesn't even mean code unit testing means clicking buttons exactly it's like someone's attempt to like highlight how absurd this discussion is and then somebody took it seriously like okay i'll go unit test my code we'll pay our unit testing department then that's right manually unit test stuff i mean here's what's going to happen is
Starting point is 00:04:53 you're going to push this unit testing definition change on everyone and the team's going to come back and and they will have put in place a linter and they'll be like okay now we're unit tested yeah the key is you have to have some automation around your testing like oh automation got it how hard could that be maybe so i have heard the phrase automated unit testing and it always struck me as redundant but i guess it's not you know it's funny because i think in the test driven development community the word testing actually means writing automated unit tests and it's funny because that's like the extreme other end of the spectrum where this company is on the far end of that which is like
Starting point is 00:05:39 unit testing means manual verification yeah it seems like it means like test the unit that you created like you created some module or package or whatever the unit of abstraction is and then you are testing that unit i wonder if it's like a manufacturing thing kind of or some other domain where it has a slightly different meaning yeah it could be i mean i i stumbled upon the term unit testing probably before yeah definitely before i had heard the term test-driven development which really popularized the notion of automated unit testing and and i do think that manual testing was what unit testing used to refer to like 20 plus years ago so maybe some historical context for why it's not as wild as it seems whenever anyone disagrees with me i just do what
Starting point is 00:06:27 i always do and link to a martin fowler wiki okay that agrees with me and then they're instantly convinced right so you just got to look up the definition of unit testing in martin fowler's website and then problem solved right yeah how do you how do you convince people there's kind of a two-pronged challenge here and i think one of the challenges is worth addressing and the other one is not so the first challenge that i don't think is worth addressing is that they're using the wrong definition at least what most developers would consider unit testing in other words like they're saying unit testing to refer to some manual thing but really i think a lot of probably the majority of developers now would consider unit testing to be automated tests at a small
Starting point is 00:07:09 unit level i don't even think that fight is worth having at least at this point but the other problem is you don't have automated tests that fight is almost definitely worth having and probably much easier to win yeah it's a smart idea because that's what i was gonna say well i so i like it just to be clear i was just looking at a martin fowler web page and that's what it said so yeah if it's really hard to change people's understanding of what terms mean and if if that's the avenue you are going down you will lose to people's laziness and ignorance and and resistance to change yes they will do nothing and win yeah exactly they'll just like one confused person will torpedo your crusade
Starting point is 00:07:55 yes or one malicious person who's behind all this at the bottom anyways so uh yeah it does turn into a more standard question of how do you how do you pitch your organization to invest more in automated testing and that's a specification a reification what's the word it's like a what's the opposite of a generalization that's a specific case of a more generic question which is like how do i convince my organization to invest more in technical excellence or technical quality or something right and the answer to that is almost always you show what's in it for them because they are not going to care unless they see the potential value and return on the effort that's going to go into it so if you can identify i mean maybe you can quantify the amount of time that people spend
Starting point is 00:08:45 doing all these tests manually and if especially if you have like a a growing suite of regression tests that people have to run if someone's like writing all these steps down in a spreadsheet somewhere and then that spreadsheet gets longer and longer all the time that's a pretty compelling list of things that you could automate yeah it can be but there's also sometimes other motives at play here like for example your leadership who would make this decision might have a whole bunch of friends who are unit testers the whole unit testing department yes i mean this reminds me of the time i tried to pitch to a team of manual regression testing like that was their job that we could outsource that to another company that would do it for
Starting point is 00:09:37 cheaper and i i knew this was going to be a problem so i went in with the angle of this will free you up to do all the fun testing like exploratory testing and feature verification and and stuff so you don't have to be the boring regression testers and they just looked back at me and they were just kind of silently shaking their heads left and right hey you know how the work you do is not valuable and boring oh man bad plan so yeah yeah it sounds like these are the developers who are doing these tests though the developer manually testing code yeah and developers should know their code works and i think some amount of manual testing while you're working on it is fairly standard but like you should have some way of making sure it's not
Starting point is 00:10:31 going to break after that and manual testing forever is not a scalable strategy to make sure your code never breaks in terms of order of complexity like that every line of code you write has some associated amount of test burden with it and unless you're also deleting a lot of code which you're probably not that test burden only increases so that's kind of it's definitely not going to be a scalable approach although this is a very large company so they've done something with it i scaled it maybe maybe they're yeah okay maybe i'm totally uh off base here but maybe the the key to having this work is that you basically never revisit old functionality you know it just you don't change it you don't enhance it you don't improve it your code only
Starting point is 00:11:20 runs once it's like this perfect flower that blooms one night a year yeah like it ran once to do one thing when you wrote it and never again it's just this moment in time it's gone and it ran so well because of all the unit testing i did exactly yeah this is this is my new software development methodology which is run once only code recognizing the inherent ephemerality of technical systems building that in not only is it philosophically pleasing but it is more consistent with the right once methodology that you also have yeah yeah that's why every day at the end of the working hours there's a cron job that deletes all source control it's a new day everyone every day it's literally a new day
Starting point is 00:12:13 okay we've got two hours to implement our erp system i know yesterday was rough everyone but i promise you tomorrow's a new day we learned a lot about spreadsheets yesterday while trying to rebuild excel and we'll get a little further today it's like groundhog day yeah oh man imagine yeah that would be interesting a programmer groundhog day like you're trapped for 24 hours how much could you get done yeah if you just like typed the right thing for 24 hours that'd be amazing you're like created a billion dollar company in 24 hours yeah so okay so how do we actually do it i mean i i've already said i don't think it's worth the fight to change the definition of unit testing but if you want to introduce automated testing into your team's workflow and
Starting point is 00:13:00 culture there's like i mean there's probably a thousand art blog articles written about this topic how to convince management to invest in automated testing but one of your strongest arguments is probably, look, let's look at our regressions. You know, do we have a lot of bugs that come up after the fact on code that was working a year ago and is no longer working? Try to quantify that. Also, how much time are your developers spending manually testing all of their code? And could that be, let's say half of that time, could it be spent developing automation instead? I'm kind of throwing out these two ideas because it's almost like this is a well-accepted industry standard now that automated testing is valuable. And any company
Starting point is 00:13:38 that doesn't do that actually has to prove why they're not doing it more so than why they should yeah shame them find some other company the one of your competitors they do automated testing yeah i think the key insight here is recognizing that the terms are a smokescreen like you said and just you're selling the value of it i think okay here's what you do you come up with a new term for unit testing like call it like something that already means something else very clearly like like continuous integration filing your taxes or something just like name it something that very clearly has a different meaning and just really go all in on that yeah got it that marketing push will help you convince people because people are convinced by marketing and
Starting point is 00:14:26 everybody loves filing their taxes how can you how can you lose it's perfect remember file your taxes or you go to jail that's what we call it when the test suite fails we're all going to jail when the build breaks okay have we answered the question i think so i think you're probably got a pretty uphill battle here and another just one more thing i'll add is that there's nothing stopping you from developing automated tests in the code that you write and a lot of times that's the easiest way to prove the benefit is to just show other people look this is what i'm talking about it's not that huge of a deal here you go maybe you've got a little build server that runs or something you know you kind of work your way into it slowly oh i like that that's especially
Starting point is 00:15:12 helpful if you feel like the level of interest and knowledge about this subject is pretty different on the team if you're an expert and you're really pumped about it you can't really expect people who know very little about it to of their own volition just kind of dive into it but if you show them with your expertise the benefit that can sell pretty well you're gonna have to show them anyway so you may as well just do it sure all right yeah question answered question answered now i'm not going to name any names but we have a time-honored tradition on this show of complaining about hard to use task trackers however things are changing in this world have you heard about monday.com yeah i've used monday.com it's a work os that powers teams to run processes projects and build
Starting point is 00:15:55 custom workflows in one digital workspace it's pretty cool it's very modern i heard you can actually develop apps that run on monday.com now it's super customizable that's right and monday.com is hosting an app competition for developers they're giving away three teslas and a bunch of other prizes to the winners i am recruiting a team to implement doom in monday.com and you can ride in my tesla if we win this sounds like a good chance to get in early on a growing platform currently there are over a hundred thousand teams that use monday.com for their daily work and your app could be in front of them to sign up go to monday.com soft skills you can find the dates and the rules of the competition there i suggest you check it out today so you don't miss out go
Starting point is 00:16:35 to monday.com slash soft skills okay i will read our next question this is from a listener named potik i'm feeling isolated and demotivated while working from home with the covet 19 pandemic we've been working from home for more than six months and it looks like it will be another six months at least before we get back to work we are already a geographically distributed team and with work from home the interactions within the team have become harder we do have a once a week team meeting but there are more than 20 people and it is usually a tech talk sometimes i go days without interacting with the team outside of slack or email i have realized that this tends to make me distracted or demotivated interacting with team members and seniors within
Starting point is 00:17:16 the teams gives a big picture information helps me understand ongoing projects and keeps me motivated i have tried proposing virtual happy hours or even meetings within small groups who work closely once a week or so understandably not everyone is enthused about virtual happy hours do you guys have any other suggestions hmm i mean the idea that comes to me first is fast forward into the year 2021 you have to buy a cyber truck which allegedly will have bioweapons grade air filtering you drive to your teammates houses and then you get on a video conference with them one-on-one where they can see you through the glass it's almost just like being there in person again you're just in your separate sealed bubble
Starting point is 00:18:05 that's right and if they try to attack you with nerve gas too bad wait no you buy everyone on the team a cyber truck and you can have team stand-ups in a parking lot you all drive your cyber trucks next to each other you're all on your video calls but you have eye contact and body language and and you all have a cyber truck yeah i mean the body language is like expressed through the movement of your car right like if you're really pumped about an idea you do some sweet donuts in the parking lot exactly if you're not feeling it you just put it in first gear and kind of like trundle along yeah this is a this is a pretty common question right now since lots of the tech world has been either encouraged or pulled kicking and screaming into remote work
Starting point is 00:19:00 yep i said a couple months ago that i thought that remote work would become more common this was before covid and i guess you're right i was behind it all yeah the monkey's paw a finger curls on the monkey's paw i wish remote work would become more common wish granted but just like right now there are people who do not like working from an office and really try and avoid it even though that's kind of the the default way of working there are going to be people who really do not like working from home or working remotely. And now they've sort of been shoved into this default way of working without opting into it. So it's kind of just a tough transition time. Normally people who work from home choose it and normally they are motivated
Starting point is 00:19:51 to make it work. And normally it's like a nice benefit that people are interested in and seek out. And now everyone's just kind of had it thrust upon them. Do you feel like people who were already working from home are enjoying it now or are there also negative elements for them what do you mean enjoying it now meaning like is it worse for them now than it was say a year ago when they were working from home or is it still just about the same oh i think for me some things are better some things are worse the whole thing with the world being sick that's worse okay but having my organization realize that it's good to write things down is better kind of like putting everyone on a more level playing field that's a common complaint with remote work if there's people in the office
Starting point is 00:20:40 that you kind of like miss out on this other communication medium and that medium is gone for everybody now in my company at least so i think overall like work wise is better life wise is worse because bad stuff is happening in life to make this work from home thing happen so i feel like i agree with you on because i was working from home for about a year before the pandemic struck and i feel like it did get better in the sense that people are now more aware of everyone who's remote because they're all remote and that's good you know so like in meetings it's like everyone's on the same page you know or everyone has the same level of access let's say it's not There's these secret body language conversations going on in the meeting that you're not privy to
Starting point is 00:21:25 because you're on the phone. Or this poor neglected laptop sitting in the corner that can't hear anything. Exactly. People leave their mics on and their speakers and you die from feedback. Yes. Yes. So that's good. But I'll tell you for me, the one major thing that was required for me to feel successful working from home was in-person get togethers, which I did. I would travel to see my team on like a monthly or bi-monthly basis and now not having been able to do that for the last six months has been so hard for me wait is bi-monthly every other month or twice a month so i it can mean both but i use i in this case i meant it i meant it to mean every two months okay virtual happy hours that can mean very different things to different people
Starting point is 00:22:11 to some people it means hey there's a meeting where we're gonna do nothing just hang out and to some people that sounds great and to some people that sounds like their worst nightmare or or like their everyday job just what they do all day in their yep in their normal job is show up to a meeting and do nothing yeah so i could see the lack of enthusiasm about virtual happy hours especially if it's not clearly communicated what the purpose is and how that purpose will be accomplished yeah i saw a bunch of virtual happy hours happening at the beginning of the pandemic and they were they were widely attended by my team and and other organizations and they seem to have kind of reduced attendance over the six or so months that we've been doing this i think
Starting point is 00:22:56 what you need to do is find find a video game that you can all play together and the virtual happy hour is just like hopping on to among us or whatever that is that is fun and then you get to just chop your project manager in half in the electrical bay or something like that i think you're only half joking right i mean that actually yeah i think a really good idea yeah video games are not everyone's thing and you want to be careful not to assume like we're programmers everybody loves to play video games because that's not true but if you can find some shared interest or something that's accessible enough that like even people who aren't into that particular hobby can participate doing something besides just sitting there and talking
Starting point is 00:23:40 can be helpful yeah and and it can be easier to talk while there's something to focus your attention on that's not just like your co-worker's zoom background yes while you stare awkwardly think about what it looked like to have social interactions in a group before the pandemic and you almost never would just gather in a room with the express purpose of just talking to each other you know if you did you would call it a salon you debate stuff but that would be lame right it's like everyone gather in this room we're going to talk to each other for an hour like if it's lame in real life it's lame over a video call too and so i love the idea like we would always there would be some reason to be there like
Starting point is 00:24:25 food or a game or something or or even you know status updates whatever i mean i think a lot of socialization happened just as a side effect of day-to-day meetings anyway but in the absence of that there needs to be some purpose for attending and i think people get excited about going to do something besides just going around the room and talking about what your weekend plans are i've seen these these kind of events pop up where they're sort of like joke presentation events where somebody has to give a short talk on something just ridiculous that they're passionate about okay like sonic the hedgehog fan fiction and they make like slides and have a thesis and that's a good idea metrics and stuff and metrics yeah i don't think you want to know what the
Starting point is 00:25:11 metrics are for sonic the hedgehog fan fiction but yeah just something that is themed more than let's sit here and interact hey yeah we need to social interact come dialogue with me oh i love i love video games are pretty natural though because you're all sitting at your computer there's there's some free ones that are easy to hop into there are some fun like quiz games too that you can play with each other it's almost like family feud style or you're guessing guessing games and things like that that don't require like dexterity and you know first person shooter skills and stuff yeah accessibility is really important though something that that
Starting point is 00:25:53 everyone can participate in and enjoy because you don't want it to be like quick everybody hop into quake 3 arena where i have been practicing for 15 years i just want to frag all of you so bad yeah let me just bunny hop across the map at warp speed headshotting everybody this will be so fun for me yeah this will be a great team bonding moment you know there is this other idea of organizing team get-togethers in a safe way with small groups and outdoors but and and we actually pitched this in my own organization but it actually turns out that it doesn't work for everyone even that doesn't work for everyone even if the destination is safe not everyone is able to get to the destination in a safe way
Starting point is 00:26:39 you know like not everybody if you live in a big city not everybody has a car of your own and so you might have to ride with a stranger in a lift, you know, or on the train with strangers. You don't know what their status is. So even that just doesn't really work. So it is kind of a rock and a hard place right now. I think I've talked about this book on the show before. It's called The Art of Gathering. And it's all about how you create meaningful gatherings. It's not about work meetings. It's about like dinner parties or get togethers with friends or something like that that sounds really good and i can't summarize it in a sentence but if i had to try it would be stand for a specific thing like have a specific ethos and that means you will do some things and
Starting point is 00:27:24 not do or not allow other things so you have to be kind of deliberate about how you are constructing it so you need tenets yeah basically that's the that's kind of the pitch that it it it's more meaningful if you're not just like hey everybody come over and turn on your camera if you have some specific thing is this book more about like how to create an organization that meets or is it more like how to have like an ad hoc get together or both no it's it's the second one it's not i think the person who wrote it is like an event planner oh okay who who does like conferences or some people i think they work with rich people basically like a rich person hires her to put together an exciting dinner party okay so we're talking it's not just fundraiser events no no no it's like
Starting point is 00:28:12 fancier events i see but it's an interesting read and if you like that kind of thing you could check it out the other thing we've we've talked a lot about this idea of gathering but that's not the only way you can communicate with your team pair programming is pretty helpful if you're really disconnected and not talking or interacting much except over slack or email it can be helpful to have some synchronous communication where you're working on the same thing together to break that up you can just like reach out and say hey i want to pair on whatever you're working on or ask someone if they can pair with you and it might be weird the first time but if people like it then it won't be weird anymore and and i found that help a lot in my
Starting point is 00:28:53 remote organization the other thing that we've talked about a couple times on the show is we have a long-standing video conference that's just always on and people can just hop in there and chat if they want to and so people will sometimes hang out in there and work and then it's like this is where you work it's like if you had a i don't know a central couch in the office that people could come sit at and work on their laptops but also chat a little bit it's basically that feel but remote it kind of signals that i'm working but i'm open to distraction yeah i'm working but like we can chat about a thing if you want or that's cool yeah i honestly think that our ability to be successful as we navigate this pandemic depends a lot on our ability to solve this
Starting point is 00:29:35 problem because i think a lot of people myself included are starting to feel the effects of the disconnect yeah it's getting rough out there which is why we've started a game of mafia with the entire company we have 47 000 detectives could you do could you do async mafia that could be fun at scale i don't know how would you do that what's that game diplomacy have you heard of that yes i've only heard of it i've never seen it played and have no desire to see it played or play it it's not the most fun game to watch i can tell you have you played it yes over 10 years ago i played it with a group in my office and i just didn't really get it and i got i got out pretty quick but it's it's
Starting point is 00:30:28 basically like you're running a country and you're trying to are you trying to take over the world is that the goal i think so i think it's world domination trying to win somehow but it's through negotiation and and things like that yeah it's like it's like risk but without dice or armies just with manipulation yeah yeah and i think that originally started i don't know if it originally started, but people did play it over mail sometimes. I would not be surprised based on the level of graphics quality that I saw in the game. This looks like a game that really values text. Yes. And a small number of colors on your printer. Yeah. So just to start that up. All right. That's all my advice. Start up a whole org game of diplomacy. I think this is the kind
Starting point is 00:31:21 of question that i think would really benefit from a crowdsourced creative outlet and i just want to put out a request to anyone who's listening to this now if your company or team has done something clever to address this problem would you tweet at us at soft skills eng and let us know what they did and we'll share your stories because i think this one is really important and is something that any one person working in isolation is not going to find solutions but i think collectively a bunch of people will probably come up with enough interesting ideas that it is solvable i mean we're just we're just fighting against thousands of years of human social development you know but it should be fine how hard could that be there's a twitter thread by somebody who's an
Starting point is 00:32:03 engineering manager at twitter named ronnie chen she says that she created this thing called the great eventually consistent mandatory fun time team offsite the team had to have a mandatory fun day to replicate an offsite and you you were at work like you couldn't just take vacation you had to do it because of work okay but you were forbidden from doing work okay and yeah let's see can i explain this in a way that doesn't sound really dumb so far you're doing great good i don't i'm trying to avoid just reading the twitter thread it's a good thread maybe we'll link it in the show notes yeah let's do that basically it's like that idea of mandatory vacation time except kind of like tweaked for this remote pandemic thing you have to do something
Starting point is 00:32:59 fun and interesting and then present about it to the team after you come back from it okay and it's sort of to try to counteract that idea of like when you're working remotely it's easy to just get sucked into only work and work is more than sitting down and typing at your computer often if you're there in person there are things to break it up and things to enhance your brains but this is this is just a practice to encourage that in this remote setting i guess okay that's cool we'll link it we'll put it in our show notes all right is that question answered jameson absolutely what more could possibly be said none more okay where can people go if they want to get their own questions not answered they can go to softskills.audio click ask us a question or ask
Starting point is 00:33:46 a question the words ask and question are in the button that's true there may be many other words in the button but those two are there and we will get to it thank you very much for listening thanks for asking questions and we hope you have a great week see ya Bye.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.