<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mark Walsh</title>
    <description>The latest articles on DEV Community by Mark Walsh (@markwalsh).</description>
    <link>https://dev.to/markwalsh</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F664339%2F6f332b1d-c3c1-419a-b37d-8c55cb64c4bd.jpeg</url>
      <title>DEV Community: Mark Walsh</title>
      <link>https://dev.to/markwalsh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/markwalsh"/>
    <language>en</language>
    <item>
      <title>Overwhelmed? Try this! - Part 4 - Good Meeting Hygiene</title>
      <dc:creator>Mark Walsh</dc:creator>
      <pubDate>Tue, 26 Sep 2023 21:32:45 +0000</pubDate>
      <link>https://dev.to/markwalsh/overwhelmed-try-this-part-4-good-meeting-hygiene-5240</link>
      <guid>https://dev.to/markwalsh/overwhelmed-try-this-part-4-good-meeting-hygiene-5240</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;In this series, I describe the various methodologies I employ to combat burnout, enhance focus, and ultimately improve well-being during the workday. Most of these strategies are job-agnostic, so non-technical individuals are encouraged to read on!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What?
&lt;/h2&gt;

&lt;p&gt;Meetings lacking documented aims, time limits, or action items can be disastrous for both you and your company. Over my nearly 14-year career, I estimate that approximately 70-80% of the meetings I've attended have been a waste of time for some, if not all, participants.&lt;/p&gt;

&lt;p&gt;Here's the average cost, in dollars, for a 5-person team with a combined salary of 100k conducting a 1-hour meeting:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Floz2esc2cxx2if3q5uow.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Floz2esc2cxx2if3q5uow.png" alt="Image description" width="631" height="662"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hbr.org/resources/html/infographics/2015/11/meeting-cost-calculator/index.html"&gt;Feel free to calculate it for your own team&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why?
&lt;/h2&gt;

&lt;p&gt;Voice or face-to-face meetings are often the default method for conveying or discussing information, whether rightly or wrongly. Unfortunately, they are frequently unproductive, unfocused, and, ultimately, a waste of time and money.&lt;/p&gt;

&lt;p&gt;To save time and money for yourself and your company, consider the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Question the necessity of the meeting&lt;/strong&gt; - Could the information be conveyed via email or instant message? Often, the answer is &lt;em&gt;yes&lt;/em&gt;. It should be acceptable to decline meetings if information can be easily provided or obtained without a meeting. Context-switching is disruptive for &lt;strong&gt;all&lt;/strong&gt; roles and costs a significant amount of money.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ensure the meeting has a documented or obvious aim&lt;/strong&gt; - Agenda-less meetings invite distractions and tangents. An aim keeps the discussion clear, on track, and all participants engaged. Meetings like 1-to-1s are somewhat exempt from this rule.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set a fixed time for the meeting&lt;/strong&gt; - Meetings should always be timeboxed appropriately to keep attendees engaged and allow time for other calendar items. No one should entertain meetings that overrun, and people should feel empowered to leave meetings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Capture actionable outputs&lt;/strong&gt; - Meetings should produce actionable results. If you don't keep track of these, why have a meeting in the first place?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prepare for the meeting&lt;/strong&gt; - The hours spent in meetings where someone adjusts fields on Jira or begins a lengthy setup for an unprepared demo, is criminal. Meeting organizers should always prepare beforehand.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you're a person of influence witnessing these issues in your business, there are a couple of things you can do to promote better meeting hygiene:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Empower people to say "No"&lt;/strong&gt; - Individuals should feel comfortable pushing back on poorly constructed meeting requests. This cultural shift will naturally lead to better meeting practices.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Practice what you preach&lt;/strong&gt; - Consistency is key; leaders should model the behavior they advocate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Aim small, miss small&lt;/strong&gt; - Begin by encouraging the addition of agendas to meetings. Even this simple step guarantees some return on investment.&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>Overwhelmed? Try this! - Part 3 - Pomodoro</title>
      <dc:creator>Mark Walsh</dc:creator>
      <pubDate>Wed, 06 Sep 2023 22:16:33 +0000</pubDate>
      <link>https://dev.to/markwalsh/overwhelmed-try-this-part-3-pomodoro-2f6g</link>
      <guid>https://dev.to/markwalsh/overwhelmed-try-this-part-3-pomodoro-2f6g</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;In this series, I describe all of the different methodologies I employ and encourage others to try to feel less burnt out, more focused and ultimately feel better during their working day.  Most of these are also job-agnostic so non-technical people - feel free to read on!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Pomodoro_Technique"&gt;The Pomodoro Technique&lt;/a&gt; is a way of micromanaging your time for focused tasks.  If you're employed in any field which requires dedicated concentration then you can employ this technique.  It works especially well if you suffer from any condition which prevents you from concentrating... &lt;em&gt;massively exaggerated nod to ADHD&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Follow these basic steps for a "Pomodoro":&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Pick a task you need to complete - remembering &lt;a href="https://dev.to/markwalsh/overwhelmed-try-this-part-2-single-threaded-tasking-24jn"&gt;One-task-at-a-time&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Set a timer - For at least 15 minutes but it can be anything up to 30 minutes - it's probably best to stick to 5 minute increments&lt;/li&gt;
&lt;li&gt;Work on your task and only this task during this time (more on this later)&lt;/li&gt;
&lt;li&gt;Once the timer goes off - stop working for 5 minutes&lt;/li&gt;
&lt;li&gt;Rinse and repeat steps 1 to 4.  Every 4 Pomodoros take a longer break, perhaps double or triple your 5 minute break.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I personally like to perform 25 minute Pomodoro and I use a software based Pomodoro timer located &lt;a href="https://apps.microsoft.com/store/detail/9P5ZSCL5QC8W?hl=en-us&amp;amp;gl=US"&gt;here&lt;/a&gt; for Windows.  Here's one for &lt;a href="https://apps.apple.com/gb/app/be-focused-pomodoro-timer/id973134470?mt=12"&gt;MacOS&lt;/a&gt; and one for &lt;a href="https://gnomepomodoro.org/"&gt;Linux&lt;/a&gt;.  Or you can buy a physical timer or use a timer on your phone.&lt;/p&gt;

