<?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>Pete on Software</title>
	
	<link>http://www.peteonsoftware.com</link>
	<description />
	<lastBuildDate>Sat, 17 Dec 2011 15:04:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/PeteOnSoftware" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="peteonsoftware" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Why I Hate Agile</title>
		<link>http://www.peteonsoftware.com/index.php/2011/12/17/why-i-hate-agile/</link>
		<comments>http://www.peteonsoftware.com/index.php/2011/12/17/why-i-hate-agile/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 15:04:05 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=402</guid>
		<description><![CDATA[Okay, now that I got the link-bait title out of the way, I am going to rant just a little bit. I imagine that I&#8217;m like most of you and I think that some flavor of agile (little a) is really the best way to develop software. I think that collaborating with the business and [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, now that I got the link-bait title out of the way, I am going to rant just a little bit.  I imagine that I&#8217;m like most of you and I think that some flavor of agile (little a) is really the best way to develop software.</p>
<p>I think that collaborating with the business and getting things in front of them as soon as possible so that you can make changes to it as you go is a very valuable model.  I am also very much for the short release cycles that most agile shops prefer.</p>
<p>What I <strong><em>despise</em></strong>, however, is what I call &#8220;Agile as Snake Oil&#8221;.  There are a lot of disreputable companies that are putting the word out there that all you have to do is hire them and they can &#8220;sprinkle a little agile&#8221; on your project or your company and you will magically get everything you want.</p>
<p><img src="http://www.peteonsoftware.com/images/201112/AgilePrinciplesPatternsAndPractices.jpg" alt="Uncle Bob's Agile Book" title="Uncle Bob's Agile Book" style="float:left;padding:.5em;" />They crow that Agile means that you can not make up your mind on what you want until the last minute because Agile Developers have to do what you say and are bound by the Laws of Agile to always change the software for the client.  They want their cake and to eat it, too.  They want all of the spec changes and none of the timeline changes or compromises.</p>
<p>Oh, that they would actually read something like Robert C. Martin&#8217;s book, <em>Agile Principles, Patterns, and Practices</em>.  I&#8217;ll tell you what, I think that if people only read the end of the book, where Uncle Bob tells a tale of two cities, a project where the team does a &#8220;traditional waterfall approach&#8221; and the same project where the team practices an &#8220;agile approach&#8221;, it would make a world of difference.  </p>
<p>As you can imagine, the waterfall approach ends in disaster, with stress and hard feelings abounding.  In contrast, people are satisfied &#8211; almost happy &#8211; with the agile approach.  The HUGE takeaway from the agile story, however, is that it was not a 100% win for either side.  They did not hit their original deadline with 100% functionality.  Features had to be traded in if the timelines could not move.  However, the business stakeholders were the ones who went ahead and made that call.</p>
<p>I covered this in my last &#8220;Agile&#8221; post over a year ago, but I think that it bears repeating.  Every agile project should do these steps</p>
<ol>
<li>Gather requirements</li>
<li>Estimate requirements to determine length of project</li>
<li>Work requirements in iterations</li>
<li>Gauge velocity in coding requirements against estimate</li>
<li>Determine whether your velocity requires you to either cut requirements or extend timelines</li>
<li>Lather, rinse, repeat</li>
</ol>
<p>Developers always get a bad rap for number 5 and it is always largely based on our lack of skill at number 2.  Estimating is something that developers really should improve on, however, the business needs to understand two major things.  Number 1, those timeline estimates are based on developers being able to work on the project at &#8220;perfect world&#8221; capacity &#8211; meaning 75-80% of their time.  If developers are interrupted with conflicting priorities, original estimates and timelines are null and void.  </p>
<p>Second of all, those who live in glass houses should not throw stones.  If the original requirements are so ill-planned that they need to be drastically refined or changed, then developers should be able to refine and change estimates, too, since they are basically working on a different project than the one they started with.</p>
<p>There are obviously no perfect people in this world, so that means that there is no perfect system.  Any system will invariably break down because of those imperfect people going around and &#8220;being human&#8221;.  That being said, the best way to get to nirvana is to act like the participants in Uncle Bob&#8217;s Agile Story and rely on the two C&#8217;s, &#8220;communication and compromise&#8221;.  </p>
<p>Compromising is the original agile.  Be retro.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2011/12/17/why-i-hate-agile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Mobile Strategy?</title>
		<link>http://www.peteonsoftware.com/index.php/2011/12/12/a-mobile-strategy/</link>
		<comments>http://www.peteonsoftware.com/index.php/2011/12/12/a-mobile-strategy/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 22:48:48 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Business of Software]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=396</guid>
		<description><![CDATA[Harvard Business Review published an article at the end of last month titled Building a Mobile App Is Not a Mobile Strategy. The TL;DR; version is that mobile is not an item to be marked off of a checklist. It is bad if your company just created a mobile app so that you can answer [...]]]></description>
			<content:encoded><![CDATA[<p>Harvard Business Review published an article at the end of last month titled <a href="http://blogs.hbr.org/cs/2011/11/building_a_mobile_app_is_not_a.html">Building a Mobile App Is Not a Mobile Strategy</a>.  The TL;DR; version is that mobile is not an item to be marked off of a checklist.  It is bad if your company just created a mobile app so that you can answer &#8220;yes&#8221; when the CEO asks, &#8220;Do we do mobile?&#8221;.  </p>
<p>I heard someone speak at a conference here in Ohio who was making this same point.  Some time ago, the best visual medium for advertising was the print ad.  Since that was the end of the standard understanding, when the web came about, people set out to put up what we now call &#8220;brochureware&#8221;.  Basically taking their magazine ad or brochure and putting it up on the web.  No real interaction and no reason to ever have a repeat visitor.  Hey, but at least they had an &#8220;Internet Strategy&#8221;, right? </p>
<p>The same thing is happening now.  Mobile is hot, so people are trying to create mobile apps that are nothing more than advertisements or brochureware for their product or business.  Not a lot of people &#8220;get&#8221; mobile yet, so the good ideas are coming slowly.  However, just as companies began to create interactive websites that provided a service or amusement while educating or advertising their service, that time will arrive for mobile, too.  </p>
<p><img src="http://www.peteonsoftware.com/images/201112/SitOrSquat.jpg" alt="Sit or Squat" title="Sit or Squat" style="float:left; padding:.5em;" />Even now, forward thinking companies are getting it.  The article mentions Proctor and Gamble&#8217;s sponsorship of a 3rd party application called &#8220;Sit or Squat&#8221; that helps locate public restrooms wherever you are, while at the same time keeping Charmin at the forefront of your mind and associating it with the best possible restroom experiences.</p>
<p>Having an idea or a strategy for what you will do to &#8220;accomplish&#8221; mobile is great, but the Harvard Business Review article pretty much stops there.  In my opinion, the key to having a dynamic and impactful mobile strategy isn&#8217;t just how you will market to consumers.  It encompasses how your employees will be productive.  What sorts of applications could your employees use &#8220;on the go&#8221; (in meetings, during travel, etc) on a smartphone or tablet device?  How will you deliver those applications to them?</p>
<p>The other big key to a successful mobile strategy is integration with your existing business platform.  What sorts of services or APIs does your organization have exposed to allow mobile applications to integrate with your systems?  If you have none, what would it take to create them?  <strong>This</strong> to me is the heart of a Great Mobile Strategy in the Enterprise.  It is mobile as an integrated natural evolution of your systems in a way that encourages productivity and growth.  And <strong>that</strong> is the hard part.</p>
<p>If you aren&#8217;t in a place where new applications can integrate with you, then you are in a place that is stagnant.  If every new application has to tear down and throw away what came before it, you are asking to fall behind.  A Great Mobile Strategy starts with a Great Overall IT Strategy that allows mobile to become not just something &#8220;checked off&#8221; or &#8220;bolted on&#8221; but a full-fledged member of your company&#8217;s application stack.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2011/12/12/a-mobile-strategy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Number One Trait of a Great Developer</title>
		<link>http://www.peteonsoftware.com/index.php/2011/12/08/the-number-one-trait-of-a-great-developer/</link>
		<comments>http://www.peteonsoftware.com/index.php/2011/12/08/the-number-one-trait-of-a-great-developer/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 01:09:26 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Craftmanship]]></category>
		<category><![CDATA[Mentoring]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=388</guid>
		<description><![CDATA[After reading this article that I saw on Hacker News some time ago, it really got me thinking. The gist of the post is that &#8220;Great Judgement&#8221; is the number one trait of a great developer. There are a lot of developers who only want to do the &#8220;latest and greatest&#8221; thing. They practice what [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://peteonsoftware.com/images/201112/Judgement.jpg" alt="Judgement" title="Judgement" style="border:none; padding: .5em; float:left;" />After reading <a href="http://www.engineyard.com/blog/2011/the-number-one-trait-of-a-great-developer/">this article</a> that I saw on Hacker News some time ago, it really got me thinking.  The gist of the post is that &#8220;Great Judgement&#8221; is the number one trait of a great developer.</p>
<p>There are a lot of developers who only want to do the &#8220;latest and greatest&#8221; thing.  They practice what I like to refer to as RDD, which stands for Resume Driven Development.  Every project is just a way to make their resume that much more enviable.  It is even a little hard to fault these people at first blush because in the IT industry, if you aren&#8217;t pressing your skills forward, you are quickly becoming irrelevant.  However, sometimes developers forget that they are being paid to deliver a solution for a client or employer.  The client&#8217;s needs should always come first.</p>
<p>Are you doing work for a PHP and MySql shop?  Could Ruby or Node or Cassandra help them solve their problem?  Sure, but their existing code is in PHP, their on-staff developers know PHP, and finding PHP developers to hire is easier than finding a good developer who knows Node or Cassandra.  You may very well be doing them a huge disservice by building them a &#8220;blazing fast web scale&#8221; solution.</p>
<p>That&#8217;s where Great Judgement comes in.  New technologies may offer benefits, but there are always trade-offs in technology.  The first is your own knowledge.  If you are very familiar with C# and .Net and don&#8217;t know Ruby, but you try to put together a Ruby on Rails solution for a client that isn&#8217;t mandating Ruby, you are very likely going to cost them time and money while you deliver more slowly, let alone any mistakes you are sure to make or hard-to-maintain patterns you might leave behind because of your inexperience.</p>
<p>The second trade-off is the number of available developers to maintain and build upon your code.  The system may really hum when you write it in <a href="http://en.wikipedia.org/wiki/Brainfuck">Brainf*ck</a>, but you just pretty much made sure that there are maybe 30 people in the world who could help that company maintain or grow it.  Larger companies aren&#8217;t as susceptible to this as smaller companies because they usually have rigid standards in place, but the &#8220;market&#8221; for your code &#8211; be it the language, the framework, or even your patterns &#8211; should be at the forefront of your mind as you plan.</p>
<p>The third trade-off is not to over-engineer.  Some developers want to create a highly robust and scalable system with a caching layer, failover clusters, and load balancing for every one of their solutions.  They want a pluggable architecture and a side of fries with that.  The problem is that they are making a small inventory application for the secretary to maintain her office supply levels for a staff of 9.  Sad to say, but a simple Access database that would take an hour of your time to create may be all that they need.  </p>
<p>I haven&#8217;t thought enough to actually assign Great Judgement as the number <strong><em>ONE</em></strong> trait of a great developer, but I definitely have to agree with the author, Tammer Saleh, on many of his points.  If Great Judgement isn&#8217;t number one, it is certainly in the team picture.  If you use Great Judgement, you are a long way to delivering valuable solutions to your clients and that may improve your resume way more than buzzwords.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2011/12/08/the-number-one-trait-of-a-great-developer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project Euler Problem 5 – Scheme Style</title>
		<link>http://www.peteonsoftware.com/index.php/2011/09/18/project-euler-problem-5-scheme-style/</link>
		<comments>http://www.peteonsoftware.com/index.php/2011/09/18/project-euler-problem-5-scheme-style/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 01:24:21 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Project Euler]]></category>
		<category><![CDATA[Scheme]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=383</guid>
		<description><![CDATA[Project Euler Problem 5 reads &#8220;What is the smallest number divisible by each of the numbers 1 to 20?&#8221; This is obviously a Least Common Multiple problem. There are 2 quick ways that come to mind to solve the problem. The first is that you can brute force it, checking all of the numbers until [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.peteonsoftware.com/images/201109/lcm.jpg" alt="Least Common Multiple (from http://uva.onlinejudge.org/external/107/p10791.jpg)" title="Least Common Multiple (from http://uva.onlinejudge.org/external/107/p10791.jpg)" style="float:left; margin: .5em;" /><br />
Project Euler Problem 5 reads &#8220;What is the smallest number divisible by each of the numbers 1 to 20?&#8221;  This is obviously a Least Common Multiple problem.  There are 2 quick ways that come to mind to solve the problem.  The first is that you can brute force it, checking all of the numbers until you find one that can be divided by all of the numbers.  </p>
<p>After I arrived at my answer (by doing just that last year), I went into the Project Euler forums and found that quite a few people did it just the same way.  Others actually attempted the prime factorization necessary to compute the least common multiple and had varying degrees of success.</p>
<p>With my recent foray into Scheme, I decided to hit the forums to see if anyone attempted problem 5 in Scheme.  The first Scheme solution that I found was the following:</p>
<pre>
;; find the smallest number where n is
;; divisible by all numbers in given list
(define smallest-divisible-by
(lambda (num-list)
(let loop ((i 1))
(if (divisible-by i num-list)
i
(loop (+ i 1)))))) 

(define divisible-by
(lambda (n lst)
(if (null? lst)
#t
(if (= (remainder n (car lst)) 0)
(divisible-by n (cdr lst))
#f)))) 

;; generates a list of numbers between start and end
;; contract: number, number -> list
(define make-list-range
(lambda (start end)
(if (> start end)
'()
(cons start (make-list-range (+ start 1) end))))) 

(smallest-divisible-by (reverse (make-list-range 1 20)))
</pre>
<p>This was just a brute force method in Scheme.  He created a list and then tried to find a number that was divisible by all of the numbers in the list.  The bad news is that it took 97 seconds on my MacBook Pro with a Quad Core i5.  That is completely unacceptable.</p>
<p>I got to thinking about it and I wondered if Scheme had a least common multiple function, as functional languages often have &#8220;neat math stuff&#8221; in their bag of tricks.</p>
<p>It turns out that it does.  If I run this code:</p>
<pre>(lcm 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20)</pre>
<p>It returns the answer as soon as I hit enter, computed almost instantly.  It may be cheating to use a built-in function, but in real life, I don&#8217;t think so.  I think you use the best tool for the job and if I can answer a problem with no development and an instant result, I think that that is the tool I should use.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2011/09/18/project-euler-problem-5-scheme-style/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 8 – My First Thoughts</title>
		<link>http://www.peteonsoftware.com/index.php/2011/09/14/windows-8-my-first-thoughts/</link>
		<comments>http://www.peteonsoftware.com/index.php/2011/09/14/windows-8-my-first-thoughts/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 05:49:05 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Fluff]]></category>
		<category><![CDATA[Windows 8]]></category>
		<category><![CDATA[Windows 8 Preview]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=373</guid>
		<description><![CDATA[Like any good nerd, I jumped on the Windows 8 download as soon as I could from dev.windows.com. I downloaded the 4.8 gig, 64 bit, full developer tool version (insert Tim Allen-style grunting here) and it took about 2 hours to arrive. Once I had the .iso, I tried to install it in VMware on [...]]]></description>
			<content:encoded><![CDATA[<p>Like any good nerd, I jumped on the Windows 8 download as soon as I could from <a href="http://dev.windows.com">dev.windows.com</a>.  I downloaded the 4.8 gig, 64 bit, full developer tool version (insert Tim Allen-style grunting here) and it took about 2 hours to arrive.</p>
<p>Once I had the .iso, I tried to install it in VMware on my MacBook Pro, but VMware kept complaining about some stupid error or another when it was trying to boot from the .iso, so I decided to move on.  I fired up Virtual Box and this time got no complaints.  The install was pretty quick and painless and took &#8220;maybe&#8221; a half hour, I didn&#8217;t time it.  I created the virtual machine with 2 processors and 2 gigs of RAM and plenty of hard disk space.</p>
<p>My &#8220;artsy&#8221; install screen.<br />
<img src="http://www.peteonsoftware.com/images/201109/Windows8_Install.jpg" style="border:none;" alt="Windows 8 Install Screen" title="Windows 8 Install Screen" /></p>
<p>I also had to accept a license (it seems pretty lax):<br />
<img src="http://www.peteonsoftware.com/images/201109/Windows8_License.jpg" style="border:none;" alt="Windows 8 License Screen" title="Windows 8 License Screen" /></p>
<p>Once I got all situated and into the OS, I was presented with a kind of confusing &#8220;totally green&#8221; screen.  I was moving my mouse around and when I got to the &#8220;Start Button Corner&#8221;, some things popped up on the screen.<br />
<img src="http://www.peteonsoftware.com/images/201109/Windows8_0.jpg" style="border:none;" alt="Windows 8 Initial Screen" title="Windows 8 Initial Screen" /></p>
<p>When I clicked &#8220;Start&#8221;, I got my first big time look at the new Metro UI.<br />
<img src="http://www.peteonsoftware.com/images/201109/Windows8_1.jpg" style="border:none;" alt="Windows 8 Metro UI" title="Windows 8 Metro UI" /></p>
<p>If I scroll to the right a little, there is more.<br />
<img src="http://www.peteonsoftware.com/images/201109/Windows8_2.jpg" style="border:none;" alt="Windows 8 Metro UI continued" title="Windows 8 Metro UI continued" /></p>
<p>But don&#8217;t worry, though, if too much change isn&#8217;t your thing.  If you click &#8220;Desktop&#8221;, you get to see &#8220;Old Faithful&#8221;.<br />
<img src="http://www.peteonsoftware.com/images/201109/Windows8_3.jpg" style="border:none;" alt="The classic desktop is still here" title="The classic desktop is still here" /></p>
<p>My first order of business &#8211; of course &#8211; was to check and make sure my blog was still okay.  I mean, a man has to have priorities.<br />
<img src="http://www.peteonsoftware.com/images/201109/Windows8_4.jpg" style="border:none;" alt="PeteOnSoftware viewed on Windows 8" title="PeteOnSoftware viewed on Windows 8" /></p>
<p>This version came with a Twitter client called Tweet@rama.  It definitely is built in the Metro UI style that those of us with Windows Phone 7s are used to.  It seems to have a panorama view and familiar styling on all of the icons and buttons.<br />
<img src="http://www.peteonsoftware.com/images/201109/Windows8_5.jpg" style="border:none;" alt="Tweet@rama, a Twitter Client on Windows 8" title="Tweet@rama, a Twitter Client on Windows 8" /></p>
<p>Of course, you can run Visual Studio on it, but OH NOES&#8230; JavaScript!?!?  Calm down, people, C# is still on here too&#8230; <img src='http://www.peteonsoftware.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<img src="http://www.peteonsoftware.com/images/201109/Windows8_6.jpg" style="border:none;" alt="Visual Studio 11 on Windows 8" title="Visual Studio 11 on Windows 8" /></p>
<p>All in all, Windows 8 is a good-looking operating system.  If you can get behind the Metro UI on the Windows Phone, you will be at home here.  The tiles can be moved around and they dip and slide out of each other&#8217;s way as you are doing any housekeeping or clicking.  Also, there are Live Tiles &#8211; like WP7 &#8211; that update with current information.</p>
<p>If I was using this on a touch device, I would call this a definite home run.  The problem is that the side scrolling was a little clunky to me using a mouse.  It could be a VM issue, but my scroll wheel on the mouse that normally lets me press and slide up-down-left-right on a page did not work, so I had to go down and grab and move the horizontal scrollbar.  Those of us who develop for the web know that people <strong>really</strong> hate doing that.</p>
<p>It is possible that Microsoft is betting on a huge move to touch devices being front and center for most business users in the future.  I&#8217;m sure there is a happy story for developers and people who do a lot of data entry, but after an hour of playing, I don&#8217;t know what it is yet <img src='http://www.peteonsoftware.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Do you have it installed yet?  What do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2011/09/14/windows-8-my-first-thoughts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Introduction to Scheme – Part 3</title>
		<link>http://www.peteonsoftware.com/index.php/2011/09/14/my-introduction-to-scheme-part-3/</link>
		<comments>http://www.peteonsoftware.com/index.php/2011/09/14/my-introduction-to-scheme-part-3/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 04:04:43 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Scheme]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=360</guid>
		<description><![CDATA[The last two posts just covered a basic overview of how Scheme&#8217;s syntax works and was kind of a way to just expose people to the language. This post is going to cover how you can use recursion in Scheme. There are two very common mathematical examples that are always used when talking about recursion [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.peteonsoftware.com/index.php/2011/08/28/my-introduction-to-scheme/">last</a> <a href="http://www.peteonsoftware.com/index.php/2011/08/29/my-introduction-to-scheme-part-2/">two</a> posts just covered a basic overview of how Scheme&#8217;s syntax works and was kind of a way to just expose people to the language.  This post is going to cover how you can use recursion in Scheme.</p>
<p><img src="http://www.peteonsoftware.com/images/201108/InfiniteRecursion.jpg" alt="Infinite Recursion" title="Infinite Recursion" /></p>
<p>There are two very common mathematical examples that are always used when talking about recursion in programming.  The first is computing a Factorial and the other is the Fibonacci sequence.  Who am I to buck tradition?</p>
<p>First, we&#8217;ll look at the <a href="http://en.wikipedia.org/wiki/Fibonacci_number">Fibonacci sequence</a>.  The first 10 numbers of the sequence are 1 1 2 3 5 8 13 21 34 55.</p>
<p>Here is how we would implement that in Scheme.</p>
<pre>
(define (fib n)
    (if (< n 2)
     n
     (+ (fib (- n 1))(fib (- n 2)))
    )
)
</pre>
<p>That function calls itself recursively to figure out what the nth digit of the Fibonacci sequence is.  So, if we'd like to see it print out in a chain, we can just call that function in a loop.</p>
<pre>
(let loop ((n 1))
  (if (<= n 10)
    (begin
     (display (fib n))(newline)
     (loop (+ n 1))
    )
  )
)
</pre>
<p>That looks like this:<br />
<img src="http://www.peteonsoftware.com/images/201109/Fibonacci.jpg" alt="Fibonacci in Scheme" title="Fibonacci in Scheme" /></p>
<p>A factorial (ex: 5! = 5 * 4 * 3 * 2 * 1 = 120) in Scheme would be coded simply like this:</p>
<pre>
(define factorial
  (lambda (n)
     (if (= n 0)
         1
         (* n (factorial (- n 1)))
     )
   )
 )
</pre>
<p>Here is something interesting.  Because Scheme is dynamic with its type system and this function can return anything, I can actually work with really large numbers.  For example, here I call the function twice, once with 5 to return 120 and the second time with 50 to return 30414093201713378043612608166064768844377641568960512000000000000.  That is obviously WAY too big to be returned with any native .Net data type.  Also, both of those calls returned as quickly as I hit Enter.</p>
<p><img src="http://www.peteonsoftware.com/images/201109/Factorial.jpg" alt="Factorial in Scheme" title="Factorial in Scheme" /></p>
<p>Up until now, there isn't much special about these recursive functions.  However, Scheme does allow something that C# doesn't allow (well, it can in very <a href="http://lookingsharp.wordpress.com/2010/03/08/tail-recursion-in-csharp-and-fsharp/">special circumstances</a>) and that is tail recursion.  This is also (sometimes controversially) called tail optimization and is something of a hallmark of functional languages.</p>
<p>Traditionally, for every method/function/procedure call you are making in a language, you are building on the stack until that method/function/procedure returns.  You see this all the time when you look at a stack trace while you are debugging.  However, when you recursively call the same method over and over and over again, you risk a stack overflow.  Imagine I wanted to find out what 50000! was.  I would be putting 50000 function calls (all to the same function) on the stack and depending on the architecture I was on, I could overflow the stack (on my Macbook Pro, it did return after a few minutes with a VERY large number - pages and pages of scrolling).</p>
<p>What tail call optimization does is "discard" the stack up to the point when it calls itself again because the function will just be returning itself, so it doesn't need to keep track.  If that sounds wayyy insane, let's think about our terms.  First "tail position" refers to the last thing that happens in a function before it returns.  In the case of tail recursion, the last thing that occurs is a call to the function itself.  Even though it looks like my factorial example from earlier might be tail recursive, it really isn't.  Here it is again.</p>
<pre>
(define factorial
  (lambda (n)
     (if (= n 0)
         1
         (* n (factorial (- n 1)))
     )
   )
 )
</pre>
<p>Take notice of the last line: <em>(* n (factorial (- n 1)))</em>.  You see how the last thing the function does is multiply the number passed in (n) against the result of the function called again with "n minus 1".  So, we can't just jump ahead to the new function and only return its results because those need to bubble up the stack, being multiplied against the function's original n all the way up.  </p>
<p>What we need to do is track our own progress, so that the function doesn't need to be multiplied by anything outside of itself.  One thing we could do is just take the accumulation as a second parameter, but that is relying on the caller of the function to kind of do something unnatural and not obvious when calling the function.  What we'll do instead is declare a local function inside of our function and call this local function with our parameter and a variable that accumulates and tracks our state.</p>
<p>The factorial function in full tail-recursive glory could look something like this</p>
<p>(please note: this isn't formatted the "Scheme-Way" because I was trying to make it as readable as possible) </p>
<pre>
(define pete_factorial ; our function
 (letrec ; defining something here with local scope
  (
   (inner_factorial ; a locally scoped function
    ; local function is a lambda taking 2 params
    (lambda (the_number our_accumulator)
     (if (= the_number 0) ; if the number passed in is 0
       ; return the current accumulation
       our_accumulator
       ; else call the local function again with the decremented
       ;number and an up-to-date accumulator
       (inner_factorial (- the_number 1) (* our_accumulator the_number))
     ) ;closing the if
    ) ; closing the lambda
   ) ; closing the inner function def
  ) ; closing the letrec body
; actual pete_factorial definition is a lambda
(lambda (actual_parameter_passed_in_to_pete_factorial)
  ; lambda body that calls the local function with the param and
  ; an initial accumulator of 1
  (inner_factorial actual_parameter_passed_in_to_pete_factorial 1)
) ; close lambda
) ; close pete_factorial body
) ; close define statement
</pre>
<p>Hopefully, that is fairly clear.  I've actually had this post in the hopper for some time while I wrapped my head around exactly what we were accomplishing here.  Then, when I thought I had it and it was time to write, I still wasn't prepared to explain it clearly.  I hope that the combination of the formatting, comments, and verbose variable names helps you to understand it.  I know that it helped me out a great deal.</p>
<p>As I've said, our basic goal here is to keep the stack from having to keep track of our state.  In the original one, it worked out to be something like </p>
<pre>
factorial(5)
5*factorial(4)
5*4*factorial(3)
5*4*3*factorial(2)
5*4*3*2*factorial(1)
5*4*3*2*1*factorial(0)
5*4*3*2*1*1
120
</pre>
<p>In my severely-commented tail recursive case, it doesn't have to do that.  It loads the function onto the stack and it keeps it there.  Every definition describes that it basically does a GOTO and just keeps calling back to the top of the function (the inner function) over and over again.  Because we keep our own state, the last thing to evaluate is just returned because the last value of the function is the answer.</p>
<p>This time, it is:</p>
<pre>
(pete_factorial 5)
replace arguments with (5 1), goto "inner_factorial"
replace arguments with (4 5), goto "inner_factorial"
replace arguments with (3 20), goto "inner_factorial"
replace arguments with (2 60), goto "inner_factorial"
replace arguments with (1 120), goto "inner_factorial"
replace arguments with (0 120), goto "inner_factorial"
return 120
</pre>
<p>I know we've covered a lot here, but this is good solid computer science stuff.  It definitely doesn't hurt to think about it from time to time and really understand what is going on with the computer and within our languages when we write our code.  </p>
<p>If you have any questions, or want me to try to clarify something, let me know in the comments and I'll do the best I can.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2011/09/14/my-introduction-to-scheme-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Introduction to Scheme – part 2</title>
		<link>http://www.peteonsoftware.com/index.php/2011/08/29/my-introduction-to-scheme-part-2/</link>
		<comments>http://www.peteonsoftware.com/index.php/2011/08/29/my-introduction-to-scheme-part-2/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 04:30:58 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Scheme]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=344</guid>
		<description><![CDATA[In my last post, I started to look at the Scheme language. We finished up with a simple if statement. Its syntax is like this: (if (condition) result1 result2). In our last example, &#8220;result1&#8243; and &#8220;result2&#8243; were simple return types. If you wanted, the &#8220;result1&#8243; or &#8220;result2&#8243; could also be functions that are evaluated to [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://www.peteonsoftware.com/index.php/2011/08/28/my-introduction-to-scheme/">last post</a>, I started to look at the Scheme language.  We finished up with a simple if statement.  Its syntax is like this: (if (condition) result1 result2).  </p>
<p>In our last example, &#8220;result1&#8243; and &#8220;result2&#8243; were simple return types.  If you wanted, the &#8220;result1&#8243; or &#8220;result2&#8243; could also be functions that are evaluated to get a return value.  Let&#8217;s look at that.  </p>
<p>In this case, if 4 is greater than 0, we are going to multiply 4 times 4, if 4 isn&#8217;t greater than 0, we are just going to add 4 plus 4.</p>
<pre>(if (> 4 0) (* 4 4) (+ 4 4))</pre>
<p><img src="http://www.peteonsoftware.com/images/201108/ComplexIfScheme.jpg" alt="Complex If in Scheme" title="Complex If in Scheme" /></p>
<p>You can see that because 4 is greater than 0, it executed the first block which evaluated 4 * 4 which is 16.  Like last time, here is the equivalent C# version to hopefully add clarity.</p>
<pre name="code" class="csharp">
if (4 > 0)
{
     return 4 * 4;
}
else
{
     return 4 + 4;
}
</pre>
<p>One of the most powerful things you can do in a functional language is &#8211; of course &#8211; to define your own functions.  Here is a simple function that defines a function named pete that squares a number passed to it.</p>
<pre>(define pete (lambda (x) (* x x)))</pre>
<p>So here, we are calling the define language construct (which is how you declare variables, functions, etc in Scheme) and defining &#8220;pete&#8221; which is a lambda that takes one parameter &#8211; x &#8211; and returns the output of the * function being passed x and x.  You see that if we call the pete function and pass in 7, it returns 49 as you would expect.</p>
<p><img src="http://www.peteonsoftware.com/images/201108/SimpleFunctionDefinitionScheme.jpg" alt="Simple Function in Scheme" title="Simple Function in Scheme" /></p>
<p>Functions are first class citizens in Scheme, so you can pass them around as arguments.  Let&#8217;s see this example where I&#8217;m going to let us &#8220;do-stuff-to-four-and-nine&#8221;.  My goal here is that we are going to create a function that takes a function as a parameter.  It then calls that function, passing it 4 and 9.</p>
<p>So, first the function. (I used a hard return in the REPL window so that the screenshot below would definitely fit.  It does not cause a problem in the language to have it there).</p>
<pre>(define do-stuff-to-four-and-nine (lambda (our-func) (our-func 4 9)))</pre>
<p><img src="http://www.peteonsoftware.com/images/201108/Declare4and9FunctionScheme.jpg" alt="Defining our function that takes a function" title="Defining our function that takes a function" /></p>
<p>All I&#8217;ve done is define &#8220;do-stuff-to-four-and-nine&#8221; as a function that takes a parameter (our-func) that I then use in the body of the lambda, calling it and passing 4 and 9 as arguments.  Next, let&#8217;s define 4 functions that we can pass to our &#8220;do stuff&#8221; function.</p>
<p><img src="http://www.peteonsoftware.com/images/201108/FourSimpleFunctions.jpg" alt="Four simple functions to use as arguments" title="Four simple functions to use as arguments" /></p>
<p>You should be able to simply read these by now.  All four take two parameters, and are plainly named for the simple operations they perform on them.</p>
<p>Now, all that is left is to call the &#8220;do-stuff&#8221; function and pass it each of these functions in turn.</p>
<p><img src="http://www.peteonsoftware.com/images/201108/FourSimpleFunctionsApplied.jpg" alt="Our four simple functions passed into the 'four-and-nine' function" title="Our four simple functions passed into the 'four-and-nine' function" /></p>
<p>Interestingly, the function must take the right number of arguments.  If not, the language throws up on you.  Notice here that I define a function that only takes one argument.  Then when I try to pass it in to our &#8220;four and nine&#8221; function, I get an error.</p>
<p><img src="http://www.peteonsoftware.com/images/201108/ThisWontWork.jpg" alt="This won't work. The number of arguments have to match." title="This won't work.  The number of arguments have to match." /></p>
<p>I hope that you&#8217;ve learned a little bit more about how Scheme works and how powerful it can be.  My next post is going to take a look at recursion in Scheme and putting a lot of these lessons together.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2011/08/29/my-introduction-to-scheme-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Introduction to Scheme</title>
		<link>http://www.peteonsoftware.com/index.php/2011/08/28/my-introduction-to-scheme/</link>
		<comments>http://www.peteonsoftware.com/index.php/2011/08/28/my-introduction-to-scheme/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 16:22:55 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Scheme]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=329</guid>
		<description><![CDATA[The other night, I was reading through Hacker News or Programming Reddit or something and I found an article about writing compilers that supposedly simplified it enough that it could be taught to beginner-level computer science students. It uses potentially hundreds of complier passes to make simple transforms to the code until it has completed [...]]]></description>
			<content:encoded><![CDATA[<p>The other night, I was reading through Hacker News or Programming Reddit or something and I found <a href="http://prog21.dadgum.com/30.html">an article</a> about writing compilers that supposedly simplified it enough that it could be taught to beginner-level computer science students.  It uses potentially hundreds of complier passes to make simple transforms to the code until it has completed its task. </p>
<p>I thought that I&#8217;d check it out and I saw that it was written in Scheme.  I personally hadn&#8217;t spent any time in LISP or any LISP dialects, so it seemed like something interesting to dive in to.</p>
<p>On my Mac, using <a href="http://mxcl.github.com/homebrew/">Homebrew</a>, it was a breeze to get started.  At first, I just typed</p>
<pre>brew search scheme</pre>
<p>I found what I was looking for and then typed</p>
<pre>brew install scheme48</pre>
<p><em>Here is an example of what you would see installing it on a Mac.</em><br />
<img src="http://www.peteonsoftware.com/images/201108/InstallScheme.jpg" alt="Install Scheme via Homebrew on Mac OSX" title="Install Scheme via Homebrew on Mac OSX" /></p>
<p>That&#8217;s it!  (if you are on Windows, you can get install instructions <a href="http://sicp.ai.mit.edu/Spring-2007/SchemeImplementations/ms-install.htm">here</a>)</p>
<p>The only things I knew about Scheme were that it was functional and there were a lot of parentheses.  I was right on both accounts.  Aside from a few exercises where you were to type a number and have it spit back out to you, the first thing you run into is this:</p>
<pre>(* 2 2)</pre>
<p>Well, at first glance, stuff like that will throw you a little bit.  However, with only a little bit of thought, you can see that it makes perfect sense.  We have to think functionally.  The parentheses tell us that this group is all one function call and reading left to right we see that we are calling the multiplication function &#8211; the * &#8211; and passing in the numbers 2 and 2 as arguments.  That&#8217;s it.  So (* 2 2) outputs 4 and (* 2 3 4) outputs 24.  Also, we need the parentheses.  Without them, you don&#8217;t get the desired result as you can see below.</p>
<p><img src="http://www.peteonsoftware.com/images/201108/MultiplicationInScheme.jpg" alt="Multiplication in Scheme" title="Multiplication in Scheme" /></p>
<p>What about control flow?  That, too, is very simple.  The syntax is simply (if (condition) result1 result2).  It is very similar to an IIF statement, but without the commas.  If you take this code, you get the result pictured below.  </p>
<pre>(if (< 4 5) "four is less than 5" "four is not less than five")</pre>
<p><img src="http://www.peteonsoftware.com/images/201108/SimpleIfScheme.jpg" alt="Simple If Statement in Scheme" title="Simple If Statement in Scheme" /></p>
<p>If you are having any trouble making sense of it, it might be helpful to think of this code in terms of how it breaks out in C#</p>
<pre name="code" class="csharp">
if (4 < 5)
{
     return "four is less than five";
}
else
{
     return "four is not less than five";
}
</pre>
<p>I hope that if the Scheme code was confusing to you, that the C# translation helped a bit.  You'll notice that just as a Ruby function returns the last thing that was evaluated, so too does Scheme.  That's why there are no return statements in my Scheme example, but there are in the C# example.</p>
<p>Next time, we'll look at more complex if statements and travel down the functional road a little further.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2011/08/28/my-introduction-to-scheme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programming Language “Skills”</title>
		<link>http://www.peteonsoftware.com/index.php/2011/08/23/programming-language-skills/</link>
		<comments>http://www.peteonsoftware.com/index.php/2011/08/23/programming-language-skills/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 11:59:33 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Craftmanship]]></category>
		<category><![CDATA[Programming Languages]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=323</guid>
		<description><![CDATA[I just read a post over at The Hundred Minute Hack called Do Programming Language Skills Exist?. The basic premise is that you don&#8217;t have Java Skills or Python Skills or Ruby Skills, you have object oriented skills, functional skills, etc. These languages are just tools. If we keep the &#8220;Software Developer As Craftsman&#8221; metaphor, [...]]]></description>
			<content:encoded><![CDATA[<p>I just read a post over at The Hundred Minute Hack called <a href="http://hundredminutehack.blogspot.com/2011/08/do-programming-language-skills-exist.html">Do Programming Language Skills Exist?</a>.  The basic premise is that you don&#8217;t have Java Skills or Python Skills or Ruby Skills, you have object oriented skills, functional skills, etc.  These languages are just tools. </p>
<p>If we keep the &#8220;Software Developer As Craftsman&#8221; metaphor, a carpenter might have 10 years of general carpentry skills, or 20 years at furniture making.  What a carpenter would never really need to put on a resume is:</p>
<ul>
<li>Hammer &#8211; 20 years experience</li>
<li>Manual Saw &#8211; 20 years experience</li>
<li>Table Saw &#8211; 18 years experience</li>
<li>Router &#8211; 14 years experience</li>
<li>Clamp &#8211; 20 years experience</li>
<li>Sandpaper &#8211; 20 years experience</li>
<li>Belt Sander &#8211; 19 years experience</li>
</ul>
<p>For an experienced carpenter, it very rarely matters what his toolset is, it matters what skills he possesses.  The tool often just offers an easier or faster way to do something he already knows how to do.  </p>
<p>With so many things changing so quickly in software development, it really is the skills that matter.  It is possible to have almost 30 years of object oriented programming skills.  You can have 15 years of skills with the web.  You can&#8217;t have 5 years of experience with .Net 4 or 10 years of experience with Rails. </p>
<p>As &#8220;new and better&#8221; things are constantly released, it really is the skill that is transcendant, while the tools come and go.  The proven ability to learn the tool is even a skill, but the act of knowing the tool alone is not.  I am great with a hammer, but I couldn&#8217;t build you anything from scratch.  In that same way, someone who only knows the C# language isn&#8217;t necessarily going to be any good in some enterprise shop or someone who only knows Ruby isn&#8217;t necessarily going to be the person you want to have as the only employee at your start up.</p>
<p>I think that I&#8217;ve almost always agreed with <a href="http://hundredminutehack.blogspot.com/">Phil</a>, but I never really had the idea codified in my head so succinctly.  I&#8217;m not saying the tools are worthless (obviously, a carpenter becomes very familiar with his tools &#8211; as should we), but I do think that we as programmers are almost worthless if we don&#8217;t hone the things that are transcendent skills.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2011/08/23/programming-language-skills/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Overtime</title>
		<link>http://www.peteonsoftware.com/index.php/2011/08/13/overtime/</link>
		<comments>http://www.peteonsoftware.com/index.php/2011/08/13/overtime/#comments</comments>
		<pubDate>Sun, 14 Aug 2011 00:49:11 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Business of Software]]></category>

		<guid isPermaLink="false">http://www.peteonsoftware.com/?p=311</guid>
		<description><![CDATA[A while back, I read a blog post on Big Bang Technology&#8217;s blog written by Max Cameron titled &#8220;Why We Don&#8217;t Work Overtime&#8220;. I will give a full disclaimer here at the outset, I probably work too many hours, so I have a little bit of skin in this game. Namely, I could be accused [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.peteonsoftware.com/images/201108/Overtime.jpg" alt="'Overtime' from MotiFake.com" title="'Overtime' from MotiFake.com" width="400" height="388" /><br />
A while back, I read a blog post on Big Bang Technology&#8217;s blog written by Max Cameron titled &#8220;<a href="http://bigbangtechnology.com/post/why_we_dont_work_overtime">Why We Don&#8217;t Work Overtime</a>&#8220;.  I will give a full disclaimer here at the outset, I probably work too many hours, so I have a little bit of skin in this game.  Namely, I could be accused of only responding because my work choices were being invalidated by someone else.  That certainly isn&#8217;t my impetus for this blog.  I merely wanted to offer a different perspective to Max Cameron&#8217;s blog post.</p>
<p>Cameron is writing from the perspective of a Startup Company.  He does make an exception to the overtime rule for the founders, but for his employees he says,</p>
<pre>There are no heroes at our office. When the clock strikes five,
the team goes home. If they try to keep working, I tell them that
the game's over and they lost. They either put too much on their
plate, got taken off-task, or were wasting time. None of those
justify working past five, on a holiday, or over a weekend.</pre>
<p>I certainly applaud his motiviations.  He sticks to this rule even when clients ask for it, when they&#8217;d need it to win new business, etc.  It is one of his company&#8217;s core values and they stick to it.  Everyone realizes that when an employee (especially a salaried one) works overtime, he is &#8220;doing more than he agreed to&#8221; and is &#8220;taking away family time&#8221; and &#8220;upsetting the work/life balance&#8221;.  However, what I find interesting are some of the reasons that their company takes that choice away from their employees.</p>
<p>One major reason that Cameron cites is that to persuade employees to work overtime, the noble concept of &#8220;sacrifice&#8221; is invoked.  In his mind, soldiers, firefighters, and police officers sacrifice, and to try to align that concept with &#8220;expected overtime&#8221; is a dangerous habit to get in to.  </p>
<p>He points out that the employees who work over are the &#8220;heroes&#8221; and those who don&#8217;t are &#8220;losers who let you down&#8221;.  In his words, &#8220;Yearly reviews just got a whole lot easier&#8221;.  Later he says, &#8220;How could I promote a loser when they&#8217;re surrounded by winners?&#8221;.</p>
<p>I want to deal with that point first.  He is obviously being rhetorical and a little sarcastic with those last quotes, arguing his point to ad absurdum.  However, I think there is a point to be investigated there.  My <a href="http://itbartender.com/">current boss</a> has taught me a lot about managing people and the value of making &#8220;the hard decision&#8221;.  It sounds to me like Cameron is welching a little bit on managing employees.  Sometimes, you have to make the hard choices.  As my boss likes to say, &#8220;Who do we pay to do the hard stuff?&#8221;.  </p>
<p>Imagine on one hand that you have an employee who works only 40 hours and is very productive, gets along well with others, is a leader, and so on.  Now, imagine you have another employee who works a ton of overtime, but you know that it is because he isn&#8217;t very efficient.  He has a good work ethic and to make up for his lack of efficiency (and &#8220;social time&#8221; during work hours), he tries to even it out with that overtime.  Now, if you are a manager who can&#8217;t promote Mr. Productive Forty and explain to Mr. Compensating why he didn&#8217;t get the job, you aren&#8217;t much of a manager and should rethink your career path.</p>
<p>Let&#8217;s pretend there is another scenerio.  This time, you have two very equal employees.  One of them is a &#8220;5:01 Developer&#8221; (gone by 5:01 every day) and the other works over to make sure things get done on time, or to add special features off of the &#8220;nice to have&#8221; list that never gets prioritized ahead of &#8220;big projects&#8221;.  In that case &#8211; all else being equal &#8211; why <strong><em>wouldn&#8217;t</em></strong> you promote the overtime guy?  </p>
<p>These kinds of decisions are why you are the person writing the reviews.</p>
<p>A point that Cameron makes alongside this one is the concept of burnout.  This is definitely a very real problem.  However, I feel that he&#8217;s again arguing to take the &#8220;copout&#8221; path.  He seems to be claiming that it is impossible or would require too much work to monitor and make sure that his employees aren&#8217;t burning out.  There is a big difference between running a guy at 80+ hours a week for months at a time, working 1 or 2 60-70+ hour weeks before  huge release, and regulary working 50 hours a week because that&#8217;s what you are comfortable working.</p>
<p>As I admitted earlier, I definitely work overtime.  I am soon taking my first vacation week in years (only because the company stopped paying out for unused time &#8211; I have to &#8220;use it or lose it&#8221; and I&#8217;m too practical for that <img src='http://www.peteonsoftware.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ).  However, I&#8217;ve been going at this pace for about five years straight now, across 2 companies.  I&#8217;m not close to burnout.  You can&#8217;t manage people homogeneously, you have to manage to the individual.  I&#8217;m more of a sports car, not a minivan, there is no danger of running the engine at a little bit higher speeds.</p>
<p>I&#8217;m not bragging.  My point is that I&#8217;m different than other people and a team needs all kinds of people on it.  The Apostle Paul actually writes to this point quite eloquently in the Bible in 1 Corinthians 12:14-21:</p>
<pre>
Even so the body is not made up of one part but of many.
Now if the foot should say, "Because I am not a hand,
I do not belong to the body," it would not for that reason
stop being part of the body. And if the ear should say,
"Because I am not an eye, I do not belong to the body," it
would not for that reason stop being part of the body. 

If the whole body were an eye, where would the sense of hearing be?
If the whole body were an ear, where would the sense of smell be?
But in fact God has placed the parts in the body, every one of
them, just as he wanted them to be. If they were all one part,
where would the body be? As it is, there are many parts, but one body.

The eye cannot say to the hand, "I don't need you!" And the head
cannot say to the feet, "I don't need you!"
</pre>
<p>There are things I do well and things that I don&#8217;t do well, and I realize that I don&#8217;t always see them clearly.  The way that that is remedied is that my team is made up of all sorts of people.  The person building the team knows what he has, and fills the gaps appropriately.  The fact that I can easily work 50 hours a week or more without burning out is just a tool that my company has at its disposal, just as all of the other skills of employees are at their disposal.</p>
<p>One point that I just could not grasp in Cameron&#8217;s blog post was the fact that he is willing to let his clients down because of this overtime policy.  Even if the work completed because of overtime would win their clients more business or help solve a serious problem that they are having, overtime is still off limits.</p>
<p>I see nothing wrong with working over to win new business, for you or for one of your clients.  Your client has likely worked with others who cannot deliver these things and you make yourself indispensible to him as someone who <strong><em>can</em></strong> deliver them.  But again, there is the potential for abuse, but that relies on your client service managers or account representitives to &#8220;do the hard stuff&#8221; of recognizing and stopping abuse before it gets anywhere.</p>
<p>As I was discussing this topic with a good friend of mine, he pointed out to me that one problem he had with overtime was that it &#8220;excused&#8221; or &#8220;covered up&#8221; poor planning.  For instance, if a project was projected to have 15 features and be delivered in 2 months, but was estimated poorly, that can be a problem.  Proper Agile philosophy is to have the business either extend the date based on the metrics from the iterations, or cut features.  Another approach is for it to still spend the hours, but spend them in 60, 70, or 80 hour weeks to meet the deadline.  That&#8217;s a &#8220;death march&#8221; and no one really wants that.</p>
<p>However, sometimes it is politically expedient to deliver the project by working the overtime.  Not everyone works at a company that can afford to turn down external clients or at a consultancy that can easily refuse work.  A good deal of software development is done as part of an &#8220;in-house&#8221; shop that develops software for &#8220;an enterprise&#8221;.  There are 100 ways that you can curry favor by seemingly doing the impossible and those who don&#8217;t see the value in that don&#8217;t have a very mature view of the &#8220;real world&#8221;.</p>
<p>However, the issue then comes if you don&#8217;t learn a lesson about your estimating and back yourself into those kinds of corners on project after project.  Again, I fall back on &#8220;Who do we get to do the hard stuff?&#8221;  If your Project Managers can&#8217;t control these projects from the outset, you probably have the wrong people in there.</p>
<p>This has definitely been one of my longer rants and I know that a lot of people will disagree with me.  Feel free to leave a comment below, or blog your own responses.  If you do a reaction blog, please link it in the comments so that I can read the discourse and the other readers may benefit, as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peteonsoftware.com/index.php/2011/08/13/overtime/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

