<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-gb" xmlns="http://www.w3.org/2005/Atom"><title type="text">Hansei-Kaizen</title>
<subtitle type="text">Relentless Reflection and Continous Improvement</subtitle>
<link rel="self" href="http://www.hansei-kaizen.be/atom/" />
<link rel="alternate" type="text/html" href="http://www.hansei-kaizen.be/" />
<id>tag:www.hansei-kaizen.be,2005:748aed1cca54298de546a749a31f6610</id>
<generator uri="http://textpattern.com/" version="4.0.3">Textpattern</generator>
<updated>2008-07-20T10:28:29Z</updated>
<author>
		<name>Nico Mommaerts</name>
		<email>&#110;&#105;&#99;&#111;&#46;&#109;&#111;&#109;&#109;&#97;&#101;&#114;&#116;&#115;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;</email>
		<uri>http://www.hansei-kaizen.be/</uri>
</author>
<entry>
		<author>
			<name>Nico Mommaerts</name>
		</author>
		<published>2006-10-21T17:49:00Z</published>
		<updated>2007-08-27T15:08:31Z</updated>
		<title>Last post</title>
		<link rel="alternate" type="text/html" href="http://www.hansei-kaizen.be/article/149/last-post" />
		<id>tag:www.hansei-kaizen.be,2006-10-21:748aed1cca54298de546a749a31f6610/6cbfa966821cad629e68d0293f84a83e</id>
		
		
		<content type="html">
	&#60;p&#62;I haven&#8217;t posted here in months, I got married, I&#8217;m starting to build a house and I&#8217;m going back to school (in the evenings). So  there won&#8217;t be much to read here in the near future.&#60;/p&#62;

 
</content>
</entry>
<entry>
		<author>
			<name>Nico Mommaerts</name>
		</author>
		<published>2006-05-11T04:26:00Z</published>
		<updated>2007-01-09T07:18:20Z</updated>
		<title>this.setDraft(false) or this.post()</title>
		<link rel="alternate" type="text/html" href="http://www.hansei-kaizen.be/article/144/thissetdraftfalse-or-thispost" />
		<id>tag:www.hansei-kaizen.be,2006-05-10:748aed1cca54298de546a749a31f6610/51ea88a3760bc970dcf6b2e9761bd7ed</id>
		
		
		<content type="html">
	&#60;p&#62;I&#8217;m doing a lot of Swing lately and there is something that irritates me even harder as people who drive in the middle lane all the time:&#60;/p&#62;
&#60;code&#62;setEnabled(false)&#60;/code&#62; 
	&#60;p&#62;This method is defined on the JComponent class so it gets used a lot. It irritates me a lot. How setLogical(false) does this sound? Imagine having to turn off the engine of your car with car.setEngineRunning(false)!&#60;/p&#62;
	&#60;p&#62;It&#8217;s hard to read and it implies changing a &#60;strong&#62;property&#60;/strong&#62; of an object, when instead you are changing the &#60;strong&#62;behavior&#60;/strong&#62; of an object. Of course, difference in behavior of objects is often if not always determined by the value(s) of one or more properties of that object, but I shouldn&#8217;t have to know about that. That&#8217;s up to the implementation of the object!&#60;/p&#62;
	&#60;p&#62;Doesn&#8217;t this sound better?&#60;br /&#62;
&#60;code&#62;setDisabled()&#60;/code&#62;&#60;/p&#62;
	&#60;p&#62;Or even better:&#60;br /&#62;
&#60;code&#62;disable()&#60;/code&#62;&#60;/p&#62;
	&#60;p&#62;Now I&#8217;m just sending a message to an object saying: dude, disable yourself, I don&#8217;t care how, just do it. &#60;/p&#62;
	&#60;p&#62;Funny thing is that those methods (&#60;code&#62;enable()&#60;/code&#62; and &#60;code&#62;disable()&#60;/code&#62;) do exist, but they are already deprecated since JDK 1.1 and replaced by &#60;code&#62;setEnabled(boolean)&#60;/code&#62;. I wonder why that is?&#60;/p&#62;
	&#60;p&#62;A related but not entirely the same post by &#60;a href=&#34;http://silkandspinach.net&#34;&#62;Kevin Rutherford&#60;/a&#62;, which made me think about this more consciously:  &#60;a href=&#34;http://silkandspinach.net/blog/2004/07/avoid_boolean_p.html&#34;&#62;avoid boolean parameters&#60;/a&#62; &#60;/p&#62;

 
</content>
</entry>
<entry>
		<author>
			<name>Nico Mommaerts</name>
		</author>
		<published>2006-04-30T07:12:00Z</published>
		<updated>2007-11-24T09:30:04Z</updated>
		<title>Multiple bounds in Java 5 generics</title>
		<link rel="alternate" type="text/html" href="http://www.hansei-kaizen.be/article/136/multiple-bounds-in-java-5-generics" />
		<id>tag:www.hansei-kaizen.be,2006-04-12:748aed1cca54298de546a749a31f6610/a0e00d25a9326bcf187ea7dce5b71218</id>
		
		
		<content type="html">
