<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Megatome &#187; coding</title>
	<atom:link href="http://www.megatome.com/tag/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.megatome.com</link>
	<description>Just another idiot&#039;s ramblings</description>
	<lastBuildDate>Thu, 12 Jan 2012 00:45:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Moving to Agile: Inertia</title>
		<link>http://www.megatome.com/2008/12/10/moving-to-agile-inertia/</link>
		<comments>http://www.megatome.com/2008/12/10/moving-to-agile-inertia/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 03:49:23 +0000</pubDate>
		<dc:creator>iamthechad</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[leadership]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[inertia]]></category>
		<category><![CDATA[scrum]]></category>

		<guid isPermaLink="false">http://www.megatome.com/?p=48</guid>
		<description><![CDATA[Switching to an Agile process shines the light on a developer who has been successfully hiding his lack of work, but what can I do to change his behavior?]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been given the dubious honor of leading a team using Scrum as a &#8220;pilot&#8221; to see how well it works for the company. I&#8217;ve used Scrum before and had a good amount of success, so I feel comfortable with the process.</p>
<p>The single largest variable on any development team is the developers. I&#8217;ve found that moving to an Agile process like Scrum can really expose developers who&#8217;ve been hiding behind &#8220;traditional&#8221; processes.</p>
<p>Therein lies one of the biggest problems I&#8217;ve run into. One of my developers is not what you could by any means call a self starter. He has been able to get along well with the official process, which does not do a good job of tracking what developers are working on. Now that he&#8217;s been thrown into Scrum, it&#8217;s become quite obvious that he really doesn&#8217;t do anything until somebody nags him long enough to get him going.</p>
<p>This is where inertia comes in. This developer is a textbook example of an object staying at rest until the team lead can poke and prod enough to finally get him moving. His previous lead had simply taken it as granted that he would have to spend a certain amount of time micromanaging to get any work out of the developer. I think it&#8217;s a waste of time and energy for me to constantly remind him to pick a task and work it, but that&#8217;s what I&#8217;ve been reduced to doing. This week, for example, it took two days of nagging to get him to perform a ten minute refactor. (I would have done the refactor myself, but I have to trust that my team can do their jobs, too.)</p>
<p>I don&#8217;t know how to engage this guy. I can spend time collecting data and create metrics, but I don&#8217;t think that&#8217;s an effective motivator. What I&#8217;d really like to see is a commitment to the team and to the project that leads into a desire to pull his fair share. I don&#8217;t even know if these are feelings I can engender in this developer.</p>
<p>Motivation is an issue for teams using any kind of development process. Every team member reacts differently to various inputs. Some members like recognition, while others prefer a bonus. Some just want to be left alone so they can do the bare minimum to get by. I&#8217;m hoping this isn&#8217;t the eventual outcome with this developer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.megatome.com/2008/12/10/moving-to-agile-inertia/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Is Refactoring Really That Scary?</title>
		<link>http://www.megatome.com/2008/03/27/is-refactoring-really-that-scary/</link>
		<comments>http://www.megatome.com/2008/03/27/is-refactoring-really-that-scary/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 03:45:08 +0000</pubDate>
		<dc:creator>iamthechad</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[leadership]]></category>
		<category><![CDATA[Making]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[refactoring]]></category>
		<category><![CDATA[tdd]]></category>

		<guid isPermaLink="false">http://www.megatome.com/2008/03/27/is-refactoring-really-that-scary/</guid>
		<description><![CDATA[I got admonished at my new job for coding practices that have become second nature to me. Is aggressive refactoring really that scary?]]></description>
			<content:encoded><![CDATA[<div class="floatleft"><a href="http://www.cafepress.com/agilestuff.26911153"><img src="http://images.cafepress.com/product/26911153_240x240_Front_Color-BlackWhite.jpg" alt="Born to Refactor Shirt"/>
<p>(Click to get the shirt)</p>
<p></a></div>
<p>I&#8217;ve been coding with an agile mindset for quite some time now. Some practices have become second nature to me over the years. One of these practices is aggressive code refactoring, coupled with test driven development (TDD).</p>
<p>I&#8217;ve been adding new functionality to our system at my new job, and as usual I&#8217;ve been following my standard techniques. My part of the system involves handling certain requests and responses. I wrote unit and functional tests for the request half of the equation, then began to tackle the response side. As I added (and tested) functionality, I began to notice a large amount of similarity in the code. This in turn led me to create an abstract base class for both request and response, pulling up all of the shared functionality. This resulted in the actual request and response classes being quite small, with just a few method implementations from the base class.</p>
<p>So far, this activity should seem pretty normal to most developers. As I said, it&#8217;s pretty much second nature for me, and I don&#8217;t even remember consciously making the decision to make the abstract class. Imagine my surprise when my team lead admonished me for creating and abstract class, and warned me not to do it again without explicit approval.</p>
<p>Of course I had to ask why we would not refactor code in this manner when the opportunity presented itself. My lead&#8217;s answer involved several parts, none of which have convinced me that refactoring is bad:</p>
<p>
<ol>
<li><strong>The abstract class is not consistent with the rest of the system.</strong> This, to me, seems to be a fault of the system. I&#8217;m not knocking consistency, but at some point you have to realize that you may be building something that&#8217;s consistently bloated/overcomplicated/etc.</li>
<li><strong>The abstract class changes the design.</strong> Huh? Sure, if I go generate a UML diagram of the system, there&#8217;s going to be this abstract class and inheritance there. This is the only place the design is different. Requests and responses are being correctly handled just like the legacy ones in the system.</li>
<li><strong>Too much refactoring is bad, and each case should be thoroughly examined before code is changed.</strong> This is how religious wars start. My lead claims that developers start out on the &#8220;no refactoring&#8221; end of the spectrum, simply because they don&#8217;t know any better. Once they learn about refactoring, they then swing to the &#8220;refactor everything&#8221; end of the spectrum where anything and everything is a potential target. Seasoned, knowledgeable developers fall somewhere in the middle. I got the impression from this speech that my lead considers me to be on the radical end of the spectrum.</li>
</ol>
<p>Why are people like my lead so scared of refactoring? The arguments given really seem more like rationalizations than actual reasons &#8211; they don&#8217;t really stand up to scrutiny. I have a hard time believing, for example, that my lead truly thinks that the system is better because each request and response is a totally separate class, albeit with most of the code copied and pasted from one to the other. If anything, he should know that this approach leads to more problems, no matter how pretty it keeps the class diagrams.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.megatome.com/2008/03/27/is-refactoring-really-that-scary/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JUnit Just Wants To Be Your Friend</title>
		<link>http://www.megatome.com/2008/03/14/junit-just-wants-to-be-your-friend/</link>
		<comments>http://www.megatome.com/2008/03/14/junit-just-wants-to-be-your-friend/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 03:02:57 +0000</pubDate>
		<dc:creator>iamthechad</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[unit tests]]></category>

		<guid isPermaLink="false">http://www.megatome.com/2008/03/14/junit-just-wants-to-be-your-friend/</guid>
		<description><![CDATA[My co-worker tests his code with the toString() and visual grep method. I'm not sure he would have ever caught the bug on his own. I keep trying to explain that unit tests are a Good Thing...]]></description>
			<content:encoded><![CDATA[<p>This is why you&#8217;re not allowed to have alcohol in the workplace.</p>
<p><strong>Co-Worker (who does not believe in unit tests)</strong>: Okay. I just checked my changes in.</p>
<p><strong>Me</strong>: There&#8217;s a bug in your code.</p>
<p><strong>Co-Worker</strong>: How do you know? I just checked it in!</p>
<p><strong>Me</strong>: It broke my unit tests. It looks like you&#8217;re not setting the flibbergibbet value correctly.</p>
<p><strong>Co-Worker</strong>: What? How can you tell?</p>
<p><strong>Me</strong>: <a href="http://www.junit.org/">JUnit</a> showed me the difference.</p>
<p><strong>Co-Worker</strong>: Oh. I guess I&#8217;ll fix it now. I would have found it eventually&#8230;</p>
<p>For what it&#8217;s worth, we&#8217;re handling <a href="http://en.wikipedia.org/wiki/Electronic_Data_Interchange">Electronic Data Interchange</a> documents &#8211; things that look like a page or so of line noise at a time. The bug was that one character wasn&#8217;t getting written to the output. My co-worker tests his code with the <code>toString()</code> and <a href="http://catb.org/jargon/html/V/vgrep.html">visual grep</a> method. I&#8217;m not sure he would have ever caught the bug on his own. I keep trying to explain that unit tests are a <a href="http://catb.org/jargon/html/G/Good-Thing.html">Good Thing</a>&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.megatome.com/2008/03/14/junit-just-wants-to-be-your-friend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