&lt;p&gt;In order to achieve peak concentration, I also make sure I mute all of my OS, IM and phone notifications during this time.  Not distracting yourself from your timed task is absolutely key to ensuring the success of this technique.&lt;/p&gt;

&lt;p&gt;...BUT! as important as achieving your peak concentration during the task is the cooldown period.  Make a coffee, go outside for 5 minutes, check the stock market (if that relaxes you!?).  The important thing is that you honour the 5 minute cooldown by giving yourself a dopamine hit which is absolutely &lt;strong&gt;not&lt;/strong&gt; work related.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why?
&lt;/h2&gt;

&lt;p&gt;This technique is so effective because:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You're totally focused on a single task at a time with no context switching&lt;/li&gt;
&lt;li&gt;There's a low-bar of entry - it's a really easy technique to learn and adhere to&lt;/li&gt;
&lt;li&gt;Time-blocking tasks into chunks actually makes difficult or long tasks easier to process and digest&lt;/li&gt;
&lt;li&gt;You can avoid burnout &lt;/li&gt;
&lt;li&gt;You can avoid decision fatigue&lt;/li&gt;
&lt;li&gt;It's easier to forecast and plan your work when it's compartmentalised&lt;/li&gt;
&lt;li&gt;You could find it easier to get started on a task&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For software engineers I've found it's also beneficial because:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I've found it acts like a &lt;a href="https://en.wikipedia.org/wiki/Rubber_duck_debugging"&gt;Rubber Duck Debugging&lt;/a&gt;-esque technique in the way that problems are often much more obvious post-Pomodoro &lt;/li&gt;
&lt;li&gt;It will improve your estimates if operate in an Agile manner because you can class user stories or tasks by how many estimated Pomodoros they will take&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>Overwhelmed? Try this! - Part 2 - One-task-at-a-time</title>
      <dc:creator>Mark Walsh</dc:creator>
      <pubDate>Tue, 18 Jul 2023 21:27:52 +0000</pubDate>
      <link>https://dev.to/markwalsh/overwhelmed-try-this-part-2-single-threaded-tasking-24jn</link>
      <guid>https://dev.to/markwalsh/overwhelmed-try-this-part-2-single-threaded-tasking-24jn</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;In this series, I describe all of the different methodologies I employ and encourage others to try to feel less burnt out, more focused and ultimately feel better during their working day.  Most of these are also job-agnostic so non-technical people - feel free to read on!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What?
&lt;/h2&gt;

&lt;p&gt;The phrase "I am a natural multitasker" or "I just juggle stuff all day" goes straight through me.  If you're a person who says this, I can say with relative certainty that you may do some tasks concurrently, but you do &lt;strong&gt;none&lt;/strong&gt; of them well.  It sounds insane for me, a serial single tasker to say this now but &lt;strong&gt;you can only do one thing at a time&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why?
&lt;/h2&gt;

