<?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 - Design</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, 27 Aug 2008 13:00:11 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=05c94d1b-afb9-4461-b1cd-bc0abb6889c7</trackback:ping>
      <pingback:server>http://bitsnwidgets.com/pingback.aspx</pingback:server>
      <pingback:target>http://bitsnwidgets.com/PermaLink,guid,05c94d1b-afb9-4461-b1cd-bc0abb6889c7.aspx</pingback:target>
      <dc:creator>John Boal</dc:creator>
      <wfw:comment>http://bitsnwidgets.com/CommentView,guid,05c94d1b-afb9-4461-b1cd-bc0abb6889c7.aspx</wfw:comment>
      <wfw:commentRss>http://bitsnwidgets.com/SyndicationService.asmx/GetEntryCommentsRss?guid=05c94d1b-afb9-4461-b1cd-bc0abb6889c7</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">"As a user, I can select my preferences
and save them<br /><p></p><img src="http://bitsnwidgets.com/content/binary/DoTheRightThing.jpg" border="0" /><br /><br />
so that the program will do the right thing."<br /><br />
ahem...<br /><br />
Sometimes we in the software business need to realize that the people using our software
are not experts in the field. We must become experts at understanding the requirements
and implications of the domain for which we write software, but we can not expect
our users to do the same. We must be able to make some decisions with the software
so that it does the "right thing" for the user. In today's world, software users have
little time to fiddle with settings or options. They just need the software to do
a job for them and do it the right way the first time. Our impatient "get it now"
society of users definitely has this attitude. If our software doesn't do what they
need it to do, they will more likely abandon it for something else before attempting
to fiddle with settings, parameters, options, and preferences.<br /><br />
Our product owners need to be keenly aware of this attitude, and get the balance right
with the features and stories that the customer base needs. While this is not an easy
task, it is a very important one. As our software gets smarter and smarter, it should
be more aware of what the user is attempting to accomplish, and it should make some
decisions and assumptions based on the mode of intent. In addition (here is the key
point missing from most software today) we need to *tell* the user what the mode is,
and what the assumptions are. If we got it wrong, or the user wanted something else,
then s/he has the opportunity to change the operating mode before the software attempts
to do the "wrong" thing.<br /><br />
A "mode" could be an entire slate of preference settings, that come packaged out of
the box with the defaults set for performing a specific task, or scenario. This entire
slate could be modified if the user is advanced and cares to fiddle with them, but
having the entire slate saved as a set, that could be chosen as a very simple selection.
Then, always make it clear what the system operating mode is, and how to change it.<br /><br />
Keep it simple by being smart about what the user is trying to accomplish and make
some decisions. Select the most appropriate mode, then - most importantly - communicate
those decisions to the user, and let them know what the software is assuming about
the task they are trying to perform. Give the user choices about how to control the
software, and change its mode, but keep the goal to be helping the user stay more
focused on performing the task at hand.<br /><img width="0" height="0" src="http://bitsnwidgets.com/aggbug.ashx?id=05c94d1b-afb9-4461-b1cd-bc0abb6889c7" /></body>
      <title>Preferences User Story</title>
      <guid isPermaLink="false">http://bitsnwidgets.com/PermaLink,guid,05c94d1b-afb9-4461-b1cd-bc0abb6889c7.aspx</guid>
      <link>http://BitsNWidgets.com/2008/08/27/PreferencesUserStory.aspx</link>
      <pubDate>Wed, 27 Aug 2008 13:00:11 GMT</pubDate>
      <description>"As a user, I can select my preferences and save them&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img src="http://bitsnwidgets.com/content/binary/DoTheRightThing.jpg" border="0"&gt;
