<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Bits 'n Widgets - bugs</title>
    <link>http://bitsnwidgets.com/</link>
    <description>&amp;nbsp;&amp;nbsp;Thoughts on real-world, practical, common-sense approaches to Agile software development using Scrum and XP</description>
    <language>en-us</language>
    <copyright>John E. Boal</copyright>
    <lastBuildDate>Wed, 14 May 2008 14:13:49 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>webmaster@bitsnwidgets.com</managingEditor>
    <webMaster>webmaster@bitsnwidgets.com</webMaster>
    <item>
      <trackback:ping>http://bitsnwidgets.com/Trackback.aspx?guid=29c86aac-c875-4e21-b676-cb8b6bcacd01</trackback:ping>
      <pingback:server>http://bitsnwidgets.com/pingback.aspx</pingback:server>
      <pingback:target>http://bitsnwidgets.com/PermaLink,guid,29c86aac-c875-4e21-b676-cb8b6bcacd01.aspx</pingback:target>
      <dc:creator>John Boal</dc:creator>
      <wfw:comment>http://bitsnwidgets.com/CommentView,guid,29c86aac-c875-4e21-b676-cb8b6bcacd01.aspx</wfw:comment>
      <wfw:commentRss>http://bitsnwidgets.com/SyndicationService.asmx/GetEntryCommentsRss?guid=29c86aac-c875-4e21-b676-cb8b6bcacd01</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Definition: <a href="http://en.wikipedia.org/wiki/Technical_debt">Technical
Debt</a> is a term that we in the Agile world use to describe things in the code that
perhaps aren't engineered as well as they could (should) be. It can refer to many
things, like areas in the code that we should probably refactor to make them more
readable, poorly performing code, obsolete or clunky architecture, encapsulation abstraction,
or other class problems, or the like. It's debt because we know about it, we "owe"
it to be done, but are focusing on other things instead.<br /><br />
Technical debt is the avoidance of doing work that we would otherwise do in the course
of doing our best practices in engineering. It's a fact of life that most every Agile
team has to deal with, in my experience. I find that there are various means of "dealing
with" technical debt, some of which I will discuss below as a matter of practicality.
However, I see it really as a symptom of a deeper problem. The team isn't finding
good engineering as valuable as completing stories could be the underlying problem.<br /><br />
Teams can be pressured to deliver more than they should (this is common), and as such,
could be focused on delivering the current sprint's stories rather than fixing things
they find that are not as they should be. The team also could be creating more technical
debt for itself by not focusing on good engineering in the first place. When junior
people design things, sometimes they don't address all the points of performance and
code maintainability. Trade-offs are made that can end up causing lots of rework later.<br /><br />
The concept of Agile software development, is heavily based on refactoring. Sometimes
I find that teams use refactoring with a little "r" when they should be Refactoring.
They make small internal changes, but are reluctant to change overall design, even
when it is truly warranted. When we add a new feature, sometimes the design needs
to change to accommodate it. THIS IS EXPECTED behavior in an Agile development process.
Yet, time after time I hear developers say "well, I don't want to change all that <i>NOW</i>..."
when that's really exactly what they should be doing. The concept of iterative development
should be allowing us to ship software at the end of every cycle, and we really can't
consider the software shippable if it has these poor designs still left over from
earlier days.<br /><br />
Refactoring the design shouldn't be catastrophic though. But, there is always some
impact that is almost always fundamentally left out when planning. Imagine we have
an apple, and we need to add some cherries to it in this sprint. We might just smash
the cherries on the outside of it, and call it good. But that would leave us a lumpy
ugly mess... Rather, we might take another approach, and put the apple and the cherries
all in a blender, and pour the mix into a new shape mold and freeze it. The new shape
will be smooth and round, yet it will encompass the new features of having both apple
and cherry flavors. It's a dumb example, but you get the idea. Refactoring can take
many forms.<br /><br />
Handling Technical Debt<br />
Now, I have been on a few Agile teams and I am a realist. Technical debt is most certainly
here to stay. We just aren't in an ideal world, and we can't always take the time
we really need to make sure that the iteration's deliverable is as pristine as it
should be. So, now how can we handle this debt in a practical way?<br /><br />
Here are some ways I have seen teams deal with Technical Debt:<br /><ol><li>
Ignore it. 
<ol><li>
This don't work so good, in my opinion, but yes I have actually seen it done. It works,
so we'll use it as-is.</li></ol></li><li>
TODO it. 
<ol><li>
//TODO in the code is a flag that there is something more that needs attention. Also,
//FIXFIX and //BUGBUG are others I have seen. Some of the tools give us mechanisms
to flag these as work items, but in my practical experience this is just about the
same as #1. Nobody ever gets back to these things to fix them. They just lose visibility
and get buried. Not very effective in my book.<br /></li></ol></li><li>
Backlog it. 
<ol><li>
Create a backlog item called Technical Debt. Each instance where something needs attention
is recorded as a task for this story. They can be estimated, and prioritized. Backlog
items have visibility, so they don't get lost. Here is the problem - Technical debt
now CAN be prioritized. And, it usually is - right to the bottom of the list. This
really doesn't solve the issue either, unless you have a product owner who is savvy
enough to know that good engineering means happier customers, developer, and management
in the long run.<br /></li></ol></li><li>
Bug it. 
<ol><li>
Log a bug for each Technical Debt item discovered. This is probably the most effective
means I have yet seen for the actual reduction or elimination of technical debt. In
reality, I think this is the most appropriate. The new story requires changes that
just haven't been made. It's not really "done" until this is taken care of. Ongoing
maintenance of code should have an appropriate stakeholder with a voice in the Product
Owner's scope of attention.<br /></li></ol></li><li>
Job-Jar it. 
<ol><li>
Put it into the bucket of things that need to be done but aren't on either the sprint
or product backlogs. I think this is marginally effective, because nobody should technically
ever have time to get to this stuff, they really should be pulling things off the
product backlog onto the sprint backlog. But, I thought I'd mention this concept since
someone brought it up.</li></ol></li></ol>
Are there other ways to deal with Technical Debt? What ways have you had success?
Please leave me a comment and let me know.<br /><img width="0" height="0" src="http://bitsnwidgets.com/aggbug.ashx?id=29c86aac-c875-4e21-b676-cb8b6bcacd01" /></body>
      <title>Technical Debt is a Process Smell</title>
      <guid isPermaLink="false">http://bitsnwidgets.com/PermaLink,guid,29c86aac-c875-4e21-b676-cb8b6bcacd01.aspx</guid>
      <link>http://BitsNWidgets.com/2008/05/14/TechnicalDebtIsAProcessSmell.aspx</link>
      <pubDate>Wed, 14 May 2008 14:13:49 GMT</pubDate>
      <description>Definition: &lt;a href="http://en.wikipedia.org/wiki/Technical_debt"&gt;Technical Debt&lt;/a&gt; is