&lt;p&gt;As you climb up the seniority ladder you will ultimately be leaned on more for your expertise, guidance and if you're technical, debugging.  More distractions, more people, more demand = evitable context switching.  You open Slack/Teams or whatever IM client in the morning and you're presented with a Christmas tree of chatter; it happens (*there's stuff as an organisation you can do to mitigate this - more on that later...) - or if you're still working in the 90s, you're inbox is full of "demanding" emails.&lt;/p&gt;

&lt;p&gt;So, why is it bad to rifle through all of these as fast as possible, context-switching as much as possible because the Christmas tree lights need to be individually turned off?&lt;/p&gt;

&lt;p&gt;Well here's why:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You &lt;strong&gt;will&lt;/strong&gt; miss important contextual details on your road to mark things as read&lt;/li&gt;
&lt;li&gt;You &lt;strong&gt;will&lt;/strong&gt; forget about that "5 minute thing" you said you'd do "soon"&lt;/li&gt;
&lt;li&gt;You &lt;strong&gt;will&lt;/strong&gt; overcommit to stuff you don't have time for&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So what can you do?:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Spend X amount of time (usually minutes prioritising) - For this I have a personal task backlog which is constructed and reprioritised throughout the day.  Those familiar with Agile should be familiar with a backlog and also familiar that personal backlog items belong nowhere near the Product backlog.  For those not familiar, in simple terms, it's a list in which the order of importance can change dependant on demands.&lt;/li&gt;
&lt;li&gt;Once prioritised - I determine the steps to completion for the task.  A task is not always immediately and solely achievable; sometimes it involves collecting people or third parties and arranging dedicated sessions. &lt;/li&gt;
&lt;li&gt;I "complete" that task and that task ONLY - that task may be completed by scheduling a meeting, emailing a third party or dealing with an issue immediately and solely by me.  Either way; a task completion is a path forward, or a direct resolution.&lt;/li&gt;
&lt;li&gt;I move onto my next task, in priority order.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I have scheduled appointments set with myself for personal backlog repriorisation throughout the day.&lt;/p&gt;

&lt;p&gt;Doing the above means I suffer less from context-switching, over-promising and I make sure that my focus is 100% on the task I am working on.&lt;/p&gt;

</description>
      <category>management</category>
      <category>mentalhealth</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>Overwhelmed? Try this! - Part 1 - Calendar Segmentation</title>
      <dc:creator>Mark Walsh</dc:creator>
      <pubDate>Wed, 12 Jul 2023 22:15:13 +0000</pubDate>
      <link>https://dev.to/markwalsh/overwhelmed-try-this-calendar-segmentation-13k2</link>
      <guid>https://dev.to/markwalsh/overwhelmed-try-this-calendar-segmentation-13k2</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;In this series, I describe all of the different methodologies I employ and encourage others to try to feel less burnt out, more focused and ultimately feel better during their working day.  Most of these are also job-agnostic so non-technical people - feel free to read on!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What?
&lt;/h2&gt;

&lt;p&gt;There's a relatively famous film called About a Boy which is basically about quite a sad man who aside from living off a relative's royalties &lt;a href="https://www.youtube.com/watch?v=74256F5BtiI&amp;amp;ab_channel=Movieclips"&gt;divides his time into units; 1 unit for a haircut, 3 units for going to see a film etc&lt;/a&gt;.  This is quite rightly portrayed as a negative in real life but when you employ this tactic in work; you may find it shockingly effective.&lt;/p&gt;

&lt;p&gt;The idea is pretty simple and applicable to &lt;em&gt;any&lt;/em&gt; job in which you have access to a hard or soft copy of a calendar.  You assign appointments in your calendar to tasks in which you need to perform during your day; during that appointment, you &lt;strong&gt;only&lt;/strong&gt; perform that task.&lt;/p&gt;

&lt;p&gt;To quantify this with something visual; here's a relatively normal representation of what my daily calendar looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faowenrdmbxi2cu4uo2f9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faowenrdmbxi2cu4uo2f9.png" alt="Image description" width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In order throughout the day:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I have an immovable/uninterruptable (and therefore purple) administration appointment of 15 minutes whilst I read emails and look at my DMs (Bookending)&lt;/li&gt;
&lt;li&gt;I have a stand up every day at 09:15&lt;/li&gt;
&lt;li&gt;I will routinely have ad-hoc meetings placed into my calendar, this is totally normal at my level&lt;/li&gt;
&lt;li&gt;I have an immovable/uninterruptable work item appointment to solely focus on a single work item&lt;/li&gt;
&lt;li&gt;I have lunch as an uninterruptable (and out of office therefore grey) appointment.  The time mostly never changes.&lt;/li&gt;
&lt;li&gt;Again another immovable/uninterruptable work item appointment&lt;/li&gt;
&lt;li&gt;Another ad-hoc meeting&lt;/li&gt;
&lt;li&gt;I have an immovable/uninterruptable (and therefore purple) administration appointment again to bookend my day.  I usually use this time to create appointments for the coming days/weeks calendars (Bookending)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The most interesting and pertinent calendar entries are 4. and 6.  This is the time were I typically set a do not disturb and will become pretty strict about not being disturbed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why?
&lt;/h2&gt;

&lt;p&gt;If you're relatively junior, especially in a technical role, then I am afraid to say that one of the negatives of becoming more senior is you will lose more and more personal focus time (by virtue of giving it to other people).  It's inescapable; your calendar will run riot; you will be pulled into things with little to no notice and/or context.  &lt;/p&gt;

&lt;p&gt;The downsides of being more senior may be inescapable but you can start employing this tactic now to protect yourself; I have for the last few years and I've observed the following benefits:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If you block out your calendar more likely than not people &lt;em&gt;will&lt;/em&gt; (and really should!) respect it.  In general, people do use the availability features of calendar applications.  Meaning - &lt;strong&gt;you get stuff done&lt;/strong&gt; in a focused manner.&lt;/li&gt;
&lt;li&gt;It acts as &lt;strong&gt;self-documentation for your day&lt;/strong&gt;.  Are you in a stand-up daily? Cool! - you can just read yesterday's calendar to tell the team what you did.  If for some zany reason you work for somewhere that wants you to account for every moment of your day - Cool! you have everything in your calendar&lt;/li&gt;
&lt;li&gt;Setting clear boundaries within your day &lt;strong&gt;minimizes context switching&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Setting boundaries and routines is *&lt;em&gt;physiologically beneficial *&lt;/em&gt; to most people.  I have particularly found great comfort in bookending my day.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>management</category>
      <category>mentalhealth</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>All About Automated Tests - Part 2 - Benefits</title>
      <dc:creator>Mark Walsh</dc:creator>
      <pubDate>Wed, 01 Dec 2021 00:02:17 +0000</pubDate>
      <link>https://dev.to/markwalsh/all-about-automated-tests-part-2-benefits-33a1</link>
      <guid>https://dev.to/markwalsh/all-about-automated-tests-part-2-benefits-33a1</guid>
      <description>&lt;h2&gt;
  
  
  TL;WR
&lt;/h2&gt;

&lt;p&gt;Welcome to part 2 of the All About Automated Tests series.  This one is going to be a little more pleasant compared to Part 1 as I try to demonstrate some of the obvious and the not-so-obvious benefits of adding value to a product via automated tests.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefit 1 - Modularisation
&lt;/h2&gt;

&lt;p&gt;In my opinion, the greatest benefit, mostly because it actually generates other benefits is the modularisation of code &lt;em&gt;as a result of introducing automated tests&lt;/em&gt; particularly unit testing.  Separating your code to be more modular might be a by-product but it's fantastic nonetheless.  &lt;/p&gt;

&lt;p&gt;Typically, in no/low test codebases you tend to see a lot of code which looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;OrderRequestService&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="n"&gt;IDatabaseContext&lt;/span&gt; &lt;span class="n"&gt;_databaseContext&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

            &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;OrderService&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;IDatabaseContext&lt;/span&gt; &lt;span class="n"&gt;databaseContext&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;_databaseContext&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;databaseContext&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;

            &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;Order&lt;/span&gt; &lt;span class="nf"&gt;CreateOrder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;CreateOrderRequest&lt;/span&gt; &lt;span class="n"&gt;createOrderRequest&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;product&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;_databaseContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SingleOrDefaultAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CompanyId&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="n"&gt;createOrderRequest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ProductId&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

                &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;product&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;ProductNotFoundException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;createOrderRequest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ProductId&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;

                &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;StockCount&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;ProductNotInStockException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;createOrderRequest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ProductId&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;

                &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;supplier&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;_databaseContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Supplier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ProductId&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="n"&gt;createOrderRequest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ProductId&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

                &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;supplierWithShortestDeliveryTime&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;supplier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;CanBeSuppliedWithinSevenDays&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;UtcNow&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

                &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(!&lt;/span&gt;&lt;span class="n"&gt;supplierWithShortestDeliveryTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;IsActiveSupplier&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;SupplierNotActiveException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;supplierWithShortestDeliveryTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;

                &lt;span class="c1"&gt;// And then about 20 other procedural statements&lt;/span&gt;

                &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;Order&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
                &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="n"&gt;Quantity&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;createOrderRequest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Quantity&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="n"&gt;ProductId&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;createOrderRequest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ProductId&lt;/span&gt;
                &lt;span class="p"&gt;};&lt;/span&gt;

                &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I know this example is written in C# (therefore OOP) but this almost completely language-agnostic.  This seems harmless enough but the more and more cognitive complexity you add to this the harder it will become to maintain and change existing functionality.  It becomes even worse when you retrospectively need to add tests - Your tests will end up being a bloated mess of setup code.&lt;/p&gt;

&lt;p&gt;The sensible thing to do in this example in order to make sure your tests are still readable, maintainable and quick to execute is to separate the concerns out.  The obtaining of a product could be refactored out into a &lt;strong&gt;ProductAvailabilityService&lt;/strong&gt; class and the same with the interactions involving suppliers - a &lt;strong&gt;SupplierSelectionService&lt;/strong&gt; class.  This would then enable testing in isolation and perhaps even more importantly - giving you units of reusable code which would be immediately available to other parts of the application.  &lt;/p&gt;

&lt;p&gt;The other cardinal sin within this example is the reliance on non-deterministic data (DateTime.UtcNow).  This is &lt;em&gt;so ridiculously&lt;/em&gt; common within the industry and the cause of so many bugs in production specifically when you start to deploy into different time zones.  Refactoring the reliance on environmental variables not only makes you more modular but allows for the specific targeted testing of multiple cases.&lt;/p&gt;

&lt;p&gt;Although these are basic programming principles (SOLID, in this instance) which you should be doing with or without tests, I often find the adherence to these principles often comes as a by-product of writing code which is easily testable - it feels almost automatic - it's like you get better design by default, for free.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefit 2 - Context Switching Damage Management
&lt;/h2&gt;

&lt;p&gt;This never, ever gets mentioned and is closely related to Benefit 1 but it makes complete sense if you think about it.  If your code is more modular and/or you have a test suite safety mat, in general, you shouldn't suffer too much from the damage of context switching (I'm not encouraging context switching &lt;em&gt;at all&lt;/em&gt; but it's a sad reality). &lt;/p&gt;

&lt;p&gt;If you're making changes to an untested 400 line mega-function  with tons and tons of return statements (I am not advocating this either) and you get that virtual tap-on-the-shoulder or even worse, a screenshot with absolutely no context on Slack/Teams, what is the likelihood that you're going to make a mistake in that function? Or forget something? I'd say it's definitely quite high and I've seen it happen countless times.  Is this going to be the same in a small, well tested function or component? Probably not ...meaning when you do resume work you will be able to enter "the zone" quicker and not only that, you'll have the cosy blanket of a failing test if you have made a mistake.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefit 3 - Intent Is Clear
&lt;/h2&gt;

&lt;p&gt;Typically, well written tests accurately describe the intent of code e.g. (Typical unit test naming syntax)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ProcessOrder_WhenTheProductIsInStock_ThenProductIsOrderIsSubmitted&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;and&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ProcessOrder_ProductIsOutOfStock_ThrowsProductOutOfStockExceptionIsThrown&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;or even (Gherkin-style):&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Given: There is a product in stock&lt;br&gt;
When: I order a product&lt;br&gt;
And the product is in stock&lt;br&gt;
Then: An order is submitted&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can clearly determine what is being tested in both of these scenarios, there's no real room for ambiguity.  The behaviour is very well defined so in the result of one of these tests failing, the maintainer will know that they've broken something.  This for me, is &lt;em&gt;the&lt;/em&gt; best form of documentation and a thousand times better than using auto-generated code comments or writing needless comments&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Opens the filestream&lt;/span&gt;
&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;fileStream&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;FileStream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"some_file.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Open&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;     
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
You're doing God's work, son.





&lt;p&gt;There is a caveat to this benefit of course - it all depends on your quality of tests and specifically the naming of the test.  The intent of the test should be clear - not forgetting you're testing outcomes not implementation details.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefit 4 - Bug/Regression Reduction
&lt;/h2&gt;

&lt;p&gt;It's the most obvious benefit but you &lt;strong&gt;will&lt;/strong&gt; have far fewer bugs as a result of maintaining a mature test suite.  Even taking the smallest type of a test you can write (a unit test) the highest &lt;em&gt;real&lt;/em&gt; percentage of coverage I've achieved previously was about 92-94% of an entire codebase, purely on unit tests.  This is anecdotal but when I joined said company the coverage was 0% with an almost daily meeting to discuss bugs, so you can probably say there were on average 5-10 bugs per week.  Once around 80% coverage was achieved, that dropped to around 0-1 a month.  You as I will quickly discover that the biggest protection when modifying functionality were those tests running either locally or on build - when they were red, I knew I'd introduced a regression bug.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Femy7g9krhgzu9n2ibabm.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Femy7g9krhgzu9n2ibabm.PNG" alt="Testing Pyramid" width="800" height="504"&gt;&lt;/a&gt;Testing Pyramid&lt;/p&gt;

&lt;p&gt;For full disclosure, this did go hand in hand with many process changes including the introduction of a Scrum-like methodology, proper pull request review procedures and manual testing etc but from first hand experience, in the many instances in which we modified functionality in some way, we had a failing test as a result.&lt;/p&gt;

&lt;p&gt;One very recent example of bug prevention I've experienced occurred when I was implementing a password complexity function as required as result of a penetration test.  Unfortunately like many specifications there was a missing requirement which had to be retrospectively added.  There was quite a massive regex which checked various conditions of the specified password and I had to add a requirement for sequential characters.  I made my changes to the regex - "Well that was easy to add" I said and a build was started as a result of my PR and lo and behold I'd broken a test by making the regex more permissible, and thus breaking the password requirements as per the penetration test.  This is a small example but it's quite applicable to every single test type on the aforementioned test pyramid.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefit 5 - Refactoring Can Be Made Much Easier
&lt;/h2&gt;

&lt;p&gt;If you're not refactoring code either as part of a change or addressing tech debt then you'll quickly start to experience both product fragility (a small change in one area breaks multiple other areas of the application) or increased development costs &lt;br&gt;
 by having to address multiple areas for one change (...well, the ones you remember...for the ones you don't it's yet &lt;em&gt;another&lt;/em&gt; bug).  &lt;/p&gt;

&lt;p&gt;In terms of refactoring with testing this is a big "can" because &lt;em&gt;if&lt;/em&gt; you are sensible about how you write your tests (e.g. you test outcomes not implementations) then refactoring the internals of functions/classes/services should be very easy to do.  I learned a very valuable lesson recently in which I kept having to go back whenever I refactored a class to change the unit tests.  This is a sign that your unit tests are too fragile and also a sign that the class is too complex.  Breaking up the class in this instance and testing &lt;em&gt;outcomes&lt;/em&gt; not &lt;em&gt;implementations&lt;/em&gt; will make refactoring a breeze.  If you find yourself constantly having to change tests as the result of refactoring (NOT changing requirements) then you've probably identified a code smell.&lt;/p&gt;

&lt;p&gt;I've often found that the likelihood that a test needs to be changed actually lowers the more you climb the pyramid (less changes for acceptance/E2E tests and most changes for unit tests).  &lt;/p&gt;

&lt;h2&gt;
  
  
  Benefit 6 - Execution Before Deployment
&lt;/h2&gt;

&lt;p&gt;In a mature development environment ideally you should use automated tests as a quality gate for shipping software.  Ideally this should run on a per pull request basis whenever &lt;em&gt;any&lt;/em&gt; change is going to be introduced into the codebase.  It's not really relevant to this article but perhaps you have a build and deploy pipeline which looks similar to this: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Test locally &lt;/li&gt;
&lt;li&gt;Test on build server on pull request &lt;/li&gt;
&lt;li&gt;Test on build server when merged into the Development environment&lt;/li&gt;
&lt;li&gt;Test on build server when merged into the UAT environment&lt;/li&gt;
&lt;li&gt;Test on build server when merged into the Pre-Prod environment&lt;/li&gt;
&lt;li&gt;Manual tests by QAs&lt;/li&gt;
&lt;li&gt;Deployed to production&lt;/li&gt;
&lt;li&gt;Customer reports bug&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Within the above process there are 5 separate stages from which code is being executed via tests before it reaches production.  This offers quite a bit of protection from the introduction of bugs into the codebase, 4 of these being machine-agnostic builds.&lt;/p&gt;

&lt;p&gt;The other obvious benefit is how quickly you can ascertain whether your change has broken anything.  For unit tests that will be Stage 1 which is really early in the pipeline.  It's also not out of the question to be able to see failing integration or E2E tests at this stage dependant on your system but if not they will be caught in Stage 2, 3 or 4.    &lt;/p&gt;

&lt;p&gt;Consider how this would play out in the same pipeline above without any automated testing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Manual functional volatile test locally (potentially)&lt;/li&gt;
&lt;li&gt;Build on pull request &lt;/li&gt;
&lt;li&gt;Build when merged into the Development environment&lt;/li&gt;
&lt;li&gt;Build when merged into the UAT environment&lt;/li&gt;
&lt;li&gt;Build when merged into the Pre-Prod environment&lt;/li&gt;
&lt;li&gt;Manual tests by QAs (potentially missing the bug)&lt;/li&gt;
&lt;li&gt;Deployed to production&lt;/li&gt;
&lt;li&gt;Customer reports bug&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The best possible outcome is at Stage 1, the author of the change catches a bug because they just happened to have functionally tested it locally (Noting that this is a volatile test, I doubt this will be functionally tested again other than at the time of modification).&lt;/p&gt;

&lt;p&gt;The next possible stage is Stage 6.  Utilising a QA to test something an automated test could have highlighted is a complete waste of their time and then your time as a developer, if you have to then go and fix it.  &lt;/p&gt;

&lt;p&gt;The worst stage is Stage 8, using your customers as a replacement for automated tests is one of the worst things you can do and &lt;em&gt;will&lt;/em&gt; result in product alienation and churn.   &lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;These are just some of the benefits I've experienced first hand when implementing automated tests of any kind into a SDLC.  I am always keen to add arrow's to my unit testing quiver so if there are any you can think of please do let me know.&lt;/p&gt;

</description>
      <category>testing</category>
      <category>codequality</category>
      <category>productivity</category>
    </item>
    <item>
      <title>All About Automated Tests - Part 1 - Excuses</title>
      <dc:creator>Mark Walsh</dc:creator>
      <pubDate>Thu, 29 Jul 2021 11:00:45 +0000</pubDate>
      <link>https://dev.to/markwalsh/all-about-automated-tests-part-1-excuses-3271</link>
      <guid>https://dev.to/markwalsh/all-about-automated-tests-part-1-excuses-3271</guid>
      <description>&lt;h2&gt;
  
  
  TL;WR
&lt;/h2&gt;

&lt;p&gt;The year is 2021, and yet somehow, there is still an ungodly amount of people &lt;em&gt;not&lt;/em&gt;(!) writing tests for production code and even worse, trying to excuse themselves of it.  This article will attempt to dispel some common excuses I've heard in the wild.  I am labelling these as excuses because I believe automated tests to be a hard requirement for production grade code. &lt;/p&gt;

&lt;h2&gt;
  
  
  Excuse 1 - 🗣️ "Tests will make X story/feature/defect longer to complete"
&lt;/h2&gt;

&lt;p&gt;Probably in terms of implementation-to-deployment time this statement is probably true...however writing software isn't like making burger patties, the product lifecycle doesn't finish when it's consumed - software is never "complete".  For all code, you have a debt as soon as that story/feature/defect is implemented - if you have untested production code you not only have to maintain that debt but also incur the debt of protecting that code from ever breaking its own or other related functionality.&lt;/p&gt;

&lt;p&gt;For arguments sake, if you take a simple scenario of an estimated dispatch date endpoint which takes a product identifier and generates an estimated dispatch date.  Let's also pretend for arguments sake that there's quite a bit of logic around several remote data sources, perhaps you query a distribution API, supplier APIs and then you perform some complex date related calculations.  Code like this will commonly require changes, perhaps some business logic changes or perhaps there's other suppliers to add later on etc.  &lt;/p&gt;

&lt;p&gt;The cumulative effort for the maintenance e.g. either bug fixes or changes to business logic &lt;strong&gt;will take you longer than if you just originally wrote tests&lt;/strong&gt; - it will also take you longer to make future changes.  Obviously there are also the added benefits of the tests accurately describing the intent of the code and preventing you from breaking related functionality but there's a whole other article's worth of testing benefits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Excuse 2 - 🗣️ "It's only a small change, we don't need a test for this"
&lt;/h2&gt;

&lt;p&gt;If you are making changes to production code which will be executed, you &lt;strong&gt;should absolutely have automated tests for this&lt;/strong&gt; and especially if you making a &lt;em&gt;Super Small Fix™&lt;/em&gt; (and we all know how that goes typically).  A &lt;em&gt;Super Small Fix™&lt;/em&gt; will surely require a &lt;em&gt;Super Small Test™&lt;/em&gt; therefore there shouldn't be a problem, should it? Ironically, in systems with low amounts of or no tests, you typically find fixes being deployed more regularly &lt;em&gt;because of the lack of tests&lt;/em&gt; which leads to yet more dangerous Super Small Fix™'s and so it snowballs and snowballs until you find yourself in a position of dealing with ever-growing amounts of bugs (a typical sign of this is having meetings specifically about bugs) instead of delivering value to your stakeholders.&lt;/p&gt;

&lt;p&gt;I've seen countless times, in systems with low or no test, fixes be deployed, then another fix to patch over a regression bug and then another fix to patch something else which has broken because of the previous fix.  The very &lt;strong&gt;least&lt;/strong&gt; you can do is construct a test to signal the intent of the change and protect it from regression.    &lt;/p&gt;

&lt;h2&gt;
  
  
  Excuse 3 - 🗣️ "We only need to test the &lt;em&gt;critical&lt;/em&gt; areas of the system"
&lt;/h2&gt;

&lt;p&gt;I do think, if you are adding automated tests to an existing production system, the critical areas should be &lt;br&gt;
addressed first.  However, a customers interaction with your software doesn't just fall under the remit of what you consider &lt;em&gt;critical&lt;/em&gt;.  I am of the opinion that every executed piece of code which modifies state is a candidate for at least some sort of test, &lt;em&gt;even internal tools&lt;/em&gt;.  Basically - anything you are executing which could impact your customer or stakeholders, should be tested.  &lt;/p&gt;

&lt;p&gt;When it comes to introducing tests to untested codebases, I tend to adopt a touch-and-test approach; &lt;em&gt;you add tests to that which you touch and only that&lt;/em&gt;.  I have previously made the mistake of spending a lot of time writing tests for code which I just ended up replacing wholesale with fully tested code.  In order to remain pragmatic and productive you have to assume, unless told otherwise, that the current code is correct and work in your tests around the change.&lt;/p&gt;

&lt;h2&gt;
  
  
  Excuse 4 - 🗣️ "It's not our job, we have testers/QA people"
&lt;/h2&gt;

&lt;p&gt;Typically this is uttered by what I like to define as "coaster developers" (which really deserves its own article as well).  It's the entire responsibility of the development team, which includes testers and product to ensure the correctness of the application.  Everyone should pull their weight; product in terms of identifying criteria and backlog refinement, testers for their manual/automated tests and developers for writing tests for their own code.&lt;/p&gt;

&lt;p&gt;It's a sad reality that there are many developers with slanty-responsibility-shoulders within the industry who will perform very acrobatic gymnastics in order to abstain from any further responsibilities bar "coding".  This self pigeon-holing is what sets apart mediocre developers from truly great developers.  Bashing out code as if you are boxing orders for Amazon will only get you so far in your career and only enhance the product to a point.  Learn to appreciate that you and your stakeholders all share a common goal.&lt;/p&gt;

&lt;h2&gt;
  
  
  Excuse 5 - 🗣️ "Frontend code doesn't need to be tested"
&lt;/h2&gt;

&lt;p&gt;This is mostly related to Single Page Applications, if you've said this whilst writing or maintaining an SPA, congratulations, you've just created the worlds first SPA without any logic (and in this instance, you probably don't need a SPA).  That being said, even if you've managed to create a SPA application without &lt;em&gt;any&lt;/em&gt; logic you still have to test against visual regression bugs (&lt;a href="https://percy.io/"&gt;Things like Percy can help with this&lt;/a&gt;)  &lt;/p&gt;

&lt;p&gt;If there's logic in place which is important to your customers and stakeholders (whether they know about it or not), it should be tested.&lt;/p&gt;

&lt;h2&gt;
  
  
  Excuse 6 - 🗣️ "That means we will have to write tests for everything we do! I can't be bothered"
&lt;/h2&gt;

&lt;p&gt;This is a fallacy.  I can think of four perfectly reasonable scenarios off the top of my head (and there are probably more) in which I don't think tests are required:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Non-production code e.g. Spikes/Research Stories/Proof of Concepts/Anything you will &lt;strong&gt;not&lt;/strong&gt; deploy to production&lt;/li&gt;
&lt;li&gt;Internal tools (which don't mutate state or you don't base business decisions off) - I am thinking of monitoring dashboards, any internally surfaced logs &lt;/li&gt;
&lt;li&gt;In general writing code for language/framework specific functionality e.g. you wouldn't write a test to ensure that &lt;code&gt;slice&lt;/code&gt; (JavaScript) actually splices or that a &lt;code&gt;List&amp;lt;string&amp;gt;&lt;/code&gt; (C#) enumerates correctly&lt;/li&gt;
&lt;li&gt;Dependencies which have their own tests - I wouldn't unit test a Nuget package I'd installed if it had it's own suite of tests providing proper coverage&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Don't test things that don't add value to stakeholders.&lt;/p&gt;

&lt;h2&gt;
  
  
  Excuse 7 - 🗣️ "Customers don't care if we write tests or not, they just care about the product"
&lt;/h2&gt;

&lt;p&gt;Customers would never usually say they care about whether you write tests, &lt;strong&gt;that bit is true&lt;/strong&gt; and they should never be exposed to that information.  &lt;em&gt;They do&lt;/em&gt; care about the quality and stability of the product they are using - and without tests, every change you make is compromising that.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;These are just a selection of the most common excuses I've heard from various people along my journey.  There are many others I've heard along the way, some of them are too ridiculous to even note.  Please note that I've specifically not mentioned the types of tests - this is intentional as to not provoke any discussions around the usefulness of unit, integration and acceptance tests.&lt;/p&gt;

</description>
      <category>testing</category>
      <category>codequality</category>
      <category>productivity</category>
    </item>
    <item>
      <title>The Madness Of Recruiting Permanent Engineers</title>
      <dc:creator>Mark Walsh</dc:creator>
      <pubDate>Thu, 15 Jul 2021 13:40:07 +0000</pubDate>
      <link>https://dev.to/markwalsh/the-madness-of-recruiting-permanent-engineers-njd</link>
      <guid>https://dev.to/markwalsh/the-madness-of-recruiting-permanent-engineers-njd</guid>
      <description>&lt;p&gt;&lt;strong&gt;Disclaimer: This article is only pertinent to permanent recruitment.  If you have a multistage interview process for contractors I think you may be beyond help...&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;WR
&lt;/h2&gt;

&lt;p&gt;Modern recruitment is broken but unlike seemingly everyone else under the sun, I don't blame recruiters; who are mostly just responsible for sourcing and placing candidates.  I blame companies themselves for many, many sins as listed below.  &lt;em&gt;Caution: This piece is opinionated...&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  "Just a one-hour pairing exercise" ❌
&lt;/h2&gt;

&lt;p&gt;By far one of the biggest annoyances I have encountered whilst searching for a job was the insistence by companies to complete live pairing exercises...&lt;em&gt;when they themselves don't even practice pair programming&lt;/em&gt;.  Now don't get me wrong, if your company practices pairing, I get it - I really do, that's your modus operandi ergo you need to judge candidates on how they operate in that environment. &lt;strong&gt;However&lt;/strong&gt;, that is not how most companies operate, so why would you interview a candidate in that manner?&lt;/p&gt;

&lt;p&gt;Now it might just be me and my years of experience interviewing candidates, but recreating &lt;em&gt;that scene&lt;/em&gt; from Swordfish during an interview tends to invoke a panicked response from a candidate.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft1mlfxdki4u9wb9wjele.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft1mlfxdki4u9wb9wjele.jpg" alt="Swordfish - An unrealistic scene (Cropped...if you know, you know)" width="800" height="267"&gt;&lt;/a&gt;Swordfish - An unrealistic scene (Cropped...if you know, you know) &lt;/p&gt;

&lt;p&gt;Take it from me who has been on both sides of the fence - you're probably not getting a representative assessment of their skills by putting them on the spot.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solution ✔️
&lt;/h3&gt;

&lt;p&gt;Give candidates a choice between a take home test, pairing exercise or just trust their CV and have an adult conversation.&lt;/p&gt;

&lt;p&gt;My preferred method when interviewing/being an interviewee was usually a 3 stage process:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Screening call - Establish appetite for role/Discuss role in detail&lt;/li&gt;
&lt;li&gt;Handcrafted short take home test (yes, I mean &lt;em&gt;very&lt;/em&gt; short) - Establish how a candidate approaches a problem under real world conditions.  This usually has some pretty explicit requirements.&lt;/li&gt;
&lt;li&gt;Final interview - To discuss why they approached the problem in the way they did and essentially review their code together&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;My reasons for this are pretty simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It mimics the real world - Candidates try things, Google stuff etc - I want them to approach a problem as they would day to day.  The final stage also lets a candidate discuss their approach to the problem and allow for a natural, free-flowing conversation between both parties
&lt;/li&gt;
&lt;li&gt;It lessens the likelihood that a candidate has memorised a Project Euler solution or a particular algorithm (Yet to see how that skill is useful in the real world anyway...)&lt;/li&gt;
&lt;li&gt;It shortens the amount of time dedicated to recruitment for me and other engineers - In almost every company I've ever worked for the engineering department is short staffed - Setting aside days to watch someone code is not a great time investment&lt;/li&gt;
&lt;li&gt;A lot of lower quality candidates either can't complete the solution or don't read the instructions.  I would go as far to say, a &lt;em&gt;shocking amount&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I've heard several arguments against this, so I will address these&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;"But they could just steal/get someone else to write it" - It becomes very, very obvious in the final stage when they cannot justify their design choices&lt;/li&gt;
&lt;li&gt;"It takes too long!" - I said &lt;em&gt;very short&lt;/em&gt; and I meant it (1-2 hours).&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  "Amazon/Facebook/Google do...we do too!" ❌
&lt;/h2&gt;

&lt;p&gt;You're not Amazon/Facebook/Google.  Now, I don't necessarily agree with the horrendous recruitment process undertaken by most FAANG companies but there's a reason they're market leaders - they attract the best talent because they usually have some of the best benefits, best co-workers, best remuneration and a lot of personal freedom within their roles.  &lt;/p&gt;

&lt;p&gt;It's highly unlikely that you're going to need to recruit candidates who need to be put through a 15 stage interview-a-thon including a "culture fit" interview (whatever that means) culminating in them being shot out of a cannon straight into the HR department.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwk03nm2tjzwqq5ra6yya.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwk03nm2tjzwqq5ra6yya.jpg" alt="End of interview human cannonball to HR - It's not for everyone" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;
End of interview human cannonball to HR - It's not for everyone



&lt;h3&gt;
  
  
  Solution ✔️
&lt;/h3&gt;

&lt;p&gt;You should be much more interested in how they approach problems and whether they can write clean, maintainable code.  Keep the interview process short with as few stages as possible which will keep both parties interested.  I lost count of the amount of times I've heard about people getting bored and dropping out at stage 4 of a 7 stage process.  We have a magical thing called "a probation period" - use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  "Let's gather as many candidates as possible and select the best" ❌
&lt;/h2&gt;

&lt;p&gt;Quite simply, &lt;em&gt;you don't have time&lt;/em&gt;.  The market is so unbelievably busy - companies are having to sell themselves to candidates which is leading to all sorts of fantastic benefits for us but unfortunately for companies, it means you have to act fast.  I was offered 4 genuinely fantastic offers very recently &lt;em&gt;within 10 days of initial contact&lt;/em&gt;.  This is unprecedented in a time in which the word "unprecedented " is used too much.&lt;/p&gt;

&lt;p&gt;I had a few companies take weeks to come back to even offer me an initial interview - For some it took months - How on earth are you hiring, well, anyone?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpeuum7tu39pgnhrngr05.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpeuum7tu39pgnhrngr05.jpg" alt="Earth - When a slow-moving company finally gets back to you" width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;
Earth - When a slow-moving company finally gets back to you



&lt;h3&gt;
  
  
  Solution ✔️
&lt;/h3&gt;

&lt;p&gt;There's no time for you to compare candidates - if you spot a good engineer you should do everything within your remit to hire them before someone else does.  The market is rigged against you.&lt;/p&gt;

&lt;h2&gt;
  
  
  "I know we're experiencing a pandemic but we need a face-to-face final interview" ❌
&lt;/h2&gt;

&lt;p&gt;I don't even know what to say to companies who request this.  Despite a successful recent vaccination drive, the UK (where I live) has recorded almost 130k deaths at the time of writing and we're currently in the midst of our third wave. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fon4gedqldhk1cvqco3ld.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fon4gedqldhk1cvqco3ld.jpg" alt='"Nice to infect you!"' width="630" height="350"&gt;&lt;/a&gt; &lt;/p&gt;
"Nice to infect you!"



&lt;h3&gt;
  
  
  Solution ✔️
&lt;/h3&gt;

&lt;p&gt;Quite simply, don't do this.  Be aware of the enviornment and conduct it via VC.  &lt;/p&gt;

&lt;h2&gt;
  
  
  "Salary is dependant on experience" ❌
&lt;/h2&gt;

&lt;p&gt;Translation - We're going to lowball you if we think we can get away with it.  This has never sat right with me - not only does it result in you getting candidates who don't have enough or too much experience but you also introduce a completely needless stage of negotiation having wasted potentially hours of time on both sides.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjrx70tbhjlearq7rmjw9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjrx70tbhjlearq7rmjw9.jpg" alt="What you look like when you lowball" width="800" height="450"&gt;&lt;/a&gt; &lt;/p&gt;
What you look like when you lowball



&lt;h3&gt;
  
  
  Solution ✔️
&lt;/h3&gt;

&lt;p&gt;It's obvious - advertise a salary or a salary band.  Make sure the candidate is happy with either the maximum or minimum during first contact.  &lt;/p&gt;

&lt;h2&gt;
  
  
  "Put legally required holiday allowances/tea and coffee/equipment/drinking water as a perk" ❌
&lt;/h2&gt;

&lt;p&gt;Great! Thanks for what is completely expected in every job...I've ever had...since I was 16...including when I was a Kitchen Porter (aka young boy who cleans pans).  You're really scraping if you're listing these things as perks.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvejgo1w0pt502dj6v9ed.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvejgo1w0pt502dj6v9ed.jpg" alt='"If I keep looking, maybe I can find some free oxygen to add to the advert"' width="224" height="225"&gt;&lt;/a&gt; &lt;/p&gt;
"If I keep looking, maybe I can find some free oxygen to add to the advert"



&lt;h3&gt;
  
  
  Solution ✔️
&lt;/h3&gt;

&lt;p&gt;Best to leave the obvious stuff off, especially the perks which are legally required.  I know not every company is exactly flush with cash but there are other things you can offer engineers which are free - autonomy, freedom to work from home, brown bag sessions, dedicated personal R&amp;amp;D time.  &lt;/p&gt;

&lt;h2&gt;
  
  
  "Comfy breakout area with PS5s, beer fridge and a massive TV" ❌
&lt;/h2&gt;

&lt;p&gt;I've never met a single &lt;em&gt;good&lt;/em&gt; or better engineer who cares about this.  Not one.  More to the point, I've never seen these areas used in any company I've ever worked for.&lt;/p&gt;

&lt;p&gt;Engineers care about autonomy, process, well defined requirements and using the best tools for the job.  I'd be much more inclined to interview for a company who, for instance, told me about the specs of my workstation on an advert or told me about their SDLC. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv0vtwrhbuaohjrdcsivi.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv0vtwrhbuaohjrdcsivi.jpg" alt="I was going to create speech bubbles for this but it's far too silly in it's own right" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;
I was going to create speech bubbles for this but it's far too silly in it's own right


   

&lt;h3&gt;
  
  
  Solution ✔️
&lt;/h3&gt;

&lt;p&gt;It boils down to this - Good engineers care about the quality of what they deliver which basically means, when you're in work...well, you're in work.  By all means, keep your breakout area if you have one but have an awareness of the type of person you want to recruit...&lt;em&gt;Hint: They're probably not going to care about zany token gestures.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  "Our Work From Home policy is up in the air at the moment" ❌
&lt;/h2&gt;

&lt;p&gt;Hearing this as a candidate is a red flag - it's typically a bait and switch e.g. they employ you and then all of a sudden a decision has been made and you're being asked to come in 3/4 days a week or you're being told there isn't an office (depending on your preference).  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq79zuvgly44a9zelwafm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq79zuvgly44a9zelwafm.jpg" alt='The office they advertised as "exciting and energic"' width="512" height="341"&gt;&lt;/a&gt;&lt;/p&gt;
The office they advertised as "exciting and energic"


  

&lt;h3&gt;
  
  
  Solution ✔️
&lt;/h3&gt;

&lt;p&gt;Coming to a decision on this shouldn't take weeks - you should just decide in black and white whether it is - or isn't - a policy, whichever side of the fence you're on just pick it. &lt;/p&gt;

&lt;h2&gt;
  
  
  "We don't have an exact list of your roles and responsibilities" ❌
&lt;/h2&gt;

&lt;p&gt;This genuinely happened to me.  &lt;/p&gt;

&lt;p&gt;I still wonder what I would be hired to do, I am going to take a punt at trouser modelling for Asda.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxj2roi7kl5kswsjd5qsq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxj2roi7kl5kswsjd5qsq.jpg" alt="Me and my pals in our black standard issue trouser chillin' in the dairy section" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;
Me and my pals in our black standard issue trouser chillin' in the dairy section


  

&lt;h3&gt;
  
  
  Solution ✔️
&lt;/h3&gt;

&lt;p&gt;If you don't know what you want a candidate to do, you shouldn't hire them...however this specific example was a gambling company (they call it "Sports Betting" - it's gambling, don't try and zhuzh it up) after all, and they're not exactly known for operating ethically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;In no way are my views necessarily representative of every software engineer but these are sins and solutions have been procured from myself and others on both sides of the fence.  In summation, companies need to change how they hire now or they will get left behind.&lt;/p&gt;

</description>
      <category>recruitment</category>
      <category>productivity</category>
      <category>discuss</category>
      <category>career</category>
    </item>
  </channel>
</rss>