&lt;br&gt;
&lt;br&gt;
so that the program will do the right thing."&lt;br&gt;
&lt;br&gt;
ahem...&lt;br&gt;
&lt;br&gt;
Sometimes we in the software business need to realize that the people using our software
are not experts in the field. We must become experts at understanding the requirements
and implications of the domain for which we write software, but we can not expect
our users to do the same. We must be able to make some decisions with the software
so that it does the "right thing" for the user. In today's world, software users have
little time to fiddle with settings or options. They just need the software to do
a job for them and do it the right way the first time. Our impatient "get it now"
society of users definitely has this attitude. If our software doesn't do what they
need it to do, they will more likely abandon it for something else before attempting
to fiddle with settings, parameters, options, and preferences.&lt;br&gt;
&lt;br&gt;
Our product owners need to be keenly aware of this attitude, and get the balance right
with the features and stories that the customer base needs. While this is not an easy
task, it is a very important one. As our software gets smarter and smarter, it should
be more aware of what the user is attempting to accomplish, and it should make some
decisions and assumptions based on the mode of intent. In addition (here is the key
point missing from most software today) we need to *tell* the user what the mode is,
and what the assumptions are. If we got it wrong, or the user wanted something else,
then s/he has the opportunity to change the operating mode before the software attempts
to do the "wrong" thing.&lt;br&gt;
&lt;br&gt;
A "mode" could be an entire slate of preference settings, that come packaged out of
the box with the defaults set for performing a specific task, or scenario. This entire
slate could be modified if the user is advanced and cares to fiddle with them, but
having the entire slate saved as a set, that could be chosen as a very simple selection.
Then, always make it clear what the system operating mode is, and how to change it.&lt;br&gt;
&lt;br&gt;
Keep it simple by being smart about what the user is trying to accomplish and make
some decisions. Select the most appropriate mode, then - most importantly - communicate
those decisions to the user, and let them know what the software is assuming about
the task they are trying to perform. Give the user choices about how to control the
software, and change its mode, but keep the goal to be helping the user stay more
focused on performing the task at hand.&lt;br&gt;
&lt;img width="0" height="0" src="http://bitsnwidgets.com/aggbug.ashx?id=05c94d1b-afb9-4461-b1cd-bc0abb6889c7" /&gt;</description>
      <comments>http://bitsnwidgets.com/CommentView,guid,05c94d1b-afb9-4461-b1cd-bc0abb6889c7.aspx</comments>
      <category>Design</category>
      <category>User Interface</category>
    </item>
    <item>
      <trackback:ping>http://bitsnwidgets.com/Trackback.aspx?guid=fc1e21d2-66c8-4e1c-a0aa-02c558c40e4a</trackback:ping>
      <pingback:server>http://bitsnwidgets.com/pingback.aspx</pingback:server>
      <pingback:target>http://bitsnwidgets.com/PermaLink,guid,fc1e21d2-66c8-4e1c-a0aa-02c558c40e4a.aspx</pingback:target>
      <dc:creator>John Boal</dc:creator>
      <wfw:comment>http://bitsnwidgets.com/CommentView,guid,fc1e21d2-66c8-4e1c-a0aa-02c558c40e4a.aspx</wfw:comment>
      <wfw:commentRss>http://bitsnwidgets.com/SyndicationService.asmx/GetEntryCommentsRss?guid=fc1e21d2-66c8-4e1c-a0aa-02c558c40e4a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I have heard a lot of discussion lately
