<?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: Rodrigo 👨‍💻🤙</title>
    <description>The latest articles on DEV Community by Rodrigo 👨‍💻🤙 (@_rodrigomd).</description>
    <link>https://dev.to/_rodrigomd</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%2F478498%2F7b627c40-e867-424c-b76b-97e80ebb4e71.jpg</url>
      <title>DEV Community: Rodrigo 👨‍💻🤙</title>
      <link>https://dev.to/_rodrigomd</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/_rodrigomd"/>
    <language>en</language>
    <item>
      <title>Comments are useful. You just need to learn when to use them</title>
      <dc:creator>Rodrigo 👨‍💻🤙</dc:creator>
      <pubDate>Tue, 28 Sep 2021 23:04:45 +0000</pubDate>
      <link>https://dev.to/_rodrigomd/comments-are-useful-you-just-need-to-learn-when-to-use-them-3bpe</link>
      <guid>https://dev.to/_rodrigomd/comments-are-useful-you-just-need-to-learn-when-to-use-them-3bpe</guid>
      <description>&lt;p&gt;Perhaps you may have heard some of the following statements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Code needs to be self-explanatory"&lt;/li&gt;
&lt;li&gt;"Comments are useless"&lt;/li&gt;
&lt;li&gt;"Don't write comments in your code"&lt;/li&gt;
&lt;li&gt;"Comments are a code-smell" &lt;/li&gt;
&lt;li&gt;"Comments are an anti-pattern"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The thing is that writing comments aren't bad at all if you know in which cases they can help us and on which others they are a complete waste of time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code needs to be self-explanatory
&lt;/h2&gt;

&lt;p&gt;Code should be expressive and intention-revealing. Needing comments to explain the code means the code doesn't describe itself well enough.&lt;/p&gt;

&lt;p&gt;Our code is read far more times than is written, so we should aim to make it as easier to read as we can.&lt;/p&gt;

&lt;p&gt;Sometimes it's clear when a comment is redundant.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Calculate the square root of the sum of two numbers&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sqrt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Timeout of 30 seconds&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;30000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But other times, knowing if the use of comments is a good or bad idea, is confusing.&lt;/p&gt;

&lt;p&gt;Consider the following example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can you know in less than ten seconds, what the code does without reading the comments?
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/*
* Calculate the total amount to pay for a pizza going through each
* item in the order and obtain the cost of each ingredient of the
* price object searching by section and ingredient name to then add 
* each subtotal and return the total to pay
*
* @param {object} o: pizza order
* @param {object} p: ingredients prices
* @return {number} total: total price to pay for the order
*/&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;total&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;o&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;keys&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;o&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;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="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ingredients&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;total&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="nx"&gt;o&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;]];&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ingredients&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="nx"&gt;total&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ingredients&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;value&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;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;total&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;In the above code, we used JSDocs, which is a fancy way to create documentation automatically by reading the comments and special tags like &lt;strong&gt;&lt;code&gt;@param&lt;/code&gt;&lt;/strong&gt; or &lt;strong&gt;&lt;code&gt;@return&lt;/code&gt;&lt;/strong&gt; that specify the parameters and the value returned by each function. Although JSDocs has justified use, when used for the sole purpose of describing what the code does, it becomes useless.&lt;/p&gt;