&#60;p&#62;
I&#039;m doing some custom rendering of JasperReports designs, this is part of the domain model I&#039;m working with:
&#60;img src=&#34;http://www.hansei-kaizen.be/images/34.png&#34;/&#62;
&#60;/p&#62;

&#60;p&#62;
There are more subclasses of JRDesignGraphicElement, but not all of them can have a box drawn around them, only the ones in the diagram are &#039;boxable&#039;. Being boxable as an element adds some extra properties to that element, for example the width of the leftborder or the padding (I omitted most of the properties in the diagram for brevity). The way it is implemented in JasperReports is a bit unhappy (more about that later), but since it is an external library I have to deal with the existing domain model.
&#60;/p&#62;
&#60;p&#62;
So far so good, the problem starts when I want to write a method that takes a Jasper element and draw a border around it. Something like this would seem right:&#60;br/&#62;
&#60;code&#62;void drawBorder(Graphics2D gg, JRBox box)&#60;/code&#62; 
&#60;/p&#62;
&#60;p&#62;
The problem with this approach is that to be able to draw a border around an element, I need also the coordinates of that element and they are not exposed through the JRBox interface, but are defined in the JRDesignElement class. Bummer. I could cast it to a JRDesignElement though when I need the x, y, width and height attributes, and that probably wouldn&#039;t be a problem, as there are no other classes which implement the JRBox interface that are used in my code. But doing that would give me an icky feeling. It would create an unchecked (at compile time) precondition for using this method, and since I&#039;m using a compiler anyway, I&#039;d better use it, right?
&#60;/p&#62;
&#60;p&#62;
The following declaration solves the problem:
&#60;br/&#62;
&#60;code&#62;&#60;notextile&#62;&amp;lt;E extends JRDesignElement &amp;amp; JRbox&amp;gt; void drawBorder(Graphics2D gg, E e)&#60;/notextile&#62;&#60;/code&#62;
&#60;/p&#62;
&#60;p&#62;
What this is saying is that E is of type JRDesignElement &#60;strong&#62;and&#60;/strong&#62; of type JRBox, effectively letting me use methods and properties of both types. 
&#60;/p&#62;
&#60;p&#62;
&#60;code&#62;e.getX();&#60;/code&#62;
and
&#60;code&#62;e.getLeftBorder()&#60;/code&#62;
&#60;/p&#62;
&#60;p&#62;
is legal code inside the method declaration, and the compiler will enforce that I don&#039;t pass on any objects of type JRDesignElement that don&#039;t implement the interface JRBox to the method. Pretty sweet stuff I think. You can even specify more bounds if you want like &#60;code&#62;E extends N &amp; N1 &amp; N2 &amp; ...&#60;/code&#62;. One remark though, Eclipse 3.1.2 can&#039;t seem to handle multiple bounds, the code compiles, but code completion doesn&#039;t show all the available methods and sometimes the background compiler shows errors that dissapear after compiling the project. IntelliJ has no problems with this. (of course:))
&#60;/p&#62;
&#60;p&#62;
I mentioned before that I think the JRBox functionality is a bit unhappily implemented, actually I had been thinking about this on the way home the day I wrote the drawBorder method, but couldn&#039;t find a better solution myself. The JRBox interface is inconvenient first of all because of the problem laid out before, but also because of the fact that every class that implements JRBox has the same tedious implementation (== code duplication). The easy way would be to create an abstract class JRBox that inherits from JRDesignGraphicElement and let all classes that are boxable inherit from JRBox. Technically speaking this would be a good solution but it would violate some OO principles.  Elements can be boxable, which implies a &#039;flavor&#039; of an element, but doesn&#039;t mean they &#60;em&#62;are&#60;/em&#62; a box.
&#60;/p&#62;
&#60;p&#62;
How else would you implement this? Any suggestions?
&#60;/p&#62;
&#60;p&#62;
In a more versatile language like Ruby we have mixins which are perfect for this situation. The implementation could look like this:
&#60;/p&#62;
&#60;p&#62;
&#60;pre&#62;&#60;span class=&#34;keyword&#34;&#62;module &#60;/span&#62;&#60;span class=&#34;module&#34;&#62;JRBox&#60;/span&#62;
	&#60;span class=&#34;keyword&#34;&#62;def &#60;/span&#62;&#60;span class=&#34;method&#34;&#62;left_padding&#60;/span&#62;
		&#60;span class=&#34;punct&#34;&#62;...&#60;/span&#62;
	&#60;span class=&#34;keyword&#34;&#62;end&#60;/span&#62;
	
	&#60;span class=&#34;keyword&#34;&#62;def &#60;/span&#62;&#60;span class=&#34;method&#34;&#62;left_border&#60;/span&#62;
		&#60;span class=&#34;punct&#34;&#62;...&#60;/span&#62;
	&#60;span class=&#34;keyword&#34;&#62;end&#60;/span&#62;