about the use of the "#region" directive in C#. There are various camps (some religious)
on this topic, so let me throw in my twopence.<br /><br /><p></p>
Many developers like to use regions to collapse sections of the code because it makes
it easier for them to focus on a particular section. That's nice.<br /><br />
If there is that much code in a single file (which *should* be only ONE class), then
there is probably too much code in that class. Class design should be focused on one
specific thing. According to good OO principles, classes should be autonomous, and
do one specific thing. Classes should be intelligent groupings for functionality relating
to a specific, focused purpose. The use of the region to group code bits together
in a file is a good indication that there is probably too much code.<br /><br />
Simplicity is a highly desired principle in software development. It's the simplest
thing that gets the kudos, not the most complicated. Developers who try to write complex,
convoluted code so that they can look good to their peers are really doing the opposite.
Added complexity is very costly, in time for other people to understand it, debug
it, and maintain it.<br /><br />
Here are some ways to determine some code smells in this area.<br /><br /><ul><li>
Do methods have more than 25 lines of code? If so they are probably too big - this
is a code smell.</li><li>
Do classes have more than 12 methods? If so, this may be another code smell. Classes
that have lots of methods probably are doing too much. See if they can be broken out
into more focused pieces.</li><li>
Are there more than 3 constructors? Sometimes a lot of constructors could be a code
smell indicating using a class for different things in different places.</li></ul>
Anyone else have any metrics that they use? Please respond with comments below.<br /><br />
These kinds of things should be completely discussed on a team, and woven into working
agreements, and coding standards guidelines. Teams that work within these are the
most productive because everyone is on the same page and playing by the same set of
rules. If your team doesn't have a guideline for these kinds of things, I would encourage
you to write one up today and get input from your team.<img width="0" height="0" src="http://bitsnwidgets.com/aggbug.ashx?id=fc1e21d2-66c8-4e1c-a0aa-02c558c40e4a" /></body>
      <title>#region is a Code Smell.</title>
      <guid isPermaLink="false">http://bitsnwidgets.com/PermaLink,guid,fc1e21d2-66c8-4e1c-a0aa-02c558c40e4a.aspx</guid>
      <link>http://BitsNWidgets.com/2008/07/18/regionIsACodeSmell.aspx</link>
      <pubDate>Fri, 18 Jul 2008 16:19:59 GMT</pubDate>
      <description>I have heard a lot of discussion lately about the use of the "#region" directive in C#. There are various camps (some religious) on this topic, so let me throw in my twopence.&lt;br&gt;
&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
Many developers like to use regions to collapse sections of the code because it makes
it easier for them to focus on a particular section. That's nice.&lt;br&gt;
&lt;br&gt;
If there is that much code in a single file (which *should* be only ONE class), then
there is probably too much code in that class. Class design should be focused on one
specific thing. According to good OO principles, classes should be autonomous, and
do one specific thing. Classes should be intelligent groupings for functionality relating
to a specific, focused purpose. The use of the region to group code bits together
in a file is a good indication that there is probably too much code.&lt;br&gt;
&lt;br&gt;
Simplicity is a highly desired principle in software development. It's the simplest
thing that gets the kudos, not the most complicated. Developers who try to write complex,
convoluted code so that they can look good to their peers are really doing the opposite.
Added complexity is very costly, in time for other people to understand it, debug
it, and maintain it.&lt;br&gt;
&lt;br&gt;
Here are some ways to determine some code smells in this area.&lt;br&gt;
&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
Do methods have more than 25 lines of code? If so they are probably too big - this
is a code smell.&lt;/li&gt;
&lt;li&gt;
Do classes have more than 12 methods? If so, this may be another code smell. Classes
that have lots of methods probably are doing too much. See if they can be broken out
into more focused pieces.&lt;/li&gt;
&lt;li&gt;
Are there more than 3 constructors? Sometimes a lot of constructors could be a code
smell indicating using a class for different things in different places.&lt;/li&gt;
&lt;/ul&gt;
Anyone else have any metrics that they use? Please respond with comments below.&lt;br&gt;
&lt;br&gt;
These kinds of things should be completely discussed on a team, and woven into working
agreements, and coding standards guidelines. Teams that work within these are the
most productive because everyone is on the same page and playing by the same set of
rules. If your team doesn't have a guideline for these kinds of things, I would encourage
you to write one up today and get input from your team.&lt;img width="0" height="0" src="http://bitsnwidgets.com/aggbug.ashx?id=fc1e21d2-66c8-4e1c-a0aa-02c558c40e4a" /&gt;</description>
      <comments>http://bitsnwidgets.com/CommentView,guid,fc1e21d2-66c8-4e1c-a0aa-02c558c40e4a.aspx</comments>
      <category>Design</category>
      <category>Team</category>
    </item>
    <item>
      <trackback:ping>http://bitsnwidgets.com/Trackback.aspx?guid=0ac802c9-4ed9-4269-b607-6c0a35963d92</trackback:ping>
      <pingback:server>http://bitsnwidgets.com/pingback.aspx</pingback:server>
      <pingback:target>http://bitsnwidgets.com/PermaLink,guid,0ac802c9-4ed9-4269-b607-6c0a35963d92.aspx</pingback:target>
      <dc:creator>John Boal</dc:creator>
      <wfw:comment>http://bitsnwidgets.com/CommentView,guid,0ac802c9-4ed9-4269-b607-6c0a35963d92.aspx</wfw:comment>
      <wfw:commentRss>http://bitsnwidgets.com/SyndicationService.asmx/GetEntryCommentsRss?guid=0ac802c9-4ed9-4269-b607-6c0a35963d92</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">First off, let's get something out in the
