<?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>Beat Fluri&#039;s Blog &#187; clean code</title>
	<atom:link href="http://fluri.computerscience.ch/tag/clean-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://fluri.computerscience.ch</link>
	<description>Just for the sake of it...</description>
	<lastBuildDate>Sat, 10 Jul 2010 20:09:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Clean Code Developer</title>
		<link>http://fluri.computerscience.ch/2010/02/clean-code-developer-4/</link>
		<comments>http://fluri.computerscience.ch/2010/02/clean-code-developer-4/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 20:19:32 +0000</pubDate>
		<dc:creator>bfluri</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[clean code]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[hudson]]></category>
		<category><![CDATA[software craftmenship]]></category>

		<guid isPermaLink="false">http://fluri.computerscience.ch/?p=181</guid>
		<description><![CDATA[It took me quite some time to replace the Clean Code Developer bracelet; it took me way more time than the usual three weeks because 1) the principles are fundamental and 2) I didn&#8217;t have much opportunity to use them all. But, now, I think it&#8217;s definitely time to switch from the yellow to the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-131" title="ccd_banner" src="http://fluri.computerscience.ch/wp-content/uploads/2009/09/ccd_banner.png" alt="ccd_banner" width="185" height="46" />It took me quite some time to replace the <a href="http://www.clean-code-developer.de">Clean Code Developer</a> bracelet; it took me way more time than the usual three weeks because 1) the principles are fundamental and 2) I didn&#8217;t have much opportunity to use them all. But, now, I think it&#8217;s definitely time to switch from the <a href="http://www.clean-code-developer.de/wiki/CcdGelberGrad">yellow</a> to the <a href="http://www.clean-code-developer.de/wiki/CcdGruenerGrad">green</a> bracelet. The principles and practices of the green bracelet are:</p>