&#60;span class=&#34;keyword&#34;&#62;end&#60;/span&#62;

&#60;span class=&#34;keyword&#34;&#62;class &#60;/span&#62;&#60;span class=&#34;class&#34;&#62;JRDesignElement&#60;/span&#62;
  &#60;span class=&#34;ident&#34;&#62;attr_accessor&#60;/span&#62; &#60;span class=&#34;symbol&#34;&#62;:x&#60;/span&#62;&#60;span class=&#34;punct&#34;&#62;,&#60;/span&#62; &#60;span class=&#34;symbol&#34;&#62;:y&#60;/span&#62;&#60;span class=&#34;punct&#34;&#62;,&#60;/span&#62; &#60;span class=&#34;symbol&#34;&#62;:width&#60;/span&#62;&#60;span class=&#34;punct&#34;&#62;,&#60;/span&#62; &#60;span class=&#34;symbol&#34;&#62;:height&#60;/span&#62;
&#60;span class=&#34;keyword&#34;&#62;end&#60;/span&#62;

&#60;span class=&#34;keyword&#34;&#62;class &#60;/span&#62;&#60;span class=&#34;class&#34;&#62;JRDesignGraphicElement&#60;/span&#62; &#60;span class=&#34;punct&#34;&#62;&amp;lt;&#60;/span&#62; &#60;span class=&#34;constant&#34;&#62;JRDesignElement&#60;/span&#62;
&#60;span class=&#34;keyword&#34;&#62;end&#60;/span&#62;

&#60;span class=&#34;keyword&#34;&#62;class &#60;/span&#62;&#60;span class=&#34;class&#34;&#62;JRDesignImage&#60;/span&#62; &#60;span class=&#34;punct&#34;&#62;&amp;lt;&#60;/span&#62; &#60;span class=&#34;constant&#34;&#62;JRDesignGraphicElement&#60;/span&#62;
	&#60;span class=&#34;ident&#34;&#62;include&#60;/span&#62; &#60;span class=&#34;constant&#34;&#62;JRBox&#60;/span&#62;
&#60;span class=&#34;keyword&#34;&#62;end&#60;/span&#62;

&#60;span class=&#34;keyword&#34;&#62;class &#60;/span&#62;&#60;span class=&#34;class&#34;&#62;JRDesignTextElement&#60;/span&#62; &#60;span class=&#34;punct&#34;&#62;&amp;lt;&#60;/span&#62; &#60;span class=&#34;constant&#34;&#62;JRDesignGraphicElement&#60;/span&#62;
	&#60;span class=&#34;ident&#34;&#62;include&#60;/span&#62; &#60;span class=&#34;constant&#34;&#62;JRBox&#60;/span&#62;
&#60;span class=&#34;keyword&#34;&#62;end&#60;/span&#62;&#60;/pre&#62;&#60;/pre&#62;
&#60;/p&#62;

&#60;p&#62;
Writing the method drawBorder wouldn&#039;t be a problem either, because of &#60;a href=&#34;http://en.wikipedia.org/wiki/Duck_typing&#34;&#62;&#039;duck typing&#039;&#60;/a&#62;.&#60;br/&#62;
&#60;code&#62;def drawBorder(design_element)&#60;/code&#62;
&#60;br/&#62;
would be enough. As long as the type of design_element has the methods and properties we use in the method the world keeps turning.
&#60;/p&#62;

