<?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>Lovable Lyle &#187; Software Development</title>
	<atom:link href="http://lylejohnson.name/blog/category/swdev/feed/" rel="self" type="application/rss+xml" />
	<link>http://lylejohnson.name/blog</link>
	<description>Covering Software Development with Ruby and FXRuby</description>
	<lastBuildDate>Wed, 18 Aug 2010 20:08:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Book Review: Debug It!</title>
		<link>http://lylejohnson.name/blog/2009/12/23/book-review-debug-it/</link>
		<comments>http://lylejohnson.name/blog/2009/12/23/book-review-debug-it/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 22:52:52 +0000</pubDate>
		<dc:creator>Lyle</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://lylejohnson.name/blog/?p=367</guid>
		<description><![CDATA[I started programming as a teenager. My first paid programming job involved writing a sort of mail-merge program in BASIC, on a TRS-80 Model II at my Dad&#8217;s office. Over the years, I figured out that by adding enough print statements here and there I could eventually figure out what was going on and make [...]]]></description>
			<content:encoded><![CDATA[<p>I started programming as a teenager. My first paid programming job involved writing a sort of mail-merge program in BASIC, on a <a href="http://oldcomputers.net/trs80ii.html">TRS-80 Model II</a> at my Dad&#8217;s office. Over the years, I figured out that by adding enough print statements here and there I could eventually figure out what was going on and make the bugs (or at least their symptoms) go away.</p>

<p>Another ten years or so passed, however, before I really learned how to debug software. That happened at my first job out of graduate school, when I went to work for a <a href="http://www.cfdrc.com/">company</a> that produced commercial software for computational fluid dynamics (CFD) analysis. The sort of scattershot debugging approach that I&#8217;d used up until then would no longer suffice. We had customers paying pretty hefty licensing fees to use our software, and when they reported a bug we needed to make sure that we could get a solid, reliable fix out to them so that their work wasn&#8217;t disrupted. It wasn&#8217;t enough to make the symptoms of the problem go away. We needed to understand what was broken, how it got that way, and only then implement a solution. Fortunately, one of my mentors at that company taught me this more rigorous approach to debugging software, one that I continue to use to this day.</p>

<p>Earlier this year, I had the opportunity to do a technical review of <a href="http://www.paulbutcher.com/">Paul Butcher</a>&#8216;s new book, <a href="http://pragprog.com/titles/pbdp/debug-it"><cite>Debug It!</cite></a> and now that it&#8217;s been published I&#8217;m pleased to be able to review the final product. A number of classic programming books, such as Steve Maguire&#8217;s <cite>Writing Solid Code</cite> or Steve McConnell&#8217;s <cite>Code Complete</cite>, touch on debugging as one aspect of the software development process, but I&#8217;m not sure that I&#8217;ve ever seen or read an entire book devoted to the topic of debugging software. In that regard, Paul&#8217;s new book fills a pretty interesting niche.</p>

<p>Paul breaks the debugging process up into four stages: reproduce, diagnose, fix and reflect. These stages are covered in detail in the first five chapters of the book, and this is the most important section. In the chapter on reproducing bugs, he touches on topics such as how to control the environmental conditions under which bugs manifests themselves, and techniques for reproducing the inputs that trigger the bugs. He also addresses some of the difficulties involved in dealing with especially difficult-to-reproduce nondeterministic bugs. In the chapter on diagnosis, Paul moves on to the process of forming a hypothesis about what&#8217;s causing the bug and then performing experiments to refine that hypothesis until you settle in on a root cause. There are a lot of useful guidelines here, including my favorite: Only change one thing at a time! The chapter on fixing bugs is relatively short, which reflects the reality that once you understand what&#8217;s going on it&#8217;s usually not that difficult to fix the problem. Here the author stresses the importance of adding regression tests, and making sure that you&#8217;re fixing the root cause and not merely the symptoms. The last step is to reflect on the significance of this bug and what it might be telling you about the overall quality of your code (e.g. are similar bugs lurking elsewhere in the code?)</p>

<p>The second section of the book (&#8220;The Bigger Picture&#8221;) takes a higher-level look at the issues surrounding software bugs, namely, how do you create an environment such that you stay on top of bugs and not fall into an &#8220;infinite defects&#8221; situation. It addresses topics such as tracking bugs and working with users and the support staff to better understand the bugs they&#8217;re seeing in production. The third section of the book (&#8220;Debug-Fu&#8221;) is sort of a hodge-podge of more advanced topics, I suppose. Some of the information in these later chapters is arguably out of place in this book. For example, Chapter 9, &#8220;The Ideal Debugging Environment,&#8221; stresses the importance of having automated tests, a continuous build system, and so forth. There&#8217;s no question that this is good advice; I&#8217;m just not sure that it&#8217;s completely on-topic for this book. Having said that, they <em>are</em> good disciplines for any programmer to have, and if the stuff in the rest of this book is new to you there&#8217;s a good chance that Paul&#8217;s advice on testing and continuous builds is new to you too.</p>

<p>It is important to note that the focus of this book is the debugging mindset, and strategies and techniques that you&#8217;ll use when debugging software. It does <em>not</em> teach you how to use any particular debugging tools. If you merely want to learn how to use the GNU debugger (gdb), or the graphical debugger in your IDE of choice, this is not the book for you.</p>

<p>In conclusion, I would highly recommend <cite>Debug It!</cite> to any junior-level programmer who&#8217;s interested in developing a more disciplined approach to debugging. If you&#8217;re not a junior-level programmer but still feel like you waste a lot of time debugging, you will probably find this book helpful as well. It&#8217;s like having a mentor sitting there with you, teaching you how to take your debugging game to the next level.</p>
]]></content:encoded>
			<wfw:commentRss>http://lylejohnson.name/blog/2009/12/23/book-review-debug-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Year&#8217;s Goals</title>
		<link>http://lylejohnson.name/blog/2008/01/04/new-years-goals/</link>
		<comments>http://lylejohnson.name/blog/2008/01/04/new-years-goals/#comments</comments>
		<pubDate>Fri, 04 Jan 2008 21:17:10 +0000</pubDate>
		<dc:creator>Lyle</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://lylejohnson.name/blog/2008/01/04/new-years-goals/</guid>
		<description><![CDATA[I&#8217;m not going to call them resolutions, because that implies a bit too much of a commitment, but I&#8217;ve been thinking about some of the techie goals that I have for this year. First, the obvious one. My goal (and my publisher&#8217;s &#8220;goal&#8221;, if you want to call it that) is to get the book [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not going to call them resolutions, because that implies a bit too much of a commitment, but I&#8217;ve been thinking about some of the techie goals that I have for this year.</p>

<p>First, the obvious one. My goal (and my publisher&#8217;s &#8220;goal&#8221;, if you want to call it that) is to get <a href="http://www.pragprog.com/titles/fxruby">the book</a> finished. And we&#8217;re well on our way to accomplishing that.</p>

<p>Next, I want to learn a new programming language this year. Although I&#8217;m taking a look at <a href="http://www.scala-lang.org/">Scala</a>, I received <cite><a href="http://www.pragprog.com/titles/jaerlang">Programming Erlang</a></cite> for Christmas (because my wife is just that good) and I&#8217;m liking what I&#8217;ve read about <a href="http://www.erlang.org/">Erlang</a> so far. I have the feeling that it&#8217;s going to win out. Scala reminds me a little too much of Java.</p>

<p>Lastly, I want to learn a lot more about developing applications for Mac OS X. That will no doubt involve my learning some <a href="http://en.wikipedia.org/wiki/Objective-C">Objective C</a> along the way, but that&#8217;s not a bad thing. I&#8217;m especially eager to dig into the <a href="http://rubycocoa.sourceforge.net/HomePage">RubyCocoa</a> framework that shipped with <a href="http://www.apple.com/macosx/">Leopard</a>, to see how viable a platform that is for developing and shipping commercial Mac OS X applications.</p>

<p>What about you? What are some of the technologies that you think you&#8217;ll be checking out in 2008?</p>
]]></content:encoded>
			<wfw:commentRss>http://lylejohnson.name/blog/2008/01/04/new-years-goals/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Binary Marble Adding Machine</title>
		<link>http://lylejohnson.name/blog/2007/06/27/binary-marble-adding-machine/</link>
		<comments>http://lylejohnson.name/blog/2007/06/27/binary-marble-adding-machine/#comments</comments>
		<pubDate>Wed, 27 Jun 2007 14:15:41 +0000</pubDate>
		<dc:creator>Lyle</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://lylejohnson.name/blog/?p=207</guid>
		<description><![CDATA[Matthias Wandel has built a simple computer (an adder) that uses marbles. The story of how he had to add extra pieces of wood to help guide the marbles, so that they wouldn&#8217;t bounce out and throw off the computation, reminded me of the apocryphal stories of early programmers having to literally &#8220;debug&#8221; computers by [...]]]></description>
			<content:encoded><![CDATA[<p>Matthias Wandel has <a href="http://woodgears.ca/marbleadd/">built</a> a simple computer (an <a href="http://en.wikipedia.org/wiki/Adder_%28electronics%29">adder</a>) that uses marbles. The story of how he had to add extra pieces of wood to help guide the marbles, so that they wouldn&#8217;t bounce out and throw off the computation, reminded me of the apocryphal stories of early programmers having to literally &#8220;debug&#8221; computers by removing moths or other insects that had become trapped in the relays.</p>

<p>Be sure to watch the video (found at the bottom of the page) to see it in action. Oh, and don&#8217;t feel shame if it reminds you of Plinko &#8212; that&#8217;s the first thing that came to mind for me too.</p>

<p>Thanks to <a href="http://www.semergence.com/2007/06/26/links-for-2007-06-27/">Seth Ladd</a> for the link.</p>
]]></content:encoded>
			<wfw:commentRss>http://lylejohnson.name/blog/2007/06/27/binary-marble-adding-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Distributed Source Control Systems</title>
		<link>http://lylejohnson.name/blog/2007/05/18/distributed-source-control-systems/</link>
		<comments>http://lylejohnson.name/blog/2007/05/18/distributed-source-control-systems/#comments</comments>
		<pubDate>Sat, 19 May 2007 02:14:11 +0000</pubDate>
		<dc:creator>Lyle</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://lylejohnson.name/blog/?p=200</guid>
		<description><![CDATA[Kyle Cordes&#8217; recent post about distributed source control reminded me that learning more about that topic has been on my Someday/Maybe list for awhile now. It&#8217;s Kyle&#8217;s opinion that distributed source control systems are &#8220;dramatically better&#8221; than centralized systems (like Subversion). I still haven&#8217;t decided whether distributed source control is a solution to a problem [...]]]></description>
			<content:encoded><![CDATA[<p>Kyle Cordes&#8217; recent <a href="http://kylecordes.com/2007/05/17/linux-git-distributed/" title="Linus Torvalds explains distributed source control">post</a> about distributed source control reminded me that learning more about that topic has been on my Someday/Maybe list for awhile now. It&#8217;s Kyle&#8217;s opinion that distributed source control systems are &#8220;dramatically better&#8221; than centralized systems (like Subversion). I still haven&#8217;t decided whether distributed source control is a solution to a problem that I don&#8217;t have, but the bits about it making creating and merging branches easier appeal to me, so I decided to dig a little deeper.</p>

<p>All of the projects that I work on use Subversion as their source control system, so I needed to find something that would play nice with it. <a href="http://svk.bestpractical.com/view/HomePage" title="SVK Home Page">SVK</a> seemed like an obvious choice since it&#8217;s layered on top of Subversion, and there&#8217;s a port for it in MacPorts, so that&#8217;s where I started. After I got the software installed, I worked through Ron Bieber&#8217;s excellent <a href="http://www.bieberlabs.com/wordpress/archives/2004/11/30/using-svk" title="SVK - Distributed Version Control - Part I">tutorial</a> series to get a feel for the SVK workflow. I highly recommend these tutorials if you&#8217;re considering using SVK.</p>

<p>I&#8217;ve been experimenting with SVK for a couple of days now, primarily doing some development on the FXRuby 1.6 branch, and it was working like a charm. I have to admit that it&#8217;s a little slow, especially considering that it&#8217;s just looking at stuff on the local disk. But it seemed to be working. Unfortunately, I just discovered that SVK doesn&#8217;t support the <code>svn:externals</code> property. That is, if a directory in your Subversion repository has the <code>svn:externals</code> property set on it, SVK will not properly mirror those external directories (it just ignores them). This isn&#8217;t an issue for the FXRuby repository, but many of the other projects that I work on make at least some use of Subversion externals. For the time being, that means no SVK for me.</p>

<p>So, back to the drawing board. I know of several alternatives that I can look at, like <a href="http://git.or.cz/" title="Git Home Page">git</a>, <a href="http://www.selenic.com/mercurial/wiki/" title="Mercurial Home Page">Mercurial</a>, <a href="http://bazaar-vcs.org/" title="Bazaar Home Page">Bazaar</a> and <a href="http://www.gnu.org/software/gnu-arch/" title="Arch Home Page">arch</a>. The main requirement for me is that it works on Mac OS X, and that it plays nice with Subversion (i.e. it can both pull down the latest changes from a Subversion repository and push my changes back to that repository). And, um, it has to support <code>svn:externals</code>. Any suggestions?</p>

<p><strong>Update:</strong> Looks like people are also talking about <a href="http://monotone.ca/" title="Monotone Home Page">Monotone</a> and <a href="http://www.abridgegame.org/darcs/" title="darcs Home Page">darcs</a>. Meanwhile, at first glance it doesn&#8217;t sound like git supports svn:externals either. I&#8217;m getting a sinking feeling that none of &#8216;em will. Oh well, we&#8217;ll see.</p>
]]></content:encoded>
			<wfw:commentRss>http://lylejohnson.name/blog/2007/05/18/distributed-source-control-systems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft: Dead, and Starting to Smell a Little</title>
		<link>http://lylejohnson.name/blog/2007/05/14/microsoft-dead-and-starting-to-smell-a-little/</link>
		<comments>http://lylejohnson.name/blog/2007/05/14/microsoft-dead-and-starting-to-smell-a-little/#comments</comments>
		<pubDate>Mon, 14 May 2007 15:21:05 +0000</pubDate>
		<dc:creator>Lyle</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://lylejohnson.name/blog/?p=198</guid>
		<description><![CDATA[A little over a month ago, Paul Graham stirred up a little hornet&#8217;s nest with his essay &#8220;Microsoft is Dead&#8221;. As he found it necessary to clarify a couple of days later, Paul didn&#8217;t mean to suggest that Microsoft was on the verge of going out of business. He meant that, in terms of all [...]]]></description>
			<content:encoded><![CDATA[<p>A little over a month ago, Paul Graham stirred up a little hornet&#8217;s nest with his essay <a href="http://www.paulgraham.com/microsoft.html" title="Microsoft is Dead">&#8220;Microsoft is Dead&#8221;</a>. As he found it necessary to <a href="http://www.paulgraham.com/cliffsnotes.html" title="Microsoft is Dead: The Cliffs Notes">clarify</a> a couple of days later, Paul didn&#8217;t mean to suggest that Microsoft was on the verge of going out of business. He meant that, in terms of all the progressive and exciting things going on in software development today, Microsoft is largely irrelevant. They continue to bolt on new features to Windows and Office in a desperate attempt to keep up with the competition, but it&#8217;s been a long time since anyone other than Microsoft&#8217;s marketing department considered them &#8220;innovative&#8221;.</p>

<p>Given this reality, today&#8217;s <a href="http://money.cnn.com/magazines/fortune/fortune_archive/2007/05/28/100033867/index.htm?section=money_latest" title="Microsoft Takes On the Free World">news</a> that Microsoft is demanding royalty payments, for what it claims are over 200 patent violations by a number of open source projects (including <a href="http://en.wikipedia.org/wiki/Linux" title="Linux article from Wikipedia">Linux</a> and <a href="http://www.openoffice.org/" title="OpenOffice.org Home Page">Open Office</a>), should come as no surprise. Although it&#8217;s not quite the same circumstances, I can&#8217;t help but compare this to the embarrassing efforts by the <a href="http://www.linux.org/news/sco/index.html" title="SCO Controversy">SCO Group</a> over the past four years to claim intellectual property rights to parts of the Linux kernel (while their plummeting stock price continually threatens to get them <a href="http://www.heraldextra.com/content/view/219959/3/" title="SCO faces delisting from Nasdaq again">delisted</a> by Nasdaq). As <a href="http://headius.blogspot.com/2007/05/big-plans.html" title="Big Plans">Charles Nutter</a> put it, &#8220;I&#8217;d hate to be an OSS (Open Source Software) developer or apologist [working] at Microsoft today.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://lylejohnson.name/blog/2007/05/14/microsoft-dead-and-starting-to-smell-a-little/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mike Clark on Sweet-Smelling Comments</title>
		<link>http://lylejohnson.name/blog/2005/05/19/mike-clark-on-sweet-smelling-comments/</link>
		<comments>http://lylejohnson.name/blog/2005/05/19/mike-clark-on-sweet-smelling-comments/#comments</comments>
		<pubDate>Thu, 19 May 2005 10:20:00 +0000</pubDate>
		<dc:creator>Lyle</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://lylejohnson.name/wp/?p=86</guid>
		<description><![CDATA[A recent article from Mike Clark presents some good advice about comments: Keep It DRY. The &#8220;Don&#8217;t Repeat Yourself&#8221; principle has wider application than the mere avoidance of code duplication. It&#8217;s also a mistake to duplicate knowledge about the intent or functionality of a method in the source code&#8217;s comments. As Mike notes, &#8220;If a [...]]]></description>
			<content:encoded><![CDATA[<p>A recent <a href="http://www.stickyminds.com/s.asp?F=S9041_ART_3">article</a> from Mike Clark presents some good advice about comments:
<ol>
    <li> <strong>Keep It DRY.</strong> The &#8220;Don&#8217;t Repeat Yourself&#8221; principle has wider application than the mere avoidance of code duplication. It&#8217;s also a mistake to duplicate knowledge about the intent or functionality of a method in the source code&#8217;s comments. As Mike notes, &#8220;If a comment already describes what the code does, then the comment is redundant and should be removed.&#8221; </li>
    <li> <strong>Make the Code Speak for Itself.</strong> That is, choose meaningful names for classes, methods and variables. If the purpose of a method isn&#8217;t fairly obvious from its name, there&#8217;s a good chance that it needs a new name. Invest the time and energy that you would have used writing a comment to &#8220;deodorize&#8221; that code smell, and use it to come up with a more descriptive name instead.</li>
    <li> <strong>Write a Sweet-Smelling Comment.</strong> Use comments to tell <em>why</em> something was done: what purpose a class serves in the system, assumptions made by the code, and so so.</li>
</ol></p>
]]></content:encoded>
			<wfw:commentRss>http://lylejohnson.name/blog/2005/05/19/mike-clark-on-sweet-smelling-comments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