a term that we in the Agile world use to describe things in the code that perhaps
aren't engineered as well as they could (should) be. It can refer to many things,
like areas in the code that we should probably refactor to make them more readable,
poorly performing code, obsolete or clunky architecture, encapsulation abstraction,
or other class problems, or the like. It's debt because we know about it, we "owe"
it to be done, but are focusing on other things instead.&lt;br&gt;
&lt;br&gt;
Technical debt is the avoidance of doing work that we would otherwise do in the course
of doing our best practices in engineering. It's a fact of life that most every Agile
team has to deal with, in my experience. I find that there are various means of "dealing
with" technical debt, some of which I will discuss below as a matter of practicality.
However, I see it really as a symptom of a deeper problem. The team isn't finding
good engineering as valuable as completing stories could be the underlying problem.&lt;br&gt;
&lt;br&gt;
Teams can be pressured to deliver more than they should (this is common), and as such,
could be focused on delivering the current sprint's stories rather than fixing things
they find that are not as they should be. The team also could be creating more technical
debt for itself by not focusing on good engineering in the first place. When junior
people design things, sometimes they don't address all the points of performance and
code maintainability. Trade-offs are made that can end up causing lots of rework later.&lt;br&gt;
&lt;br&gt;
The concept of Agile software development, is heavily based on refactoring. Sometimes
I find that teams use refactoring with a little "r" when they should be Refactoring.
They make small internal changes, but are reluctant to change overall design, even
when it is truly warranted. When we add a new feature, sometimes the design needs
to change to accommodate it. THIS IS EXPECTED behavior in an Agile development process.
Yet, time after time I hear developers say "well, I don't want to change all that &lt;i&gt;NOW&lt;/i&gt;..."
when that's really exactly what they should be doing. The concept of iterative development
should be allowing us to ship software at the end of every cycle, and we really can't
consider the software shippable if it has these poor designs still left over from
earlier days.&lt;br&gt;
&lt;br&gt;
Refactoring the design shouldn't be catastrophic though. But, there is always some
impact that is almost always fundamentally left out when planning. Imagine we have
an apple, and we need to add some cherries to it in this sprint. We might just smash
the cherries on the outside of it, and call it good. But that would leave us a lumpy
ugly mess... Rather, we might take another approach, and put the apple and the cherries
all in a blender, and pour the mix into a new shape mold and freeze it. The new shape
will be smooth and round, yet it will encompass the new features of having both apple
and cherry flavors. It's a dumb example, but you get the idea. Refactoring can take
many forms.&lt;br&gt;
&lt;br&gt;
Handling Technical Debt&lt;br&gt;
Now, I have been on a few Agile teams and I am a realist. Technical debt is most certainly
here to stay. We just aren't in an ideal world, and we can't always take the time
we really need to make sure that the iteration's deliverable is as pristine as it
should be. So, now how can we handle this debt in a practical way?&lt;br&gt;
&lt;br&gt;
Here are some ways I have seen teams deal with Technical Debt:&lt;br&gt;
&lt;ol&gt;
&lt;li&gt;
Ignore it. 
&lt;ol&gt;
&lt;li&gt;
This don't work so good, in my opinion, but yes I have actually seen it done. It works,
so we'll use it as-is.&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;
TODO it. 
&lt;ol&gt;
&lt;li&gt;
//TODO in the code is a flag that there is something more that needs attention. Also,
//FIXFIX and //BUGBUG are others I have seen. Some of the tools give us mechanisms
to flag these as work items, but in my practical experience this is just about the
same as #1. Nobody ever gets back to these things to fix them. They just lose visibility
and get buried. Not very effective in my book.&lt;br&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;
Backlog it. 
&lt;ol&gt;
&lt;li&gt;
Create a backlog item called Technical Debt. Each instance where something needs attention
is recorded as a task for this story. They can be estimated, and prioritized. Backlog
items have visibility, so they don't get lost. Here is the problem - Technical debt
now CAN be prioritized. And, it usually is - right to the bottom of the list. This
really doesn't solve the issue either, unless you have a product owner who is savvy
enough to know that good engineering means happier customers, developer, and management
in the long run.&lt;br&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;
Bug it. 
&lt;ol&gt;
&lt;li&gt;
Log a bug for each Technical Debt item discovered. This is probably the most effective
means I have yet seen for the actual reduction or elimination of technical debt. In
reality, I think this is the most appropriate. The new story requires changes that
just haven't been made. It's not really "done" until this is taken care of. Ongoing
maintenance of code should have an appropriate stakeholder with a voice in the Product
Owner's scope of attention.&lt;br&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;
Job-Jar it. 
&lt;ol&gt;
&lt;li&gt;
Put it into the bucket of things that need to be done but aren't on either the sprint
or product backlogs. I think this is marginally effective, because nobody should technically
ever have time to get to this stuff, they really should be pulling things off the
product backlog onto the sprint backlog. But, I thought I'd mention this concept since
someone brought it up.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
Are there other ways to deal with Technical Debt? What ways have you had success?
Please leave me a comment and let me know.&lt;br&gt;
&lt;img width="0" height="0" src="http://bitsnwidgets.com/aggbug.ashx?id=29c86aac-c875-4e21-b676-cb8b6bcacd01" /&gt;</description>
      <comments>http://bitsnwidgets.com/CommentView,guid,29c86aac-c875-4e21-b676-cb8b6bcacd01.aspx</comments>
      <category>bugs</category>
      <category>scrum</category>
    </item>
    <item>
      <trackback:ping>http://bitsnwidgets.com/Trackback.aspx?guid=dcbf4850-1b54-436d-aa4c-a71403fcfa0c</trackback:ping>
      <pingback:server>http://bitsnwidgets.com/pingback.aspx</pingback:server>
      <pingback:target>http://bitsnwidgets.com/PermaLink,guid,dcbf4850-1b54-436d-aa4c-a71403fcfa0c.aspx</pingback:target>
      <dc:creator>John Boal</dc:creator>
      <wfw:comment>http://bitsnwidgets.com/CommentView,guid,dcbf4850-1b54-436d-aa4c-a71403fcfa0c.aspx</wfw:comment>
      <wfw:commentRss>http://bitsnwidgets.com/SyndicationService.asmx/GetEntryCommentsRss?guid=dcbf4850-1b54-436d-aa4c-a71403fcfa0c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">How do you handle bugs? There are many