&#60;p&#62;
I looked a bit around for mixin support  in Java, and the closest I could find was the &#60;a href=&#34;https://rapt.dev.java.net/nonav/docs/api/net/java/dev/rapt/exploratory/mixin/package-summary.html#package_description&#34;&#62;rapt&#60;/a&#62; project. I implemented the same domain model using rapt, but the code became so ugly I didn&#039;t even compile it (you have to compile with apt, not with javac which would also require some java command line skills which are somewhere in the back of my skull beneath a deep layer of IDE-using brain cells).
&#60;/p&#62;
</content>
</entry>
<entry>
		<author>
			<name>Nico Mommaerts</name>
		</author>
		<published>2006-04-16T05:40:00Z</published>
		<updated>2007-11-27T11:45:28Z</updated>
		<title>Some thoughts on Team System</title>
		<link rel="alternate" type="text/html" href="http://www.hansei-kaizen.be/article/130/some-thoughts-on-team-system" />
		<id>tag:www.hansei-kaizen.be,2006-03-17:748aed1cca54298de546a749a31f6610/2e666bb0495ae7b0a05b1f3f7746fd44</id>
		
		
		<content type="html">
	&#60;p&#62;Some thoughts I had after attending a presentation on Team System&#8230;&#60;/p&#62;
	&#60;h3&#62;Benefits of Team System (besides the functional ones)&#60;/h3&#62;
	&#60;p&#62;The fact that this is a product from Microsoft and not from the open source community means that the barrier to use unit testing, continuus build etc will be a lot lower than it is now for some companies. While using open source products in a Java project is almost a sine qua non, there still seems to be a bit of a  distrust against open source in some .NET projects. (relatively speaking, compared to Java projects)&#60;/p&#62;
	&#60;p&#62;This also means, trusting the gigantic marketing machine that is Microsoft, that Team System will probably reach a lot more (MS) developers than the agile community has been able to so far. Because don&#8217;t be mistaken, there are still a lot of people out there who haven&#8217;t even heard of the concept &#8216;agile&#8217;, or of unit testing, testdriven development, or even of an issue management system (certainly not only MS developers!).&#60;/p&#62;
	&#60;h3&#62;Everybody will be Agile!&#60;/h3&#62;
	&#60;p&#62;So that would seem like a good thing right? More and more developers/project managers/testers/... are being exposed to agile practices, isn&#8217;t that what we want? Well&#8230;not exactly. &#60;/p&#62;
	&#60;p&#62;&#60;strong&#62;Practices serve a goal&#60;/strong&#62;, and the same practice may not always be appropriate in every situation to achieve that goal. If you don&#8217;t know or understand the goal of the practices you are following, you may be in for an unpleasant surprise somewhere along the road.&#60;/p&#62;
	&#60;h3&#62;What about MSF for Agile?&#60;/h3&#62;
	&#60;p&#62;In &#60;a href=&#34;http://www.stsc.hill.af.mil/crosstalk/2005/12/0512miller.html&#34;&#62;this article by Randy Miller&#60;/a&#62;, he explains that MSF for Agile is actually an implementation of the agile philosophy (the agile manifesto), &#60;strong&#62;adapted to specific circumstances&#60;/strong&#62; experienced over the years by Microsoft teams where the classical implementations of Agile were deemed unsufficient. &#60;/p&#62;
	&#60;blockquote&#62;
		&#60;p&#62;It [MSF for Agile] also presents alternative practices to those commonly found in many agile processes.&#60;/p&#62;
	&#60;/blockquote&#62;
	&#60;p&#62;For example, while Microsoft recognizes that having an &#60;strong&#62;on-site customer&#60;/strong&#62; is a key factor for a successful project, they also know that this isn&#8217;t always possible, and offer &#60;strong&#62;personas&#60;/strong&#62; (invented by &#60;a href=&#34;http://www.cooper.com/content/insights/newsletters/2003_08/Origin_of_Personas.asp&#34;&#62;Alan Cooper&#60;/a&#62;) as an alternative.&#60;/p&#62;
	&#60;p&#62;MSF for Agile provides you with a lot of &#60;strong&#62;guidance&#60;/strong&#62; and building blocks, all beautifully integrated with Team System, but it doesn&#8217;t provide detailed instructions on how to handle day-to-day stuff like SCRUM does for example. You still have a lot of freedom to determine how the project will be run, and that&#8217;s where &#60;strong&#62;a good understanding of agile&#60;/strong&#62; is needed. Using MSF for Agile won&#8217;t magically make you agile.&#60;/p&#62;
	&#60;h3&#62;The danger&#60;/h3&#62;
	&#60;p&#62;I think there is a danger that people who have no previous knowledge about agile will start equalizing ‘Agile’ and ‘Team System’. I’ve already seen this happening on a team using a custom build Team System-like product, where project managers were way too rigorous in following the practices laid out by the tools, forgetting (or not even knowing) why the practices were there in the first place, effectively crippling productivity and quality.&#60;/p&#62;
	&#60;h3&#62;What can you do to avoid this?&#60;/h3&#62;
	&#60;p&#62;Start learning Agile. Read about MSF for Agile. I have the feeling that Team System gets most of the attention, but in fact you can&#8217;t view at Team System without looking at MSF too. They are intended to be one system.&#60;/p&#62;
	&#60;ul&#62;
		&#60;li&#62;There is a &#60;a href=&#34;http://wiki.systemsthinking.net/Systemsthinking/BookList.html&#34;&#62;list with good books&#60;/a&#62; on the Systems Thinking wiki where you can start reading.&#60;/li&#62;
		&#60;li&#62;If you live in Belgium you can start attending the &#60;a href=&#34;http://wiki.xp.be/Xpbe/XpBeMeeting.html&#34;&#62;XP BE user Group Meetings&#60;/a&#62;, I&#8217;m sure there are similar user groups in your neighborhood.&#60;/li&#62;
		&#60;li&#62;Read &#60;a href=&#34;http://www.technorati.com/blogs/Agile&#34;&#62;blogs&#60;/a&#62;.&#60;/li&#62;
		&#60;li&#62;Doing a project with someone who knows agile won&#8217;t hurt either, but may be a bit more difficult to arrange.&#60;/li&#62;
	&#60;/ul&#62;

 
