<?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>Coderholic &#187; software design</title>
	<atom:link href="http://www.coderholic.com/category/software-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.coderholic.com</link>
	<description>Addicted to Development</description>
	<lastBuildDate>Tue, 31 Aug 2010 09:19:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>The Acronym School of Software Design</title>
		<link>http://www.coderholic.com/the-acronym-school-of-software-design/</link>
		<comments>http://www.coderholic.com/the-acronym-school-of-software-design/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 11:33:52 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[software design]]></category>
		<category><![CDATA[dry]]></category>
		<category><![CDATA[kiss]]></category>
		<category><![CDATA[yagni]]></category>

		<guid isPermaLink="false">http://www.coderholic.com/?p=566</guid>
		<description><![CDATA[Well written software should be easy to use, test, maintain and understand. There are lots of software design principles and best practices that aim to help us achieve these goals (see Uncle Bob for great coverage of Object Oriented principles). While all of these design principles and practices will certainly help you to write better [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.coderholic.com/wp-content/uploads/180635570_345676005c_o.jpg" style="float: right; margin-left: 10px;"/><br />
Well written software should be easy to use, test, maintain and understand. There are lots of software design principles and best practices that aim to help us achieve these goals (see <a href="http://www.butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod">Uncle Bob</a> for great coverage of Object Oriented principles).</p>
<p>While all of these design principles and practices will certainly help you to write better software there are lots of them to learn, and lots to remember. When you actually sit down to write some code and you&#8217;re under pressure to get it finished as soon as possible some of the best practices can go by the way side. </p>
<p>Here are three acronyms that are simple to remember and will almost certainly help you to write better software. So whether you&#8217;re writing a small function, a class or a large module spare a few minutes to think about these acronyms and hopefully your software should end up being easier to use, test, maintain and understand as a result:</p>
<h3>DRY</h3>
<p>Don&#8217;t Repeat Yourself &#8211; The <a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself">DRY principle</a> is about not repeating any logic or knowledge throughout your software, it&#8217;s about removing duplication. At the very least this means that repeated code should be moved into a function or class &#8211; <b>no copy and paste</b>! Taken to an extreme it means even things like a database schema and database interaction code should be generated from a single source. In their book <a href="http://www.amazon.co.uk/gp/product/020161622X?ie=UTF8&#038;tag=dowlingmeuk-21&#038;linkCode=as2&#038;camp=1634&#038;creative=19450&#038;creativeASIN=020161622X">The Pragmatic Programmer</a><img src="http://www.assoc-amazon.co.uk/e/ir?t=dowlingmeuk-21&#038;l=as2&#038;o=2&#038;a=020161622X" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />Andy Hunt and Dave Thomas recommend the use of code generators to help remove all duplication from a project.</p>
<p>With no duplication software becomes much easier to maintain. If something needs to be changed you know you&#8217;ll only need to change it in once place. It should also be easier to understand and test as a result.</p>
<h3>KISS</h3>
<p>Keep It Simple and Stupid &#8211; The <a href="http://en.wikipedia.org/wiki/KISS_principle">KISS principle</a> is about avoiding needless complexity, and keeping things as simple as possible. This doesn&#8217;t apply just to code, it can also apply to features. As 37Signals say in their free book <a href="http://gettingreal.37signals.com/toc.php">Getting Real</a>, which contains lots of suggestions for maximizing simplicity:</p>
<blockquote><p>&#8220;The key is to restate any hard problem that requires a lot of software into a simple problem that requires much less. You may not be solving exactly the same problem but that&#8217;s alright. Solving 80% of the original problem for 20% of the effort is a major win. The original problem is almost never so bad that it&#8217;s worth five times the effort to solve it.&#8221;</p></blockquote>
<p>Almost by definition simpler software should be easier to use, test, maintain and understand &#8211; so don&#8217;t forget KISS!</p>
<h3>YAGNI</h3>
<p>You Ain&#8217;t Gonna Need It &#8211; <a href="http://en.wikipedia.org/wiki/You_ain%27t_gonna_need_it">YAGNI</a> is about not writing code now for things that you think you might need in the future, because the chances are that you won&#8217;t, and even if you do the software you write now will likely be less than ideal for what you actually need in the future.</p>
<p>As a Software Engineer it&#8217;s easy to get carried away and think about generalized solutions to the problem you&#8217;re working on, or other ways in which your code can be used. This isn&#8217;t necessarily bad, and thinking about these issues can certainly aid maintainability and software reuse. The point of YAGNI though is that we shouldn&#8217;t actually write the code until we need it. Otherwise we have to maintain code that may never be used, and the time could better spent on other things.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderholic.com/the-acronym-school-of-software-design/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SQL Antipatterns</title>
		<link>http://www.coderholic.com/sql-antipatterns/</link>
		<comments>http://www.coderholic.com/sql-antipatterns/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 17:43:56 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[software design]]></category>

		<guid isPermaLink="false">http://www.coderholic.com/?p=283</guid>
		<description><![CDATA[I was really pleased to come across the &#8220;SQL Antipatterns Stirke Back&#8221; presentation recently, which discusses common mistakes with SQL database design. It gives some really good advice on how best to design databases to avoid these issues. I&#8217;ve certainly made some of the mistakes mentioned, and I&#8217;m sure I&#8217;ll be referring back to this [...]]]></description>
			<content:encoded><![CDATA[<p>I was really pleased to come across the &#8220;SQL Antipatterns Stirke Back&#8221; presentation recently, which discusses common mistakes with SQL database design. It gives some really good advice on how best to design databases to avoid these issues. I&#8217;ve certainly made some of the mistakes mentioned, and I&#8217;m sure I&#8217;ll be referring back to this presentation again and again!</p>
<div style="width:425px;text-align:left" id="__ss_1319559"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/billkarwin/sql-antipatterns-strike-back" title="Sql Antipatterns Strike Back">Sql Antipatterns Strike Back</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=sqlantipatternsstrikeback-090421005946-phpapp01&#038;stripped_title=sql-antipatterns-strike-back" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=sqlantipatternsstrikeback-090421005946-phpapp01&#038;stripped_title=sql-antipatterns-strike-back" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">documents</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/billkarwin">Bill Karwin</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.coderholic.com/sql-antipatterns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Ultimate Scalability Presentation</title>
		<link>http://www.coderholic.com/the-ultimate-scalability-presentation/</link>
		<comments>http://www.coderholic.com/the-ultimate-scalability-presentation/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 19:37:54 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[software design]]></category>
		<category><![CDATA[web dev]]></category>

		<guid isPermaLink="false">http://www.coderholic.com/?p=231</guid>
		<description><![CDATA[At work we&#8217;re experiencing some fairly rapid growth, and our single production server is starting the feel the strain. I&#8217;ve been doing a lot of investigation into how we can scale the site, and thankfully there is lots of information out there. The &#8220;Do you Scale&#8221; presentation I saw at PHP London a couple of [...]]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://www.mendeley.com">work</a> we&#8217;re experiencing some fairly rapid growth, and our single production server is starting the feel the strain. I&#8217;ve been doing a lot of investigation into how we can scale the site, and thankfully there is lots of information out there. </p>
<p>The &#8220;<a href="http://www.coderholic.com/php-london/">Do you  Scale</a>&#8221; presentation I saw at PHP London a couple of months ago gave a good high level overview of scalability issues, and included some useful techniques to help you scale.</p>
<p>I think I&#8217;ve found the ultimate scalability presentation though: &#8220;Real World Web: Performance &#038; Scalability&#8221;. The 189 slides contained within this presentation cover almost everything I&#8217;ve read elsewhere, and it&#8217;s packed full of practice advice!</p>
<p><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=rwwmysql2008-1216304757388368-8&#038;stripped_title=real-world-web-performance-scalability" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=rwwmysql2008-1216304757388368-8&#038;stripped_title=real-world-web-performance-scalability" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderholic.com/the-ultimate-scalability-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Design Patterns</title>
		<link>http://www.coderholic.com/design-patterns/</link>
		<comments>http://www.coderholic.com/design-patterns/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 15:46:41 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[books]]></category>
		<category><![CDATA[software design]]></category>

		<guid isPermaLink="false">http://www.dowling.me.uk/blog/design-patterns/</guid>
		<description><![CDATA[Knowledge of design patterns can be really useful when designing software. If you don&#8217;t know what a design pattern is, then from Wikipedia: In software engineering, a design pattern is a general reusable solution to a commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly [...]]]></description>
			<content:encoded><![CDATA[<p>Knowledge of design patterns can be really useful when designing software. If you don&#8217;t know what a design pattern is, then from Wikipedia:</p>
<blockquote><p>In software engineering, a <strong class="selflink">design pattern</strong> is a general reusable solution to a commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into <span class="mw-redirect">code</span>. It is a description or template for how to solve a problem that can be used in many different situations.</p></blockquote>
<p>Design patterns were made famous by the book <a href="http://www.amazon.co.uk/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.co.uk%2FDesign-patterns-elements-reusable-object-oriented%2Fdp%2F0201633612%3Fie%3DUTF8%26qid%3D1203867430%26sr%3D11-1&amp;tag=dowlingmeuk-21&amp;linkCode=ur2&amp;camp=1634&amp;creative=6738">Design patterns: elements of reusable object-oriented software</a><img src="http://www.assoc-amazon.co.uk/e/ir?t=dowlingmeuk-21&amp;l=ur2&amp;o=2" style="border: medium none  ! important; margin: 0px ! important" border="0" height="1" width="1" />, written by the Gang of Four, or GoF. Although I&#8217;ve never got round to reading it, it is fairly high on my to-read list!</p>
<p><a href="http://www.amazon.co.uk/gp/product/0201633612?ie=UTF8&amp;tag=dowlingmeuk-21&amp;linkCode=as2&amp;camp=1634&amp;creative=6738&amp;creativeASIN=0201633612"><img src="http://www.dowling.me.uk/blog/wp-content/uploads/2008/02/gof.jpg" alt="Design Patterns by the GOF" border="0" /></a><img src="http://www.assoc-amazon.co.uk/e/ir?t=dowlingmeuk-21&amp;l=as2&amp;o=2&amp;a=0201633612" style="border: medium none  ! important; margin: 0px ! important" border="0" height="1" width="1" /></p>
<p>Despite not having read the GoF book I&#8217;m still aware of some of the more common design patterns, such as the singleton, factory, and iterator patterns. Such is the nature of patterns that I&#8217;ve probably used some without even being aware,after all they are just common reusable software designs.</p>
<p>I recently came across an excellent <a href="http://sourcemaking.com/design_patterns">website</a> that gives details on all of the GoF design patterns, including descriptions, UML diagrams, and sample code in Java, C++ and PHP! The site isn&#8217;t good enough to displace the GoF book from my to-read list, but I&#8217;m sure I&#8217;ll find it useful for the mean time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderholic.com/design-patterns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