open. As an agile software developer, I have a couple of strongly held beliefs.<br /><br />
Design isn't optional.<br />
Architecture isn't optional.<br /><br />
DTSTTCPW doesn't mean "no up-front design, we'll just wing it." [That's DO THE SIMPLEST
THING THAT COULD POSSIBLY WORK for all y'all who don't speak acronym.]<br /><br />
When we fail to refactor our new code into the existing code, we get odd bits of functionality
that stick out from the existing design like warts on a bowling ball. The idea behind
refactoring is that we intend to make sure that we *always* have a round ball. Refactor
doesn't mean just change a signature or two. Sometimes it means we need to go back
to the design white board and figure out what we need to have *now* given the current
functionality requirements. We almost always need to change the existing code's design
and integrate the new code so that all appears cohesive, each and every time we write
new code. Iterative development doesn't intend that we make a bunch of atomic changes
and just glue them together.<br /><br />
Code design at each check-in should be able to withstand scrutiny of any outside reviewer,
and the design should be up to engineering standards. We still call it software *engineering*
not software *art*. Many teams I see are missing this point completely and are producing
code that should have been re-designed rather than just having new code glued on.
With each check-in we should be able to look over our classes and functionality and
say, "yes, this is something that would withstand the scrutiny of a code reviewer
not on my team, without excuses or explanation." If I have to couch it and say "well,
we will be fixing that in the next release" or "we'll revise that in a later check-in"
this is technical debt, and therefore a process smell. Developers that are stuck in
this rut need to be re-trained that they aren't "done" with the code until it is production-quality.<br /><br />
If there are warts on your software, this is a very loud process smell, and it should
be addressed directly. Make sure that the team understands that this is not an acceptable
way to work on an agile team. Re-design in refactoring and adding new code should
be common, and discussed among the team after the stand-up meeting daily. "Yesterday
I re-factored and re-engineered the Widget classes, so that they now have the new
functionality we need in story XXX and are more streamlined to what we are delivering
this sprint. Today I plan to have a half-hour review with the team so everyone is
on the same page with the re-design. Then I will incorporate all the feedback, get
the final code reviewed and coordinate the check-in with the rest of the team to make
sure I don't block anyone. I'll make the appointment for the review with everyone
after the stand-up."<br /><br />
Make sure that everyone understands that the code as a whole should be well-designed
at each commit point, and that this isn't optional. It needs to be expected behavior
on the team. This also means that estimation of effort may (and should) go up, for
complexity on tasks in both story points and hours. We don't look at revising design
as "additional work" just like we don't view unit tests as "additional work." These
things are both fundamental parts of the iterative process. Without adhering to these
principles, iterative development just won't work, and we might as well go back to
waterfall.<br /><br />
If your team has the process smell of needing to budget additional work for refactoring
the design, perhaps it's time to go to the team and discuss what Agile software development
really means, and that it doesn't mean lower-engineering quality software.<br /><p></p><img width="0" height="0" src="http://bitsnwidgets.com/aggbug.ashx?id=0ac802c9-4ed9-4269-b607-6c0a35963d92" /></body>
      <title>Agile Software Design, Refactoring, and Warts</title>
      <guid isPermaLink="false">http://bitsnwidgets.com/PermaLink,guid,0ac802c9-4ed9-4269-b607-6c0a35963d92.aspx</guid>
      <link>http://BitsNWidgets.com/2008/07/10/AgileSoftwareDesignRefactoringAndWarts.aspx</link>
      <pubDate>Thu, 10 Jul 2008 15:18:51 GMT</pubDate>
      <description>First off, let's get something out in the open. As an agile software developer, I have a couple of strongly held beliefs.&lt;br&gt;