</content>
</entry>
<entry>
		<author>
			<name>Nico Mommaerts</name>
		</author>
		<published>2006-03-20T20:22:00Z</published>
		<updated>2007-09-03T05:54:19Z</updated>
		<title>Goodbye Firefox</title>
		<link rel="alternate" type="text/html" href="http://www.hansei-kaizen.be/article/129/goodbye-firefox" />
		<id>tag:www.hansei-kaizen.be,2006-03-17:748aed1cca54298de546a749a31f6610/1947c4740971d0d62049fd783716e736</id>
		
		
		<content type="html">
	&#60;p&#62;&#60;img src=&#34;http://www.hansei-kaizen.be/images/33.jpg&#34;/&#62;&#60;/p&#62;
	&#60;p&#62;I think I&#8217;m one of the earliest adopters of Firefox around. It happened quite by coincidence, just on the day I switched to using Linux, Mozilla released Phoenix 0.1. I was looking for what browsers were available on Linux, and stumbled upon Phoenix. Back then I fell in love with it because of its small footprint, and simplicity (certainly compared to Mozilla). I&#8217;ve been using it ever since, going from Phoenix to Firebird, and finally from Firebird to Firefox. I&#8217;m singlehandedly responsible for dozens of people switching from IE to Firefox, so it is rather ironic that now I&#8217;m switching back to IE (on my Dell box at work, at home I am a Safari loving guy). &#60;/p&#62;
	&#60;p&#62;The reason is Firefox&#8217;s memory usage. Last week I spent half a day debugging an application that failed to insert some records through its JDO layer because it didn&#8217;t have enough memory. Okay, granted, JDO (Kodo) shouldn&#8217;t fail silently in this case, but still, it was very frustrating. And maybe it didn&#8217;t have any relation to my memory at all, but it did make me discover how much memory Firefox actually consumes. &#62;200Mb memory usage for a browser isn&#8217;t something I&#8217;d call a feature. &#60;a href=&#34;http://weblogs.mozillazine.org/ben/archives/009749.html&#34;&#62;(the Firefox developers respond to the reactions on the memory usage of Firefox 1.5)&#60;/a&#62; I  did change the max_total_viewers setting, and I realize that the excessive memory usage may be caused by one of the extensions I use (GMail reportedly also causes a memory leak in it&#8217;s use of XmlHttpRequest, although they deny it), but still it annoys me. &#60;/p&#62;
	&#60;p&#62;So the last few days I&#8217;ve been happily browsing along using &#60;a href=&#34;http://www.avantbrowser.com/&#34;&#62;Avant Browser&#60;/a&#62; It has popup blocking, tabs support, and it includes &#60;a href=&#34;http://kb.mozillazine.org/SessionSaver&#34;&#62;SessionSaver&#60;/a&#62; -like capabilities. All that I need (for my non web developing needs)! Goodbye Firefox, maybe I&#8217;ll see you again on a browser reunion party or something.&#60;/p&#62;
	&#60;p&#62;(the default install does like look shit though, you&#8217;ll have to tweak it a bit to look a bit decent if you decide to give it a go)&#60;/p&#62;

 
</content>
</entry>
<entry>
		<author>
			<name>Nico Mommaerts</name>
		</author>
		<published>2006-03-13T03:22:00Z</published>
		<updated>2008-02-11T16:34:29Z</updated>
		<title>Guy Kawasaki</title>
		<link rel="alternate" type="text/html" href="http://www.hansei-kaizen.be/article/126/guy-kawasaki" />
		<id>tag:www.hansei-kaizen.be,2006-03-12:748aed1cca54298de546a749a31f6610/663d2080738f6c480647ee5d5520e459</id>
		
		
		<content type="html">
	&#60;p&#62;&#60;a href=&#34;http://www.guykawasaki.com/&#34;&#62;Guy Kawasaki&#60;/a&#62;, the man who invented evangelizing in the early days of Apple. I keep running into his name ever since I&#8217;ve heard of him. Today it was when I was signing up for an account at &#60;a href=&#34;http://www.istockphoto.com/index.php&#34;&#62;iStockPhoto&#60;/a&#62;, in their signup form there is the obligatory question &#8220;How did you hear about iStockphoto?&#8221;. Guess whose name was among the more common options like &#8220;Google&#8221; or &#8220;Magazines&#8221;? Yep, Guy Kawasaki. The funny thing is, I was looking for &#8220;Blogs&#8221;, cause I learned about iStockPhoto through Guy Kawasaki&#8217;s blog&#8230;&#60;/p&#62;

 