<ol>
<li>Open closed principle: open for extension, closed for change (<a href="http://www.amazon.com/Object-Oriented-Software-Construction-Book-CD-ROM/dp/0136291554/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1257362953&amp;sr=1-1">Object-Oriented Software Construction</a> by Bertrand Meyer)</li>
<li><a href="http://www.pragprog.com/articles/tell-dont-ask">Tell don&#8217;t ask</a></li>
<li><a href="http://www.cmcrossroads.com/bradapp/docs/demeter-intro.html">Law of Demeter</a>: Personally, I don&#8217;t think this principle can be used steadily nowadays. If you work with frameworks, you seldom have a chance to follow this principle striclty.</li>
<li>Continuous Integration: I recommend the <a href="http://martinfowler.com/articles/continuousIntegration.html">article</a> of <a href="http://www.martinfowler.com/">Martin Fowler</a> for a very good introduction and the <a href="http://www.se-radio.net/podcast/2009-04/episode-133-continuous-integration-chris-read">Podcast</a> fom <a href="http://www.se-radio.net/">se-radio.net</a> For our project, we use <a href="http://hudson.dev.java.net">Hudson</a> as the continuous integration server.</li>
<li>Static code analysis</li>
<li>Inversion of Control Container</li>
<li>Pass knowledge</li>
<li>Measure bugs</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://fluri.computerscience.ch/2010/02/clean-code-developer-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clean Code Developer</title>
		<link>http://fluri.computerscience.ch/2009/11/clean-code-developer-3/</link>
		<comments>http://fluri.computerscience.ch/2009/11/clean-code-developer-3/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 19:30:24 +0000</pubDate>
		<dc:creator>bfluri</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[clean code]]></category>
		<category><![CDATA[cobertura]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[jmockit]]></category>
		<category><![CDATA[mockito]]></category>
		<category><![CDATA[refactoring]]></category>
		<category><![CDATA[software craftmenship]]></category>

		<guid isPermaLink="false">http://fluri.computerscience.ch/?p=143</guid>
		<description><![CDATA[It&#8217;s time to replace the Clean Code Developer bracelet again. The next color, and grade respectively, is the yellow bracelet. Now, the principles become more interesting; The yellow bracelet principles are the foundation of clean object-oriented design. Although they are not that easy to fulfill every time, they should be followed as eagerly as possible. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-131" title="ccd_banner" src="http://fluri.computerscience.ch/wp-content/uploads/2009/09/ccd_banner.png" alt="ccd_banner" width="185" height="46" />It&#8217;s time to replace the <a href="http://www.clean-code-developer.de">Clean Code Developer</a> bracelet again. The next color, and grade respectively, is the <a href="http://www.clean-code-developer.de/wiki/CcdGelberGrad">yellow bracelet</a>. Now, the principles become more interesting; The yellow bracelet principles are the foundation of clean object-oriented design. Although they are not that easy to fulfill every time, they should be followed as eagerly as possible. The principles and practices are:</p>
<ol>
<li>Interface Segregation Principle: Clients should not be forced to depend upon interfaces that they do not use.</li>
<li>Dependency Inversion Principle: a) High level classes should not depend upon low level modules. Both should depend upon abstractions. b) Abstractions should not depend upon details. Details should depend upon abstractions.</li>
<li>Liskov Substitution Principle: a) subclasses have to fulfill the invariants of the superclass. Post-conditions of methods in the superclass have to be fulfilled by overriding methods in subclasses.</li>
<li>Principles of Least Astonishment: Avoid side-effects. Use, for instance, the command and query separation principle of Bertrand Meyer (<a href="http://www.amazon.com/Object-Oriented-Software-Construction-Book-CD-ROM/dp/0136291554/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1257362953&amp;sr=1-1">Object-Oriented Software Construction</a>).</li>
<li>Information Hiding Principle: Well, that&#8217;s not a principle, that&#8217;s an order <img src='http://fluri.computerscience.ch/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
<li>Complex Refactorings: See the <a href="http://www.amazon.com/Refactoring-Improving-Design-Existing-Code/dp/0201485672/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1257361863&amp;sr=8-1">Refactoring book by Martin Fowler</a>, his <a href="http://www.refactoring.com">Refactoring Web site</a>, or the <a href="http://www.amazon.com/Refactoring-Patterns-Joshua-Kerievsky/dp/0321213351/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1257361990&amp;sr=1-1">Refactoring to Patterns book by Joshua Kerievsky</a>.</li>
<li>Automated Unit Tests</li>
<li>Mockups: For Java I recommend <a href="https://jmockit.dev.java.net/">JMockit</a> or <a href="http://mockito.org/">mockito</a>.</li>
<li>Code Coverage: I recommend <a href="http://cobertura.sourceforge.net/">Cobertura</a> (free) or <a href="http://www.atlassian.com/software/clover/">Clover</a> (commercial) which both integrate nicely into <a href="http://hudson.dev.java.net">Hudson</a>.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://fluri.computerscience.ch/2009/11/clean-code-developer-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clean Code Developer</title>
		<link>http://fluri.computerscience.ch/2009/10/clean-code-developer-2/</link>
		<comments>http://fluri.computerscience.ch/2009/10/clean-code-developer-2/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 19:30:18 +0000</pubDate>
		<dc:creator>bfluri</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[clean code]]></category>
		<category><![CDATA[software craftmenship]]></category>

		<guid isPermaLink="false">http://fluri.computerscience.ch/?p=134</guid>
		<description><![CDATA[Today, I replaced the red Clean Code Developer bracelet the orange bracelet. To admit, I once had to switch the red bracelet from the right arm to the left because I was unable to fully make a root cause analysis: We, some friends and I, have a Linux server that is connected to a ZyWall2 [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-131" title="ccd_banner" src="http://fluri.computerscience.ch/wp-content/uploads/2009/09/ccd_banner.png" alt="ccd_banner" width="185" height="46" />Today, I replaced the <a href="http://www.clean-code-developer.de/wiki/CcdRoterGrad">red </a><a href="http://www.clean-code-developer.de/wiki/CcdArmband">Clean Code Developer bracelet</a> the <a href="http://www.clean-code-developer.de/wiki/CcdOrangerGrad">orange bracelet</a>. To admit, I once had to switch the red bracelet from the right arm to the left because I was unable to fully make a root cause analysis: We, some friends and I, have a Linux server that is connected to a <a href="http://www.zyxel.com/web/product_family_detail.php?PC1indexflag=20040908175941&amp;CategoryGroupNo=FF94F854-B6F1-47B7-BFB7-4660CF8649C8&amp;display=6244">ZyWall2 plus router</a>. The router itself is connect in bridge-mode to a DSL modem. That also means, the router sends DNS requests to the modem and gets the answers from the ISP. With that configuration we were able to <em>nslookup</em> domain names but failed using <em>telnet</em> or other network services; the resolution always failed with the message &#8220;temporary unavailable.&#8221; After two days of Internet research we gave up and hard-coded a public name-server address in the <code>ifcfg-eth0</code> file.</p>
<p>The new principles of the <a href="http://www.clean-code-developer.de/wiki/CcdOrangerGrad">orange bracelet</a> are:</p>
<ol>
<li>One level of abstraction per method</li>
<li>Single responsibility principle (<a href="http://www.objectmentor.com/resources/articles/srp.pdf">there should never be more than one reason to change a class</a>)</li>
<li>Separation of concerns (<a href="http://en.wikipedia.org/wiki/Separation_of_concerns">overlap of functionality between classes should be as little as possible</a>)</li>
<li>Coding conventions (<a href="http://checkstyle.sourceforge.net">Checkstyle</a> ftw!)</li>
<li>Use issue tracking</li>
<li>Create automated integration tests</li>
<li>Read, read, read</li>
<li>Review</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://fluri.computerscience.ch/2009/10/clean-code-developer-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clean Code Developer</title>
		<link>http://fluri.computerscience.ch/2009/09/clean-code-developer/</link>
		<comments>http://fluri.computerscience.ch/2009/09/clean-code-developer/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 11:55:10 +0000</pubDate>
		<dc:creator>bfluri</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[clean code]]></category>
		<category><![CDATA[software craftmenship]]></category>

		<guid isPermaLink="false">http://fluri.computerscience.ch/?p=107</guid>
		<description><![CDATA[
Yesterday, I received the Clean Code Developer bracelets. Clean Code Developer is an initiative of two German software engineers, Stefan Lieser and Ralf Westphal, to improve software quality in general and source code quality in particular. The foundation of this initiative is the book of our Uncle Bob (Robert C. Martin): &#8220;Clean Code.&#8221;
To raise the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.clean-code-developer.de"><img class="alignleft size-full wp-image-131" title="ccd_banner" src="http://fluri.computerscience.ch/wp-content/uploads/2009/09/ccd_banner.png" alt="ccd_banner" width="185" height="46" /></a></p>
<p>Yesterday, I received the <a href="http://www.clean-code-developer.de">Clean Code Developer</a> bracelets. Clean Code Developer is an initiative of two German software engineers, <a href="http://lieser-online.de/">Stefan Lieser</a> and <a href="http://www.ralfw.de/">Ralf Westphal</a>, to improve software quality in general and source code quality in particular. The foundation of this initiative is the book of our Uncle Bob (Robert C. Martin): <a href="http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1253358171&amp;sr=8-1">&#8220;Clean Code.&#8221;</a></p>
<p>To raise the awareness for developing clean code, Stefan and Ralf provide <a href="http://www.clean-code-developer.de/wiki/CcdGrade">bracelets in different colors</a>. In short, each color represents a particular level of clean code development experience and a certain set of principles to consider in your daily work. That means, you bear a bracelet for 21 days and try for applying the corresponding development principles. After the 21 days you switch the bracelet to the next color, <em>i.e.</em>, next level. If you have not been consistent in applying the principles over a day, you should bear the bracelet on the other arm the next day. That should motivate you to apply the principles even more.</p>
<p>Although some of the principles I already use are distributed over different bracelet colors, I started with first level: the <a href="http:///">red bracelet</a>. Its principles are:</p>
<ol>
<li><a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself">Don&#8217;t repeat yourself</a> (DRY); one of the <a href="http://www.pragprog.com/the-pragmatic-programmer/extracts/tips">pragmatic programmer tips</a></li>
<li><a href="http://en.wikipedia.org/wiki/KISS_principle">Keep it simple, stupid</a> (KISS)</li>
<li>Caution with optimizing code; or à la eXtreme programming: first do it, then do it right, then make it fast</li>
<li>Favor composition over inheritance</li>
<li><a href="http://www.informit.com/articles/article.aspx?p=1235624&amp;seqNum=6">Boy scout rule</a></li>
<li>Root cause analysis</li>
<li>Use a version control system</li>
<li>Simple refactorings: <a href="http://www.refactoring.com/catalog/renameMethod.html">rename</a> and <a href="http://www.refactoring.com/catalog/extractMethod.html">extract method</a></li>
<li>Reflect your work every day</li>
</ol>
<p>I encourage you in taking part in the Clean Code Developer initiative. Clean code reflects the passion of the software development craftsmanship. Happy clean coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://fluri.computerscience.ch/2009/09/clean-code-developer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
