<?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>Forem: Lucas Medeiros Reis</title>
    <description>The latest articles on Forem by Lucas Medeiros Reis (@iamlucasmreis).</description>
    <link>https://forem.com/iamlucasmreis</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%2F15445%2Ff50fa164-15cf-48fc-89ec-951e2e282e44.jpg</url>
      <title>Forem: Lucas Medeiros Reis</title>
      <link>https://forem.com/iamlucasmreis</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/iamlucasmreis"/>
    <language>en</language>
    <item>
      <title>The Single Most Important Driver Of Software Quality</title>
      <dc:creator>Lucas Medeiros Reis</dc:creator>
      <pubDate>Fri, 02 Jun 2017 13:21:30 +0000</pubDate>
      <link>https://forem.com/iamlucasmreis/the-single-most-important-driver-of-software-quality</link>
      <guid>https://forem.com/iamlucasmreis/the-single-most-important-driver-of-software-quality</guid>
      <description>&lt;p&gt;So, there I was, ready to press the button. All the while three hundred people were looking at me, thinking "is this guy going to make my work more difficult?". I had nowhere to hide, and the button needed to be pushed.&lt;/p&gt;

&lt;p&gt;My claim: &lt;strong&gt;developers having skin in the game is the &lt;em&gt;main&lt;/em&gt; driver of software quality&lt;/strong&gt;. If your life depends on the software you are building, you can bet that the software will be of a much higher quality than any software that your life does not depend on. That being said, there are also "second best" scenarios, like being near &lt;em&gt;people whose lives&lt;/em&gt; depend on the quality of your code, or being an &lt;em&gt;actual user&lt;/em&gt; of the product yourself. I cannot imagine any better factor than skin in the game to drive quality.&lt;/p&gt;

&lt;p&gt;But let me start from the beginning.&lt;/p&gt;

&lt;p&gt;I work at a large online retail company, with millions and millions of  users. In addition to the millions of users using from home, a modified version of the website is leveraged by a telemarketing sector within my company. As you may have guessed, these are the three hundred people who were not very comfortable with my presence.&lt;/p&gt;

&lt;p&gt;I can't say that I blame them for being uncomfortable, because they do earn a share of what they sell for the company. In other words, they have a lot of skin in the game. They don't use the website as a normal user, to buy something; they use it &lt;em&gt;as a selling tool&lt;/em&gt;. If the checkout doesn't work, they don't sell, and they don't make money. Needless to say some of them are thinking, "I'd kill the person who broke this thing!" when the site goes down.&lt;/p&gt;

&lt;p&gt;When I pitched my idea to refactor/rewrite a part of our checkout to upper management, they were a little unsure of the project. First, I tried to sell them on it with a promise of an increase in code quality and better performance, and when they still seemed hesitant, I said, "I'll deploy the changes to production in the middle of the telemarketers". At that moment they realized I was serious about idea, and they agreed to sign off on the project.&lt;/p&gt;

&lt;p&gt;As soon as I got back to my work station, I felt something different. As always we were very serious about our metrics and processes, and we took every action necessary to be sure the website would not have any problems for our millions of users. But just the thought of deploying the changes to production while at the telemarketing headquarters, next to people who depend on the site to make a living, gave us a different feeling. From early on, everyone on the team worked hard to avert potential disasters down the road.&lt;/p&gt;

&lt;p&gt;Not only were we super careful with our code, we also got very engaged with UX, UI, and with the infrastructure of the project. From the very beginning, our team came up with strategies to deploy the application while causing the least impact possible. We created a "panic" link for the telemarketers to go to the previous application. We even developed a new telemarketing-only feature to help them sell additional services and insurance, as an incentive not to press that panic link.&lt;/p&gt;

&lt;p&gt;Our website is really large, with lots of different micro-services and different clients interacting, and at this level of complexity, it's almost inevitable that problems will occur in production, no matter how much testing you do, or how careful you are in your process. With that in mind, it wasn't a huge surprise that on deploy day, in the first ten minutes, we had a small problem affecting the sale of gift wrap.&lt;/p&gt;

&lt;p&gt;Everybody had been cordial to us from the beginning, but I could feel the tension in the air during those ten minutes. And then, after rolling back and fixing the issue, I could still see that the telemarketers were not very confident. What other errors would affect the sales?&lt;/p&gt;

&lt;p&gt;But by the end of the day, everything had gone well. We had anticipated almost every scenario, and we were ready to fix all the problems that were raised. The application started to run smoothly, and no one was using the panic link anymore, success! By the end of a couple of weeks, we learned that services and insurance sales had risen by 20% for telemarketing, and we raised the overall conversion of the website by about 2%.&lt;/p&gt;