</content>
</entry>
<entry>
		<author>
			<name>Nico Mommaerts</name>
		</author>
		<published>2006-03-07T16:53:00Z</published>
		<updated>2007-09-03T05:54:31Z</updated>
		<title>Clean up your code!</title>
		<link rel="alternate" type="text/html" href="http://www.hansei-kaizen.be/article/124/clean-up-your-code" />
		<id>tag:www.hansei-kaizen.be,2006-03-06:748aed1cca54298de546a749a31f6610/9bf5e0f6bd80b3711824e4d28782269e</id>
		
		
		<content type="html">
	&#60;p&#62;&#60;strong&#62;[Update]&#60;/strong&#62; Kathy Sierra talks about the same subject in the post &#60;a href=&#34;http://headrush.typepad.com/creating_passionate_users/2006/03/code_like_a_gir.html&#34;&#62;Code like a girl&#60;/a&#62;&#60;/p&#62;
	&#60;p&#62;I love my job.&#60;/p&#62;
	&#60;p&#62;I love it when I have created an application that improves someone&#8217;s work or life, or just looks cool.&#60;/p&#62;
	&#60;p&#62;I love the process of creating that application, the writing of the code.&#60;/p&#62;
	&#60;p&#62;My grandfather is a carpenter, and he also loves his job. When I was still young(er), and I visited my grandparents in the weekends, he was always working in his atelier. Nowadays he isn&#8217;t working with wood as much as he used to, but when he speaks about it, you still hear his passion for wood in his voice.&#60;/p&#62;
	&#60;p&#62;He loves creating furniture, and he loves the process of doing it. Because he loves working with wood so much, he pays attention to every little detail. When you see one of his finished pieces, you can see it was made by someone who loved creating it. He is proud of every piece he made, as he deserves to be.&#60;/p&#62;
	&#60;p&#62;Since I love my job, I pay attention to every little detail of my work. One of the most obvious parts of a programmers work where you can see this attention is the look of the code. No matter what patterns you use, or how many bugs are still in your code, you can still make it look good. In fact it&#8217;s the easiest thing to get right when writing code, it doesn&#8217;t require any extra thinking or time at all, there is no learning curve involved, you just do it. I am proud of the way my code looks, just as my grandfather is proud of the way his finished piece of wood looks like. &#60;strong&#62;We are craftsmen, we take pride in our work.&#60;/strong&#62; But why does it seem so hard for some people to make their code look decent?!&#60;/p&#62;
	&#60;p&#62;I&#8217;m sure you have all seen examples of what I have in mind. Eclipse for example, displays little yellow triangles on each class that has warnings, and on packages that contain classes with warnings. Some projects don&#8217;t contain classes without warnings, &#60;em&#62;literally thousands of warnings&#60;/em&#62;. Some code is littered with warnings of unused variables, unused private methods, unused imports or incorrect javadoc tags. Those classes typically have large blocks of code that are commented out instead of deleted, a random number of white lines between lines of code, &#60;em&#62;inconsistent&#60;/em&#62; use of curly braces, whitespace and other formatting idioms. Only getters and setters seem to be documented but that mysterious method &#60;code&#62;public void deleteSomeRecords(int arg0, int arg1, boolean xf5)&#60;/code&#62; isn&#8217;t. You all know the horrors I&#8217;m talking about. &#60;strong&#62;Sloppy looking code.&#60;/strong&#62;&#60;/p&#62;
	&#60;p&#62;So here are some guidelines for writing code, I call it &#60;strong&#62;&#8220;the etiquette of writing beautiful code&#8221;&#60;/strong&#62;:
	&#60;ul&#62;
		&#60;li&#62;the button on your keyboard with the arrow on it that points left, above your enter key, is called the backspace key. It deletes characters. Another key that has the same functionality is the &#8216;delete&#8217; key. Open up notepad, gedit, textedit or whatever, and try it out. You&#8217;ll see it is much easier as putting // in front of every line of code you don&#8217;t want anymore, or for the power users among us, putting the block of code between /* */. If you suddenly need that entire method back that you deleted before, well, that&#8217;s why we use a source control system (yes it has other uses as blaming people!). &#60;strong&#62;Don&#8217;t abuse the ability to comment out code as a way to remove it!&#60;/strong&#62;&#60;/li&#62;
		&#60;li&#62;documenting your code is considered a best practice, but don&#8217;t you think writing &#8220;&#60;code&#62;i++; // this increments the variable i with one&#60;/code&#62;&#8221; is a bit too much? Try naming your methods and variables in such a way that you don&#8217;t need to comment them. With generics in Java 5 en .NET 2.0 one of the major uses of commenting has disappeared. If you are feeling extreme, &#60;strong&#62;write a unit test&#60;/strong&#62; that documents the expected behavior of your methods, such a test may be useful for other things too, who knows? Oh yeah, while you are at it, learn the documenting system of the language you use, so other people don&#8217;t get thousands of javadoc related warnings in their IDE.&#60;/li&#62;
		&#60;li&#62;please oh please, I know it is jolly good fun to insert a random number of white lines between your methods, but &#60;strong&#62;format your code consistently&#60;/strong&#62;! It doesn&#8217;t matter where you put your opening curly brace, and how many whitespace you put after your commas, but please be consistent about it. Most editors even format your code for you, so it&#8217;s not a tough job! &#60;/li&#62;
		&#60;li&#62;&#60;strong&#62;copy+paste are the tools of the devil!&#60;/strong&#62; Making it so easy for programmers to copy other blocks of code is the worst invention ever! Every IDE should disable copy+paste, or limit it to one line. Understand the code you write, don&#8217;t copy a bunch of lines where one line does what you need, and the others&#8230;well, you actually don&#8217;t know what they do&#8230; Copying the same piece of code over and over again may say something about the design of your application too&#8230;&#60;/li&#62;
		&#60;li&#62;&#60;strong&#62;Update&#60;/strong&#62; Thomas: Never use abusive language in your comments like “WTF, who made this crappy code” or “This is method is sh*t”. First of all it’s not professional and it gives a bad impression to your customer.&#60;/li&#62;
		&#60;li&#62;&#60;em&#62;feel free to add your own rules of ettiquete, put them in a comment and I&#8217;ll add them here, I know every programmer has his pet peeve, today you may freely admit them&#60;/em&#62;&#60;/li&#62;
	&#60;/ul&#62;&#60;/p&#62;
	&#60;p&#62;This rant was out of love and respect for the code.&#60;/p&#62;
	&#60;p&#62;Note: code can look great, but suck at its implementation, it can also look bad, but have a clean implementation. There is no immediate relationship between the &#8216;look&#8217; of code, and its implementation. Ugly looking code may work perfectly, but then again, that wasn&#8217;t the point of this post, now was it?&#60;/p&#62;

 
