tag:blogger.com,1999:blog-85794762024-02-08T10:11:08.933-08:00Reflections on ProgrammingAnonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comBlogger55125tag:blogger.com,1999:blog-8579476.post-56710684913996219552007-01-17T09:03:00.000-08:002007-01-17T09:04:57.485-08:00MovingI have decided to consolidate my blogs into a single one at <a href="http://john-dunne.blogspot.com/">http://john-dunne.blogspot.com/</a>Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1153411689010964472006-07-20T09:07:00.000-07:002006-07-20T09:08:09.026-07:00Quote of the Day<div style="text-align: left; font-style: italic;"><span style="font-family:Tahoma;font-size:85%;"><blockquote>Watch where the footpaths go before you lay down the sidewalks.<br /></blockquote></span></div>Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1138293292878987542006-01-26T08:34:00.000-08:002006-01-26T08:34:52.886-08:00Grooks<div xmlns="http://www.w3.org/1999/xhtml">By way of <a href="http://dig.csail.mit.edu/breadcrumbs/node/72">Tim Berners-Lee</a>, I found this wonderful collection of <a href="http://chat.carleton.ca/%7Etcstewar/grooks/grooks.html">Grooks</a> by Piet Hein. They have a wonderfully whimsical character, like this one:<br/><blockquote><pre>BUDGETING: THE FIRST LAW <br/><br/>If you want to know<br/>where your money went,<br/>you must spend it quickly<br/>before it's spent. </pre><br/></blockquote></div>Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1138129125610814672006-01-24T10:58:00.000-08:002006-01-24T10:58:45.650-08:00Great Quote<div xmlns="http://www.w3.org/1999/xhtml"><a href="http://www.darrenhobbs.com/archives/2006/01/agile_answers.html">Darren Hobbs: Agile Answers</a> <br/> <blockquote>Developing incrementally does not (in my opinion) mean taking your brain out before starting. <br/></blockquote></div>Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1137787871753093822006-01-20T12:05:00.000-08:002006-01-20T12:11:11.766-08:00What happens when you don't "get it"<a href="http://blogs.pragprog.com/cgi-bin/pragdave.cgi/Random/Imitation.rdoc">PragDave</a><br /><blockquote>Without exception, these early attempts at imitation failed: the car companies replicated what they saw Toyota doing, but only on the surface. They didn't really understand what was behind these practices. It was like trying to become an artist by copying the angle and velocity of the brush held by a master.</blockquote>You see this happen often with various "agile" practices, like test driven development, XP, or Scrum. If all of the participants don't grok the practice, then they blindly execute a series of steps, and say, "See. It didn't work!"<br /><br />There are two possible resolutions to this problem.<br /><br />You can <span style="font-weight: bold;">tighten up the process</span>. Unfortunately, if you didn't "get it" in the first place, you are likely to cause more harm than good. At its pathological extreme, your team works like the staff of a McDonald's, with each person following a carefully prescribed methodology. If you are building the software equivalent of a Big Mac, then this might be perfect for you.<br /><br />You can <span style="font-weight: bold;">invest in your people</span>. The old saw about giving a man a fish versus teaching him to fish applies here. For even the most simple project, it is nearly impossible to prescribe everything. At some point, personal judgement has to kick in, therefore it makes sense to equip the team with the mental tools needed to make the right decisions.<br /><br />I don't mean to "dis" process, but I think you reach a point of diminishing returns, with "process improvement" whereas "people improvement" will always pay off handsomely.Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1136324414038015732006-01-03T13:40:00.000-08:002006-01-03T13:40:14.046-08:00Design by Contract is trademarked!<div xmlns="http://www.w3.org/1999/xhtml">I was reading this article called <a href="http://www.artima.com/cppsource/deepspace.html">Contract Programming 101</a>, when I ran into this little gem:<br/><blockquote>Note: the term <em>Design By Contract</em> was trademarked in 2003 by Dr. Meyer, so all the little free software pixies are dropping the term like a hot coal. The latest favoured term is <em>Contract Programming</em>, as suggested by Walter Bright in 2004 and used in the recent proposal by Thorsten Ottosen and Lawrence Crowl to the C++ standards body.</blockquote>That is not cool!<br/></div>Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1131749151915232332005-11-11T14:45:00.000-08:002005-11-11T14:45:51.950-08:00Index CardsExtreme Programming has this strong tradition of using index cards to track <a href="http://www.c2.com/cgi/wiki?UserStory">user stories</a>, or to aid in design through the use of <a href="http://www.c2.com/cgi/wiki?CrcCard">CRC cards</a>.<br/><br/>Now, I have always had a strong preference for Excel spreadsheets. You can print them, e-mail them, share them, and save them. <br/><br/>But there is something wonderful in the very nature of index cards. Their very constraints create interesting feedback loops. Think of all the objections that you might have against them:<br/><br/><em>Index cards are too easy to lose.</em><br/><br/>Yes – but why are you writing anything important on an index card in the first place? At the end of the day, the only important work product is the code. <a href="http://www.agilemodeling.com/">Requirements and any other models</a> exist to facilitate conversations about the code. If you have been writing tests along the way, when the coding is done, the requirements don’t need to exist anymore. The requirements aren’t sacred. The only thing that is sacred, the desires of your users, cannot be captured in any format, but must be discovered through a constant dialog.<br/><br/><em>Index cards are too bulky.</em><br/><br/>If you have more index cares than you can manage, then your user stories are either too fine grained or your scope is too ambitious. Either way, the cards are telling you that you need to change.<br/><br/>This is a pet peeve of mine. Quite often, when you are doing the wrong thing, it will be difficult. The correct solution is not to make it easier to do the wrong thing, but to change what you were doing in the first place. <br/><br/><em>Only one person can “own” an index card at a time.</em><br/><br/>So what? Distributed ownership is the worst thing that can happen in project management. If everyone owns a task, then no one is really responsible for carrying it out. <br/><br/>Having said all that, I am still mulling over the use of index cards in my process, and have started collecting links about index cards in <a href="http://del.icio.us/johndunne/indexcards">del.icio.us</a>.Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1131451604027040582005-11-08T03:56:00.000-08:002005-11-08T09:39:26.456-08:00Holistic thinking is disruptiveIn the November issue of the <a href="http://www.theatlantic.com/">Atlantic Monthly</a>, there was a <a href="http://www.theatlantic.com/doc/prem/200511/primarysources">brief article</a> about the heuristics used by the US intelligence community to detect spies.<br /><blockquote>They may also take a "holistic view of world affairs" that could lead them to believe espionage is "morally justifiable."</blockquote>You can read this any number of ways, and I won't debate the ethics of making decisions to support particular policies of this adminstration in spite of common sense (or holistic thinking) telling you otherwise.<br /><br />But I would like to touch briefly on his this might affect <span style="font-style: italic;">your</span> organization. When it exceeds a certain size, every organization begets a hierarchy of departments. While the organization, as a whole, might wish to move in one direction, each department has its own incentives, which sometimes contradict the organization's larger goals.<br /><br />In such a world, to think <span style="font-weight: bold; font-style: italic;">holistically</span> is to think about disruption, as any move to re-align the departments with the organization's goals will result in disruption to that department's practices.Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1131379491776079572005-11-07T08:04:00.000-08:002005-11-07T08:04:51.826-08:00Behavior Driven DevelopmentI recently read an interesting paper by <a href="http://www.daveastels.com/index.php?section=1">Dave Astels</a>, entitled <a href="http://blog.daveastels.com/?p=53">A New Look at Test-Driven Development</a>, which suggested that Test Driven Design is overly focused on testing, which gets in the way of reaping the true benefits of TDD.<br/><br/>I agree that using the word “test” when describing TDD definitely gets in the way, when explaining it to other people. Management asks, “Why are we hiring testers if developers will be writing tests?” Developers ask, “Why should I write unit tests for code that will get tested by the (manual or automatic) acceptance tests?” And so on. You get the usual objections to TDD.<br/><br/>So I am down with giving TDD another name, but what threw me was the suggestion that we ought <strong><em>not </em></strong>to use the word “test” when actually writing the tests.<br/><br/>In Behavior Driven Development, tests are called “specifications.” Fixtures are called “contexts.” And instead of assert, one would say “should.” (Dave’s essay has examples of their usage.)<br/><br/>Initially, I was fairly dismissive of what seemed like a cosmetic change, but I decided to give it a go for the past week. Here is what I found.<br/><br/><em>I wrote more, smaller test fixtures. </em>Whereas I used to write test fixtures with names, like CustomerFixture, I found myself creating many little contexts, with names like CustomerWithOverdueBill or CustomerWithoutAddress. <br/><br/><em>I wrote more asserts per test. </em>Each test started with a particular context, invoked a particular operation in that context, and then verified the expected resulting context. That verification often took multiple asserts.<br/><br/><em>The tests naturally had better names. </em>In the past, when writing tests for a Customer class, I might have tests with names like testSetAddress. Now, I find myself thinking in terms of scenarios, so that the CustomerWithoutAddress context might have a specification like settingAddressForFirstTimeSendsNotifcation.<br/><br/>In summary, this change in perspective has proven extremely useful, so I am sticking with it.Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1130677568428691542005-10-30T05:05:00.000-08:002005-10-30T05:06:08.443-08:00Could You Pass 8th Grade Math?<table width=350 align=center border=0 cellspacing=0 cellpadding=2><tr><td bgcolor="#CDDEFF" align=center><font face="Georgia, Times New Roman, Times, serif" style='color:black; font-size: 14pt;'><b>You Passed 8th Grade Math</b></font></td></tr><tr><td bgcolor="#EBF2FF"><center><img src="http://images.blogthings.com/couldyoupasseighthgrademathquiz/passed.jpg" height="100" width="100"></center><font color="#000000"><br />Congratulations, you got 10/10 correct!</font></td></tr></table><div align="center"><a href="http://www.blogthings.com/couldyoupasseighthgrademathquiz/">Could You Pass 8th Grade Math?</a></div>Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1128975747384158722005-10-10T13:22:00.000-07:002005-10-10T13:22:27.410-07:00Planarity.netA way cool game that tests your facility with spacial relationships:
<br />
<br /><a href="http://www.planarity.net/#">Planarity.net</a>Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1126544303784332932005-09-12T09:58:00.000-07:002005-09-12T09:58:23.813-07:00Are iterations hazardous to your project?<a href="http://alistair.cockburn.us/crystal/articles/aih/areiterationshazardous.htm">Are iterations hazardous to your project?</a>: "That surprise experience helped open my eyes to why 'iterations' may be hazardous to your project: Danger grows when the results of the iteration are not directly linked to delivering the product to the end user. Without that linkage, iteration results hang in the air just as badly as the old, pre-agile forms of wandering in the wilderness."
<br />
<br />This could be filed under the general heading of "Don't let the process become the goal," which is a disease that strikes nearly every organization.
<br />
<br />Here is how it happens:
<br />
<br />Management wants feedback that the team is making progress towards a particular goal, so they add instrumentation to the process to gather metrics. The team responds by trying to improve those metrics. If management chooses the wrong metrics, the end effect is that they drive the team <b>away</b> from its goals, rather than towards them.
<br />
<br />I think that all of Alistair's observations and recommendations are dead-on.Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1123776186754935462005-08-11T08:32:00.000-07:002005-08-11T09:03:06.803-07:00Laziness Driven DesignI have become fanatical about writing unit tests for every method on every class, regardless of how trivial that method first appears. ( "But it's just a getter!" )<br /><br />This leads to an interesting <span style="font-style: italic;">laziness driven feedback loop</span>. Here's what happens:<br /><br />I am implementing a feature, and think that the shortest distance between two points, is to add another dependency onto one of my classes, but then I realize that this new dependency would further complicate all of my tests, requiring large changes. Ugh! I don't have time for sweeping changes to my test suite.<br /><br />So, in my laziness, I skip over the initial, obvious solution, think a little bit harder, and come up with a <span style="font-style: italic;">truly simpler solution.</span>Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1123519172997091222005-08-08T08:06:00.000-07:002005-08-08T09:39:33.040-07:00The PO-STAR MovementIn the past year, I have seen an increasing number of "Plain Old *" abbreviations:<br /><ul> <li><a href="http://www.martinfowler.com/bliki/POJO.html">POJO </a>- Plain Old Java Objects</li> <li>POCO - Plain Old CLR (.NET runtime) Objects</li> <li><a href="http://en.wikipedia.org/wiki/Plain_Old_XML">POX</a> - Plain Old XML</li> </ul> At this point, I think it qualifies as a crypto-movement, and the clue to the genesis of this movement is in Andy Smith's "<a href="http://an9.org/devdev/why_frameworks_suck?sxip-homesite=&checked=1">Why Frameworks Suck</a>."<br /><blockquote>Frameworks hurt sharing. I’d really like to give you this fork Jimmy, but you’re gonna need a knife and plate to use it.</blockquote>The alternative to PO* is to buy into some framework, which inevitably prevents code reuse as your classes become riddled with framework junk. <br /><br />You know a library is really a framework when:<br /><ul> <li>It requires you to derive your classes from some library class.</li> <li>It requires you to use their main() function.</li> <li>It requires you to use their Application class.</li> <li>It requires your classes to depend on some third party library.</li> <li>The setup() and teardown() methods of your test suites become really complex.</li> </ul> Nearly every time that I have written framework-like functionality into an application, I have found that I was able to factor it out in favor of simple library classes that are themselves PO* objects.Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1123430468114073722005-08-07T08:58:00.000-07:002005-08-07T09:01:08.140-07:00I Heart PythonI have been playing around with Python at home, developing a simple web application, and I just wanted to say that I think that Python is awesome.Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1123430254259442902005-08-07T07:58:00.000-07:002005-08-07T08:57:35.223-07:00Fear of the Domain ModelDid you ever notice that many programmer's tend to shy away from developing a domain model?<br /><br />This is a pretty reasonable reaction. We want to exploit our strengths, and leave the domain to the domain experts. We want to continue to improve our knowledge of computer technology, because this translates into a personal asset.<br /><br />I think that the ability to elicit domain knowledge from a domain expert and convert this into a viable domain model is a more important skill than the knowing the latest technology that your tools vendor is trying to push at your CIO.<br /><br />A rich domain model is truly fertile ground for <a href="http://www.pragmaticprogrammer.com/ppllc/papers/1998_03.html">developing applications</a>, and building working, valuable applications is way more important than extending one's knowledge of the solution domain.Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1123267355446250022005-08-05T11:42:00.000-07:002005-08-05T11:42:35.476-07:00The Garden<div style="float: right; margin-left: 10px; margin-bottom: 10px;"> <a href="http://www.flickr.com/photos/39354941@N00/31494557/" title="photo sharing"><img src="http://photos21.flickr.com/31494557_ee32bd3391_m.jpg" alt="" style="border: solid 2px #000000;" /></a> <br /> <span style="font-size: 0.9em; margin-top: 0px;"> <a href="http://www.flickr.com/photos/39354941@N00/31494557/"></a> <br /> Originally uploaded by <a href="http://www.flickr.com/people/39354941@N00/">Jennifer Dunne</a>. </span></div>This is picture of a flower in my wife's garden.<br clear="all" />Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1113338220517257082005-04-12T13:37:00.000-07:002005-04-12T13:37:00.516-07:00Thoughtless InterfacesHere is a great write-up on how to <strong>not</strong> create an interface: <a href="http://www.livejournal.com/users/sirenian/13646.html?mode=reply">IFoo as Foo's interface is evil and should be punished.</a>
<br />
<br />It's all about responsibilities, people!Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1113235592180207072005-04-11T09:06:00.000-07:002005-04-11T09:06:32.180-07:00Toothpaste<div style="float: right; margin-left: 10px; margin-bottom: 10px;"> <a href="http://www.flickr.com/photos/39354941@N00/9109906/" title="photo sharing"><img src="http://photos4.flickr.com/9109906_518401c2f9_m.jpg" alt="" style="border: solid 2px #000000;" /></a> <br /> <span style="font-size: 0.9em; margin-top: 0px;"> <a href="http://www.flickr.com/photos/39354941@N00/9109906/"></a> <br /> Originally uploaded by <a href="http://www.flickr.com/people/39354941@N00/">Jennifer Dunne</a>. </span></div>My wife took these wonderful pictures of toothpaste, which had quietly extruded itself from the tube in the middle of the night.<br clear="all" />Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1112908305987120322005-04-07T14:11:00.000-07:002005-04-07T14:11:45.986-07:00Trust is an essential deliverableFrom <a href="http://www.testing.com/cgi-bin/blog/2005/04/06">Exploration Through Example</a>:
<br />
<br /><cite>Sometimes teams are jumping into Agile to avoid the horror of the previous release. The code was too buggy, or too late, or cost too much per feature, or all three. In such a case, the programmer team is probably not trusted by the business people. If so, trust is an essential deliverable. It's not enough to be better; you have to be visibly better soon. Delivering tested, working features at frequent intervals is a key way to get trust back. Another way is close cooperation with a product owner that demonstrates that the team's orientation is toward helping her meet her goals. But more generally, the team should pay active attention to how well they're doing at building trust, not just at building code.</cite>Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1111521642371864812005-03-22T12:00:00.000-08:002005-03-22T12:00:42.370-08:00A Perfect Recipe for a SOA FailureFrom <a href="http://blogs.sun.com/roller/page/crupi/20050319#soa_is_a_business_driven">SOA is a Business-Driven Architectural Style</a>:
<br />
<br /><cite>"It means that for SOA to be successful, it must be a 'top-down' approach. And top-down, means problem to architecture to solution. It does not mean, working from what we have and just wrapping it with new technologies just because we can. This bottom-up approach is quite natural and easy and is the perfect recipe for a SOA failure. "</cite>
<br />
<br />I will go a bit further and say that any architecture that isn't bent on solving a particular problem is a recipe for failure.Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1111441106369801182005-03-21T13:22:00.000-08:002005-03-21T13:38:26.370-08:00Searching Google for BooksI had heard about <a href="http://print.google.com/">Google Print</a> a while back. <br /><br />I hadn't realized that the <a href="http://print.google.com/googleprint/library.html">Google Library project</a> would mean that public domain books, like <a href="http://www.google.com/search?q=book+huckleberry+finn&sourceid=mozilla-search&start=0&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official">Huckleberry Finn</a>, would now be searchable via Google.<br /><br />You just enter "book" followed by the book title in Google.Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1111425996211034002005-03-21T09:26:00.000-08:002005-03-21T09:26:36.210-08:00Yahoo has acquired Flickr<a href="http://jeremy.zawodny.com/blog/archives/004362.html">Thoughts on Flickr and Yahoo (by Jeremy Zawodny)</a>
<br />
<br />I hope they don't mess it up. :-)Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1109786276116056082005-03-02T09:55:00.000-08:002005-03-02T09:57:56.120-08:00Being Careful Is Not The SolutionSometimes, when you touch a piece of code, or a build script, or a configuration file, you might feel the urge to be very careful, because your change might break the overnight build, or result in a subtle bug.<br /><br />Being careful is not the solution. You cannot be careful all the time. Sooner or later, you will let you guard down and make a mistake. It is inevitable. If you are lucky, this mistake will occur when you have loads of time to diagnose it. If you are unlucky, you'll get a bad build at the 11th hour.<br /><br />When you find that you need to be careful, you should ask yourself, how can I change this situation so that mistakes are either impossible to make or discovered immediately after making them?<br /><br />If you think about it, you probably already know a few strategies for achieving this right now:<br /><ul> <li>Unit tests insure that your classes behave as you expect them to.</li> <li>Asserts (Design by Contract) achieve the same thing from a different direction.</li> <li>Code generation eliminates duplication, so that you only have to make a change in one place. </li> <li>Static type checking catches mistakes at compile time.</li> </ul>Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.comtag:blogger.com,1999:blog-8579476.post-1109734040278746212005-03-01T19:27:00.000-08:002005-03-01T19:27:20.276-08:00Jellyfish<div style="float: right; margin-left: 10px; margin-bottom: 10px;"> <a href="http://www.flickr.com/photos/johndunne/5718906/" title="photo sharing"><img src="http://photos6.flickr.com/5718906_de066a2be5_m.jpg" alt="" style="border: solid 2px #000000;" /></a> <br /> <span style="font-size: 0.9em; margin-top: 0px;"> <a href="http://www.flickr.com/photos/johndunne/5718906/">Jellyfish</a> <br /> Originally uploaded by <a href="http://www.flickr.com/people/johndunne/">JohnDunne</a>. </span></div>This is a jellyfish that we saw while poking around the aquarium at the Mandalay Bay hotel in Las Vegas.<br clear="all" />Anonymoushttp://www.blogger.com/profile/16213725934255823205noreply@blogger.com