<?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: conectionist</title>
    <description>The latest articles on DEV Community by conectionist (@conectionist).</description>
    <link>https://dev.to/conectionist</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%2F53315%2F5708854d-da8a-4813-97ee-03d3ad1c11e9.png</url>
      <title>DEV Community: conectionist</title>
      <link>https://dev.to/conectionist</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/conectionist"/>
    <language>en</language>
    <item>
      <title>It helps to distinguish between stories and tasks</title>
      <dc:creator>conectionist</dc:creator>
      <pubDate>Fri, 26 Mar 2021 14:37:35 +0000</pubDate>
      <link>https://dev.to/conectionist/it-helps-to-distinguish-between-stories-and-tasks-iga</link>
      <guid>https://dev.to/conectionist/it-helps-to-distinguish-between-stories-and-tasks-iga</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Agile/Scrum teams using Jira often create a "story" for everything they work on (except bugs and improvements).&lt;br&gt;
Tracking your work is not a bad practice, but not distinguishing between stories and tasks can be.&lt;/p&gt;

&lt;h2&gt;
  
  
  So what's the difference?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Stories contain changes that are visible to end-users.&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;(Most) tasks contain changes that not visible to end-users.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Examples
&lt;/h2&gt;

&lt;p&gt;To make it a bit clearer, here are some examples of stories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;create installer &lt;/li&gt;
&lt;li&gt;add login screen&lt;/li&gt;
&lt;li&gt;add "Cancel" button&lt;/li&gt;
&lt;li&gt;add application to OS startup&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While not all changes are visual, they are all clearly visible to the end-user (ok, some users might be oblivious even to the most obvious graphical changes of an app, but that's a different story - pun intended!)&lt;/p&gt;

&lt;p&gt;And here are some examples of tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;refactor login screen code&lt;/li&gt;
&lt;li&gt;add documentation for IDE setup&lt;/li&gt;
&lt;li&gt;research how to support 10k concurrent connections&lt;/li&gt;
&lt;li&gt;integrate unit test framework&lt;/li&gt;
&lt;li&gt;add third-party library to project&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of these tasks, when finalized, will have no impact on end-users. They don't know or care about unit tests, refactoring or third-party libraries. With or without them, the application/product is the same to end-users.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ok, so what's the real benefit of this "separation"?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;It's testability.&lt;/strong&gt;&lt;br&gt;
In Scrum teams, the Definition of Ready should (ideally) contain a checkbox that says "is this testable by QA?".&lt;br&gt;
Also, the Definition of Done, should (ideally) contain a checkbox that says "has it been tested by QA?".&lt;/p&gt;

&lt;p&gt;All stories can be tested by QA! Why? Because "Stories contain changes that are visible to end-users".&lt;br&gt;
Can tasks be tested by QA? Not really. At least most of them can't. Why? Because "(Most) tasks contain changes that not visible to end-users".&lt;/p&gt;

&lt;p&gt;"refactor login screen code" - Other than running a set of regression tests to make sure nothing was broken, there's not much QA can do to verify this. But then again, this wouldn't mean that they are testing this task alone, would it?&lt;br&gt;
"add documentation for IDE setup" - Sure, QA can look at the documentation and actually try to do what was written there, but I would hardly call that QA testing.&lt;br&gt;
"research how to support 10k concurrent connections" - QA can ask developers what the result of their research was, but this would not be QA testing.&lt;br&gt;
"integrate unit test framework" - Other than making sure everything still compiles ok, there's not much QA could do. But again, this isn't QA testing. Or QA's job, for that matter.&lt;br&gt;
"add third-party library" - Again, QA cannot test this specifically. Best case, they could run a set of automated regression tests to check that nothing was broken.&lt;/p&gt;

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

&lt;p&gt;While it's easy to consider everything as a "story", it might help to distinguish between stories and tasks sometimes.&lt;/p&gt;

&lt;p&gt;Let me know your thoughts!&lt;/p&gt;

</description>
      <category>scrum</category>
      <category>jira</category>
      <category>stories</category>
      <category>testing</category>
    </item>
    <item>
      <title>Should blockers be part of the Definition of Done?</title>
      <dc:creator>conectionist</dc:creator>
      <pubDate>Mon, 22 Jan 2018 12:19:53 +0000</pubDate>
      <link>https://dev.to/conectionist/should-blockers-be-part-of-the-definition-of-done-38jb</link>
      <guid>https://dev.to/conectionist/should-blockers-be-part-of-the-definition-of-done-38jb</guid>
      <description>&lt;p&gt;In Scrum, there is something called the Definition of Done. It's basically a set of conditions which is used to objectively determine is a user story is done (in a sense that is understood by all parties).&lt;/p&gt;

&lt;p&gt;Let's say that I've implemented a story, but upon testing the QA team finds one or more bugs that are critical (i.e. blockers).&lt;/p&gt;

&lt;p&gt;Obviously that blockers will have to be fixed ASAP.&lt;br&gt;
But can/should you consider that story done?&lt;br&gt;
More specifically, &lt;b&gt;should blockers be part of the definiton of done?&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Also, what if it's not a blocker (just a P2 or lower)?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;All answers are welcome, but I'd especially appreciate those coming from people who actually have experience with Scrum.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Why code coverage is not a reliable metric</title>
      <dc:creator>conectionist</dc:creator>
      <pubDate>Sat, 13 Jan 2018 20:22:57 +0000</pubDate>
      <link>https://dev.to/conectionist/why-code-coverage-is-not-a-reliable-metric-327l</link>
      <guid>https://dev.to/conectionist/why-code-coverage-is-not-a-reliable-metric-327l</guid>
      <description>&lt;p&gt;I often hear statements like "Let's increase code coverage" or "What's our code coverage?" (mostly from managers). And I think to myself "Oh, boy...".&lt;/p&gt;

&lt;p&gt;Not because I don't like unit tests or think they're useless. On the contrary. I think unit tests are very important and useful.&lt;/p&gt;

&lt;p&gt;What I'm against is using code coverage as a metric. Because it can mean nothing. And it usually doesn't.&lt;/p&gt;

&lt;h1&gt;Let me explain why&lt;/h1&gt;

&lt;p&gt;Consider the following class that validates and email address:&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;pre&gt;
class EmailValidator
{
    public bool ValidateEmail(string email)
    {
        // just for demo purposes
        // I know it's not a very good email regex :P
        return new RegEx("[a-zA-Z0-9_]+[@][a-z]+[.]com").matches(email);
    }
}
&lt;/pre&gt;

&lt;p&gt;&lt;br&gt;
And a class used for unit testing the email validator:&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;pre&gt;
class EmailValidatorTest
{
    void TestValidEmail()
    {
        Assert.IsTrue(EmailValidator.ValidateEmail("someone@email.com"));
    }
}
&lt;/pre&gt;



&lt;h1&gt;What's my code coverage?&lt;/h1&gt;

&lt;p&gt;Well, I only have one class with one method. And my unit test goes though that code. That means my entire "codebase" is covered. Yay! 100% coverage!&lt;br&gt;
That means my code is bullet-proof, right? &lt;b&gt;WRONG!&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Why? Because my regex, although not very complex, covers a lot scenarios.&lt;br&gt;
I've only written a unit test for small letters.&lt;br&gt;
I haven't written unit tests for emails that are comprised of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;empty string&lt;/li&gt;
&lt;li&gt;caps&lt;/li&gt;
&lt;li&gt;numbers&lt;/li&gt;
&lt;li&gt;underscore&lt;/li&gt;
&lt;li&gt;alphanumeric characters&lt;/li&gt;
&lt;li&gt;combinations of the above (and there are plenty)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, what's my &lt;em&gt;REAL&lt;/em&gt; coverage? I would say less than 15%.&lt;/p&gt;

&lt;h1&gt;What about real life?&lt;/h1&gt;

&lt;p&gt;I'm not saying code coverage is always unreliable. But it only works as expected for simple cases. Like the following:&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;pre&gt;
bool IsEven(int n)
{
    if(n%2 == 0)
        return true;
    else
        return false;
}
&lt;/pre&gt;

&lt;p&gt;&lt;br&gt;
Two unit tests for this code will give 100% coverage and that's actually all the unit tests you need for this.&lt;/p&gt;

&lt;p&gt;But you don't have code like this in real life. From my experience, less than 5% of any codebase has code that's dead simple like this.&lt;/p&gt;

&lt;p&gt;Most of the time, you use third party libraries that have classes/functions like the regex I used above. Even though I only wrote one line, there are a bunch of if/else statements hiding behind that.&lt;/p&gt;

&lt;h1&gt;Conclusion&lt;/h1&gt;

&lt;p&gt;What I disagree with isn't code coverage per se. That actually helps the developer to visualize the areas in which s/he hasn't written any unit tests at all.&lt;/p&gt;

&lt;p&gt;The problem is most people don't understand that &lt;br&gt;
&lt;b&gt;high code coverage ≠ code reliability&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;You can have &amp;gt;95% code coverage and your application can be unacceptably buggy (I've actually witnessed this myself).&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