ways organizations handle bugs in software. I have what I think is a very workable
approach, see if you agree.<br /><br />
The environment: The team is a dozen software developers and testers (total) and the
project is run as a Scrum project. Iterations are 3 weeks.<br /><br />
Scenario 1:<br />
QA is testing the build, and there is a bug discovered. The date/time field data that's
entered in local time is stored in UTC, but the data comes back as UTC (not local)
when retrieved.<br /><br /><ol><li>
QA logs a bug. Priority 2 Severity 2</li><li>
Bug is assigned to the Product Owner for the team.</li><li>
PO looks at the bug, and makes the call that the currently signed-off stories are
more important than this bug.</li><li>
The bug is estimated in story points by the team as 2 points.<br /></li><li>
The bug is put on the product backlog, prioritized along with the other bugs and stories.</li><li>
The team can't "ship" the sprint's release with this bug outstanding, but the PO knows
that they aren't planning a release for another two sprints anyway.</li></ol>
Scenario 2:<br />
QA is testing the build and discovers that if a name is entered that is longer than
50 characters, the site crashes with an unhandled exception.<br /><br /><p></p><ol><li>
QA logs a bug, Priority 1 Severity 1</li><li>
Bug is assigned to the Product Owner for the team.</li><li>
PO knows that this bug is serious enough to warrant being fixed right away.</li><li>
PO meets with the team, and the bug is estimated at 5 story points.</li><li>
The team's velocity last sprint was 80, and they have committed to 78 points for this
sprint. The team left only 2 points "spare" and didn't allocate time for bug fixes.<br /></li><li>
PO suggests that the bug be fixed this sprint, but the team does not feel they will
have time enough to do that along with the other stories.</li><li>
PO removes the lowest priority story from the sprint backlog, and replaces it with
the bug instead.</li><li>
The story goes back on the product backlog as the top story in priority.</li></ol>
There are also other permutations that may work in different organizations:<br /><ol><li>
Abort the sprint, and replan a new sprint including the bug fix.</li><li>
Allocate some time and time-box it just like a spike. The team may not be interested
in working overtime, but try to negotiate it anyway. Most teams will want to fix bugs
like this even if it means they work a few extra hours. Buy pizza.</li></ol>
The current team I am on doesn't follow these guidelines, and they insist that every
single bug be fixed for every sprint, or the story can't be accepted as done. While
I think this is a lofty goal, in my experience it just isn't practical. Maybe it's
my old school days at Microsoft where "done" meant it was "code complete" but not
"bug free." I think that Scrum gives us the ability to continue the current sprint
and continue to develop the features as committed, and delay bug fixes until the next
sprint. The only time when this doesn't work is the case where this sprint's story
delivery is scheduled to be the release. And even in that case, most organizations
allow a small window for last-minute fixes which could be used to take care of the
bug.<br /><br />
If the developers are doing TDD, they won't be writing bugs in the first place...
I see more than a handful of bugs per sprint at a clear process smell. In that case,
the process should be evaluated to see why the bugs are being created in the first
place. Is it unclear story descriptions? or more likely, is it a lack of testing in
the functional, integration, and acceptance areas? Any way it goes, bugs seem to be
a symptom, not the actual problem. Every bug I have written myself was due to a lack
of a test for that area. Find a bug, write a test! Please make sure that your developers
realize that when they estimate fixing bugs, that it should always include writing
tests that first fail when the bug is present, then pass when the bug is corrected.
Bugs should not be able to be resolved without at least a unit test to illustrate
that they are really fixed.<br /><br />
Handling bugs can complicate a project manager's life, so if they are cropping up,
be sure to address the root cause, and all will be happier.<br /><img width="0" height="0" src="http://bitsnwidgets.com/aggbug.ashx?id=dcbf4850-1b54-436d-aa4c-a71403fcfa0c" /></body>
      <title>Bugs on an Agile Team</title>
      <guid isPermaLink="false">http://bitsnwidgets.com/PermaLink,guid,dcbf4850-1b54-436d-aa4c-a71403fcfa0c.aspx</guid>
      <link>http://BitsNWidgets.com/2008/05/07/BugsOnAnAgileTeam.aspx</link>
      <pubDate>Wed, 07 May 2008 02:02:00 GMT</pubDate>
      <description>How do you handle bugs? There are many ways organizations handle bugs in software. I have what I think is a very workable approach, see if you agree.&lt;br&gt;
