<?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>Gerbrand on ICT &#187; coder</title>
	<atom:link href="http://www.gerbrand-ict.nl/tag/coder/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gerbrand-ict.nl</link>
	<description>Weblog on JEE and software-engineering</description>
	<lastBuildDate>Tue, 18 Oct 2011 14:10:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Develop with faster with smarter tools</title>
		<link>http://www.gerbrand-ict.nl/2010/02/develop-with-jrebel/</link>
		<comments>http://www.gerbrand-ict.nl/2010/02/develop-with-jrebel/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 23:23:58 +0000</pubDate>
		<dc:creator>gerbrand</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[coder]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.gerbrand-ict.nl/?p=401</guid>
		<description><![CDATA[I develop software for a living. This involves quite a lot of talking, coaching, attending meetings, drinking coffee, etc. but the actual work is done during programming &#8211; when the software is created. That programming involves repeated cycles of the following: modify or type some code, compile, deploy and then run the code and perform [...]]]></description>
			<content:encoded><![CDATA[<p>I develop software for a living. This involves quite a lot of talking, coaching, attending meetings, drinking coffee, etc. but the actual work is done during programming &#8211; when the software is created. That programming involves repeated cycles of the following: modify or type some code, compile, deploy and then run the code and perform some tests to see if it works. How cumbersome that process was ranged from:</p>
<ul>
<li>Hitting &#8216;Run&#8217; and waiting a few seconds,</li>
<li>to hitting &#8216;Run and deploy&#8217; in my IDE and waiting about 20-30 seconds,</li>
<li>to executing a ant script, restarting the application server and waiting 5 minutes</li>
<li>to compiling a class file, uploading the class and accompanied libraries using a cumbersome webinterface and then executing a PLSQL script to run that class, wasting in total time amount 15 minutes (<em>yes, that was a a very big and professional company)<br />
</em></li>
</ul>
<p>In my opinion, the programmer is productive when he either codes, or when he tests his codes. Any time spent on waiting or performing some troublesome actions like accessing a web interface is pure waste. In short the above time ranging from a few seconds to 15 minutes is <a href="http://www.oreillynet.com/onjava/blog/2006/03/dead_time_code_compile_wait_wa.html">dead time</a>.</p>
<p>Of course all that time wasted not only frustrates developers, it&#8217;ll cost quite some time and thus money. Now how can you limit that dead time, that is wasted by developers? One way is your have your developers write perfect code at once. Of course that&#8217;s not very realistic. Recently I found a very nice tool to limit that dead time, when you develop Java software: <a href="http://www.zeroturnaround.com/jrebe">JRebel</a>. What does that mean for you as java-developer:<br />
JRebel runs as a software agent within your virtual machine, that in turn runs your application server. What JRebel does, is taking over the class-loader.<br />
You can specify the output directories of your IDE (target/classes, /bin, etc.). Now whenever you make a change in your code, IDE&#8217;s like Eclipse can compile that code into a new class file in the output directory. JRebel will automatically detect the changed class file. Thus no waste! Since JRebel plugs into the VM, it&#8217;ll work with virtually any application server.</p>
<p><a href="http://www.zeroturnaround.com/blog"><img class="alignnone" title="JRebel Hotswap" src="http://www.zeroturnaround.com/wp-content/uploads/2009/11/hotswap.png" alt="" width="550" height="302" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gerbrand-ict.nl/2010/02/develop-with-jrebel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clean code</title>
		<link>http://www.gerbrand-ict.nl/2009/07/clean-code/</link>
		<comments>http://www.gerbrand-ict.nl/2009/07/clean-code/#comments</comments>
		<pubDate>Sat, 04 Jul 2009 22:20:45 +0000</pubDate>
		<dc:creator>gerbrand</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[coder]]></category>

		<guid isPermaLink="false">http://www.gerbrand-ict.nl/?p=303</guid>
		<description><![CDATA[Recently I read the book Clean Code by Robert C. Martin. I was very pleasently surprised by the book. The book was well written, for me it was a page-turner. The book starts with explaining why you (or the people you manage) should write clean code: writing good, well-written, consise - in short clean &#8211; code, is [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I read the book <a href="http://www.amazon.com/gp/product/B001GSTOAM?ie=UTF8&amp;tag=geonic-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B001GSTOAM">Clean Code</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=geonic-20&amp;l=as2&amp;o=1&amp;a=B001GSTOAM" border="0" alt="" width="1" height="1" /> by Robert C. Martin. I was very pleasently surprised by the book. The book was well written, for me it was a page-turner. The book starts with explaining why you (or the people you manage) should write clean code: writing good, well-written, consise - in short clean &#8211; code, is essential to agile software development. Writing clean code makes certain both yourself and any future developers can easily extend and maintain your software.</p>
<p style="text-align: center;"><a href="http://www.amazon.com/gp/product/B001GSTOAM?ie=UTF8&amp;tag=geonic-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B001GSTOAM"><img class="aligncenter" src="http://www.gerbrand-ict.nl/wp-content/uploads/2009/07/41Obj6pdGtL._SL160_.jpg" border="0" alt="" /></a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=geonic-20&amp;l=as2&amp;o=1&amp;a=B001GSTOAM" border="0" alt="" width="1" height="1" /></p>
<p>Every chapter goes on specific part of programming, amongst others: using meaning full names, how to write good, consise and easy-to-understand functions, writing good comments, writing good unit tests, and having a good class design. A lot of content I already knew or was at least aware of, either intuitively through experience or from other sources. However, that didn&#8217;t made reading it any less usuful, the book does very well on explaining why and offering good arguments, just to convince other people. The book also questions a lot of common practices, I did not think of before.<br />
<br/><br />
I&#8217;ll pick some chapters to explain more in detail the content. First chapter goes into importance of good naming. Amongst others, variable should have meaning full names, and one letter variables like <code>j</code> or <code>h</code> should be used only for simple loop iteration. Class names should correspond to domain words like <code>Customer</code>, <code>WikiPage </code>or <code>AddressParser</code>. Postfixes like <code>Info </code>(<code>AccountInfo</code>) or prefixes like I (<code>ICustomer</code>) just clutter up and don&#8217;t add anything. Same goes for prefixed variable names like <code>m_dsc </code>or <code>int_ordernum</code>. Function names should be verbs like <code>addAccount </code>or <code>deletePage</code>.<br />
Another chapter goes on a often mis-understood or underestimated subject: writing good comments. One point the auther made is to limit the amount of generated comments. IDE-generated comments containing lots of <code>@param, @return </code>tags, etc., just clutter up your code while not adding information: if you use clear names, you don&#8217;t need to explain each parameter. Worse, they increase the change that of introducing &#8216;lies&#8217;: comments that do not corrrespond with the code the&#8217;re commenting.</p>
<p>Allthough the title of the book suggests it&#8217;s about programming in general, the book is slightly targeted to Java-programming. All code-samples are Java code, and some times the book refers to Java standards (like the Bean standard). C# developers could benefit from the book as well, as well as developers in similar languages, allthough some code samples could be harder to understand. Programmers in languages like Haskell, XSLT, Lisp would benifit less of the book.<br />
<br/><br />
I could go on, but I&#8217;d just recommend you to read the book if you&#8217;re a programmer yourself or have to manage programmers directly!</p>
<hr/>
<table width="100%">
<tr>
<td align="left">
<iframe src="http://rcm.amazon.com/e/cm?t=geonic-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B001GSTOAM&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr&#038;nou=1" style="width:120px; height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td border=1 align="right" valign="top">
<p><A HREF="http://clk.tradedoubler.com/click?a=1601917&#038;p=67859&#038;g=17297702&#038;epi=1001004006133271" TARGET="_BLANK"><br />
Bol.com<br />
<IMG SRC="http://www.bol.com/imgbase0/thumb/BOOKCOVER/FC/0/1/3/2/3/0132350882.gif" ALT="Clean Code" BORDER="0"><BR>Clean Code<BR>Robert C. Martin<BR></A></p>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.gerbrand-ict.nl/2009/07/clean-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trying to do good for the wrong reasons</title>
		<link>http://www.gerbrand-ict.nl/2009/01/doing-good-for-the-wrong-reasons/</link>
		<comments>http://www.gerbrand-ict.nl/2009/01/doing-good-for-the-wrong-reasons/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 17:42:05 +0000</pubDate>
		<dc:creator>gerbrand</dc:creator>
				<category><![CDATA[Methodology]]></category>
		<category><![CDATA[coder]]></category>
		<category><![CDATA[design patterns]]></category>

		<guid isPermaLink="false">http://www.gerbrand-ict.nl/?p=43</guid>
		<description><![CDATA[Many programmers with at least some education computer science code by a few principles: Encapsulate database access, using Data Access Objects so we&#8217;re not tied to one or another database Use Model View Controller pattern, so we can change the view logic easily without having to change the entire software. Use Facade beans and Remote [...]]]></description>
			<content:encoded><![CDATA[<p>Many programmers with at least some education computer science code by a few principles:</p>
<ul>
<li><em>Encapsulate database access, using Data Access Objects so we&#8217;re not tied to one or another database</em></li>
<li><em>Use Model View Controller pattern, so we can change the view logic easily without having to change the entire software.</em></li>
<li><em>Use Facade beans and Remote Beans so we can separate our application server in a frontend-server and business-logic server.</em></li>
<li><em>Know the book of <a href="http://clk.tradedoubler.com/click?a=1601421&amp;p=67859&amp;g=17297702&amp;epi=1001004004976354" target="_BLANK">GoF</a> by heart and use their <a href="http://en.wikipedia.org/wiki/Design_Patterns">patterns</a>, so our code is good.</em></li>
</ul>
<p>However that&#8217;s all wrong! The principles are good, when applied correctly. However the reasons are all wrong resulting mediocre software. If in any project changing database is from for example from MySQL to Oracle or changing view-layer from JSF to GWT is a possibility, then that software-project is very bad managed. The ability to change a product shouldn&#8217;t be the reason. And if people think they can have their software be more robust are perform better by setting up an extra business-logic server, they&#8217;ll be disappointed.</p>
<p>Because people often use the wrong reasons, a lot of code is overly complicated, badly performing and highly unmaintainable. You known something is wrong if you have to wade to a lot of interfaces, Impl classes, XML-configuration files just to known what a piece of code is doing</p>
<p>Naturally the principles are good, however, the goal is totally different.  The reason for all of the principles should be: <em>program correctly functioning code that can be adapted easily now or in the future.</em><br />
<strong>Design patterns isn&#8217;t a bible</strong></p>
<p style="text-align: left;">Known that any book on design patters shouldn&#8217;t be used as a bible. Wrongly applied design patterns produce <a href="http://blog.thinkrelevance.com/2007/5/17/design-patterns-are-code-smells">terrible code</a>. The book of GoF was a great book because they (Gamma et al.) introduced the concept of design patterns and gave a list of good design patterns for C++ and Smalltalk. Many of the design patterns are relevant, but many are also not.<br />
<a href="http://clk.tradedoubler.com/click?a=1601917&amp;p=67859&amp;g=17297702&amp;epi=1001004004976354"><img class="alignleft" style="border: 0pt none;" src="http://www.bol.com/intershoproot/thumb/BOOKCOVER/FC/1/4/0/5/8/1405837306.gif" border="0" alt="Design Patterns" width="48" height="62" /><br />
Design Patterns<br />
Erich Gamma &amp; Craig Larman<br />
</a></p>
<p>Most important contribution of the book, is the notion of design patterns. They introduces common words, a name, like Data Access Object, Visitor, Singleton to programming constructs. Because they gave name to certain programmings patterns, people can talk about them and understand each others code. Similar like architects use various patterns to design houses, office buildings, public buildings or monuments. The origin of design patterns was a book about architecture:</p>
<p><a href="http://clk.tradedoubler.com/click?a=1601917&amp;p=67859&amp;g=17297702&amp;epi=1001004000020130" target="_BLANK"><img src="http://www.bol.com/intershoproot/thumb/BOOKCOVER/FC/0/1/9/5/0/0195024028.gif" border="0" alt="The Timeless Way of Building" /><br />
The Timeless Way of Building<br />
Christopher Alexander<br />
</a></p>
<p>There are endless design patterns besides the one listed in <a href="http://en.wikipedia.org/wiki/Design_Patterns">Design Patterns: Elements of Reusable design</a>. Every programming language, framework and software project and application has its own patterns. Recognize patterns, give them a name if they haven&#8217;t got one. Make sure the patterns and the naming are known within the company, organization or all of the users of a framework. That way, the code will be easily to grasp for anyone who has modify or extend the software, because of common naming and usage.</p>
<p><strong>Great coder</strong></p>
<p>Read who a  <a href="http://www.paulgraham.com/gh.html">great hacker</a> is, how to become <a href="http://www.flipcode.com/archives/Being_A_Better_Programmer.shtml">better programmer</a> read what you can do to be a <a href="http://www.codinghorror.com/blog/archives/001138.html">better coder</a>. The greatest cause why software development is so expensive and costly, is because there&#8217;s enough emphasis within many organisations on writing good code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gerbrand-ict.nl/2009/01/doing-good-for-the-wrong-reasons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