&lt;p&gt;We can refactor the previous example using descriptive and meaningful variable names, moving some logic to a smaller function so that its name explains what the function does. After that, we will soon realize that all such comments are unnecessary.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;calculatePriceToPay&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pizzaOrder&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;tableOfPrices&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;totalPrice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="nb"&gt;Object&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pizzaOrder&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(([&lt;/span&gt;&lt;span class="nx"&gt;section&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;totalPrice&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;getItemPrice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;section&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;tableOfPrices&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
     &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;totalPrice&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;getItemPrice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;section&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;tableOfPrices&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;price&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&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="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isArray&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;price&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;accumulator&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;subItem&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
             &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;accumulator&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt;  &lt;span class="nx"&gt;tableOfPrices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;section&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="nx"&gt;subItem&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;price&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;tableOfPrices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;section&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;price&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;The only reason to hesitate before removing those comments is if the JSDocs is actually been used to create documentation, if not, or if they were another type of comments we could remove them immediately.&lt;/p&gt;

&lt;p&gt;See?. The &lt;code&gt;calculatePriceToPay&lt;/code&gt; function is much simple to read after the refactoring even without the comments.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When we write code with intention revealing and easy to understand, every previous comment whose sole purpose was to explain the code, lose completely its value, and therefore we can remove it&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Avoid using comments to explain "What"
&lt;/h2&gt;

&lt;p&gt;Whenever you find comments used to explain what the code is doing I invite you to question if they are really necessary because in the majority of cases those comments aren't needed, and can be deleted.&lt;/p&gt;

&lt;p&gt;We should understand what the code is doing after reading it line by line and not by reading a description.&lt;/p&gt;

&lt;p&gt;Another reason is that code is alive, it changes more frequently than comments and even documentation, so it's more likely to see comments become obsolete sooner than you think.&lt;/p&gt;

&lt;p&gt;As in everything, there are exceptions. There is one case in which we can use comments to describe the code; If we are building a really complex algorithm or performing complex operations, in non-trivial domains like statistics, physics, chemistry, healthcare. In those situations, we can give additional context and reinforce the self-described code through the use of comments.&lt;/p&gt;

&lt;p&gt;Let's see an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;math&lt;/span&gt;

&lt;span class="n"&gt;EARTH_RADIUS_KM&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;6371&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_distance_km&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;src_lat&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;src_lng&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dest_lat&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dest_lng&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;span class="s"&gt;"""
Calculate the linear distance between two points in the earth using
the Haversine Formula

The points are GPS coordinates with a latitude and longitude 
represented as floats numbers
"""&lt;/span&gt;   

    &lt;span class="n"&gt;DEGREES_TO_RADIANS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pi&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mf"&gt;180.0&lt;/span&gt;

    &lt;span class="c1"&gt;# Convert latitude and longitude to
&lt;/span&gt;    &lt;span class="c1"&gt;# spherical coordinates in radians
&lt;/span&gt;    &lt;span class="n"&gt;phi_src&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;90.0&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;src_lat&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;DEGREES_TO_RADIANS&lt;/span&gt;
    &lt;span class="n"&gt;phi_dest&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;90.0&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;dest_lat&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;DEGREES_TO_RADIANS&lt;/span&gt;

    &lt;span class="n"&gt;theta_src&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;src_lng&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;DEGREES_TO_RADIANS&lt;/span&gt;
    &lt;span class="n"&gt;theta_dest&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dest_lng&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;DEGREES_TO_RADIANS&lt;/span&gt;

    &lt;span class="c1"&gt;# Compute spherical distance from spherical coordinates.
&lt;/span&gt;    &lt;span class="n"&gt;cos&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;phi_src&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;phi_dest&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;theta_src&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;theta_dest&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
           &lt;span class="n"&gt;math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;phi_src&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;phi_dest&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;arc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;acos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cos&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


    &lt;span class="n"&gt;distance_in_km&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;arc&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;EARTH_RADIUS_KM&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;distance&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;As you can see above, even with a clean code, it's difficult, near to impossible to understand what the code does. Why is that?, It's because it requires domain-specific knowledge. The variable names represent mathematical symbols and formulas but none of them give us context to understand what those formulas are needed, the use of comments, in this case, guides us through the steps and delivers us additional context. &lt;/p&gt;

&lt;p&gt;With the use of those comments, we can quickly search on google for "Haversine function" and "spherical coordinates" to get the missing information.&lt;/p&gt;

&lt;h2&gt;
  
  
  Write comments to explain "Why"
&lt;/h2&gt;

&lt;p&gt;Comments are a great tool to explain things that cannot be explained through the code.&lt;/p&gt;

&lt;p&gt;They are good for express the reasons behind our decisions and provide additional context.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why we write the code in this way?&lt;/li&gt;
&lt;li&gt;Why we took that decision?&lt;/li&gt;
&lt;li&gt;Why we are using this library?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cases where is a good idea to use comments:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Add links to issues that are affecting our code
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Needed to handle Webpack and faux modules&lt;/span&gt;
&lt;span class="c1"&gt;// See https://github.com/fastify/fastify/issues/2356&lt;/span&gt;
&lt;span class="c1"&gt;// and https://github.com/fastify/fastify/discussions/2907.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Explain exceptions to our code style
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Typescript quirk - libraries exported with `export = ` need to be imported using `require()`.&lt;/span&gt;
&lt;span class="c1"&gt;// See: https://github.com/microsoft/TypeScript/blob/master/doc/spec.md#1135-export-assignments&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;chaiShallowDeepEqual&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;chai-shallow-deep-equal&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Redirect to an external source of information
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Override timezone formatting for MSSQL&lt;/span&gt;
&lt;span class="c1"&gt;// link: https://stackoverflow.com/questions/47056395/how-to-pass-a-datetime-from-nodejs-sequelize-to-mssql&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Justify our choices when writing the code
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Some errors contain not only line numbers in stack traces&lt;/span&gt;
&lt;span class="c1"&gt;// e.g. SyntaxErrors can contain snippets of code, and we don't&lt;/span&gt;
&lt;span class="c1"&gt;// want to trim those, because they may have pointers to the column/character&lt;/span&gt;
&lt;span class="c1"&gt;// which will get misaligned.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;trimPaths&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
  &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;STACK_PATH_REGEXP&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Build automatic documentation
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/**
 * Initialize a new `View` with the given `name`.
 *
 * Options:
 *
 *   - `defaultEngine` the default template engine name
 *   - `engines` template engine require() cache
 *   - `root` root path for view lookup
 *
 * @param {string} name
 * @param {object} options
 * @public
 */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Prevent unexpected errors by providing warning messages
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// This file is autogenerated by build/build-validation.js, do not edit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Explain business decisions
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/**
 * This module contains code that will be migrated into 
 * its own service
 * DO NOT ADD MORE CODE INTO THIS MODULE
 * see epic: https://jira.example.com/browse/PM-32145
**/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What comments should we avoid?
&lt;/h2&gt;

&lt;p&gt;Comments can lie, that is a fact that can create confusion because, unlike code that keeps evolving, comments are rarely updated because it's not our priority as developers&lt;/p&gt;

&lt;p&gt;In addition to redundant comments, we should avoid those that are implicitly or explicitly time-limited.&lt;/p&gt;

&lt;p&gt;For example, the famous TODO or FIXME comments are used to let everyone know that there is a debt in the code that we must pay in the future, but the future could never come, and no one will review the code when the team needs to prioritize work. Instead of those comments, create a task in your task manager and label it "Technical Debt" to track how much debt the project generates and how much is paid in each iteration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Comments are just another tool to solve a specific problem. The problem here is the lack of understanding after reading our code.&lt;/p&gt;

&lt;p&gt;They aren't the bad of the movie, but they can become a waste of text so it's important to know when they are beneficial and when using them is nonsense.&lt;/p&gt;

&lt;p&gt;As a general rule, write comments when you need to provide additional information that cannot be expressed through clean code.&lt;/p&gt;

&lt;p&gt;If you like the article and want to support me to write more content like this, you can invite me a coffee&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/rodrigomd"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rJvAnNew--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.buymeacoffee.com/buttons/default-black.png" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>codenewbie</category>
      <category>coding</category>
      <category>codequality</category>
    </item>
    <item>
      <title>How we change our client’s thought that we were a slow team</title>
      <dc:creator>Rodrigo 👨‍💻🤙</dc:creator>
      <pubDate>Fri, 02 Oct 2020 13:59:49 +0000</pubDate>
      <link>https://dev.to/_rodrigomd/how-we-change-our-client-s-thought-that-we-were-a-slow-team-b9h</link>
      <guid>https://dev.to/_rodrigomd/how-we-change-our-client-s-thought-that-we-were-a-slow-team-b9h</guid>
      <description>&lt;p&gt;One day, at the end of the sprint, my manager calls me. Very polite tells me that &lt;strong&gt;our client is upset and worried because he doubts we could deliver the product on time to the release date&lt;/strong&gt;. We were hours before the end of the sprint, and I was busy trying to fix a problem in the checking account balance endpoint of our API. It was a complex problem that requires a lot of testing, but my manager didn’t understand why. He starts asking me some questions about our processes and methodology, trying to get to the problem’s root. He keeps asking until one of those questions triggers me.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Don’t you think that five days is too much time to finish just one endpoint?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I Immediately react, trying to justifying the time invested, perhaps so fast and in a high tone that my boss thought I was furious and tried to calm me down. He starts saying that he doesn’t enjoy making me work until late, neither in my day off (yup, I wasn’t supposed to working that day; it was an earned day off). He says that we were doing something wrong, and in the retrospective, we’ll together discover the causes with the team.&lt;/p&gt;

&lt;p&gt;After the phone call, my impression was that he doesn’t know how difficult the problem was and all the team’s effort to recover us from a delay caused by the client’s changes at the last moment. That day the sprint review went all right, the project manager from the client side was pleased with our work, but the problem wasn’t him otherwise their boss. Until the call, we always had been thinking that we were doing right. These thoughts explain why it took the whole team and me for a surprise to know that our client wasn’t satisfied with our performance.&lt;/p&gt;

&lt;p&gt;The day after the call with my manager, I decided to try his words, and after thinking about it, I started to believe that maybe he was right. We were doing something wrong because the time wasn’t enough to finish our work even with all the team’s extra effort.&lt;/p&gt;

&lt;p&gt;We end it up moving the retrospective to the next day. On that morning, we receive a mail from our manager moving the meeting to another hour because he wanted to participate. When I saw the reactions of my teammates, well, there wasn’t much enthusiasm about it. So, because I was preparing myself to talk about the problem, I volunteered to lead the meeting and do the Ishikawa’s diagram to discover the causes of our client’s wrong impression of us. After a very long meeting with a lot of collaboration and constructive discussion, we came to this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F56tt3lrjraiit3c2zait.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F56tt3lrjraiit3c2zait.png" alt="Ishikawa’s diagram with five spines; people, external, methodology, systems and product launch delayed."&gt;&lt;/a&gt;&lt;br&gt;
Ishikawa’s from the retrospective&lt;/p&gt;

&lt;p&gt;It resulted in many causes that influenced our client’s perception. Some of them were &lt;strong&gt;poor communication, lack of information to start the sprint, changes introduced after planning, lack of crucial processes, and external factors not considered when planning&lt;/strong&gt;. We recognize that all these problems came from a bad implementation of Scrum. It was the first time we used this framework. Without proper training, it would likely look like a Zombie Scrum implementation with many anti-patterns.&lt;/p&gt;

&lt;p&gt;As a team, we resolve to implement two solutions: one in the short term and the other in the long way. In a short time, we made an extraordinary deploy to production to accomplish the client release date. After that, we set some actions to correct the remaining problems in the next few sprints.&lt;/p&gt;

&lt;p&gt;Here are the actions that we implement and the learnings that we gain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Know what they want and let them know what you need
&lt;/h2&gt;

&lt;p&gt;In the scrum framework, this is called the definition of ready. It means that the requirements to develop a user story should be identified and completed before starting to work on it. For example, we can’t start working on an endpoint that should use the client’s database model -given by them- without knowing the details of the model, the business meaning of the tables and columns, ordering, possible filters, and so on.&lt;/p&gt;

&lt;p&gt;When you have identified these requirements, ask for them, be clear and set a deadline to the client, explaining that if they don’t meet the deadline, the user story will be re-prioritized and excluded from the following sprint. All this was made at the refinement meeting when we revisit some stories to polish their definitions and identify dependencies between them whenever possible. Also, discovering the development tasks needed to accomplished the story.&lt;/p&gt;

&lt;h2&gt;
  
  
  Anticipate to changes, communicate at a fast speed when things happened
&lt;/h2&gt;

&lt;p&gt;Sometimes the client isn’t clear about what user stories prioritize to develop them on the next sprint and change his mind barely hours before the start. One strategy to prevent this is to have the backlog updated and estimated with user stories to add and swap from the suggested sprint. That way, we can give the client the flexibility he needs to prioritizes according to the results and past events. There were other cases when the stories that were planned suffer changes in their definition or something unexpected occur that requires immediate attention and we need to include it in the sprint. Thus, it’s crucial to inform the team when these cases arise and update stories and acceptance criteria to reorganize the active sprint.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Have the backlog updated and estimated with user stories to add and trade from the suggested sprint. That way, you can give the client the flexibility he needs to prioritizes according to the results and past events.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;It’s essential to back up every change and agreement made with the client&lt;/strong&gt;. Do this via email and copy it to every stakeholder for transparency, indicating the changes’ impact and how the development team will act according to these changes. Explain to the customer when a delay may happen because of the changes and advise him when to stop adding, updating, or removing stories. Additionally, it’s crucial to explain what they can exchange from the current sprint to include new stories; ideally, it should always be work equivalent in effort.&lt;/p&gt;

&lt;h2&gt;
  
  
  There is always space for improvement: Optimize your development cycle
&lt;/h2&gt;

&lt;p&gt;When your clients think that your team is slow, it’s related to three main problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bad communication&lt;/li&gt;
&lt;li&gt;Unoptimized workflow&lt;/li&gt;
&lt;li&gt;Unattainable commitments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They don’t understand what you are doing or how you do it, so you have a &lt;strong&gt;communication problem&lt;/strong&gt;. Also, maybe you aren’t satisfying the client expectations about what should be delivered and when; this could be caused by an &lt;strong&gt;unoptimized workflow&lt;/strong&gt; or setting higher expectations that you cannot accomplish (&lt;strong&gt;unattainable commitments problems&lt;/strong&gt;).&lt;br&gt;
Having and unoptimized development workflow is a tough one because even by resolving it, you can’t be sure that your client will change their mind if you keep setting unattainable commitments.&lt;/p&gt;

&lt;p&gt;Optimize your development cycle and search for dead spaces in the sprint. Understand why team members are waiting until someone finishes a story needed to start working on their own stories.&lt;/p&gt;

&lt;p&gt;Invest time on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implementing CI/CD&lt;/li&gt;
&lt;li&gt;Test automatization&lt;/li&gt;
&lt;li&gt;Refine stories until you have almost only independent and small stories.&lt;/li&gt;
&lt;li&gt;Increase the coverage, boost the confidence to refactor the code&lt;/li&gt;
&lt;li&gt;Refactor what you can to allow easy extendability and maintainability.&lt;/li&gt;
&lt;li&gt;Reduce loss time, use contracts, and API specs to split the development so that nobody has to wait until others finish their work. (try swagger virtualization). Keep an eye on the number of dependant stories in the sprint. It could mean that the team is planning badly.&lt;/li&gt;
&lt;li&gt;Revisit your git workflow and implementation. Maybe it isn’t the most suitable for this project.&lt;/li&gt;
&lt;li&gt;Search for tools to increase the team’s productivity: code generators, CLI, libraries, packages, frameworks.&lt;/li&gt;
&lt;li&gt;Begin to measure; the time to finish stories, how many times a story is blocked, occurs unexpected events that affect development?. Then set actions together on every retrospective to eliminate the bad behavior and maintain good practices.&lt;/li&gt;
&lt;li&gt;Reduce the batch size of the sprint. That way, you reserve free space for unplanned work.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The primary purpose is to gain more time through automation and use that time on any unplanned work during the sprint. Also, keep watching any constraints to avoid possible bottlenecks on the sprint.&lt;/p&gt;

&lt;p&gt;There is always room for improvement, so you must increase team efficiency to be effective. After eliminating one of the reasons why the team is considered slow, you’ll see a boost in productivity but beware of unattainable compromises. Measure the velocity and capacity of the team, explain it clearly to the client before building the next sprint, and remember never to plan above the maximum capacity of the team, or you’ll continue losing the client’s faith for not meeting your commitments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Be the technology expert: Explain your development workflow to the client
&lt;/h2&gt;

&lt;p&gt;Even these days are companies that don’t know how software is made, perhaps because they don’t need to know to use it. But, it’s valuable for the team that your client knows this type of information. It can help to understand why you make some decisions or why it’s too challenging to build something in a short period.&lt;/p&gt;

&lt;p&gt;As a software engineer — or any equivalent role — It’s expected that you identify obstacles and risks to develop an application or system. You and your team are the technology experts, so behave like that and express your thoughts, emphasize what is essential and crucial to do for the project’s sake from a technological perspective. Also, inform the consequences of sacrifice quality against velocity. Even if you don’t work for an external client you are the technology consultant for the company that hires you.&lt;/p&gt;

&lt;p&gt;Some clients have an IT area and maybe they do things faster than your team. But that doesn’t mean they do it right, this way of thinking can be easily changed when you explain why there is a development process with defined stages and what does every step in the process. Why you expend time writing tests or why sometimes is necessarily doing a refactor before adding new functionality.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The trick is explaining to your customer that they are paying for a product that is expected to be durable, that should fulfill a necessity, and to do so you need to focus not only on building new features fasts but also on doing it right&lt;/strong&gt;. It should be a concern no only to make the software but also to prepare it to be easy to maintain, that way, it remains valuable for a long time and at a low cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build a trustworthy relationship by improving the communication
&lt;/h2&gt;

&lt;p&gt;One of the main things that helped us to change our client’s perception was to improve communication. We increase the dialog through phone calls and emails and always show them respect and a complete compromise to do our best for their product. But, there is a difference between making our best effort and do everything right. Sometimes you can commit errors and accidentally delete the client’s data or take down a reviewed service during a meeting. These things can happen all the time, and rather than trying to hide our blame someone else, it has more value to be transparent and honest.&lt;/p&gt;

&lt;p&gt;There are plenty of companies and professionals capable of doing the work that your client needs, so always focus on building a trustworthy relationship; this adds value on top of high-quality products and is an advantage over your competition.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Mistakes are hidden opportunities to win the confidence of your client, all depends on how you approach them.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you commit a mistake, don’t worry. Tell your client the situation and explain the options to solve the problem, also design ways to ensure that it will not happen again. The same approach can be applied when there are delays in the planning, raise your hand early to reveal what happened, and what should be the actions to prevent these delays.&lt;/p&gt;

&lt;h3&gt;
  
  
  Now, continuing with the story
&lt;/h3&gt;

&lt;p&gt;In the next sprints, we apply and keep track of all the actions described above. We deliver more without sacrificing the quality by organizing the stories better and improving the timing between requesting the required information to start working on a story and added into a sprint. Also, we increase the messages in the communication channels and transparent any problem or external events that could affect the planned work.&lt;/p&gt;

&lt;p&gt;We change our mindset from following the client’s indications without arguing to proposing better approaches and solutions to their product.&lt;/p&gt;

&lt;p&gt;We notice changes in the attitude during the sprint reviews. The product manager and the manager itself -from the client-side- start to give us compliments about our work. They were genuinely impressed with the quality and the compromise of the team. They tell our manager that they were astonished about the team performance and velocity; they appreciate the effort and are glad for the results.&lt;/p&gt;

&lt;p&gt;The changes that we implement helped us to make an impact on our relationship with the client. Now they understand and also believe in our way of work, all because of the outstanding results. In the final weeks of the project, they only call our boss to compliment and coordinate new opportunities for working together.&lt;/p&gt;

&lt;p&gt;With all the team’s compromise to implement the actions described in this article, we manage to deliver a high-quality product that satisfies our client’s needs and changes their opinion about us.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2q420s1m2zogu7tio653.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2q420s1m2zogu7tio653.png" alt="Summary of the approach"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The process described here is summarized in the diagram. It’s an iterative process in which we first use a neutral approach taking all the complaints to analyze them and discover insights that tell us what we are doing wrong. Then we set actions to correct bad behavior and improve the good ones. The most significant change introduced was to invest time teaching and educating our clients to know how we work and the benefits of our methodology. To keep the whole process sharp, we keep track of every experiment and action defined through metrics. That way, we know what is working and what should be corrected or discarded.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Perhaps the process described here is not suitable for your problems, and even if it does it, you may not have the same results with your clients.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Remember that &lt;strong&gt;every client is a different world, and for some of them, it is more important to meet a deadline rather than have a fully tested, robust, and reliable system&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You should invest time talking with your clients to know what their worries are. Usually, a product owner knows these things but is vital to transmitting to every team member to be aligned and on the same page.&lt;/p&gt;

&lt;p&gt;We went through everything due to Scrum’s poor implementation and not having the proper knowledge, neither a coach nor a scrum master. Getting out of that situation was very difficult, so I suggest starting well and hiring an agile coach or an experienced scrum master to teach the principles and values ​​to all those involved in developing the product, but most importantly to the non-developers. Your team will save a lot of headaches if you can count on that support.&lt;/p&gt;

</description>
      <category>agile</category>
      <category>scrum</category>
      <category>teamwork</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
