<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.5" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Bit Motif</title>
	<link>http://www.bitmotif.com</link>
	<description>A Zero Here, A One There</description>
	<pubDate>Mon, 25 Aug 2008 11:58:39 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.5</generator>
	<language>en</language>
			<item>
		<title>Enough With The POJOs!</title>
		<link>http://www.bitmotif.com/development/enough-with-the-pojos/</link>
		<comments>http://www.bitmotif.com/development/enough-with-the-pojos/#comments</comments>
		<pubDate>Sun, 17 Aug 2008 12:31:49 +0000</pubDate>
		<dc:creator>pjberry</dc:creator>
		
		<category>development</category>

		<guid isPermaLink="false">http://www.bitmotif.com/development/enough-with-the-pojos/</guid>
		<description><![CDATA[In the last year I&#8217;ve heard too much about POJOs.  It has died down some, but I still hear it too much.  Basically, I am sick of people saying POJO when they mean DTO.  
The notion of a framework that works with your existing objects is great.  And, if it actually [...]]]></description>
			<content:encoded><![CDATA[<p>In the last year I&#8217;ve heard too much about POJOs.  It has died down some, but I still hear it too much.  Basically, I am sick of people saying POJO when they mean DTO.  </p>
<p>The notion of a framework that works with your existing objects is great.  And, if it actually does work with your existing objects, that&#8217;s even better.</p>
<p>But, when everything in my system&#8211;through ignorance and/or framework&#8211;has become a DTO, it kind of pisses me off.</p>
<p>I mean, why is there a setter there?  Can the object change state during it&#8217;s lifetime?  If so, why is there a setter?  Why not some other name that doesn&#8217;t have to do with implementation?  If not, why the hell is it there?  Why is that getter there?  Do we need to return that value?  If so, why?  Is somebody asking the object for something rather than telling it what to do?  If not, why the hell is it there?  </p>
<p>What I&#8217;ve heard a lot of is:  &#8220;Just new up a POJO, and the FlarbleMeister framework will do the rest.  It is freaking awesome.&#8221;  Because of ignorance, framework, and ignorance of the framework, I have to deal with code from the database to the UI with nary a real object.  You know, the stuff that can make code easy to work with, the stuff that helps explain the system and allow others (developers working on the code years from now) to intuit what is supposed to happen.</p>
<p>So, please think about it:  Is this a real object or a glorified DTO?  If it is a DTO, does it belong at this layer in the system?  Does it make sense to have it at all?  And, please, stop calling it a POJO.
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitmotif.com/development/enough-with-the-pojos/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Forgotten Value Of Unit Tests</title>
		<link>http://www.bitmotif.com/development/the-forgotten-value-of-unit-tests/</link>
		<comments>http://www.bitmotif.com/development/the-forgotten-value-of-unit-tests/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 13:57:48 +0000</pubDate>
		<dc:creator>pjberry</dc:creator>
		
		<category>development</category>

		<guid isPermaLink="false">http://www.bitmotif.com/development/the-forgotten-value-of-unit-tests/</guid>
		<description><![CDATA[The other day, my team was asking if we needed to have unit tests for our data structure classes that had only getters and setters.  We were thinking more in terms of Test First Development/Test Driven Design.  I was uncomfortable saying &#8220;no&#8221;, but I couldn&#8217;t say why.  Most IDEs will generate these, [...]]]></description>
			<content:encoded><![CDATA[<p>The other day, my team was asking if we needed to have unit tests for our data structure classes that had only getters and setters.  We were thinking more in terms of Test First Development/Test Driven Design.  I was uncomfortable saying &#8220;no&#8221;, but I couldn&#8217;t say why.  Most IDEs will generate these, so you don&#8217;t you shouldn&#8217;t have to worry about doing something wrong.  The practical side of me was fighting with the Test First side of me.</p>
<p>I could see why one wouldn&#8217;t want to have tests for said classes.  They suck to write, and are supposedly so simple you have high confidence that they work correctly.  Still, it bugged me.  Then, a teammate pointed out something.  In these cases, the value of the unit test isn&#8217;t necessarily the design aspect. It is for future users.  The test is a set of expectations for the data structure class, a set of expectations that all other classes it interacts with will have.</p>
<p>If you don&#8217;t have a test, when you make a change, you aren&#8217;t going to have confidence that everything is working as it should.  With a test, you will know what the expectations are if you need to make a change.  And, if you make a change to the data structure class without regard for the test, the existing test should give you some feedback, and a little more confidence.</p>
<p>In this case, I think the value is for future changes.  It isn&#8217;t nearly as cool as having a test drive your design (which it still can), but it is just as important.  </p>
<p><em>As to why we have all these, data structure classes and what I think of it, that&#8217;s another post&#8230;</em>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitmotif.com/development/the-forgotten-value-of-unit-tests/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A Time To Stub, A Time To Mock</title>
		<link>http://www.bitmotif.com/development/a-time-to-stub-a-time-to-mock/</link>
		<comments>http://www.bitmotif.com/development/a-time-to-stub-a-time-to-mock/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 16:18:06 +0000</pubDate>
		<dc:creator>pjberry</dc:creator>
		
		<category>development</category>

		<guid isPermaLink="false">http://www.bitmotif.com/uncategorized/a-time-to-stub-a-time-to-mock/</guid>
		<description><![CDATA[Often, there&#8217;s an implication that everything being unit tested is on an equal footing.  That isn&#8217;t the case.  I think within unit testing  there is a spectrum.  On one end you may have a simple object on the  other end you may have a more complex object composed of several [...]]]></description>
			<content:encoded><![CDATA[<p>Often, there&#8217;s an implication that everything being unit tested is on an equal footing.  That isn&#8217;t the case.  I think within unit testing  there is a spectrum.  On one end you may have a simple object on the  other end you may have a more complex object composed of several other objects.   For the simple object, state-based testing is easy and understandable. For the composed object, behavior-based testing becomes preferable.</p>
<p>Expanding on this, I&#8217;ve noticed that when I am just starting  development, there are no mocks or stubs.  As I progress, there are  instances where I am using some stubs in tests.  And when I almost have functionality, I am using mocks when testing.  I use stubs at a  &#8220;lower&#8221; level and mocks at a &#8220;higher&#8221; level.</p>
<p>I think that this makes sense.  Once I&#8217;ve got my base set of objects,  I just want to make certain that they talk to each other in the  appropriate manner.  I trust that the individual objects know what to do.  At that higher level, it&#8217;s the interaction I want to test. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitmotif.com/development/a-time-to-stub-a-time-to-mock/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Visual Inspection of Code</title>
		<link>http://www.bitmotif.com/development/visual-inspection-of-code/</link>
		<comments>http://www.bitmotif.com/development/visual-inspection-of-code/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 13:05:09 +0000</pubDate>
		<dc:creator>pjberry</dc:creator>
		
		<category>development</category>

		<guid isPermaLink="false">http://www.bitmotif.com/development/visual-inspection-of-code/</guid>
		<description><![CDATA[We can glean a lot of information about code from visual cues like number of lines in the file, the size of the blocks of text, number of blocks, and the consistency and amount of indentation.

Bigger files &#8212; typically bad
Bigger blocks of text &#8212; typically bad
Lots of blocks of text &#8212; typically bad
Lots of indentation [...]]]></description>
			<content:encoded><![CDATA[<p>We can glean a lot of information about code from visual cues like number of lines in the file, the size of the blocks of text, number of blocks, and the consistency and amount of indentation.</p>
<ul>
<li>Bigger files &#8212; typically bad</li>
<li>Bigger blocks of text &#8212; typically bad</li>
<li>Lots of blocks of text &#8212; typically bad</li>
<li>Lots of indentation &#8212; typically bad</li>
<li>Inconsistent indentation &#8212; typically bad</li>
</ul>
<p>Now, I don&#8217;t think that if any of the above are present, it is a metaphysical certainty that code is bad.  And, just because some code does not have any of the above, I don&#8217;t think it means it must be good. </p>
<p>I do think they are good predictors.  In my experience, the vast majority of the time if I see something that has all of the issues listed above, it is going to be difficult to work with.  Conversely, if it is going to be easy to work with, it will typically have none of the aforementioned issues. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitmotif.com/development/visual-inspection-of-code/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Taken Out Of Context</title>
		<link>http://www.bitmotif.com/development/taken-out-of-context/</link>
		<comments>http://www.bitmotif.com/development/taken-out-of-context/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 12:53:46 +0000</pubDate>
		<dc:creator>pjberry</dc:creator>
		
		<category>development</category>

		<guid isPermaLink="false">http://www.bitmotif.com/uncategorized/taken-out-of-context/</guid>
		<description><![CDATA[The other day I across some funky stuff in some code we inherited.  It worked, but it wasn&#8217;t the cleanest or clearest way of doing things.  I thought, &#8220;Well, I should probably refactor this.&#8221;  The funkiness was at a high enough level that no unit test was going to explain what was [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I across some funky stuff in some code we inherited.  It worked, but it wasn&#8217;t the cleanest or clearest way of doing things.  I thought, &#8220;Well, I should probably refactor this.&#8221;  The funkiness was at a high enough level that no unit test was going to explain what was going on.  So, I went to the appropriate acceptance tests.  </p>
<p>I figured I&#8217;d have enough information to know what was going on and to verify my changes didn&#8217;t break anything.  The tests did provide some documentation, but it was really about the mechanics of what we were doing.  I knew that I could make changes, but still felt a little uncomfortable.  For me to be really comfortable making the change, I needed some context&#8212;the &#8220;why&#8221;.    </p>
<p>I know others had a few of these uncomfortable moments with the code.  A number of times we might have wanted to make a high level change, but because we didn&#8217;t know the &#8220;why&#8221;, we didn&#8217;t have the necessary confidence to do it.</p>
<p>This got me thinking about some aspects of the BDD-type stuff that I like.  One of them is the whole &#8220;As a..&#8221;, &#8220;I want to..&#8221;, &#8220;So I that&#8230;&#8221; preamble for story frameworks (see <a href="http://rspec.info/">RSpec</a> or <a href="http://jbehave.org/documentation/the-story-framework/">JBehave</a> for examples).  With some documentation about the roles, the actions, and the outcomes, you have that necessary context when you come back to the code several years later.  </p>
<p>This context is absolutely needed at the acceptance test (story) level.  At that level, it ceases to be about the units, and is about the whole.  When we start making changes at that level, we need to know the &#8220;why&#8221;.  Otherwise, our software just ain&#8217;t gonna be soft.
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitmotif.com/development/taken-out-of-context/feed/</wfw:commentRss>
		</item>
		<item>
		<title>From Customer-Approved Software To Customer-Written Software</title>
		<link>http://www.bitmotif.com/agile/from-customer-approved-software-to-customer-written-software/</link>
		<comments>http://www.bitmotif.com/agile/from-customer-approved-software-to-customer-written-software/#comments</comments>
		<pubDate>Mon, 28 Jan 2008 13:42:50 +0000</pubDate>
		<dc:creator>pjberry</dc:creator>
		
		<category>agile</category>

		<guid isPermaLink="false">http://www.bitmotif.com/uncategorized/from-customer-approved-software-to-customer-written-software/</guid>
		<description><![CDATA[When we talk about customers with respect to an agile methodology, we often talk about people who have the final say in what is going to be produced and when.  
Customers make decisions based on feedback from sources such as the current application, the tests for the parts of the application that are currently [...]]]></description>
			<content:encoded><![CDATA[<p>When we talk about customers with respect to an agile methodology, we often talk about people who have the final say in what is going to be produced and when.  </p>
<p>Customers make decisions based on feedback from sources such as the current application, the tests for the parts of the application that are currently under development, their future needs, and what the development team says they can do in an iteration.  The end result should be customer-approved software.</p>
<p>The implementation of the system outlined above may vary, but they key features remain.  And, I think too often there is an implication that there is a distinct wall between producer (development team) and consumer (customer).  The development team makes the stuff and the customer must approve it.</p>
<p>Contrast this with another approach to creating customer-approved software: have the customer write the software. Supposing the customers are savvy enough and/or have the right tools, if they write the software, it would be customer approved, too.</p>
<p>I actually worked at a place where this was the case.  The first release of the product was written in a scripting language by industrial engineers that knew the domain.  And, you know what?  It worked.  It did what they needed it to do at the time.</p>
<p>Notice I said &#8220;at the time&#8221;.  As time went on, keeping the software &#8220;soft&#8221; proved to be difficult.  Maintainability, extensibility, and testability went out the door.  I don&#8217;t blame the people that wrote it.  That kind of stuff is really part of the software development trade.  In fact, I believe that if some sharp developers had been involved earlier, there would have been few issues.</p>
<p>What if the customer is not savvy enough?  Provided we are always striving to improve our software and development process, I think eventually they will be.  The longer we work with a customer, the more likely we will be creating tools for the customer to write some of the software themselves.  </p>
<p>I am seeing hints of this at my current employer.  On one of our projects we&#8217;ve reached the point where we have DSL for describing and testing our system that is used by developers, testers, and business analysts.  We have super-tight iterations, with very few defects.  If we are going to take a next step, it seems that step would be to use the DSL to create production code.  It&#8217;s the next logical step.
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitmotif.com/agile/from-customer-approved-software-to-customer-written-software/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Shut the Hell Up!</title>
		<link>http://www.bitmotif.com/development/shut-the-hell-up/</link>
		<comments>http://www.bitmotif.com/development/shut-the-hell-up/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 13:01:06 +0000</pubDate>
		<dc:creator>pjberry</dc:creator>
		
		<category>development</category>

		<guid isPermaLink="false">http://www.bitmotif.com/development/shut-the-hell-up/</guid>
		<description><![CDATA[In the past month or so I&#8217;ve been working on a code base that&#8217;s been around the block a few times.  Some of the code was inherited from other projects where it was already ancient.  Other code is just code that has been in the project forever.
I&#8217;ve noticed that this code&#8212;production code and [...]]]></description>
			<content:encoded><![CDATA[<p>In the past month or so I&#8217;ve been working on a code base that&#8217;s been around the block a few times.  Some of the code was inherited from other projects where it was already ancient.  Other code is just code that has been in the project forever.</p>
<p>I&#8217;ve noticed that this code&#8212;production code and tests&#8212;is very chatty.  I mean, I can&#8217;t run a test without <em>War and Peace</em> being written to the console.  My guess is that this due poor tests. </p>
<p>When the code is unfamiliar, we have a few options to get our heads around it.  The first and best option (in my opinion) is to run the code&#8217;s extensive and well-maintained test suites.  The tests will serve as documentation for the code in its current state.  </p>
<p>What if we don&#8217;t have those tests?  I guess we start reading through the code, using the debugger, and output statements to the console.  See where I am going with this?</p>
<p>Writing output/debug statements is fine for short-lived (think minutes) testing/code archeology.  Once you answer your particular question, <strong>get rid of it</strong>.  If you need that output to test something, put it in a test. If the output is something you&#8217;d like to have when the production code is running, log it.  Either way, those <strong>output statements should not get committed</strong>.</p>
<p>Why?  Software is complex.  We try to reduce the complexity.  Tests and production code that spew line after line to the console when it is not needed add complexity.  Consider a test that prints a stack trace from an exception to the console, yet passes.  How are you going to feel about the test? The production code?
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitmotif.com/development/shut-the-hell-up/feed/</wfw:commentRss>
		</item>
		<item>
		<title>It Takes At Least A Generation</title>
		<link>http://www.bitmotif.com/agile/it-takes-at-least-a-generation/</link>
		<comments>http://www.bitmotif.com/agile/it-takes-at-least-a-generation/#comments</comments>
		<pubDate>Tue, 16 Oct 2007 11:17:06 +0000</pubDate>
		<dc:creator>pjberry</dc:creator>
		
		<category>agile</category>

		<guid isPermaLink="false">http://www.bitmotif.com/agile/it-takes-at-least-a-generation/</guid>
		<description><![CDATA[Why is agile still such a foreign concept?  Many software shop are familiar with the name, and some even claim to be agile.  Yet, very few are.  
In many places that claim to be agile, rather than collaboration amongst stake holders, there&#8217;s conflict.  The process is more valuable than working, deliverable [...]]]></description>
			<content:encoded><![CDATA[<p>Why is agile still such a foreign concept?  Many software shop are familiar with the name, and some even claim to be agile.  Yet, very few are.  </p>
<p>In many places that claim to be agile, rather than collaboration amongst stake holders, there&#8217;s conflict.  The process is more valuable than working, deliverable software.</p>
<blockquote><p>
&#8220;We can&#8217;t release your well-tested, customer-requested, money-saving feature now.&#8221;<br />
&#8220;Why?&#8221;<br />
&#8220;Because we only release 3.2 times a year, per our process.  This release would violate the process.&#8221;<br />
&#8220;Process? 3.2?&#8221;<br />
&#8220;Yes.  The process keeps us agile and the .2 helps gives us some buffer.&#8221;<br />
&#8220;I don&#8217;t even know what that means!&#8221;
</p></blockquote>
<p>When does this silliness end?  My guess is about one developer-to-leader generation.  The developers that experienced an agile working environment will want to take it with them as they start leading others.  But, that&#8217;s only when you&#8217;d start seeing <em>some</em> changes.
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitmotif.com/agile/it-takes-at-least-a-generation/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Killing An Agile Team</title>
		<link>http://www.bitmotif.com/agile/killing-an-agile-team/</link>
		<comments>http://www.bitmotif.com/agile/killing-an-agile-team/#comments</comments>
		<pubDate>Tue, 09 Oct 2007 11:12:46 +0000</pubDate>
		<dc:creator>pjberry</dc:creator>
		
		<category>agile</category>

		<guid isPermaLink="false">http://www.bitmotif.com/uncategorized/killing-an-agile-team/</guid>
		<description><![CDATA[Have an agile team?  Tired of all those high-quality deliverables and happy customers?  Well, there are few simple things you can do to make certain that team will &#8220;fall in line&#8221;.
No-Location
Separate the team.  Make certain the customers, developers, testers, and other stakeholders are not anywhere near each other.  As face-to-face communication [...]]]></description>
			<content:encoded><![CDATA[<p>Have an agile team?  Tired of all those high-quality deliverables and happy customers?  Well, there are few simple things you can do to make certain that team will &#8220;fall in line&#8221;.</p>
<p><strong>No-Location</strong><br />
Separate the team.  Make certain the customers, developers, testers, and other stakeholders are not anywhere near each other.  As face-to-face communication is the most effective method of communicating complex issues, it must be eliminated.    </p>
<p><strong>Lengthen The Feedback Loop</strong><br />
By making certain that decisions cannot be made &#8220;just in time&#8221;, you can prevent real agility.  Purposeless delays in deploying to production, ridiculously long testing cycles, and a barely working deployment infrastructure can be a real help here. </p>
<p><strong>Time-Consuming Metrics</strong><br />
A superb way to waste time and kill morale is to forcing agile teams to <strong><em>prove</em></strong> they are agile by collecting metrics that do not really mean anything to the end customer.  Extra morale-killing can be achieved by having people track every single task they work on to the hour.</p>
<p><strong>External Organization</strong><br />
Don&#8217;t let the team self-organize.  Hold back key pieces of information that could allow a team to self-organize, such as organizational changes or time line changes.  Be sure to conduct daily meetings that really are just people &#8220;reporting up&#8221;.  </p>
<p><strong>Emasculation</strong><br />
If at all possible, make certain whoever has the ultimate say in what will happen (e.g., the project manager) is completely out of the loop with the day-to-day work.  But, don&#8217;t let the team have any say in how things are going to get done.  Prevent individual and team decision making.</p>
<p>These are just a few simple suggestions.  Be creative.  You can break their will if you put enough effort into it!
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitmotif.com/agile/killing-an-agile-team/feed/</wfw:commentRss>
		</item>
		<item>
		<title>If Your Code Is Hard To Test, It Probably Sucks</title>
		<link>http://www.bitmotif.com/development/if-your-code-is-hard-to-test-it-probably-sucks/</link>
		<comments>http://www.bitmotif.com/development/if-your-code-is-hard-to-test-it-probably-sucks/#comments</comments>
		<pubDate>Sat, 02 Jun 2007 12:24:12 +0000</pubDate>
		<dc:creator>pjberry</dc:creator>
		
		<category>development</category>

		<guid isPermaLink="false">http://www.bitmotif.com/uncategorized/if-your-code-is-hard-to-test-it-probably-sucks/</guid>
		<description><![CDATA[Recently, I had the displeasure of adding new functionality to some very old code.
Since I develop test-first, I immediately went to the unit tests for this code and started looking around.  I planned on modifying the existing tests, adding new tests, and refactoring along the way.  This way, I would ensure the new [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I had the displeasure of adding new functionality to some very old code.</p>
<p>Since I develop test-first, I immediately went to the unit tests for this code and started looking around.  I planned on modifying the existing tests, adding new tests, and refactoring along the way.  This way, I would ensure the new functionality was working properly, and did not have any negative effects on the existing code.</p>
<p>I soon discovered that a number of the classes did not have any tests.  Annoyed and disappointed, I set out to get some tests around the areas I was going to be touching.  I decided I would go back and add more tests for other parts of the code if I had time.</p>
<p>As I worked, I was amazed at how difficult it was to get tests around the code.  Strange dependencies, improper abstractions, and duplicated code hampered my attempts to test.  Eventually, I made the tests I needed and left the code a little better than when I got there.</p>
<p>This experience reminded me of an old adage: </p>
<blockquote><p><strong>Listen to your tests.</strong></p></blockquote>
<p>Your tests can tell you a lot about your code, and not just in the &#8220;this method returns the input multiplied by 2&#8243; kind of way.  By examining what you must do to create a test you can learn much about the code&#8217;s dependencies, abstractions, and interactions.</p>
<p>Do you have to make all sorts of funky objects to test something?  Is it impossible to test something &#8220;straight on&#8221;?  Do the assertions you make in one class&#8217;s tests look pretty much like the assertions in another class&#8217;s tests?  Do your tests take a long time to run?  If you answer yes to these questions, your code is probably hard to test.    </p>
<p>All of which leads me to another old adage:</p>
<blockquote><p><strong>If your code is hard to test, it probably sucks.</strong></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.bitmotif.com/development/if-your-code-is-hard-to-test-it-probably-sucks/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