&lt;br&gt;
Design isn't optional.&lt;br&gt;
Architecture isn't optional.&lt;br&gt;
&lt;br&gt;
DTSTTCPW doesn't mean "no up-front design, we'll just wing it." [That's DO THE SIMPLEST
THING THAT COULD POSSIBLY WORK for all y'all who don't speak acronym.]&lt;br&gt;
&lt;br&gt;
When we fail to refactor our new code into the existing code, we get odd bits of functionality
that stick out from the existing design like warts on a bowling ball. The idea behind
refactoring is that we intend to make sure that we *always* have a round ball. Refactor
doesn't mean just change a signature or two. Sometimes it means we need to go back
to the design white board and figure out what we need to have *now* given the current
functionality requirements. We almost always need to change the existing code's design
and integrate the new code so that all appears cohesive, each and every time we write
new code. Iterative development doesn't intend that we make a bunch of atomic changes
and just glue them together.&lt;br&gt;
&lt;br&gt;
Code design at each check-in should be able to withstand scrutiny of any outside reviewer,
and the design should be up to engineering standards. We still call it software *engineering*
not software *art*. Many teams I see are missing this point completely and are producing
code that should have been re-designed rather than just having new code glued on.
With each check-in we should be able to look over our classes and functionality and
say, "yes, this is something that would withstand the scrutiny of a code reviewer
not on my team, without excuses or explanation." If I have to couch it and say "well,
we will be fixing that in the next release" or "we'll revise that in a later check-in"
this is technical debt, and therefore a process smell. Developers that are stuck in
this rut need to be re-trained that they aren't "done" with the code until it is production-quality.&lt;br&gt;
&lt;br&gt;
If there are warts on your software, this is a very loud process smell, and it should
be addressed directly. Make sure that the team understands that this is not an acceptable
way to work on an agile team. Re-design in refactoring and adding new code should
be common, and discussed among the team after the stand-up meeting daily. "Yesterday
I re-factored and re-engineered the Widget classes, so that they now have the new
functionality we need in story XXX and are more streamlined to what we are delivering
this sprint. Today I plan to have a half-hour review with the team so everyone is
on the same page with the re-design. Then I will incorporate all the feedback, get
the final code reviewed and coordinate the check-in with the rest of the team to make
sure I don't block anyone. I'll make the appointment for the review with everyone
after the stand-up."&lt;br&gt;
&lt;br&gt;
Make sure that everyone understands that the code as a whole should be well-designed
at each commit point, and that this isn't optional. It needs to be expected behavior
on the team. This also means that estimation of effort may (and should) go up, for
complexity on tasks in both story points and hours. We don't look at revising design
as "additional work" just like we don't view unit tests as "additional work." These
things are both fundamental parts of the iterative process. Without adhering to these
principles, iterative development just won't work, and we might as well go back to
waterfall.&lt;br&gt;
&lt;br&gt;
If your team has the process smell of needing to budget additional work for refactoring
the design, perhaps it's time to go to the team and discuss what Agile software development
really means, and that it doesn't mean lower-engineering quality software.&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://bitsnwidgets.com/aggbug.ashx?id=0ac802c9-4ed9-4269-b607-6c0a35963d92" /&gt;</description>
      <comments>http://bitsnwidgets.com/CommentView,guid,0ac802c9-4ed9-4269-b607-6c0a35963d92.aspx</comments>
      <category>Design</category>
      <category>Refactoring</category>
      <category>Team</category>
    </item>
  </channel>
</rss>