&lt;p&gt;So, when I see that &lt;a href="https://zapier.com/blog/how-basecamp-uses-basecamp3/"&gt;Basecamp uses Basecamp&lt;/a&gt;, and &lt;a href="https://www.youtube.com/watch?v=uLrnQtAq5Ec&amp;amp;t=4m10s"&gt;the VS Code team uses VS Code to build VS Code itself&lt;/a&gt;, I understand why those products have really high quality. They have &lt;em&gt;skin in the game&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Final notes&lt;/em&gt;: of course this is not a scientific claim :) It is a hypothesis raised from our own experience, and we continue to observe this property in different projects. The effects of skin in the game are usually very well described by some economists and philosophers, and especially by &lt;a href="https://www.amazon.com/Nassim-Nicholas-Taleb/e/B000APVZ7W"&gt;Nassim Taleb&lt;/a&gt;. He's actually writing a book called &lt;em&gt;Skin In The Game&lt;/em&gt;, and &lt;a href="https://medium.com/incerto/why-each-one-should-eat-his-own-turtles-equality-in-uncertainty-e2b2ee3bcddf"&gt;a lot&lt;/a&gt; &lt;a href="https://medium.com/incerto/the-skin-of-others-in-your-game-3f51d8ccc3fb"&gt;of really&lt;/a&gt; &lt;a href="https://medium.com/incerto/no-worship-without-skin-in-the-game-70b4aa341092"&gt;interesting chapters&lt;/a&gt; &lt;a href="https://medium.com/incerto/an-expert-called-lindy-fdb30f146eaf"&gt;are online&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post was originally published in &lt;a href="http://lucasmreis.github.io/blog/the-single-most-important-driver-of-software-quality/"&gt;my personal blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>codequality</category>
      <category>software</category>
      <category>opinion</category>
      <category>philosophy</category>
    </item>
    <item>
      <title>Solve All Bugs Or Implement New Features?</title>
      <dc:creator>Lucas Medeiros Reis</dc:creator>
      <pubDate>Thu, 06 Apr 2017 14:39:02 +0000</pubDate>
      <link>https://forem.com/iamlucasmreis/solve-all-bugs-or-implement-new-features</link>
      <guid>https://forem.com/iamlucasmreis/solve-all-bugs-or-implement-new-features</guid>
      <description>&lt;p&gt;&lt;em&gt;This post was originally published on &lt;a href="https://lucasmreis.github.io/blog/solve-all-bugs-or-implement-new-features/"&gt;my personal blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Most projects have moments in which they have new features to implement and, at the same time, bugs to solve. A choice has to be made on whether to focus more time on solving those bugs and making sure they don't appear again - let's call this option &lt;em&gt;quality&lt;/em&gt; - or implementing new features - &lt;em&gt;scope&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;A lot of arguments have been made in favor of quality. One of my favorites is an argument presented by &lt;a href="http://www.joelonsoftware.com/articles/fog0000000043.html"&gt;Joel Spolsky in this already classic text&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In this post I'll make the argument that, &lt;em&gt;even from business and financial&lt;/em&gt; points of view, &lt;em&gt;focus on raising quality should always come a before focus on implementing new features&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The concepts
&lt;/h2&gt;