</content>
</entry>
<entry>
		<author>
			<name>Nico Mommaerts</name>
		</author>
		<published>2006-02-24T19:13:00Z</published>
		<updated>2008-02-11T16:35:06Z</updated>
		<title>My Job Went To India [Part 2]</title>
		<link rel="alternate" type="text/html" href="http://www.hansei-kaizen.be/article/123/my-job-went-to-india-part-2" />
		<id>tag:www.hansei-kaizen.be,2006-02-24:748aed1cca54298de546a749a31f6610/9940f95bb33fe7d6529d80c06ca8d29b</id>
		
		
		<content type="html">
	&#60;p&#62;I finally finished the entire book, there were two paragraphs in the final chapter that I wanted to share.&#60;/p&#62;
	&#60;blockquote&#62;
		&#60;p&#62;The real meat of your career is not the promotions and salary advances. It’s the time you spend working toward those advances. Or, more important, it’s the time you spend working &#60;em&#62;regardless&#60;/em&#62; of the advances.&#60;/p&#62;
	&#60;/blockquote&#62;
	&#60;blockquote&#62;
		&#60;p&#62;If this is the core of your work life—the actual work—then you’ve already arrived at your destination. The goal-oriented, destination-focused thinking that you usually do leads only from one goal to the next. It has no logical end. What most of us fail to realize is that &#60;em&#62;the path&#60;/em&#62; is the end.&#60;/p&#62;
	&#60;/blockquote&#62;
	&#60;p&#62;This is the best description for what the book is about, and in a way, also what this blog is about. This book is a great complement for &#60;a href=&#34;http://www.amazon.co.uk/exec/obidos/redirect?link_code=as2&#38;path=ASIN/020161622X&#38;tag=thelifeofabeg-21&#38;camp=1634&#38;creative=6738&#34;&#62;The Pragmatic Programmer&#60;/a&#62;, whereas that book focuses on technical &#8216;attitude&#8217;, this book focuses on your attitude and behaviour in general (in the context of the IT industry of course).  If you are starting out in the industry, and read these two books, you&#8217;ll have a head start on the rest.&#60;/p&#62;

 
</content>
</entry>
<entry>
		<author>
			<name>Nico Mommaerts</name>
		</author>
		<published>2006-02-21T15:41:00Z</published>
		<updated>2008-02-11T16:35:14Z</updated>
		<title>Agile Open 2006</title>
		<link rel="alternate" type="text/html" href="http://www.hansei-kaizen.be/article/122/agile-open-2006" />
		<id>tag:www.hansei-kaizen.be,2006-02-21:748aed1cca54298de546a749a31f6610/e359c3c549d503ab79dff08674e4c7f5</id>
		
		
		<content type="html">
	&#60;blockquote&#62;
		&#60;p&#62;The Agile Open conference is the second international unconference on agile development. It is an Open Space intended for software development and business people from all walks of life, taking place on April 27th and 28th, 2006, in Mechelen, Belgium &#8230; an amazingly open, warm and lively community space where people spark new insights in and relationships for collaborative (software) development and doing business together.&#60;/p&#62;
	&#60;/blockquote&#62;
	&#60;p&#62;&#60;em&#62;From &#60;a href=&#34;http://www.agileopen.net/&#34;&#62;Agile Open&#60;/a&#62;&#60;/em&#62;&#60;/p&#62;
	&#60;p&#62;Unfortunately I won&#8217;t be there, one of the downsides of not being self-employed is that can&#8217;t you frequent every conference you&#8217;d like (the upside is that when I do, my employer pays all expenses). As you can read on &#60;a href=&#34;http://www.agileopen.net/Conference/OpenSpace.html&#34;&#62;their website&#60;/a&#62;, it will be an Open Space conference, I&#8217;m kinda curious as to how such a conference feels like, but alas, my curiosity won&#8217;t be satisfied this time. I know that there must be something good about the Open Space format as I know a few very intelligent people that make their living out of &#8220;Open Space Communication&#8221;. &#60;/p&#62;
	&#60;p&#62;Anyway, if I look at the sessions that were covered last year, it looks like it will be as interesting, engaging and funny as the XPDays2005 in Rotterdam. The location of the Agile Open 2006 is btw the same as the one of the XPDays2004, which I did attend, and I can tell you, the Elewijt Center is a top-notch place.&#60;/p&#62;


 
