<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Coder-friendly</title>
	
	<link>http://www.coderfriendly.com</link>
	<description>Writing about software and human behavior...</description>
	<lastBuildDate>Thu, 08 Apr 2010 21:23:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/coderfriendly" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="coderfriendly" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Do your team members agree on when a feature is done?</title>
		<link>http://www.coderfriendly.com/2010/04/08/do-your-team-members-agree-on-when-a-feature-is-done/</link>
		<comments>http://www.coderfriendly.com/2010/04/08/do-your-team-members-agree-on-when-a-feature-is-done/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 21:23:18 +0000</pubDate>
		<dc:creator>coder-friendly</dc:creator>
				<category><![CDATA[developer]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[done]]></category>
		<category><![CDATA[team]]></category>
		<category><![CDATA[technical debt]]></category>

		<guid isPermaLink="false">http://www.coderfriendly.com/?p=745</guid>
		<description><![CDATA[Iterative development approaches have good days : it changes the way you manage projects and most (all?) of agile &#8220;frameworks&#8221; are iterative ones. With the waterfall model, you set the features to develop and then, you estimate the time required to implement them. With iterative approaches, the paradigm is the opposite; you set the duration [...]]]></description>
			<content:encoded><![CDATA[<p>Iterative development approaches have good days : it changes the way you manage projects and most (all?) of agile &#8220;frameworks&#8221; are iterative ones. With the waterfall model, you set the features to develop and then, you estimate the time required to implement them. With iterative approaches, the paradigm is the opposite; you set the duration (an iteration) and then, you estimate what feature(s) you can develop during it : it is commonly named <a title="Timeboxing, Wikipedia" href="http://en.wikipedia.org/wiki/Timeboxing">timeboxing</a>.</p>
<p>It is highly recommended to deliver completed <a title="User story, Wikipedia" href="http://en.wikipedia.org/wiki/User_story">user stories</a> at the end of each iteration and so, you try to estimate the &#8220;size&#8221;/&#8221;cost&#8221; of a story. Ideally, each member can estimate the cost, but to estimate correcly, are you sure that the team members have the same definition of done? Whatever the domain, &#8220;done&#8221; can lead to ambiguity&#8230;</p>
<div id="attachment_747" class="wp-caption aligncenter" style="width: 550px"><a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2Fs%3Fie%3DUTF8%26x%3D0%26ref_%3Dnb%5Fsb%5Fnoss%26y%3D0%26field-keywords%3Dmortal%2520kombat%26url%3Dsearch-alias%253Daps&amp;tag=coderfriendly-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=390957"><img class="size-full wp-image-747" title="mortal_kombat_finish_him" src="http://www.coderfriendly.com/wp-content/uploads/2010/03/mortal_kombat_finish_him.png" alt="If you played to Mortal Kombat, you know that you can choose what done means :-)" width="540" height="343" /></a><p class="wp-caption-text">If you played to Mortal Kombat, you know that you can choose what done means <img src='http://www.coderfriendly.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p></div>
<h3>What user stories are can help us to define what done means</h3>
<p>According to <a title="User story, Wikipedia" href="http://en.wikipedia.org/wiki/User_story">Wikipedia</a>, an user story is:</p>
<blockquote><p>A <strong>user story</strong> is a software system <a title="Requirement" href="http://en.wikipedia.org/wiki/Requirement">requirement</a> formulated as one or more sentences in the everyday or business language of the user. User stories are used with <a title="Agile software development" href="http://en.wikipedia.org/wiki/Agile_software_development">Agile software development</a> methodologies for the specification of requirements (together with <a title="Acceptance test" href="http://en.wikipedia.org/wiki/Acceptance_test">acceptance tests</a>). Each user story is limited, so it fits on a small paper note card—usually a 3×5 inches card—to ensure that it does not grow too large. The user stories should be written by the customers for a software project and are their main instrument to influence the development of the software.</p></blockquote>
<p>Considering this definition, a completed user story is something which has value for the customer. In a developer&#8217;s point of view, it implies that the feature is implemented and that it can be seen by the customer. It means that a first definition of done may be: it works on my machine and the customer can test the feature on it. But we know that &#8220;it works on my machine&#8221; is terrible and we want to go deeper and so, this definition becomes: <span style="text-decoration: underline;">it works on any machine and the customer can test the feature</span>(acceptance test).</p>
<h3>The iceberg is bigger than its top</h3>
<p>The problem with this definition is that it focuses only on the visible part of the iceberg (what the customer sees):</p>
<div id="attachment_751" class="wp-caption aligncenter" style="width: 416px"><a href="http://www.mindtalk.co.za/unconscious_mind.html"><img class="size-full wp-image-751" title="iceberg-metaphor" src="http://www.coderfriendly.com/wp-content/uploads/2010/03/iceberg-metaphor.jpg" alt="The customer sees only the top of the feature (Credits: Mindtalk)" width="406" height="276" /></a><p class="wp-caption-text">The customer sees only the top of the software (Credits: Mindtalk)</p></div>
<p>If your team doesn&#8217;t work/rework on the &#8220;invisible&#8221; things, you will quickly have troubles and you will have to pay the technical debt soon. <a title="Technical debt, Wikipedia" href="http://en.wikipedia.org/wiki/Technical_debt">Wikipedia</a> references it as:</p>
<blockquote><p>Shipping first time code is like going into debt. A little debt speeds development so long as it is paid back promptly with a rewrite&#8230; The danger occurs when the debt is not repaid. Every minute spent on not-quite-right code counts as <a title="Interest" href="http://en.wikipedia.org/wiki/Interest">interest</a> on that debt. Entire engineering organizations can be brought to a stand-still under the debt load of an unconsolidated implementation, <a title="Object-oriented programming" href="http://en.wikipedia.org/wiki/Object-oriented_programming">object-oriented</a> or otherwise.</p></blockquote>
<p>So, whatever the feature, when someone of your team says that it&#8217;s done, your first questions may be: &#8220;Which unit tests have you written? Have you fixed any warnings from the compiler and from the static code analyzers? Are every previous automatic tests still green?&#8221;. All these points are so often ignored that, after few weeks, the software can&#8217;t evolve:</p>
<div id="attachment_768" class="wp-caption aligncenter" style="width: 471px"><a href="http://www.coderfriendly.com/wp-content/uploads/2010/04/technical_debt_customer.JPG"><img class="size-full wp-image-768" title="technical_debt_customer" src="http://www.coderfriendly.com/wp-content/uploads/2010/04/technical_debt_customer.JPG" alt="Technical debt effect (Credits: Jim HighSmith)" width="461" height="266" /></a><p class="wp-caption-text">Technical debt effect (Credits: Jim HighSmith)</p></div>
<p>So, the definition of done might be:</p>
<p style="padding-left: 30px;">it works on any machine, the customer can test the feature AND no automated tests is broken, there are new automated tests and no warnings/errors from compiler/static code analyzer.<span style="text-decoration: underline;"><br />
</span></p>
<h3>Conclusion</h3>
<p>When you estimate the size of an user story with your team, be sure that everybody has the same definition of done : it will avoid bad surprises. Each of us has to understand that technical debt has to be managed during the whole development.</p>
<p>So, does your team have the same definition? What is yours?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderfriendly.com/2010/04/08/do-your-team-members-agree-on-when-a-feature-is-done/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Design patterns are a kind of Object oriented programmer’s degree</title>
		<link>http://www.coderfriendly.com/2010/02/13/design-patterns-are-like-a-degree-on-object-oriented-programming/</link>
		<comments>http://www.coderfriendly.com/2010/02/13/design-patterns-are-like-a-degree-on-object-oriented-programming/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 13:05:18 +0000</pubDate>
		<dc:creator>coder-friendly</dc:creator>
				<category><![CDATA[developer]]></category>

		<guid isPermaLink="false">http://www.coderfriendly.com/?p=725</guid>
		<description><![CDATA[I&#8217;m not an active contributor to Dzone but I always keep an eye on its top list. One day, I was surprised because a link called &#8220;Design Patterns are not a Silver Bullet and the State of the Programming Blogosphere&#8221; was on the top 5. To summarize briefly my understanding of this post, the author [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not an active contributor to Dzone but I always keep an eye on its top list. One day, I was surprised because a link called &#8220;<a href="http://www.dzone.com/links/rss/design_patterns_are_not_a_silver_bullet_and_the_s.html">Design Patterns are not a Silver Bullet and the State of the Programming Blogosphere</a>&#8221; was on the top 5. To summarize briefly my understanding of this post, the author criticizes that, in the &#8220;blogosphere&#8221;, many developers write that you are not a good developer if you don&#8217;t know the GOF&#8217;s design patterns. Even if I understand his point of view, I&#8217;m still convinced that it&#8217;s a &#8220;must-have&#8221; skill, especially for young developers.</p>
<h3>Work as a team</h3>
<p>First, I need to come back on what a good programmer is for me. In his book &#8220;<a title="Refactoring: Improving the Design of Existing Code, Amazon" href="http://www.amazon.com/gp/product/0201485672?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0201485672">Refactoring: Improving the Design of Existing Code</a>&#8220;, <a title="Martin Fowler, Wikipedia" href="http://en.wikipedia.org/wiki/Martin_Fowler">Martin Fowler</a> wrote this quote:</p>
<blockquote><p>Any fool can write code that a computer can understand. Good programmers write code that humans can understand</p></blockquote>
<p>I agree on his definition of good programmers. This value is so often taken into account when we talk about agile methodologies: pair programming or code ownership tries to limit the &#8220;compile-only&#8221; code or the common sentence &#8220;It works on my machine&#8221;. When you read code, it is important to be able to read it quickly : if you can&#8217;t, it is probably because you are in front of a technical debt and that this source code has to be improved. When you&#8217;re not the writer of it, before modifying/debugging it, you will have to understand the intent of the developer in order to avoid any regressions. It&#8217;s one of the reasons why Design Patterns are so important: using one of them, you clearly describe to others what you are trying to do, you put a name on it and it enables you to write code for humans.</p>
<p>I&#8217;m convinced that people who know design patterns are better than the others when they have to work as a team.You share a same common language!</p>
<h3>Long-term value</h3>
<p>The biggest deal of a paid developer is to find stuffs to learn/know which improve his/her value on the market. Nowadays, object oriented is clearly the most researched skill. When an employer wants to hire a developer, he/she will test his/her technical skills and his/her human skills (keep in mind that <a title="You have to hire technical talents, Coderfriendly" href="http://www.coderfriendly.com/2009/04/15/you-have-to-hire-technical-talent-but-how/">you want to hire technical talents</a>). Knowing Java and/or C++ doesn&#8217;t indicate that you write &#8220;good&#8221; code. I have read so much code from C++ guy which is in fact&#8230; C code. Knowing Design patterns indicates to your future employer that you know what an object is and that you prefer composition to inheritance. And my point of view is that it&#8217;s a long-term value compared to knowing a language!</p>
<h3>Learning cost is low</h3>
<p>I&#8217;m a little bit mixed about the debate whether we have (or not) to know Design Patterns (reason of this post). In my opinion, it is a must-have skill and the learning cost is low: I don&#8217;t understand why a good developer don&#8217;t want to learn them. The first book (<a title="Design Patterns: Elements of reusable Object-oriented Software, Amazon" href="http://www.amazon.com/gp/product/0201633612?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0201633612">Design Patterns: elements of Reusable Object-Oriented Software</a>) is a reference one and so, a bad one to learn them. I really recommend to read <a title="Head First, Design Patterns, Amazon" href="http://www.amazon.com/gp/product/0596007124?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0596007124">Head First Design Patterns</a> (low cost and read in one week) and then, to keep a wonderful cheatsheet on your desktop (consult the list <a title="Friendly Cheatsheet, Coderfriendly" href="http://www.coderfriendly.com/friendly-cheatsheets/">there</a>).</p>
<p>So, as a conclusion, don&#8217;t worry about not knowing them, just invest few days to learn them. In my opinion, they are like a OOP&#8217;s degree : you can be good without it but your skills are easier to show when you have it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderfriendly.com/2010/02/13/design-patterns-are-like-a-degree-on-object-oriented-programming/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>My 5 favorite software quotes</title>
		<link>http://www.coderfriendly.com/2009/12/30/my-5-favorite-software-quotes/</link>
		<comments>http://www.coderfriendly.com/2009/12/30/my-5-favorite-software-quotes/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 18:00:20 +0000</pubDate>
		<dc:creator>coder-friendly</dc:creator>
				<category><![CDATA[developer]]></category>
		<category><![CDATA[quotes]]></category>

		<guid isPermaLink="false">http://www.coderfriendly.com/?p=696</guid>
		<description><![CDATA[Some quotes are so good that they can learn you more things than complete books. For my last post of this year 2009, I&#8217;ve chosen to compile 5 of my favorites quotes.
Bjarne Stroustrup
I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I [...]]]></description>
			<content:encoded><![CDATA[<p>Some quotes are so good that they can learn you more things than complete books. For my last post of this year 2009, I&#8217;ve chosen to compile 5 of my favorites quotes.</p>
<h3><a title="Bjarne Stroustrup, Wikipedia" href="http://en.wikipedia.org/wiki/Bjarne_Stroustrup">Bjarne Stroustrup</a></h3>
<blockquote><p>I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone</p></blockquote>
<p>It&#8217;s really what happened. Smartphones are easier and easier, but they are still more complicated than phone-only device! We often forget it!</p>
<div id="attachment_704" class="wp-caption aligncenter" style="width: 275px"><a href="http://www.coderfriendly.com/wp-content/uploads/2009/12/iphone_connect_itunes.jpg"><img class="size-full wp-image-704" title="Iphone first boot" src="http://www.coderfriendly.com/wp-content/uploads/2009/12/iphone_connect_itunes.jpg" alt="You must connect your iphone to a computer to activate it the first time. Did you say &quot;easy&quot;? Photo credits: Hirotomo" width="265" height="176" /></a><p class="wp-caption-text">You must connect your iphone to a computer to activate it the first time. Did you say &quot;easy&quot;? Credits: Hirotomo</p></div>
<h3>John F. Woods</h3>
<blockquote><p>Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.</p></blockquote>
<p>If you&#8217;re a developer, remember this one! It&#8217;s our job to write clean code. &#8220;It works!&#8221; is not enough, we are writing code for humans.</p>
<div id="attachment_709" class="wp-caption aligncenter" style="width: 287px"><a href="http://www.amazon.com/gp/product/B001GZ6QC4?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B001GZ6QC4"><img class="size-full wp-image-709" title="joker_violent_psychopath" src="http://www.coderfriendly.com/wp-content/uploads/2009/12/joker_violent_psychopath.jpg" alt="Imagine that he will maintain your code! Credits: Dark Knight" width="277" height="186" /></a><p class="wp-caption-text">Imagine that he will maintain your code! Credits: Dark Knight</p></div>
<h3><a title="Cory Doctorow, Wikipedia" href="http://en.wikipedia.org/wiki/Cory_Doctorow">Cory Doctorow</a></h3>
<blockquote><p>Engineers are all basically high-functioning autistics who have no idea how normal people do stuff.</p></blockquote>
<p>It&#8217;s from his novel <a title="Little Brother, Amazon" href="http://www.amazon.com/gp/product/0765319853?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0765319853">Little Brother</a> and most of the software which are built demonstrate this fact : unusable or useless.</p>
<div id="attachment_716" class="wp-caption aligncenter" style="width: 730px"><a href="http://wondermark.com/"><img class="size-full wp-image-716" title="wondermark_engineer" src="http://www.coderfriendly.com/wp-content/uploads/2009/12/wondermark_engineer.gif" alt="Credits: Wondermark.com" width="720" height="278" /></a><p class="wp-caption-text">Credits: Wondermark.com</p></div>
<h3><a title="Fred Brooks, Wikipedia" href="http://en.wikipedia.org/wiki/Fred_Brooks">Fred Brooks</a></h3>
<blockquote><p>Adding manpower to a late software project makes it later</p></blockquote>
<p>This quote is from his book the <a title="The Mythical Man-Month, Amazon" href="http://www.amazon.com/gp/product/0201835959?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0201835959">Mythical Man Month</a> and he states it as the Brooks&#8217;s Law. It is the hardest thing to understand for project managers that are not used to software projects.</p>
<div id="attachment_719" class="wp-caption aligncenter" style="width: 468px"><a href="http://www.stellman-greene.com/2007/05/15/late-projects-man-months-and-the-software-crisis/"><img class="size-full wp-image-719" title="late_projects_brooks_law" src="http://www.coderfriendly.com/wp-content/uploads/2009/12/late_projects_brooks_law.png" alt="Credits: stellman-greene.com" width="458" height="375" /></a><p class="wp-caption-text">Credits: stellman-greene.com</p></div>
<h3><a title="P.J. Plauger, Wikipedia" href="http://en.wikipedia.org/wiki/P._J._Plauger">P. J. Plauger</a></h3>
<blockquote><p>My definition of an expert in any field is a person who knows enough about what&#8217;s really going on to be scared.</p></blockquote>
<p>I like this definition: the title &#8220;expert&#8221; is so often overused! I still don&#8217;t know <a title="When do we reach the expert stage, Coderfriendly" href="http://www.coderfriendly.com/2009/05/22/when-do-we-reach-the-expert-stage/">when we reach the expert stage</a>&#8230;</p>
<div id="attachment_720" class="wp-caption aligncenter" style="width: 438px"><a href="http://www.doglegs.net/cclovett/toppage1.htm"><img class="size-full wp-image-720" title="Tell_It_to_the_Experts" src="http://www.coderfriendly.com/wp-content/uploads/2010/01/Tell_It_to_the_Experts.jpg" alt="Credits: doglegs.net" width="428" height="321" /></a><p class="wp-caption-text">Credits: doglegs.net</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.coderfriendly.com/2009/12/30/my-5-favorite-software-quotes/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Developers: do you know how to promote your ideas in your company?</title>
		<link>http://www.coderfriendly.com/2009/11/30/developers-do-you-know-how-to-promote-your-ideas-in-your-company/</link>
		<comments>http://www.coderfriendly.com/2009/11/30/developers-do-you-know-how-to-promote-your-ideas-in-your-company/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 11:03:12 +0000</pubDate>
		<dc:creator>coder-friendly</dc:creator>
				<category><![CDATA[developer]]></category>
		<category><![CDATA[developers]]></category>
		<category><![CDATA[ideas]]></category>
		<category><![CDATA[presentation]]></category>

		<guid isPermaLink="false">http://www.coderfriendly.com/?p=661</guid>
		<description><![CDATA[Have you already done a presentation on software development? Sometimes, do you feel that attendees don&#8217;t understand what you promote? Or they don&#8217;t ask any questions and just wait for the next presentation? Most of us have known this kind of awkward situation. We want to share our ideas, our thoughts but nobody seems interested.
When [...]]]></description>
			<content:encoded><![CDATA[<p>Have you already done a presentation on software development? Sometimes, do you feel that attendees don&#8217;t understand what you promote? Or they don&#8217;t ask any questions and just wait for the next presentation? Most of us have known this kind of awkward situation. We want to share our ideas, our thoughts but nobody seems interested.</p>
<div id="attachment_662" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.flickr.com/photos/31349235@N02/3481599336/"><img class="size-full wp-image-662" title="boring_presentation_corbis" src="http://www.coderfriendly.com/wp-content/uploads/2009/12/boring_presentation_corbis.jpg" alt="Boring presentation - Credits: Corbis" width="400" height="267" /></a><p class="wp-caption-text">Boring presentation - Credits: Corbis</p></div>
<p>When you&#8217;re the talker, there are many possibilities why people don&#8217;t like your presentation:</p>
<ul>
<li>you repeat the same thing every time</li>
<li>your topic is not relevant to their interest</li>
<li>people don&#8217;t understand your ideas</li>
</ul>
<p>These three points are extremely linked together: it&#8217;s your fault! Why don&#8217;t you:</p>
<ul>
<li>present the topic using an original approach</li>
<li>consider your public in order to help them to solve their own problems</li>
<li>make your ideas easier to understand (it doesn&#8217;t mean simplistic)</li>
</ul>
<h3>Create better presentations</h3>
<p>If you have already read my blog, you know that I&#8217;m used to read books when I go into a topic. This time, I&#8217;ve chosen a best seller(I often choose my books by reading the reviews on Amazon): Presentation zen.</p>
<div id="attachment_667" class="wp-caption aligncenter" style="width: 264px"><a href="http://www.amazon.com/gp/product/0321525655?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0321525655"><img class="size-full wp-image-667" title="presentation-zen-book" src="http://www.coderfriendly.com/wp-content/uploads/2009/12/presentation-zen-book.jpg" alt="Presentation Zen: Simple ideas on presentation design and delivery" width="254" height="311" /></a><p class="wp-caption-text">Presentation Zen: Simple ideas on presentation design and delivery</p></div>
<p>It&#8217;s from <a title="Garr Reynolds, Wikipedia" href="http://en.wikipedia.org/wiki/Garr_Reynolds">Garr Reynolds</a> who is, according to Wikipedia:</p>
<blockquote><p><strong>Garr Reynolds</strong> is an <a title="United States" href="http://en.wikipedia.org/wiki/United_States">American</a> writer and designer. He is particularly known for his book <em><a title="Presentation Zen: Simple Ideas on Presentation Design and Delivery (page does not exist)" href="http://en.wikipedia.org/w/index.php?title=Presentation_Zen:_Simple_Ideas_on_Presentation_Design_and_Delivery&amp;action=edit&amp;redlink=1">Presentation Zen: Simple Ideas on Presentation Design and Delivery</a></em>, and for two presentations, <em><a rel="nofollow" href="http://www.slideshare.net/garr/brain-rules-for-presenters">Brain Rules for Presenters</a></em> and <em><a rel="nofollow" href="http://www.slideshare.net/garr/career-advice-08">Career Advice &#8216;08</a></em>. Reynolds is also a professor at the <a title="Kansai Gaidai University" href="http://en.wikipedia.org/wiki/Kansai_Gaidai_University">Kansai Gaidai University</a>, and the former Manager of Worldwide User Group Relations at <a title="Apple Inc." href="http://en.wikipedia.org/wiki/Apple_Inc.">Apple Inc.</a></p></blockquote>
<p>The book is well designed and well explained. It&#8217;s a pleasure to read it! Considering the quality of the paper, it&#8217;s really cheap! There are many samples which illustrate each idea. The &#8220;tool&#8221; Powerpoint is criticized: in fact, it gives bad habits to people. When you have to prepare a presentation, the first thing to do is not to launch Powerpoint! If you do this, it will clearly break your creativity and so, your presentation will probably be boring.</p>
<p>So how to do? There are four main sequential steps:</p>
<ul>
<li><em>Brainstorming:</em> Don&#8217;t use a computer! Write everything you have in mind on the topic you will talk about. It doesn&#8217;t require to be ordered ideas&#8230; Write everything!</li>
<li><em>Grouping and identifying the core:</em> Group similar ideas and identify the unified message, it is what you want your public remembers after the presentation</li>
<li><em>Storyboard off the computer:</em> To be efficient, you have to tell a story: a good way is to print out blank slides, 12 slides per sheet. Then, draw inside the slides (one message per slide).</li>
<li><em>Storyboarding in Slide Sorter view:</em> Make a first draft of your slides on Powerpoint. Use the Slide sorter view to see whether it is fluent.</li>
</ul>
<p>This process will help you to create a presentation which captivates your attendees. The book describes clearly the basic knowledge that everybody has to know about design.</p>
<p>But, when you have the storyboard of your presentation, each slide has to be cautiously built. Don&#8217;t write too much text, only few words. Use an image that your attendees can memorize because, it will be easier for them to remember this slide if there is an image. Use the contrast when you show a chart (example below), etc&#8230; You will learn that building a presentation is an interesting work.</p>
<div id="attachment_682" class="wp-caption aligncenter" style="width: 927px"><a href="http://www.amazon.com/gp/product/0321525655?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0321525655"><img class="size-full wp-image-682" title="presentation_zen_slides_improvements" src="http://www.coderfriendly.com/wp-content/uploads/2009/12/presentation_zen_slides_improvements.jpg" alt="Example of using efficiently the constrast (credits: presentation Zen)" width="917" height="346" /></a><p class="wp-caption-text">Example of using efficiently the constrast (credits: presentation Zen)</p></div>
<p>I can&#8217;t give too much samples if I don&#8217;t want to be accused of &#8220;plaggia&#8221;, but I really recommend everybody to read this book. You will see how bad your presentations were and, particularly, how to improve them.</p>
<h3>Metaphor are keys in software development</h3>
<p>If you have read <a title="Code Complete, Amazon" href="http://www.amazon.com/gp/product/0735619670?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0735619670">Code complete</a> from <a title="Steve McConnell, Wikipedia" href="http://en.wikipedia.org/wiki/Steve_McConnell">Steve McConnell</a>, you know that metaphors are really important to understand software building. In the section 2.1, we can read:</p>
<blockquote><p>Important developments often arise out of analogies. By comparing a topic you understand poorly to something similar you understand better, you can come up with insights that result in a better understanding of the less-familiar topic. This use of metaphor is called &#8220;modeling.&#8221;</p>
<p>[...]</p>
<p>Software development is a younger field than most other sciences. It&#8217;s not yet mature enough to have a set of standard metaphors. Consequently, it has a profusion of complementary and conflicting metaphors. Some are better than others. Some are worse. How well you understand the metaphors determines how well you understand software development.</p></blockquote>
<p>Steve McConnell uses metaphors to describe most of the concepts of his books and yes, it gives us the feeling that he&#8217;s a specialist of software (I&#8217;m convinced he is).</p>
<h3>A good presentation on software development</h3>
<p>So, how to present software development? Whatever the topic is, you have to tell a story which can be understood by all your attendees. Avoid judgments when someone doesn&#8217;t understand what you mean, your explanation can be the problem. Use metaphors in order to make your software development ideas/problems understandable by everyone.</p>
<p>Personally, I&#8217;ve recently tested this technique and people really liked it. And you, what is your tips to prepare a good presentation on software development?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderfriendly.com/2009/11/30/developers-do-you-know-how-to-promote-your-ideas-in-your-company/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Agile evangelism can be dangerous: focus on your needs</title>
		<link>http://www.coderfriendly.com/2009/09/24/agile-evangelism-can-be-dangerous-focus-on-your-needs/</link>
		<comments>http://www.coderfriendly.com/2009/09/24/agile-evangelism-can-be-dangerous-focus-on-your-needs/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 18:52:14 +0000</pubDate>
		<dc:creator>coder-friendly</dc:creator>
				<category><![CDATA[developer]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[agile manifesto]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[scrum]]></category>
		<category><![CDATA[xp]]></category>

		<guid isPermaLink="false">http://www.coderfriendly.com/?p=564</guid>
		<description><![CDATA[Agile becomes popular. The pillar of Agile approaches is the Agile Manifesto which focuses on 4 values:


Individuals and interactions over processes and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan


These values are important to remember : before trying to learn Scrum or XP, just read them sometimes.
Do you [...]]]></description>
			<content:encoded><![CDATA[<p>Agile becomes popular. The pillar of Agile approaches is the <a href="http://agilemanifesto.org/">Agile Manifesto</a> which focuses on 4 values:</p>
<ul>
<blockquote>
<li><strong>Individuals and interactions</strong> over processes and tools</li>
<li><strong>Working software</strong> over comprehensive documentation</li>
<li><strong>Customer collaboration</strong> over contract negotiation</li>
<li><strong>Responding to change</strong> over following a plan</li>
</blockquote>
</ul>
<p>These values are important to remember : before trying to learn Scrum or XP, just read them sometimes.</p>
<p>Do you know who are the authors of this manifesto? Kent Beck, Mike Beedle, Arie van Bennekum, Alistair Cockburn, Ward Cunningham, Martin Fowler, James Grenning, Jim Highsmith, Andrew Hunt, Ron Jeffries, Jon Kern, Brian Marick, Robert C.Martin, Steve Mellor, Ken Schwaber, Jeff Sutherland, Dave Thomas. You can get their biographies <a href="http://agilemanifesto.org/authors.html">here</a>.</p>
<h3>The books phenomenon</h3>
<p>When we investigate a new domain, read a book is one of the most efficient way to get an overview. I&#8217;ve searched for books from these authors on Amazon and the results impressed me.</p>
<p>In order to share my feelings with you, I put here books from these authors if they are related to Agile approaches :</p>
<ul>
<li>every book which has &#8220;Agile&#8221; or &#8220;Agility&#8221; in its title</li>
<li>every book which presents an Agile methodoly (Scrum, Extreme Programming, etc)</li>
<li>every book which presents refactoring, testing, code quality or other technical stuff that are used to &#8220;responding to change&#8221;</li>
<li>every book which presents pragmatic thinking and which is not related to a specific language  (Java, Ruby, etc)</li>
</ul>
<table border="0">
<tbody>
<tr>
<td><strong>Kent Beck</strong></p>
<p><a href="http://www.amazon.com/gp/product/0321278658?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0321278658"><img class="aligncenter size-full wp-image-574" style="display:inline;margin-right:10px;" title="books_extreme_programming_explained" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_extreme_programming_explained.jpg" alt="books_extreme_programming_explained" width="88" height="110" /></a><a href="http://www.amazon.com/gp/product/0201710919?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0201710919"></a><a href="http://www.amazon.com/gp/product/0321146530?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0321146530"><img class="aligncenter size-full wp-image-578" style="display:inline;margin-right:10px;" title="books_tdd" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_tdd.jpg" alt="books_tdd" width="88" height="110" /></a></td>
<td><strong>Robert C.Martin</strong></p>
<p><a href="http://www.amazon.com/gp/product/0135974445?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0135974445"><img class="aligncenter size-full wp-image-611" style="display:inline" title="books_agile_design_patterns_practices" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_agile_design_patterns_practices.jpg" alt="books_agile_design_patterns_practices" width="115" height="115" /></a><a href="http://www.amazon.com/gp/product/0132350882?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0132350882"><img class="aligncenter size-full wp-image-612" style="display:inline;margin-right:10px;" title="books_clean_code" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_clean_code.jpg" alt="books_clean_code" width="84" height="110" /></a></td>
<td><strong>Mike Beedle &amp; Ken Schwaber</strong></p>
<p><a href="http://www.amazon.com/gp/product/0130676349?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0130676349"><img class="aligncenter size-full wp-image-584" style="display:inline;margin-right:10px;" title="books_agile_software_dev" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_agile_software_dev1.jpg" alt="books_agile_software_dev" width="74" height="110" /></a></td>
</tr>
<tr>
<td><strong>Alistair Cockburn</strong></p>
<p><a href="http://www.amazon.com/gp/product/0321482751?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0321482751"><img class="aligncenter size-full wp-image-586" style="display:inline;margin-right:10px;" title="books_agile_software_dev_ali" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_agile_software_dev_ali.jpg" alt="books_agile_software_dev_ali" width="88" height="110" /></a><a href="http://www.amazon.com/gp/product/0201702258?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0201702258"><img class="aligncenter size-full wp-image-587" style="display:inline;margin-right:10px;" title="books_writing_effective_uc" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_writing_effective_uc.jpg" alt="books_writing_effective_uc" width="88" height="110" /></a><a href="http://www.amazon.com/gp/product/0201699478?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0201699478"><img class="aligncenter size-full wp-image-588" style="display:inline;margin-right:10px;" title="books_crystal_clear" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_crystal_clear.jpg" alt="books_crystal_clear" width="82" height="110" /></a></td>
<td><strong>Ward Cunningham</strong></p>
<p><a href="http://www.amazon.com/gp/product/0321269349?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0321269349"><img class="aligncenter size-full wp-image-594" style="display:inline" title="books_fit_development_software" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_fit_development_software.jpg" alt="books_fit_development_software" width="115" height="115" /></a></td>
<td><strong>Jim Highsmith</strong></p>
<p><a href="http://www.amazon.com/gp/product/0321658396?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0321658396"><img class="aligncenter size-full wp-image-614" style="display:inline;margin-right:10px;" title="books_agile_innovative_products" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_agile_innovative_products.jpg" alt="books_agile_innovative_products" width="89" height="116" /></a><a href="http://www.amazon.com/gp/product/0201760436?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0201760436"><img class="aligncenter size-full wp-image-615" style="display:inline;margin-right:10px;" title="books_agile_dev_ecosystems" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_agile_dev_ecosystems.jpg" alt="books_agile_dev_ecosystems" width="93" height="116" /></a></td>
</tr>
<tr>
<td><strong>Andrew Hunt</strong></p>
<p><a href="http://www.amazon.com/gp/product/020161622X?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=020161622X"><img class="aligncenter size-full wp-image-599" style="display:inline;margin-right:10px;" title="books_pragmatic_programmer" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_pragmatic_programmer.jpg" alt="books_pragmatic_programmer" width="87" height="110" /></a><a href="http://www.amazon.com/gp/product/1934356050?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1934356050"><img class="aligncenter size-full wp-image-600" style="display:inline;margin-right:10px;" title="books_pragmatic_thinking_learning" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_pragmatic_thinking_learning.jpg" alt="books_pragmatic_thinking_learning" width="92" height="110" /></a><a href="http://www.amazon.com/gp/product/097451408X?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=097451408X"><img class="aligncenter size-full wp-image-601" style="display:inline;margin-right:10px;" title="books_pratices_agile_development" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_pratices_agile_development.jpg" alt="books_pratices_agile_development" width="92" height="110" /></a></td>
<td><strong>Ron Jeffries</strong></p>
<p><a href="http://www.amazon.com/gp/product/0735619492?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0735619492"><img class="aligncenter size-full wp-image-609" style="display:inline;margin-right:10px;" title="books_xp_csharp" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_xp_csharp.jpg" alt="books_xp_csharp" width="91" height="110" /></a></td>
<td><strong>Kent Beck &amp; Martin Fowler</strong></p>
<p><a href="http://www.amazon.com/gp/product/0201710919?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0201710919"><img class="aligncenter size-full wp-image-575" style="display:inline;margin-right:10px;" title="books_planning_xp" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_planning_xp.jpg" alt="books_planning_xp" width="88" height="110" /></a><a href="http://www.amazon.com/gp/product/0201485672?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0201485672"><img class="aligncenter size-full wp-image-582" style="display:inline;margin-right:10px;" title="books_refactoring_improving" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_refactoring_improving.jpg" alt="books_refactoring_improving" width="86" height="110" /></a></td>
</tr>
<tr>
<td><strong>Ken Schwaber</strong></p>
<p><a href="http://www.amazon.com/gp/product/0977616649?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0977616649"><img class="aligncenter size-full wp-image-603" style="display:inline;margin-right:10px;" title="books_agile_retrospectives" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_agile_retrospectives.jpg" alt="books_agile_retrospectives" width="115" height="115" /></a><a href="http://www.amazon.com/gp/product/073561993X?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=073561993X"><img class="aligncenter size-full wp-image-604" style="display:inline;margin-right:10px;" title="books_agile_proj_scrum" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_agile_proj_scrum.jpg" alt="books_agile_proj_scrum" width="91" height="110" /></a><a href="http://www.amazon.com/gp/product/0735623376?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0735623376"><img class="aligncenter size-full wp-image-605" style="display:inline;margin-right:10px;" title="books_enterprise_scrum" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/books_enterprise_scrum.jpg" alt="books_enterprise_scrum" width="90" height="110" /></a></td>
</tr>
</tbody>
</table>
<h3>Feelings are strange</h3>
<p>Does the number of books from these authors impress you? Really? Evangelism is often required in order to make ideas popular : books are part of the system. And it&#8217;s amazing: each book has pretty good reviews on Amazon (min 4/5). They are good references on this domain and these guys have made a tremendous job for software engineering : I encourage every developer to subscribe to their feeds (most of them have a blog, search engines are your friends).</p>
<p>But it&#8217;s interesting to see an opposite view. In his post, &#8220;<a title="Good Agile, Bad Agile; Steeve Yegge" href="http://steve-yegge.blogspot.com/2006/09/good-agile-bad-agile_27.html">Good Agile, bad agile</a>&#8220;, <a title="Steve Yegge, Wikipedia" href="http://en.wikipedia.org/wiki/Steve_Yegge">Steve Yegge</a> (a &#8220;googler&#8221;) criticizes methodologies:</p>
<blockquote>
<ul>
<li>anything that calls itself a &#8220;Methodology&#8221; is stupid, on general principle.</li>
<li>anything that requires &#8220;evangelists&#8221; <em>and</em> offers seminars, exists soley for the purpose of making money.</li>
<li>anything that never mentions any competition or alternatives is dubiously self-serving.</li>
<li>anything that does diagrams with hand-wavy math is stupid, on general principle.</li>
</ul>
<p>And by &#8220;stupid&#8221;, I mean it&#8217;s &#8220;incredibly brilliant marketing targeted at stupid people.&#8221;</p></blockquote>
<p>Maybe, this view is not really objective and the biggest problem of Steve&#8217;s post is that Steve considers that the Google model can be replicated in any company, and for cultural history of others companies, it&#8217;s often wrong. And I disagree that, when you listen to others ideas, you&#8217;re stupid. But I agree with Steve on one point that we can observe when evangelism is too strong:</p>
<blockquote><p>anything that never mentions any competition</p></blockquote>
<h3>Agile approaches don&#8217;t work with any type of projects</h3>
<p>But currently, I worry about the &#8220;agility&#8221; word because it seems that it becomes a buzzword and most of us forget sometimes that Agile approaches are not silver-bullets:</p>
<ul>
<li>it&#8217;s hard to become agile</li>
<li>agile is not always the most appropriate approach</li>
</ul>
<p>The first point is always the one which is addressed when we say that it&#8217;s not a silver-bullet, but the second one is often forgotten. In his best-seller &#8220;<a title="Code Complete, Amazon" href="http://www.amazon.com/gp/product/0735619670?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0735619670">Code complete</a>&#8220;, <a title="Steve McConnel, Wikipedia" href="http://en.wikipedia.org/wiki/Steve_McConnell">Steve McConnell</a> wrote:</p>
<blockquote><p>In software, consultants sometimes tell you to buy into certain software-development methods to the exclusion of other methods. That&#8217;s unfortunate because if you buy into any single methodology 100 percent, you&#8217;ll see the whole world in terms of that methodology. In some instances, you&#8217;ll miss opportunities to use other methods better suited to your current problem.</p></blockquote>
<p>Most of (all?) authors of the Agile manifesto agrees with the Steve&#8217;s view about methods. So, focus on this point !</p>
<h3>When is agile relevant?</h3>
<p><a title="Danc, Profile" href="http://www.blogger.com/profile/10437870541630835660">Danc</a> gives a spectrum of Process Complexity in his post &#8220;<a title="Managing game design risk: Part I" href="http://lostgarden.com/2006/04/managing-game-design-risk-part-i.html">Managing game design risk: Part I</a>&#8221;</p>
<blockquote><p><a href="http://www.coderfriendly.com/wp-content/uploads/2009/09/spectrum_proces_complexity.jpg"><img class="aligncenter size-full wp-image-641" title="Process complexity" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/spectrum_proces_complexity.jpg" alt="Process complexity" width="545" height="467" /></a></p>
<p><span> </span></p>
<ul>
<li><strong>Simple Processes</strong>: When both requirements and execution are quite certain, then the projects can be managed with relatively simple processes. Often a simple checklist does the trick. The repetative steps that a single worker performs on an assembly line is a good example of a simple task.</li>
<li><strong>Complicated</strong>: When the requirements and execution get out of hand slightly, you end up with a project that can still be completed with your typical check list. However, you need to increase the number of rule and steps necessary to accomplish the task. Bridge building is a good example of a complicated task.</li>
<li><strong>Complex</strong>: Many projects fall into the dangerous middle ground where requirements and execution is somewhat defined, but rife with multiple layers of uncertainty. In these situations, high feedback, agile processes let team steer their way towards ago despite high risk and uncertainty. Software development is a good example of a complex task.</li>
<li><strong>Chaotic Processes</strong>: When both requirements and execution uncertainty is very high, projects tend to devolve into unmanageable chaos. Success arises as often from luck as it does from any real process.</li>
</ul>
</blockquote>
<p>Agile is adapted to complex projects. For others kinds of projects, there&#8217;s probably a better way to manage them. If your project is complicated, you may have a look at Lean approaches or other methodologies. When you have a simple project, I think that the Waterfall way is a good one: you will always be more efficient if you can specify clearly the requirements at the beginning.</p>
<h3>Conclusion</h3>
<p>Don&#8217;t become an evangelist yourself : look at your project and decide which methodologies is the most adapted. Sometimes, Agile is not the right one but if you see that your requirements are far from agreement or certainty, Agile approaches are probably a good choice.</p>
<p>Do you think that you become an evangelist sometimes?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderfriendly.com/2009/09/24/agile-evangelism-can-be-dangerous-focus-on-your-needs/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Multitasking is not productive</title>
		<link>http://www.coderfriendly.com/2009/09/06/multitasking-is-not-productive/</link>
		<comments>http://www.coderfriendly.com/2009/09/06/multitasking-is-not-productive/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 15:23:04 +0000</pubDate>
		<dc:creator>coder-friendly</dc:creator>
				<category><![CDATA[developer]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[task]]></category>

		<guid isPermaLink="false">http://www.coderfriendly.com/?p=528</guid>
		<description><![CDATA[In your every day work, you are probably working on more than one project at the same time. Sometimes, you have so many tasks to do that you don&#8217;t know with which one you have to start. You observe your progress but you don&#8217;t seem to be getting anywhere. Maybe you have a problem, or [...]]]></description>
			<content:encoded><![CDATA[<p>In your every day work, you are probably working on more than one project at the same time. Sometimes, you have so many tasks to do that you don&#8217;t know with which one you have to start. You observe your progress but you don&#8217;t seem to be getting anywhere. Maybe you have a problem, or you&#8217;re just human&#8230;</p>
<h3><span>Study</span></h3>
<p><span>In 90s, two professors of Harvard, <a href="http://drfd.hbs.edu/fit/public/facultyInfo.do;jsessionid=HSzSkdKpnmryWbtFWY02Xk9Y2T6CLhz3kLZMQJQpsbvm8RkphPYv!761137847!-1483919228?facInfo=bio&amp;facEmId=swheelwright%40hbs.edu">Steven C.Wheelwright</a> and <a href="http://drfd.hbs.edu/fit/public/facultyInfo.do?facInfo=bio&amp;facEmId=kclark">Kim B.Clark</a> have studied human productivity when we are working on many concurrent tasks (you can find this result in their book <a href="http://www.amazon.com/Revolutionizing-Product-Development-Quantum-Efficiency/dp/0029055156/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1252246616&amp;sr=8-2">Revolutionizing Product Development: Quantum Leaps in Speed, Efficiency and Quality</a>). This chart gives the percent of time working on tasks relative to the number of concurrent tasks to do:<br />
</span></p>
<h3>
<div id="attachment_529" class="wp-caption aligncenter" style="width: 617px"><a href="http://www.coderfriendly.com/wp-content/uploads/2009/06/multitasking_delays.jpg"><img class="size-full wp-image-529" title="multitasking_delays" src="http://www.coderfriendly.com/wp-content/uploads/2009/06/multitasking_delays.jpg" alt="Multitasking &amp; productivity" width="607" height="435" /></a><p class="wp-caption-text">Multitasking &amp; productivity</p></div></h3>
<p>So, what do we see here? The highest productivity is reached when we have only two concurrent tasks. With more than two, we waste too much time on switching. With only one, when we&#8217;re blocked, we waste time. With two, you can work on a task and when you&#8217;re blocked, you switch to the other one. This result is easy to understand but it is too often forgotten by managers who wants to drive sometimes too many projects at the same time (and so, they give too much concurrent tasks to his/her team members -&gt; but remember, they&#8217;re just human too&#8230;).</p>
<h3>How to improve my productivity?</h3>
<p>Okay, our management team can sometimes decrease our productivity when they give us too many tasks (maybe, it may be a good idea to show him/her this study). But, what about ourselves?</p>
<p>Today, if you have Internet at work, you probably add to yourself many tasks: read the last RSS feeds, see what is going on on Tweeter, look at your social networks, access to your personal emails&#8230; And now, you know that it decreases your productivity in a way you don&#8217;t want. So, try to keep you some time-breaks to manage your &#8220;personal concurrent tasks&#8221; but don&#8217;t work at the same time : just close them when you are working (yes, close the gmail tab <img src='http://www.coderfriendly.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<p><div id="attachment_553" class="wp-caption aligncenter" style="width: 650px"><a href="http://dilbert.com/"><img class="size-full wp-image-553" title="dilbert gadgets" src="http://www.coderfriendly.com/wp-content/uploads/2009/09/dilbert-gadgets.gif" alt="Credits: dilbert.com" width="640" height="199" /></a><p class="wp-caption-text">Credits: dilbert.com</p></div>
<h3>LeechBlock can help</h3>
<p>If you&#8217;re a user of Firefox, I recommend you to install the <a href="https://addons.mozilla.org/en-US/firefox/addon/4476">LeechBlock</a> extension:</p>
<blockquote><p>LeechBlock is a simple productivity tool designed to block those time-wasting sites that can suck the life out of your working day. (You know: the ones that rhyme with &#8216;Blue Cube&#8217;, &#8216;Pie Face&#8217;, &#8216;Space Hook&#8217;, &#8216;Hash Pot&#8217;, &#8216;Sticky Media&#8217;, and the like.) All you need to do is specify which sites to block and when to block them.</p>
<p>You can specify up to six sets of sites to block, with different times and days for each set. You can block sites within fixed time periods (e.g., between 9am and 5pm), after a time limit (e.g., 10 minutes in every hour), or with a combination of time periods and time limit (e.g., 10 minutes in every hour between 9am and 5pm). You can also set a password for access to the extension options, just to slow you down in moments of weakness!</p></blockquote>
<p>With this tool, the temptation is lower and you can configure it as you want.</p>
<p>Have you already try this kind of tools? Does it prevent you from being disturbed?</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">
<h1 class="parseasinTitle"><span id="btAsinTitle">Revolutionizing Product Development: Quantum Leaps in Speed, Efficiency, and Quality</span></h1>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.coderfriendly.com/2009/09/06/multitasking-is-not-productive/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to win friends? Social network are similar to real life…</title>
		<link>http://www.coderfriendly.com/2009/08/26/how-to-win-friends-social-network-are-similar-to-real-life/</link>
		<comments>http://www.coderfriendly.com/2009/08/26/how-to-win-friends-social-network-are-similar-to-real-life/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 14:02:54 +0000</pubDate>
		<dc:creator>coder-friendly</dc:creator>
				<category><![CDATA[developer]]></category>
		<category><![CDATA[friend]]></category>
		<category><![CDATA[social networks]]></category>

		<guid isPermaLink="false">http://www.coderfriendly.com/?p=540</guid>
		<description><![CDATA[Nowadays, social networks are maybe overused but I&#8217;m not a fan of them. They have completely redefined the word &#8220;Friends&#8221;: &#8220;acquaintance&#8221; is the right one for most of the cases.
At the beginning, I wasn&#8217;t convinced by the success of this kind of websites. Why do people want to share their personal life with 200 of [...]]]></description>
			<content:encoded><![CDATA[<p>Nowadays, social networks are maybe overused but I&#8217;m not a fan of them. They have completely redefined the word &#8220;Friends&#8221;: &#8220;acquaintance&#8221; is the right one for most of the cases.</p>
<div id="attachment_542" class="wp-caption aligncenter" style="width: 525px"><a href="http://rimfrost.deviantart.com/art/McMorbid-Facebook-127236360?moodonly=1"><img class="size-full wp-image-542" title="McMorbid___Facebook_by_Rimfrost" src="http://www.coderfriendly.com/wp-content/uploads/2009/08/McMorbid___Facebook_by_Rimfrost.jpg" alt="Facebook Friends - Credits Mc Morbid" width="515" height="366" /></a><p class="wp-caption-text">Facebook Friends - Credits Mc Morbid</p></div>
<p>At the beginning, I wasn&#8217;t convinced by the success of this kind of websites. Why do people want to share their personal life with 200 of their &#8220;friends&#8221;. Why would I want to say to everybody that I&#8217;m happy&#8230; that I love this group&#8230; and why would I want to share my private photos with these &#8220;friends&#8221;? Moreover, how can I accept to give all those informations to a website/company which consider that the data is its property&#8230; Maybe, I&#8217;m too paranoid on this topic!</p>
<p>But in fact, what are friends? What is behind this popular word? If you haven&#8217;t read this great book, I recommend this cheap best seller to you:</p>
<p><a href="http://www.amazon.com/gp/product/0671027034?ie=UTF8&amp;tag=coderfriendly-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0671027034"><img class="aligncenter size-full wp-image-545" title="how-to-win-friends" src="http://www.coderfriendly.com/wp-content/uploads/2009/08/how-to-win-friends.jpg" alt="how-to-win-friends" width="150" height="233" /></a>Each chapter is summarized in one sentence (it&#8217;s not enough to just read these sentences but, it&#8217;s nice to read them again after reading the book). I read it in French but the sentences are available on <a href="http://en.wikipedia.org/wiki/How_to_Win_Friends_and_Influence_People">its wikipedia page</a>. Some of them are really useful in order to consider the success of social network:</p>
<ul>
<li>Become genuinely interested in other people</li>
<li>Be a good listener. Encourage others to talk about themselves</li>
<li>Make the other person feel important and do it sincerely</li>
</ul>
<p>Why these ones? Because when I ask to other people why they are using thiskind of networks, they answer me: I want to stay in touch with my &#8220;friends&#8221;. But, I&#8217;m convinced that they are using it in order to tell to every body what they are doing themselves. They want to say: I&#8217;ve done this, do you know? And I never see one of my &#8220;friend&#8221; who is saying &#8220;What you&#8217;ve done, I don&#8217;t care&#8221;! We just make a small interest, if it is nice, we say it&#8230; But if it is not, we don&#8217;t say anything.</p>
<p>I&#8217;m not a social network fan&#8230; But I try to understand why they have such a success&#8230; And one of my answer is: Others are genuinely interested in other people. They are good listeners and they encourage others to talk about themselves. They make me feel that I&#8217;m important&#8230;</p>
<p>And you, do you like social network? Do you use them?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderfriendly.com/2009/08/26/how-to-win-friends-social-network-are-similar-to-real-life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Your project doesn’t become better because it has more lines of code…</title>
		<link>http://www.coderfriendly.com/2009/07/15/your-project-doesnt-become-better-because-it-has-more-lines-of-code/</link>
		<comments>http://www.coderfriendly.com/2009/07/15/your-project-doesnt-become-better-because-it-has-more-lines-of-code/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 19:19:21 +0000</pubDate>
		<dc:creator>coder-friendly</dc:creator>
				<category><![CDATA[developer]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[lines of code]]></category>
		<category><![CDATA[loc]]></category>
		<category><![CDATA[refactoring]]></category>

		<guid isPermaLink="false">http://www.coderfriendly.com/?p=509</guid>
		<description><![CDATA[As an Eclipse user, you know that the new release Galileo is available. This chart represents the evolution of the Eclipse project (found here):

In 6 years, the Eclipse project counts now 33 sub-projects and 24 millions Lines Of Code (LOC). The number of projects demonstrates that its incubator is really useful but, I don&#8217;t like [...]]]></description>
			<content:encoded><![CDATA[<p>As an Eclipse user, you know that the new release Galileo is available. This chart represents the evolution of the Eclipse project (found <a title="Eclipse Galileo, ZDNET" href="http://blogs.zdnet.com/Burnette/?p=1276">here</a>):</p>
<p><a href="http://www.coderfriendly.com/wp-content/uploads/2009/07/eclipse_galileo.png"><img class="aligncenter size-full wp-image-531" title="eclipse_galileo" src="http://www.coderfriendly.com/wp-content/uploads/2009/07/eclipse_galileo.png" alt="eclipse_galileo" width="465" height="321" /></a></p>
<p>In 6 years, the Eclipse project counts now 33 sub-projects and 24 millions Lines Of Code (LOC). The number of projects demonstrates that its incubator is really useful but, I don&#8217;t like to see the number of lines of code. In his article &#8220;<a title="Cannot Measure Productivity, Martin Fowler" href="http://martinfowler.com/bliki/CannotMeasureProductivity.html">Cannot Measure Productivity</a>&#8220;, Martin Fowler wrote:</p>
<blockquote><p>Any good developer knows that they can code the same stuff with huge variations in lines of code, furthermore code that&#8217;s well designed and factored will be shorter because it eliminates the duplication. Copy and paste programming leads to high LOC counts and poor design because it breeds duplication. You can prove this to yourself if you go at a program with a refactoring tool that supports <a href="http://www.refactoring.com/catalog/inlineMethod.html">Inline Method</a>. Just using that on common routines should allow you to easy double the LOC count.</p>
<p>You would think that lines of code are dead, but it seems that every month I see productivity studies based on lines of code &#8211; even in such respected journals as IEEE Software that should know better.</p>
<p>Now this doesn&#8217;t mean that LOC is a completely useless measure, it&#8217;s pretty good at suggesting the size of a system. I can be pretty confident that a 100 KLOC system is bigger than a 10KLOC system. But if I&#8217;ve written the 100KLOC system in a year, and Joe writes the same system in 10KLOC during the same time, that doesn&#8217;t make me more productive. Indeed I would conclude that our productivities are about the same but my system is much more poorly designed.</p></blockquote>
<p>What I mean is that, for a project of the size of Eclipse, the rise of this metric doesn&#8217;t provide any information. A project with 17 MLOC is as big as a project with 24 MLOC: they are both huge projects. What would be interesting to know is whether dead code is removed between releases or whether redundant code is refactored. <a title="Ohloh" href="http://www.ohloh.net/">Ohloh</a> can give you an idea. For sample, if we&#8217;re looking at the <a title="Mysql, Ohloh" href="http://www.ohloh.net/p/mysql/analyses/latest">MySQL</a> project, we can get this chart:</p>
<div id="attachment_532" class="wp-caption aligncenter" style="width: 644px"><a href="http://www.coderfriendly.com/wp-content/uploads/2009/07/ohloh_mysql.jpg"><img class="size-full wp-image-532" title="ohloh_mysql" src="http://www.coderfriendly.com/wp-content/uploads/2009/07/ohloh_mysql.jpg" alt="Mysql - Ohloh - LOC" width="634" height="245" /></a><p class="wp-caption-text">Mysql - Ohloh - LOC</p></div>
<p>The fact that the number of LOC decreases sometimes can give us an hint on the project. We can hope that it is related to refactor/clean up sessions.</p>
<p>In summary, the number of lines of code provides only an idea of what the size of a project is. When the project is becoming bigger and bigger and that the size never decreases, refactoring stuffs are probably never done and the cost to enter in the code increases significantly.</p>
<blockquote><p>Measuring progress by lines of code is like measuring aircraft building progress by weight, Bill Gates</p></blockquote>
<p>NB: I only use the Eclipse chart to discuss about this metric, I like Eclipse and I don&#8217;t deduce that Eclipse developers don&#8217;t make any refactoring: this chart is not enough.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderfriendly.com/2009/07/15/your-project-doesnt-become-better-because-it-has-more-lines-of-code/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Nested classes : static and non-static</title>
		<link>http://www.coderfriendly.com/2009/06/27/inner-classes-static-and-non-static/</link>
		<comments>http://www.coderfriendly.com/2009/06/27/inner-classes-static-and-non-static/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 17:56:58 +0000</pubDate>
		<dc:creator>coder-friendly</dc:creator>
				<category><![CDATA[developer]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[inner]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[nested]]></category>

		<guid isPermaLink="false">http://www.coderfriendly.com/?p=506</guid>
		<description><![CDATA[You probably use inner classes which are (if I refer to Wikipedia):
In object-oriented programming, an inner class (aka nested class) is a class declared entirely within the body of another class or interface. It is distinguished from a subclass.
In Java, we can illustrate this concept with this sample:

public final class Clazz &#123;
  private final [...]]]></description>
			<content:encoded><![CDATA[<p>You probably use inner classes which are (if I refer to <a title="Inner class, Wikipedia" href="http://en.wikipedia.org/wiki/Inner_class">Wikipedia</a>):</p>
<blockquote><p>In <a title="Object-oriented programming" href="http://en.wikipedia.org/wiki/Object-oriented_programming">object-oriented programming</a>, an <strong>inner class</strong> (aka <strong>nested class</strong>) is a <a title="Class (computer science)" href="http://en.wikipedia.org/wiki/Class_%28computer_science%29">class</a> declared entirely within the body of another class or interface. It is distinguished from a <a title="Subclass (computer science)" href="http://en.wikipedia.org/wiki/Subclass_%28computer_science%29">subclass</a>.</p></blockquote>
<p>In Java, we can illustrate this concept with this sample:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">class</span> Clazz <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">class</span> InnerClazz <span style="color: #000000; font-weight: bold;">implements</span> <span style="color: #003399;">Runnable</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> InnerClazz<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> run<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Hello world&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> Clazz<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">Runnable</span> getRunnable<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> InnerClazz<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>It&#8217;s a simple sample that does nothing useful but the declaration of inner classes is shown. I remark that the difference between nested classes and  inner classes is not always understood by every developer.</p>
<h3>Inner class</h3>
<p>The previous code declares a nested class &#8220;InnerClazz&#8221;. A new instance of it is created each time the getRunnable method is called. If you analyze this code with FindBugs, you will have this warning:</p>
<blockquote><p><strong>SIC: Should be a static inner class (SIC_INNER_SHOULD_BE_STATIC)</strong><br />
This class is an inner class, but does not use its embedded reference   to the object which created it.  This reference makes the instances   of the class larger, and may keep the reference to the creator object   alive longer than necessary.  If possible, the class should be    made static.</p></blockquote>
<p>The message is explicit: an inner class keeps a reference on its parent class and so, as long as the InnerClazz is referenced, the parent class can&#8217;t be garbage collected (there&#8217;s a strong reference between the inner class and its parent -&gt; you may read on <a title="Garbage collection doesn’t mean no memory management" href="http://www.coderfriendly.com/2009/06/14/garbage-collection-doesnt-mean-no-memory-management/">memory management</a>). This kind of nested class is useful when you want to use the reference:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">class</span> Clazz <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">class</span> InnerClazz <span style="color: #000000; font-weight: bold;">implements</span> <span style="color: #003399;">Runnable</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> InnerClazz<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> run<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #666666; font-style: italic;">// print the value of a member of its &quot;parent&quot; class</span>
      <span style="color: #666666; font-style: italic;">// it's possible because the inner class has an implicit reference</span>
      <span style="color: #666666; font-style: italic;">// on the Clazz instance</span>
      <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>_currentNumber<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">int</span> _currentNumber <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> Clazz<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">Runnable</span> getRunnable<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    _currentNumber<span style="color: #339933;">++;</span>
    <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> InnerClazz<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h3>Nested but not inner class</h3>
<p>If you don&#8217;t need to keep a strong reference between the instance of Clazz and InnerClazz, just declare InnerClazz as a static member class (now called NestedNotInnerClazz).</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">class</span> Clazz <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">// static keyword is added</span>
  <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">class</span> NestedNotInnerClazz <span style="color: #000000; font-weight: bold;">implements</span> <span style="color: #003399;">Runnable</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> NestedNotInnerClazz<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> run<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Hello world&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> Clazz<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">Runnable</span> getRunnable<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> NestedNotInnerClazz<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Yes, it&#8217;s easy&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderfriendly.com/2009/06/27/inner-classes-static-and-non-static/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Garbage collection doesn’t mean no memory management</title>
		<link>http://www.coderfriendly.com/2009/06/14/garbage-collection-doesnt-mean-no-memory-management/</link>
		<comments>http://www.coderfriendly.com/2009/06/14/garbage-collection-doesnt-mean-no-memory-management/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 17:33:56 +0000</pubDate>
		<dc:creator>coder-friendly</dc:creator>
				<category><![CDATA[developer]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[garbage collection]]></category>
		<category><![CDATA[garbage collector]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[memory]]></category>

		<guid isPermaLink="false">http://www.coderfriendly.com/?p=476</guid>
		<description><![CDATA[Managed languages rely on the garbage collector. According to Wikipedia article on garbage collection, it is:
In computer science, garbage collection (GC) is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory used by objects that are no longer in use by the application. Garbage collection was [...]]]></description>
			<content:encoded><![CDATA[<p>Managed languages rely on the garbage collector. According to Wikipedia article on <a title="Garbage collection, Wikipedia" href="http://en.wikipedia.org/wiki/Garbage_collection_(computer_science)">garbage collection</a>, it is:</p>
<blockquote><p>In <a title="Computer science" href="http://en.wikipedia.org/wiki/Computer_science">computer science</a>, <strong>garbage collection</strong> (<strong>GC</strong>) is a form of automatic <a title="Memory management" href="http://en.wikipedia.org/wiki/Memory_management">memory management</a>. The <em>garbage collector</em>, or just <em>collector</em>, attempts to reclaim <em><a title="Garbage (computer science)" href="http://en.wikipedia.org/wiki/Garbage_%28computer_science%29">garbage</a></em>, or memory used by <a title="Object (computer science)" href="http://en.wikipedia.org/wiki/Object_%28computer_science%29">objects</a> that are no longer in use by the <a title="Application software" href="http://en.wikipedia.org/wiki/Application_software">application</a>. Garbage collection was invented by <a title="John McCarthy (computer scientist)" href="http://en.wikipedia.org/wiki/John_McCarthy_%28computer_scientist%29">John McCarthy</a> around 1959 to solve the problems of manual memory management in <a title="Lisp (programming language)" href="http://en.wikipedia.org/wiki/Lisp_%28programming_language%29">Lisp</a>.</p></blockquote>
<p>In this post, we have a look at:</p>
<ul>
<li>when is the garbage collection triggered?</li>
<li>how to know when objects are no longer in use?</li>
</ul>
<p>This post is related to the Java platform but it&#8217;s probably the same principles on .net one.</p>
<h3>Triggers of garbage collection</h3>
<p>As you know, you can invoke garbage collection explicitly in your code:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #003399;">System</span>.<span style="color: #006633;">gc</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The javadoc of this static method is:</p>
<blockquote><p>Runs the garbage collector.</p>
<p>Calling the <code>gc</code> method suggests that the Java Virtual  Machine expend effort toward recycling unused objects in order to  make the memory they currently occupy available for quick reuse.  When control returns from the method call, the Java Virtual  Machine has made a best effort to reclaim space from all discarded  objects.</p></blockquote>
<p>But it&#8217;s not recommended to use this explicit call. <a title="Findbugs website" href="http://findbugs.sourceforge.net/">Findbugs</a> considers that it&#8217;s <a title="DM_GC bug, Findbugs" href="http://findbugs.sourceforge.net/bugDescriptions.html#DM_GC">a bug</a>:</p>
<blockquote><p><strong>Dm: Explicit garbage collection; extremely dubious except in benchmarking code (DM_GC)</strong><br />
Code explicitly invokes garbage collection.   Except for specific use in benchmarking, this is very dubious.</p>
<p>In the past, situations where people have explicitly invoked   the garbage collector in routines such as close or finalize methods   has led to huge performance black holes. Garbage collection    can be expensive. Any situation that forces hundreds or thousands    of garbage collections will bring the machine to a crawl.</p></blockquote>
<p>So, we have to rely on the mechanism provided by the platform. The <a title="HotSpot, Sun" href="http://java.sun.com/javase/technologies/hotspot/">Java HotSpot Virtual Machine</a> uses a generational collection which means that the memory is divided in generations. Each generation holds objects of a different ages. The reason why this approach is used is that it exploits the weak generational hypothesis:</p>
<ul>
<li>Most objects die young (not referenced for a long time)</li>
<li>Few references from older to younger objects exist</li>
</ul>
<p>In HotSpot, the generations are:</p>
<ul>
<li>Young generation (green)</li>
<li>Old generation (blue)</li>
</ul>
<div id="attachment_481" class="wp-caption aligncenter" style="width: 624px"><a href="http://www.coderfriendly.com/wp-content/uploads/2009/06/javagc.png"><img class="size-full wp-image-481" title="Garbage collector: generations" src="http://www.coderfriendly.com/wp-content/uploads/2009/06/javagc.png" alt="Memory: Credits: www.wilsonmar.com" width="614" height="288" /><br />
</a><p class="wp-caption-text">Memory - Credits: www.wilsonmar.com</p></div>
<p>The <a title="Memory Management Whitepaper, Sun" href="http://java.sun.com/javase/technologies/hotspot/gc/memorymanagement_whitepaper.pdf">memory management whitepaper</a> describes the life of an object through generations as:</p>
<blockquote><p>Memory in the Java HotSpot virtual machine is organized into three generations: a young generation, an old generation, and a permanent generation. Most objects are initially allocated in the <em>young generation</em>. The <em>old generation</em> contains objects that have survived some number of young generation collections, as well as some large objects that may be allocated directly in the old generation. The <em>permanent generation</em> holds objects that the JVM finds convenient to have the garbage collector manage, such as objects describing classes and methods, as well as the classes and methods themselves.</p>
<p>The young generation consists of an area called Eden plus two smaller survivor spaces [...]. Most objects are initially allocated in Eden. (As mentioned, a few large objects may be allocated directly in the old generation.) The survivor spaces hold objects that have survived at least one young generation collection and have thus been given additional chances to die before being considered “old enough” to be promoted to the old generation. At any given time, one of the survivor spaces (labeled From in the figure) holds such objects, while the other is empty and remains unused until the next collection.</p></blockquote>
<p>So, a minor garbage collection is triggered when the the eden is full and can promote survivor objects to the old generation. The major garbage collection is triggered when the tenured space is full. Note that a call to System.gc() launches a major GC.</p>
<p>What we need to remember is that minor GC and major GC consume CPU (there are more than one strategy for garbage collection but it is the subject of another post). Major GC is longer than minor GC. If you don&#8217;t choose the right values (options Xms, Xmx, etc) your application can launch too many garbage collections and so, its global performance will drop significatively.</p>
<h3>Live objects</h3>
<p>How does the garbage collector determine that an object is no more referenced? One of the most used algorithm is the <a title="Mark-and-sweep, Data Structures Algorithms" href="http://www.brpreiss.com/books/opus5/html/page424.html">mark-and-sweep</a> one and it uses the following principle to determine whether an object live or not:</p>
<blockquote><p>The objects that a program can access directly are those objects which are referenced by local variables on the processor stack as well as by any static variables that refer to objects. In the context of garbage collection, these variables are called the <em>roots</em><a name="30487"> </a>. An object is indirectly accessible if it is referenced by a field in some other (directly or indirectly) accessible object. An accessible object is said to be <em>live</em>. Conversely, an object which is not <em>live</em> is garbage.</p></blockquote>
<p>Java memory leaks are often caused by adding object reference in a collection and never removing it. If your application has a cache system, it&#8217;s better to use <a title="Understand weak references, Ethan Nicholas" href="http://weblogs.java.net/blog/enicholas/archive/2006/05/understanding_w.html">weak references</a> rather than a strong reference. The <a title="Weak reference, Wikipedia" href="http://en.wikipedia.org/wiki/Weak_reference">article of Wikipedia on weak references</a> defines them as:</p>
<blockquote><p>In <a title="Computer programming" href="http://en.wikipedia.org/wiki/Computer_programming">computer programming</a>, a <strong>weak reference</strong> is a <a title="Reference (computer science)" href="http://en.wikipedia.org/wiki/Reference_%28computer_science%29">reference</a> that does not protect the referent object from collection by a <a title="Garbage collection (computer science)" href="http://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29">garbage collector</a>. An object referenced <em>only</em> by weak references is considered <a title="Unreachable memory" href="http://en.wikipedia.org/wiki/Unreachable_memory">unreachable</a> (or &#8220;weakly reachable&#8221;) and so may be collected at any time. Weak references are used to avoid keeping in memory referenced but unneeded objects.</p></blockquote>
<h3>Conclusion</h3>
<p>In this post, garbage collectors are not deeply explained: the algorithms are not described precisely and it is just an abstact view that every developer has to know. To summarize:</p>
<ul>
<li>when the size of the memory is not adapted to your application, it implies too many garbage collections and it consumes CPU time</li>
<li>most of the memory leaks are caused by strong references that are never released: when it is relevable, use weak/soft references instead.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.coderfriendly.com/2009/06/14/garbage-collection-doesnt-mean-no-memory-management/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

