<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Endlessly Curious &#187; Design</title>
	<atom:link href="http://www.endlesslycurious.com/category/programming/design-programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.endlesslycurious.com</link>
	<description>by Daniel Brown</description>
	<lastBuildDate>Thu, 03 Jun 2010 16:53:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Beware the Golden Hammer!</title>
		<link>http://www.endlesslycurious.com/2009/03/19/beware-the-golden-hammer/</link>
		<comments>http://www.endlesslycurious.com/2009/03/19/beware-the-golden-hammer/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 09:00:48 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[anti-pattern]]></category>

		<guid isPermaLink="false">http://www.endlesslycurious.com/?p=1180</guid>
		<description><![CDATA[The &#8216;Golden Hammer&#8216; is a very common anti-pattern, which can be best summed up by the phrase &#8220;if all you have is a hammer, everything looks like a nail&#8220;.  This anti-pattern occurs when the perpetrator has typically learned a particularly powerful technique or design (the hammer),  which they then go on to apply blindly to [...]]]></description>
			<content:encoded><![CDATA[<p>The &#8216;<a title="Wikipedia" href="http://en.wikipedia.org/wiki/Golden_hammer">Golden Hammer</a>&#8216; is a very common <a title="Wikipedia" href="http://en.wikipedia.org/wiki/Anti-pattern#Software_design_anti-patterns">anti-pattern</a>, which can be best summed up by the phrase &#8220;<em>if all you have is a hammer, everything looks like a nail</em>&#8220;.  This anti-pattern occurs when the perpetrator has typically learned a particularly powerful technique or design (the hammer),  which they then go on to apply blindly to all problems (the nails) they encounter whether it is a suitable solution or not.</p>
<p>This can be especially evident amongst beginner programmers, who are learning new techniques almost constantly, but it only seems to become a dangerous anti-pattern if the individual becomes overly fixated on a particular technique.</p>
<p>Interestingly this anti-pattern can apply to more than just individuals, in my experience it can also apply to teams or even entire organisations.  One of the ways I have seen this manifest at a team or organisational level is with attempts to solve social problems with technology solutions.  This trait seems to be especially strong in software development organisations: perhaps because technology is their usual solution to problems.</p>
<p>Such social issues faced by development teams and organisations can include things like not breaking the build, lack of communication or lack of testing.  These problems really are not technology problems, they are social (people) problems, yet time and again I have witnessed technology solutions to these problems.  For example, more elaborate and sophisticated check-in systems being introduced in response to constantly broken builds, where a much simpler social solution such as peer pressure to not break the build would be much more effective.</p>
<p>Avoiding the Golden Hammer when programming is achievable with some self awarness and honesty: are you using your current technique for the right reasons?  However, identifying and interveening when a team or organisation is about to use the Golden Hammer is much more challenging as it can involve going against the solution favoured by the majority along with the polical implications that brings&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.endlesslycurious.com/2009/03/19/beware-the-golden-hammer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>You Aren&#8217;t Gonna Need It!</title>
		<link>http://www.endlesslycurious.com/2009/02/16/you-arent-gonna-need-it/</link>
		<comments>http://www.endlesslycurious.com/2009/02/16/you-arent-gonna-need-it/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 09:00:28 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[YAGNI]]></category>

		<guid isPermaLink="false">http://www.endlesslycurious.com/?p=1104</guid>
		<description><![CDATA[A very common trap to fall into while implementing a new system or feature is to add functionality to &#8216;future proof&#8217; your code for a use case that you imagine in may be required in the future.  The future for the purposes of this post is any time that is not in your current development [...]]]></description>
			<content:encoded><![CDATA[<p>A very common trap to fall into while implementing a new system or feature is to add functionality to &#8216;future proof&#8217; your code for a use case that you imagine in may be required in the future.  The future for the purposes of this post is any time that is not in your current development iteration.</p>
<p>This may seem harmless but consider that the future use cases you are imagining are not something you fully understand yet: as most of us will admit we are pretty bad at anticipating the future.  So how can we hope to implement future functionality successfully?  The most likely outcome is that whatever you implement now not be sufficient when you actually try to use it in the future.  This will mean more time will have to be invested in the future to <a title="Wikipedia" href="http://en.wikipedia.org/wiki/Code_refactoring">refactor</a> or replace the functionality with what is actually required.</p>
<p>Unless you also plan to implement a full set of tests for this new functionality then you are adding extra code to your program that will not be correct and will not stay correct.  This can also lead to really weird run time behavior if the flow of program execution goes into your new &#8216;future proof&#8217; functionality unexpectedly: which can be <em>very</em> hard to debug.  Adding functionality for future use without corresponding tests also means that as the rest of your program evolves the future functionality does not evolve with it, this means by the time you actually try to use it that it is most likely hopelessly out of sync with the rest of the code base.</p>
<p>The future functionality is also expanding the size of the source code of your program which leads to unnecessary <a title="Wikipedia" href="http://en.wikipedia.org/wiki/Code_bloat">code bloat</a>.  In some compiled languages (e.g. C++) code bloat will lead to increased memory usage and decreased program performance which is highly undesirable.</p>
<p>Another thing to consider from a business stand point is that you are spending time and money implementing future functionality when you are not being paid for it.  This is a strong indication to me that implementing future functionality makes little business sense.  As it means spending money now paying developers to implement functionality that you can&#8217;t sell right now.</p>
<p>There is a handy acronym for this: it is <a title="Wikipedia" href="http://en.wikipedia.org/wiki/You_Ain%27t_Gonna_Need_It">YAGNI</a> which stands for &#8216;You Aren&#8217;t Gonna Need It&#8217;.  The essence of this concept is to only implement the functionality you need right <em>now</em> and to implement in as simple and robust a fashion as possible.  As simple robust code (preferable with acompaning unit tests) is code that can be easily refactored in the future to meet future needs and that is cost effcient!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.endlesslycurious.com/2009/02/16/you-arent-gonna-need-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