</content>
</entry>
<entry>
		<author>
			<name>Nico Mommaerts</name>
		</author>
		<published>2006-02-20T05:02:00Z</published>
		<updated>2008-02-11T21:15:12Z</updated>
		<title>You get what you measure</title>
		<link rel="alternate" type="text/html" href="http://www.hansei-kaizen.be/article/118/you-get-what-you-measure" />
		<id>tag:www.hansei-kaizen.be,2006-02-08:748aed1cca54298de546a749a31f6610/b42d37f1d942f6b08010a96c52c951b7</id>
		
		
		<content type="html">
	&#60;p&#62;2 weeks ago was another &#60;a href=&#34;http://wiki.xp.be/Xpbe/XpBeMeeting.html&#34;&#62;XPBE meeting&#60;/a&#62;, this time hosted by the &#60;a href=&#34;http://www.erggroup.com/default.htm&#34;&#62;ERG Group&#60;/a&#62;. The subject at hand was &#8216;Management Metrics&#8217;.&#60;/p&#62;
	&#60;p&#62;&#60;img src=&#34;http://hansei-kaizen.be/images/18.jpg&#34;/&#62;&#60;/p&#62;
	&#60;p&#62;I didn&#8217;t quite know what to expect first, but thankfully &#60;a href=&#34;http://blog.nayima.be/blog/Entry20060215.html&#34;&#62;Pascal Van Cauwenberghe&#60;/a&#62; gave a small introduction first (he also led the entire workshop). We were to conduct a workshop created by &#60;a href=&#34;http://www.agilespi.com&#34;&#62;Jason Gorman&#60;/a&#62; and &#60;a href=&#34;http://www.duncanpierce.org&#34;&#62;Duncan Pierce&#60;/a&#62;. &#60;/p&#62;
	&#60;p&#62;We were separated into 4 teams, each team had someone from the ERG group. Our assignment was to find a metric to measure something that the ERG group wanted to measure on their projects. To be more specific, the team I was in had to find a metric to measure the velocity of the development, analyst, test and support team.&#60;/p&#62;
	&#60;p&#62;In the following rounds we had to:
	&#60;ul&#62;
		&#60;li&#62;make a list of possible metrics&#60;/li&#62;
		&#60;li&#62;choose one metric and present it to the other groups&#60;/li&#62;
		&#60;li&#62;every group passed their sheet with their metric on it to the adjacent group&#60;/li&#62;
		&#60;li&#62;each group had to find ways to &#8216;cheat&#8217; the metric; to still look good when measured by the metric, but not actually doing a good job/not doing much effort&#60;/li&#62;
		&#60;li&#62;each group got the chance to improve their metric &#60;/li&#62;
	&#60;/ul&#62;&#60;/p&#62;
	&#60;p&#62;For example, we chose the number of use cases completed/fixed time-span as a metric to measure the velocity, this could be cheated by increasing the granularity of the use cases, or by developing half-assed use cases  (which raised the problem have not having acceptance criteria of use cases going from dev to test). We improved our metric by giving use cases cost points, and measure the #cost points/time completed.&#60;/p&#62;
	&#60;p&#62;What did I learn from this?
	&#60;ul&#62;
		&#60;li&#62;you got to think about what metric to use to measure something&#60;/li&#62;
		&#60;li&#62;every metric can and probably will be cheated by some people, so don&#8217;t spend to much time on designing your metric to counter this&#60;/li&#62;
		&#60;li&#62;you almost always need more as one metric&#60;/li&#62;
		&#60;li&#62;don&#8217;t be afraid to use qualitative metrics (customer satisfaction, fun, ...; as opposed to quantitative metrics)&#60;/li&#62;
		&#60;li&#62;XPBE meetings are jolly good fun and very educating!&#60;/li&#62;
	&#60;/ul&#62;&#60;/p&#62;
	&#60;p&#62;&#60;em&#62;Thanks to &#60;a href=&#34;http://blog.nayima.be&#34;&#62;Pascal&#60;/a&#62; for sending me his powerpoint he used on the meeting so I didn&#8217;t make any flagrant mistakes  and so I could credit the right people&#60;/em&#62;&#60;/p&#62;

 
</content>
</entry></feed>