&lt;br&gt;
The environment: The team is a dozen software developers and testers (total) and the
project is run as a Scrum project. Iterations are 3 weeks.&lt;br&gt;
&lt;br&gt;
Scenario 1:&lt;br&gt;
QA is testing the build, and there is a bug discovered. The date/time field data that's
entered in local time is stored in UTC, but the data comes back as UTC (not local)
when retrieved.&lt;br&gt;
&lt;br&gt;
&lt;ol&gt;
&lt;li&gt;
QA logs a bug. Priority 2 Severity 2&lt;/li&gt;
&lt;li&gt;
Bug is assigned to the Product Owner for the team.&lt;/li&gt;
&lt;li&gt;
PO looks at the bug, and makes the call that the currently signed-off stories are
more important than this bug.&lt;/li&gt;
&lt;li&gt;
The bug is estimated in story points by the team as 2 points.&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
The bug is put on the product backlog, prioritized along with the other bugs and stories.&lt;/li&gt;
&lt;li&gt;
The team can't "ship" the sprint's release with this bug outstanding, but the PO knows
that they aren't planning a release for another two sprints anyway.&lt;/li&gt;
&lt;/ol&gt;
Scenario 2:&lt;br&gt;
QA is testing the build and discovers that if a name is entered that is longer than
50 characters, the site crashes with an unhandled exception.&lt;br&gt;
&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
QA logs a bug, Priority 1 Severity 1&lt;/li&gt;
&lt;li&gt;
Bug is assigned to the Product Owner for the team.&lt;/li&gt;
&lt;li&gt;
PO knows that this bug is serious enough to warrant being fixed right away.&lt;/li&gt;
&lt;li&gt;
PO meets with the team, and the bug is estimated at 5 story points.&lt;/li&gt;
&lt;li&gt;
The team's velocity last sprint was 80, and they have committed to 78 points for this
sprint. The team left only 2 points "spare" and didn't allocate time for bug fixes.&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
PO suggests that the bug be fixed this sprint, but the team does not feel they will
have time enough to do that along with the other stories.&lt;/li&gt;
&lt;li&gt;
PO removes the lowest priority story from the sprint backlog, and replaces it with
the bug instead.&lt;/li&gt;
&lt;li&gt;
The story goes back on the product backlog as the top story in priority.&lt;/li&gt;
&lt;/ol&gt;
There are also other permutations that may work in different organizations:&lt;br&gt;
&lt;ol&gt;
&lt;li&gt;
Abort the sprint, and replan a new sprint including the bug fix.&lt;/li&gt;
&lt;li&gt;
Allocate some time and time-box it just like a spike. The team may not be interested
in working overtime, but try to negotiate it anyway. Most teams will want to fix bugs
like this even if it means they work a few extra hours. Buy pizza.&lt;/li&gt;
&lt;/ol&gt;
The current team I am on doesn't follow these guidelines, and they insist that every
single bug be fixed for every sprint, or the story can't be accepted as done. While
I think this is a lofty goal, in my experience it just isn't practical. Maybe it's
my old school days at Microsoft where "done" meant it was "code complete" but not
"bug free." I think that Scrum gives us the ability to continue the current sprint
and continue to develop the features as committed, and delay bug fixes until the next
sprint. The only time when this doesn't work is the case where this sprint's story
delivery is scheduled to be the release. And even in that case, most organizations
allow a small window for last-minute fixes which could be used to take care of the
bug.&lt;br&gt;
&lt;br&gt;
If the developers are doing TDD, they won't be writing bugs in the first place...
I see more than a handful of bugs per sprint at a clear process smell. In that case,
the process should be evaluated to see why the bugs are being created in the first
place. Is it unclear story descriptions? or more likely, is it a lack of testing in
the functional, integration, and acceptance areas? Any way it goes, bugs seem to be
a symptom, not the actual problem. Every bug I have written myself was due to a lack
of a test for that area. Find a bug, write a test! Please make sure that your developers
realize that when they estimate fixing bugs, that it should always include writing
tests that first fail when the bug is present, then pass when the bug is corrected.
Bugs should not be able to be resolved without at least a unit test to illustrate
that they are really fixed.&lt;br&gt;
&lt;br&gt;
Handling bugs can complicate a project manager's life, so if they are cropping up,
be sure to address the root cause, and all will be happier.&lt;br&gt;
&lt;img width="0" height="0" src="http://bitsnwidgets.com/aggbug.ashx?id=dcbf4850-1b54-436d-aa4c-a71403fcfa0c" /&gt;</description>
      <comments>http://bitsnwidgets.com/CommentView,guid,dcbf4850-1b54-436d-aa4c-a71403fcfa0c.aspx</comments>
      <category>scrum</category>
      <category>bugs</category>
    </item>
  </channel>
</rss>