&lt;p&gt;First of all, let me explain better what I mean when I talk about quality and scope. Let's say there's a demand for X new features to be implemented in a given period and we know there are currently Y open bugs. One could say:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"We are going to implement all X features and solve as many bugs as we can."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Or you could say:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"We are going to solve all Y bugs in their root causes, and we'll implement as many features as we can."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;See the difference? It's a matter of explicitly stating what your priorities are. In the first example, we'll make sure everything we implement is well tested and well designed, but some bugs will not be considered due to time constraints.  In most cases, bugs will be listed in a spreadsheet or on a board with a "priority" property, and the business will choose which bugs should be solved  per sprint, based on a "financial" analysis (which I'll talk about in the next section).&lt;/p&gt;

&lt;p&gt;In the second case, a team will focus all of its energy on, at least, investigating every bug that appears. Whenever there's a decision not to solve a bug right away, it's because the developers diagnosed that the bug is not a manifestation of something that would stop the business, or incur a big loss.&lt;/p&gt;

&lt;p&gt;Those are what I'm calling in this post "a focus on scope" and "a focus on quality", respectively.&lt;/p&gt;

&lt;h2&gt;
  
  
  Losses due to lack of quality and scope
&lt;/h2&gt;

&lt;p&gt;One of the main criteria needed in order to choose between focusing on solving a bug or implementing a new feature is an analysis of the financial loss that the business will incur by &lt;em&gt;not&lt;/em&gt; doing these things.&lt;/p&gt;

&lt;p&gt;It's impossible to know for sure the loss a business could have in the future, so we'll need to estimate it. And to do the estimation we'll need to deal with uncertainty. My point is that the uncertainty of a loss due to not solving a bug is &lt;em&gt;qualitatively different&lt;/em&gt; from the uncertainty of a loss due to not implementing a new feature.&lt;/p&gt;

&lt;p&gt;To explain this difference, I'll briefly present two concepts introduced by author Nassim Taleb in his book &lt;a href="http://www.amazon.com/Black-Swan-Improbable-Robustness-Fragility/dp/081297381X/"&gt;Black Swan&lt;/a&gt;. I suggest this book to anyone interested in having their mind turned inside out. :)&lt;/p&gt;

&lt;h2&gt;
  
  
  Mediocristan and Extremistan
&lt;/h2&gt;

&lt;p&gt;Taleb argues that uncertainties can "come from two places". The first place is Mediocristan: observations do not vary very much, or vary in a somewhat predictable way. An example of an Mediocristan uncertainty is "the average height of a random group of a hundred people". After you measure five or six groups, you would have a very nice idea of what other averages will be. Even if one person in the group is the tallest man on Earth!&lt;/p&gt;

&lt;p&gt;Then there is Extremistan, a place where one observation can be very, very different from the others, which makes predictions very difficult, sometimes even impossible. An example is "the average net worth of a random group of a hundred people". Every group will have a very different average.  We could have a run of thirty, or even fifty groups with a very similar average, and then suddenly Bill Gates is in a group and "BAM".&lt;/p&gt;

&lt;p&gt;So, here's my first claim:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Losses due to not implementing a new feature belong in Mediocristan.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A new feature is something that in the past did not exist in your business (duh). That means that not having a new feature, in the majority of cases, will not cause a big loss. Or at least it will not make the losses you already have any bigger.&lt;/p&gt;

&lt;p&gt;Let's consider for example an e-commerce business that wants their users to be able to pay with a new payment option, let's say Bitcoins. It could be difficult to estimate how much the company would &lt;em&gt;make&lt;/em&gt;, but it's relatively easy to see that there won't be a big loss if the Bitcoin feature is not implemented. Current users are buying with current payment options and will continue doing so even without a Bitcoin option.&lt;/p&gt;

&lt;p&gt;And that leads to my second claim:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Losses due to not solving a bug belong in Extremistan.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Every bug, no matter how small, can be the tip of the iceberg to a much deeper problem. That's why it's so difficult to estimate the effort needed to solve a bug. And deep problems can &lt;em&gt;stop a business in it's tracks&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;A bug in the error feedback of a credit card form could explain the drop in conversion rates. Also, that bug could be a manifestation of a much deeper problem with server side validation, which, in turn, could start to appear in other forms.&lt;/p&gt;

&lt;p&gt;Some errors can be solved quickly by "patching" them. But that means that errors could reoccur if someone touches the code, or uses those same modules elsewhere. A lot of times, a more complex refactoring has to be done carefully, and must be fully backed by unit, integration and end to end tests. With these tests, we can diminish the chance of a bug creeping back up on you.&lt;/p&gt;

&lt;h2&gt;
  
  
  But is the whole team always going to be working on bugs?
&lt;/h2&gt;

&lt;p&gt;What about all the new features that we need to implement??? When will that happen?&lt;/p&gt;

&lt;p&gt;By solving every bug at its root cause, we diminish the chances of new bugs appearing. That means that in the not-so-long-term, almost everybody in the team will be focusing on implementing new features. The project gains traction, and will deliver a &lt;em&gt;larger scope&lt;/em&gt; with a &lt;em&gt;higher quality&lt;/em&gt;. And that's what everyone wants, isn't it?&lt;/p&gt;

&lt;p&gt;I'm not saying that all bugs have to be solved right away. I'm saying that all bugs should be &lt;em&gt;investigated&lt;/em&gt;, and the developers should diagnose whether or not the root cause could give rise to other new, more dangerous problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  A script for dealing with a bug
&lt;/h2&gt;

&lt;p&gt;Every time a new bug is reported, and comes to the developers to be solved, ideally we should follow the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Investigate the root cause of the problem. Ideally this should be done in pairs, with at least one of the developers having already worked on that part of the code. That would make things quicker.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose whether or not to solve the bug right away. The answer to this question should be "yes" in most cases.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Write tests to reproduce the bug. Unit tests preferably, but don't be afraid to write new integration and/or end to end tests, if needed. By creating new tests, we try to guarantee that if anything brings the bug back, it will be caught by tests before going to production.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Solve the root cause as well as you can.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This approach is not new. It's actually one of the main components of Toyota's "Lean Manufacturing" revolution, called &lt;a href="https://en.wikipedia.org/wiki/Autonomation"&gt;Jidoka&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summing up
&lt;/h2&gt;

&lt;p&gt;Losses due to not implementing a new feature are much more predictable than losses due to bugs not being solved. Every bug is a potential business-stopper. And that's why we should always give quality a higher priority than scope: to keep our businesses alive.&lt;/p&gt;

</description>
      <category>codequality</category>
      <category>scope</category>
      <category>agile</category>
      <category>risk</category>
    </item>
  </channel>
</rss>
