TDD and Double Entry Bookkeeping

I want you to think of TDD the way accountants think of dual entry bookkeeping. I want you to consider it as an essential part of your profession. I don't want you to think of it as optional. I don't want you to think of it as a luxury. I want you to think of it as absolutely necessary to your professional and personal self respect.

- Robert C. Martin

Rails! And BDD! And OS X! (Oh My!)

I announced this on Twitter last week, but I thought I should do it in blog form as well:

I'll be the first employee and fifth member of Mutually Human Software, a small Ruby on Rails shop in Grand Rapids.

Yeah, there's a "t" missing from my first name. Wanna fight about it?

As much as I'm looking forward to working with Ruby & Rails (which is a lot), I'm looking forward just as much to using modern development practices like behavior-driven development, pair programming, and all things agile.

I'm starting the new job next week.  Wish me luck!

Now Hiring: Ruthlessly Honest Dick

Mission Accomplished

I Gotta Give This Seaside Thing a Try

JITting CSS?

This post by Eric Meyer blew my mind.  Let me get this straight: is he basically talking about using JavaScript to JIT CSS3 to CSS2 (or some widely supported subset thereof) and HTML5 to HTML4 so we don't have to wait for browser platforms to support them "natively"?


I think my brain just exploded. $deity bless John Resig and all the JavaScript pioneers that are carrying the Web forward.

The American Gothic of Book Covers?

They don't look too excited to be working with SharePoint.  Where's the pitchfork?

I'm So Glad Uncov is Back

VCs are still making their rounds in the Valley, but they're demanding at least two forms of protection. The pill just doesn't cut it anymore. What I mean is that writing a social network for the tree squirrels living in your yard in Django is now only half of the picture. An actual business model beyond "get a bunch of traffic and get bought out by Google" is important.

No glove, no love.

- Ted Dziuba

The Mystery of Run -> "firefox"

The why is a long story, but this morning I became obsessed with finding out how Windows's Run command knew to launch Firefox when I typed in firefox.  In other words, how was the mapping done from the string firefox to the executable file C:\Program Files (x86)\Mozilla Firefox\firefox.exe (if you're wondering about the (x86) part there, it's because I'm running 64-bit Vista).


The obvious place to look was my PATH variable. No dice.

I figured the next most likely place would be a registry setting, but I had no idea where to look.  So I googled around for a while, and finally came across this forum thread, which contained some interesting information.

According to this information, there are five magic places Run will look for things:

  • The current working directory
  • The Windows directory (usually C:\Windows)
  • The Windows\System32 directory (usually C:\Windows\System32)
  • Directories listed in the PATH environment variable
  • The App Paths registry key (visible in regedit at

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths)

Thinking I had solved the mystery, I eagerly launched regedit and navigated to the aforementioned registry key.  Much to my chagrin, nothing related to Firefox was present.

I tweeted a little bit about this deepening mystery I was trying to solve, and one of my friends replied mentioning RegMon, a Windows tool that allows one to monitor registry activity and has recently been rolled into Process Monitor.

I downloaded Process Monitor, and after familiarizing myself with what it could do, I configured it to show me only registry activity.  I then went through the motions of starting Firefox via Run (Windows+R -> firefox -> Enter).  I then stopped Process Monitor from logging anything further and used its search feature to find mentions of firefox in the activity log.  This immediately led me to the following two lines that told me everything I needed to know:

Eureka!  You can see in the screenshot that a process tried to read a registry key at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe, which resulted in NAME NOT FOUND.  It then tried to read the registry key at HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe and was successful.  After pulling up regedit and navigating to that key, I could see that the value was set to C:\Program Files (x86)\Mozilla Firefox\firefox.exeMystery solved!  That's how the mapping is done.  If you look at this screenshot, you'll also see some other interesting things, like excel.exe (which explains how Run knows to launch Excel's executable when you type excel):

But what's up with the weird registry key location with Wow6432Node in there?  After a little more googling around, I found this buried in a blog post:

It turns out that 64-bit Windows performs 'registry redirection' where it presents 32-bit programs another view of the registry to make them co-exist with 64-bit applications. This is done by redirecting 32-bit applications to the HKEY_LOCAL_MACHINE\Software\WOW6432node sub key when they request for HKEY_LOCAL_MACHINE\Software.

That's why the registry key I was looking for was not in the expected place.  Since I run a 64-bit version of Windows, we've got this redirection thing going on, hence the disappearing act of the magical registry key I was looking for but couldn't find earlier.

It took some digging (more than I expected) to solve this mystery, but I'm glad I saw it through, and I learned some interesting and unexpected things in the process.

PowerShell Tip: Get Synopses for All Built-in Cmdlets

I've been messing around with PowerShell quite a bit lately.  Here's a little one-liner I cooked up that's helping me as I continue to familiarize myself with PowerShell's built-in cmdlets:

gcm | get-help | ft name, synopsis -auto

And here's what the results look like:

Twitter Links: Let Your Smart Friends Filter Stuff for You

Using elfin magic, I've created a Yahoo! Pipe that allows you to sit back and have your friends filter content for you:

Twitter Links

Give it a try, and experience new heights of laziness.  For maximum righteousness, add the resulting feed to your favorite RSS reader.

Looping Is An Anti-Pattern

This is a concept that is probably foreign to a great deal of C# developers (although C# 3.0 contains various functional programming concepts).

(Note: When I say "looping" I mean primitive looping via while, for, foreach, etc.)

Design Patterns: Making C++ Suck Less

...the Design Patterns book, even according to one of the authors (Vlissides), should have been called Making C++ Suck Less.

- Josh Holmes paraphrasing Neal Ford

Freebase Parallax

Zed on Feed Readers

Now, I’m sure tons of people will scoff at the idea of not having graphics in their feed. They’ve gotta have that curvy candy coated interface with the flash video about Steampunk Buttplugs posted by BoingBoing blaring right in their fucking face or else they don’t feel alive.

I laughed harder than I had in several weeks when I read that.

OFF-TOPIC: This is underground rap (Muxtape)

My latest muxtape, focusing on another of my favorite genres:

This is underground rap.

If It Hurts, Do It More Often

There's a soundbite I like to use in an agile context: if it hurts do it more often. Its surface illogicality makes it memorable, and there's a real truth in there. Many difficult activities can be made much more straightforward by doing them more frequently. XPers are particularly well known for applying this principle to testing, integration, design, and planning...

- Martin Fowler

Select Quotes from Peopleware, Part 4

In my early years as a developer, I was privileged to work on a project managed by Sharon Weinberg, now president of the Codd and Date Consulting Group.  She was a walking example of much of what I now think of as enlightened management.  One snowy day, I dragged myself out of a sickbed to pull together our shaky system for a user demo.  Sharon came in and found me propped up at the console.  She disappeared and came back a few minutes later with a container of soup.  After she'd poured it into me and buoyed up my spirits, I asked her how she found time for such things with all the management work she had to do.  She gave me her patented grin and said, "Tom, this is management."

Sharon knew what all good instinctive managers know: The manager's function is not to make people work, but to make it possible for people to work.

Peopleware, pg. 34, This Is Management

Select Quotes from Peopleware, Part 3

Projects on which the boss applied no schedule pressure whatsoever ("Just wake me up when you're done.") had the highest productivity of all.  Of course, none of this proves that Parkinson's Law doesn't apply to development workers.  But doesn't it make you wonder?

The decision to apply schedule pressure to a project needs to be made in much the same way you decide whether or not to punish your child: If your timing is impeccable so the justification is easily apparent, then it can help.  If you do it all the time, it's just a sign that you've got troubles of your own.

Peopleware, pg. 29, Some Data from the University of New South Wales

OFF-TOPIC: This is post-punk (Muxtape)

Here's a new muxtape I just finished.  Take a tour through post-punk, starting in 1979 and continuing, in chronological order, through the post-punk revival of the 2000s.


This is post-punk.

Select Quotes from Peopleware, Part 2

Allowing the standard of quality to be set by the buyer, rather than the builder, is what we call the flight from excellence.  A market-derived quality standard seems to make good sense only as long as you ignore the effect on the builder's attitude and effectiveness.

In the long run, market-based quality costs more.  The lesson here is,

Quality, far beyond that required by the end user, is a means to higher productivity.

If you doubt that notion, imagine the following gedanken experiment: Ask one hundred people on the street what organization or culture or nation is famous for high quality.  We predict that more than half the people today would answer, "Japan."  Now ask a different hundred people what organization or culture or nation is famous for high productivity.  Again, the majority can be expected to mention, "Japan."  The nation that is an acknowledged quality leader is also known for its high productivity.

Wait a minute.  How is it possible that higher quality coexists with higher productivity?  That flies in the face of the common wisdom that adding quality to a product means you pay more to build it.  For a clue, read the words of Tajima and Matsubara, two of the most respected commentators on the Japanese phenomenon:

The trade-off between price and quality does not exist in Japan.  Rather, the idea that high quality brings on cost reduction is widely accepted.

Peopleware, pg. 21, The Flight from Excellence

How I Got Started in Software Development

I've decided to take Mike Eaton's challenge and answer some questions on how I got started in software development.

How old were you when you started programming?

I was 18.

How did you get started in programming?

When I was looking into possible majors prior to starting college, it came down to two choices: Psychology or Computer Science. I thought psychology was more interesting at the time, but computer science was the more practical choice. (Come on, we all have a relative or friend who graduated with a psychology degree, but ended up working in a restaurant or something.) The first time I saw source code was in the second semester of my freshman year of college. I had no idea what it meant to program a computer up until that point.

What was your first language?


What was the first real program you wrote?

I'm not entirely sure what you mean by "real" program, but....I believe it was a Java console application where the user could type in a number of pennies and the program would print out how many dollars, quarters, dimes, nickels, and pennies it broke down into.

What languages have you used since you started programming?

Java, C, C++, C#, Assembly, SQL, Prolog, Visual Basic, Common Lisp, Tcl, Bash script, MS-DOS script, JavaScript, Ruby

What was your first professional programming gig?

My first professional programming gig was developing extensions for a CAD/CAM software package called Unigraphics NX in C, C++, and C# for a die company.

If you knew then what you know now, would you have started programming?

Definitely. I really can't imagine doing anything else for a living. I get to be creative and make things out of thin air on a daily basis. I get to work with incredibly smart people on challenging problems that often require intense intellectual effort. And all from the comfort of an air-conditioned office!

If there is one thing you learned along the way that you would tell new developers, what would it be?

Developing software in the real world is almost nothing like developing software in the academic world. For example, you won't have clear, unambiguous requirements like you had in college. Rather than just doing things, you'll spend an enormous amount of effort just trying to figure out what you're supposed to do. In general, your people skills end up being more important than your technical skills.

What's the most fun you've ever had programming?

In my sophomore year of college, I took a class taught by Dr. Scott Grissom, in which we were split up into small teams and collaborated heavily on complex (at the time) programming assignments. Prior to this class, I was really questioning my choice of Computer Science as a major and really wasn't enjoying programming. The more complex programming challenges that I encountered in this class and the great interaction finally made something click in my head. I got way into the assignments, working night after night on my programs, and I ended up acing all the assignments (and ultimately the class). Programming came quite naturally to me and I started to really enjoy the challenge. That class convinced me that I had found my calling.

Select Quotes from Peopleware, Part 1

The main reason we tend to focus on the technical rather than the human side of the work is not because it's more crucial, but because it's easier to do.  Getting the new disk drive installed is positively trivial compared to figuring out why Horace is in a blue funk or why Susan is dissatisfied with the company after only a few months.  Human interactions are complicated and never very crisp and clean in their effects, but they matter more than any other aspect of the work.

If you find yourself concentrating on the technology rather than the sociology, you're like the vaudeville character who loses his keys on a dark street and looks for them on the adjacent street because, as he explains, "The light is better there."

Peopleware, pg. 5, The High-Tech Illusion

Where's the N-ovation?

When was the last time someone took an open source project that originated in the .NET space and ported it to another language?  I might be clueless, but I can't think of a single time it's happened.

Is Microsoft losing the Alpha Geeks? The more relevant question is: Were they ever here?

If you think the world needs better software managers, then...

If I subscribe to the notion "Be the change you want to see in the world", and the change I most want to see in the (software) world is better managers, then what conclusion does that lead me to?

I think I could paraphrase Giles Bowkett fairly and come up with this:

If you think the world needs better software managers, then be that manager.


West Michigan Day of .NET 2008 Recap


I saw many "twitter people" in the flesh for the first time, which was a very strange experience.  From memory, these include: mjeaton, joshholmes, jamesbender, danhounshell, stevenharman, timwingfield, sillyevar, pandamonial, and patrickfoley.  It was cool to watch many of the attendees live-twittering the event.

I Need to Speak

One of the great revelations that occurred to me and kept playing on my mind during the event was that I really should have been speaking/presenting.

This is in no way intended to take away anything from the presentations that I witnessed, but I came away feeling very confident that I could give a presentation at least as good as the ones I saw.  While I watched the presentations, I took notes on what bothered me about them, and what I would have done differently.  I thought a lot about what I would like to see in a presentation that I didn't see.

That's not the only reason I'm convinced that I need to speak next year.  It also occurred to me that most of my twitter friends who attended were also speaking at the event.  In fact, I didn't see much of them because they were either hanging out together in the "Speakers' Room" or giving presentations.

I came away convinced that people who get the most out of these things don't go for the technical content.  They go to talk to people and be seen.  The sessions are very much secondary, or perhaps even irrelevant.

So I'm planning to speak next year.  I'm not sure what the topic will be, but I already have a few decent candidates in mind.

Feedback for the Organizers

Ironically, my first bit of feedback would be to give us more time to give you feedback! :-)  They made a point to say how important our feedback was, and then gave us all of two minutes to fill out the feedback forms!  Also, don't expect people to write their names on their feedback forms.  People are less likely to honestly criticize you if they can't do it anonymously.

My second bit of feedback concerns the Wi-Fi.  I'm not sure if there is anything the organizers could have done about this or not, but the Wi-Fi...well...sucked.  When I fired up my laptop for the first time at the event and opened up Firefox, I was greeted with a big, ugly registration screen from Davenport University telling me that only students and faculty were allowed to access the Internet.  Are you freakin' serious?!  After several panic-filled minutes, I finally figured out how to get around it, but it was not at all obvious.  I realize there's probably nothing the organizers could have done about that, but at least distribute clear directions on how to get around it.  Also, when I did finally get connected, it was very slow.  People nowadays love to twitter from these events, and if they can't get online, then they can't twitter.  That's a serious bummer.

My third bit of feedback would be to make the labeling of the session rooms less confusing.  I actually wound up in the wrong room for the first session and missed a presentation I really wanted to see because the number outside the door did not match the number that the organizers intended for it.

My fourth and last bit of feedback would be to (if at all possible) put the "Speakers' Room" further away from the session rooms.  At one point, I was attending a session in a room that must have been right next to the speakers' room.  We were absorbing a tremendous amount of noise, to the point that we could barely hear the presentation.

But, keep in mind these are just a few criticisms of what was overall an awesome event!  The organizers did a fantastic job overall.


Overall, it was a great event, and I'm really glad I decided to go.  The venue, Davenport University, was very nice and modern.  There was a huge amount of variety in the sessions, covering wildly different areas of the Microsoft universe.  I got to see a lot of cool people in person and be entertained at no cost.  I'm looking forward to next year.


P.S.  For anyone who met me for the first time on Saturday, I apologize for my lack of conversational skills.  I'm not adept at the art of small talk, and I'm aware of that.  I'm actually fairly interesting once you get to know me, but I guarantee I won't wow you with my charisma at our first meeting.

We've Turned XML Into A Crappy Programming Language

[The .NET and Java communities] have had this trend in which we started jamming everything into XML configuration.
We’ve turned XML into a programming language, and a crappy one at that.
With the ASP.NET MVC project, we’ve taken the approach of Code First, Config Second.

- Phil Haack, Senior Program Manager for ASP.NET MVC


I know this isn't a new idea, but I'm just glad to see that a Microsoft employee who is guiding the direction of a very important product "gets" the emerging trend of DSLs and is actively countering the community's past sins regarding XML.


It was interesting to me that one of the comments on Phil's post mentioned MSBuild as an example of XML gone wild.  I have never used MSBuild, but I have used NAnt, which is very similar in that you basically find yourself programming in XML at some point.  When you find yourself reading  documentation on how to properly construct <if> and <foreach> XML elements, you start to get this strange feeling.  "Wait a minute.  This doesn't feel right.  Can someone please remind me why the hell I'm doing this in XML?"

Great Blog Series on Purely Functional Programming for Mere Mortals

In this blog series (Part 1, Part 2, Part 3) James Hague takes something that would be hopelessly theoretical for most--writing a video game in a purely functional style--and makes it concrete and accessible.


He's actually done the legwork (brainwork?) and thought through the many thorny issues that would hopelessly ensnare programmers that are just getting started with functional languages and the "functional mind-set".

Very, very interesting.  A great series, with hopefully many more installments to come.

Great Article for People Not Sold on Ruby on Rails

I'm actually a bit blown away by how good this article is from A List Apart.

I'd be quite surprised if an open-minded developer from any background could read it from beginning to end and not be very intrigued by Ruby on Rails...and hopefully enough so to at least give Rails a test-drive.

So if you've somehow never heard of Ruby on Rails, or have heard of it but don't understand why it's so interesting to so many people, then please read this article.  It's very well written, and I promise it won't bore you.

Bolt of Lightning #1 of ∞

Tedium == Opportunity for Clever Automation

(Note: This is a revelation I had today, and I consider it a cousin of Blodgett's First Law.)

West Michigan Day of .NET 2008

I finally broke down and registered for the West Michigan Day of .NET on May 10.

WM Day of .Net May 10, 2008 - I'll be there!

As I've said, although I'm quite active on Twitter, I'm typically not especially social in real life.  But that's something I'm interested in changing, and this is too good of an opportunity to pass up.

Many of my Twitter friends that I've never met face-to-face will be there.  I thought about listing them here, but there are simply too many.  One of them even called me out by name on his blog. :-)

On top of that, there are some very good looking sessions on the schedule.  In particular, I'm excited to hear about MonoRail, Boo, DSLs, and testing features in Visual Studio Team System.

Bring on the awkwardness!

Wired | Tired | Expired

Wired GitHub
Tired Google Code
Expired SourceForge

Blodgett's Comprehensibility/Flexibility Hypothesis

Comprehensibility and flexibility are incompatible. You must sacrifice one to get the other.

See here for some background.  I hope I'm wrong!  Prove me wrong!

Am I More Interesting on Twitter?

Something just occurred to me:

I have more followers on Twitter (currently 108) than subscribers on my blog (currently 85).

Is that significant?  Am I more interesting on Twitter than I am on my blog?  Why is that?  Should I make the writing I do on my blog more like the writing I do on Twitter? mind is going in a million directions now...

Automatically Generate Unit Tests from Unhandled Exceptions

This idea is so good, it makes me sick. (via Giles Bowkett)

Long Job Titles


I'm looking at you, Central Region Rich Internet Application Architect Evangelist. :)

Can We Use IronRuby Yet?

When C# 3 came out, there was some quiet discussion in ALT.NET circles that maybe the new language features (the "var" keyword, better type inference, lambdas) would be enough to satisfy us in regards to Language Oriented Programming and keep us from clamoring for Ruby.  The answer for me after three months of hands on C# 3 is that C# 3 is NOT an acceptable Ruby


So, anybody know any new news on IronRuby?

- Jeremy Miller

The comments on that post have turned into an awesome discussion on the future of programming languages, and C# and Ruby in particular, with many great links being bandied about.

I Could Never Work At Google

A comment I left on Steve Yegge's latest post:


Are there software engineer jobs at Google that aren't so academic in nature?

For example, do the people who work on Gmail have to memorize all of that "baseline" stuff you listed?

Is there room for smart software engineers at Google who like working at a higher level?

I'm genuinely curious to hear your answer. Google seems like a great company to work for, but I'd sooner be bashed in the face with a sledgehammer than have to commit all of that low-level nastiness to memory.

Steve Yegge is one of my heroes, and I've had a fantasy of working at Google for several years, but I fear that we operate in two completely different worlds.

List of Book Lists

If you're like me, and you're always looking for the next great book on software development to cram into your brain, then here are some great places to start.

I've put together a collection of book lists from some of my favorite bloggers.  Enjoy!


Joel Spolsky

Jeff Atwood

Steve Yegge

Reg Braithwaite

Jeremy Miller

This Blog Has Moved!

I recently passed the one year anniversary of my first blog post, and it's official that I'm serious about this "blogging thing."  So I decided it was time to get myself a real domain.

My blog is now located at (hopefully you'll be able to drop the "www" and it will still work, but that remains to be seen).

I don't think any changes will need to be made for subscribers.  Everything should Just Work.  Let me know if you notice any weirdness.


Be the Change You Want to See in the World

The basic idea is that if you want to make it better, go for it. Complaining is simply disregarded as noise. There are code contributions and there is noise. That's basically how it works.


That's how it's supposed to be. Open source works in the same way markets do: supply and demand. If the demand exists for a patch, it will come into being, guaranteed. That's why complaints are just noise. If they were worth paying attention to, they would be expressed as patches.


I'm saying the whole idea that Rails ought to be easier or different or whatever is only true if you make it true by (to use Gandhi's phrase) being the change you want to see in the world. If you think the world needs somebody to fix Rails, then be that somebody.

- Giles Bowkett

Three Simple Rules for Career Satisfaction

Inspired by some serious honestly and introspection I've recently witnessed, I thought I'd take stock of my career in its present state. Here are three simple rules for my own career satisfaction with a score (out of 10) to indicate how I'm doing currently on each of them.

  1. I want to rarely if ever be bored. (3/10)
  2. I want to make a comfortable living. (9/10)
  3. I want to continue to live near my hometown. (10/10)

I'm convinced that I can score at least 9/10 on #1 and #2, but I'm too chickenshit to compromise #3. Am I screwed?

Great Hackers and Boring Work

If it is possible to make yourself into a great hacker, the way to do it may be to make the following deal with yourself: you never have to work on boring projects (unless your family will starve otherwise), and in return, you'll never allow yourself to do a half-assed job. All the great hackers I know seem to have made that deal...

- Paul Graham

Firefox Tip: Get Spell Checking on All Form Fields

This tip is so useful that I just had to share it with my fellow Firefox addicts.

We all love Firefox's built-in spell checking feature, but we're all annoyed that it only works on multi-line text boxes, right?

If you want spell checking to work everywhere like I do, then today's your lucky day.

(via Josh Giese)

  1. type this in the browser address bar “about:config”
  2. look for “layout.spellcheckDefault”
  3. change the value to “2″
  4. restart firefox

Corollaries to Blodgett's First Law

When I originally wrote down Blodgett's First Law of Software Development, I also wrote down, stream-of-consciousness style, a bunch of related thoughts as they came to me.  Here they are in all their raw, rambling, pretentious glory:

  • Any step in a process that could be automated must be automated.
  • Any code that could be generated must be generated.
  • A good developer has a built-in tedium detector that's extremely sensitive.
  • Great developers feel a moral obligation to eliminate tedium.
  • Tedium indicates a flaw in your process.
  • A good developer will refuse to do boring work.
  • A good developer is lazy.
  • It's foolish to force your best developers to do boring work.
  • Prefer unit tests over comments.
  • Dynamic languages will eventually win.
  • Ruby on Rails is popular because it ruthlessly eliminates tedium from web development.
  • "Don't Repeat Yourself" might be the most important and fundamental principle in software development.

Paul Graham on Office Space for Hackers

While re-reading Paul Graham's classic essay, Great Hackers, in preparation for a previous blog post, I took note of a few quotations that I wanted to include in a separate blog post.  I recently committed publicly to writing them up, so here they are.

Big companies think the function of office space is to express rank. But hackers use their offices for more than that: they use their office as a place to think in. And if you're a technology company, their thoughts are your product. So making hackers work in a noisy, distracting environment is like having a paint factory where the air is full of soot.


Maybe the people in charge of facilities, not having any concentration to shatter, have no idea that working in a cubicle feels to a hacker like having one's brain in a blender.

If Something Seems Boring, Skip It

...I tried two tactics to increase the amount of money I could charge for my programming services. One of them failed spectacularly, and one of them succeeded wonderfully. The failure was learning the skills that had the most job posts; the success was learning the skills that most engaged my own curiosity. I learned Java and got nothing out of it; I studied Bayesian filtering for fun and did consulting work in Bayesian filtering through my activity on a Ruby mailing list.


The moral here is that if something seems boring, skip it. Trust your intuition.

- Giles Bowkett

^\d+ ?[A-Za-z]+s$ is Officially Played Out

Can we all please agree that the ^\d+ ?[A-Za-z]+s$ pattern for naming your web thing is officially played out, and just move on?

( I can't wait for the pedants to pick apart that regex. :-) )

Matt Blodgett's First Law of Software Development

A development process that involves any amount of tedium will eventually be done poorly or not at all.

Code Samples From "Programming Ruby" That Made Me Stop, Look Up At the Ceiling, and Sigh Longingly (Part 2)



def with_title(title)

  @songs.find {|song| title == }


Code Samples From "Programming Ruby" That Made Me Stop, Look Up At the Ceiling, and Sigh Longingly (Part 1)



a = [ 1, 3, 5, 7, 9]

a[-1]    ->  9

a[-2]    ->  7

a[-99]   ->  nil

IronRuby Caveats

Here are a couple caveats to keep in mind if you're following along with the "How do I get started?" screencast from the official IronRuby site.


1. Use Debug, not ExternalDebug

Near the 1:50 mark, the presenter switches the build configuration to "ExternalDebug" before (re)building the solution.  This didn't work for me, as all six projects were skipped every time.  I tried a few different build configurations and eventually discovered that the "Debug" configuration worked just fine.


2. No local variables in the console

At around the 2:40 mark, the presenter executes a few simple lines of code in the IronRuby console (rbx) just to show that the build is functional.  The only important thing to note in those lines of code is that they're using local variables.  It turns out this capability was a temporary hack that the IronRuby team removed shortly before RubyConf 2007.  If you're playing around in the console, just use instance variables (like @x) or global variables (like $x).

TDD as Part of Your Marketing Pitch

I just finished listening to my coworker, Chris Woodruff, interviewing Josh Holmes at CodeMash 2008. It's a great interview (if a bit too long, honestly).

One of the things that really grabbed my attention was when Josh mentioned an acquaintance who includes an absolute commitment to test-driven development as part of the marketing message from his consulting company. This acquaintance proudly makes known that all builds at his company automatically fail if the test coverage is less than 100%.

I've heard that before (actually, from a local competitor of ours).

I can't help but think: wouldn't it be fantastic if we could include an absolute commitment to quality, backed by TDD, as part of our marketing message? Competitive advantage, anyone?

Get Your Yegge "Thumbs Up!" T-Shirt

You have no idea how badly I want to make this image into a T-shirt. CafePress anyone?


Seriously, though, go watch this video. Yegge iz god.

Methods Are Not Just a Means of Reuse

I was reading through the "Refactoring--By Example" chapter of Test-Driven Development in Microsoft .NET today when I ran across a tip that really stuck out at me:

When you see a block of code with a comment attached to it, it is often a good idea to extract that code into a method and make sure that the method's name conveys the meaning specified by the comment.

In the past, I tended to think of methods as a way to reduce duplication in code.  If you have two or more sections of code that are very similar, you create a method that encapsulates that similarity, remove those sections, and replace them with calls to the new method.

What the above quotation makes clear is that methods are more than just a way to reduce duplication and promote reuse.  A method should also be used to logically group lines of code together, even if the method is only called once.

This is an important realization one must come to on the road to producing more readable and maintainable code.


Updated 7/15/2008

I need to unload all this stuff somewhere before my brain bursts. So here is a collection of all the books related to software development that I want to read, have completely read, and have partially read.

Want to read:

Have completely read:

Have partially read:

Subtle Usability Improvements in Vista

I've been using Windows Vista for several months now, and in that time, I've noticed some nice little ways in which Vista has improved its usability over its predecessor, Windows XP.

Here are a couple of my favorites:


1. In the "details" view of Windows Explorer, when you select a file, the whole line is highlighted.

This may seem insignificant, but it's a pretty big deal to me.  I was actually very annoyed with this shortcoming in Windows XP for years, and was really excited to see that Microsoft finally corrected it in Vista.

One common scenario for me when I'm using Windows Explorer is to browse through my music collection.  MP3 files tend to have a lot of details associated with them that I'm interested in seeing.

In XP, it's very hard to match up one of the outer columns in "details" view with the name of the file, because they're not visually connected.  (This is especially true if the column you want to look at is off the screen.)


But in Vista, it's very easy, because the whole line is highlighted, and the file name is connected visually with all of its details.



2. When renaming a file, the extension is not selected.

If you're like me, one of the first things you do on a fresh install of Windows is turn off the "Hide extensions for known file types" option in Explorer.

This caused a minor annoyance in XP, because when you went to rename a file (F2 for you keyboard junkies), you'd have to stop, de-select the extension, and then type your new file name.


If you didn't do this, you'd probably wipe out the extension and get an unexpected error message.


Fortunately, Vista recognizes that 99% of the time, you just want to change the file name without changing the extension, so it doesn't select the extension.



As someone who tends to pay close attention to usability issues in software, I'm really glad that the Windows shell team is still looking for little enhancements that can improve the interface of such a mature product.

A NuSoft Spotting in CodeSmith Studio

I started up CodeSmith Studio today for the first time in a while, and I was immediately greeted with this:


Are thousands of developers all over the world seeing this when they fire up CodeSmith Studio?  Nice free publicity for NuSoft!

Adding Blog Posts to Google Reader Shared Items without Subscribing

I've been addicted to Google Reader for about a year now.  It's completely changed the way I consume information, and I absolutely love it.

I've recently decided to give the "shared items" feature of Google Reader a try, and I've added a widget to my blog that displays my shared items.

But here's a thing that I noticed almost immediately after starting this journey: I can't add items to my "shared items" for blogs that I'm not subscribed to.  This is a major problem.

Here's an example.  Let's say I'm reading the latest Coding Horror post inside Google Reader, and Jeff links to an interesting post by Bruce Eckel.

I really like Bruce's post and I'd like to share it right along with my other "shared items".  But, since I'm not subscribed to Bruce's blog, and I really don't want to subscribe to it just to share a single post, I'm stuck!

While seeking possible solutions to this problem, I ran across this post (cached from Google).  Some of the workarounds listed in the comments were interesting, but I couldn't help but wonder if my beloved Firefox could offer a solution.

Here's what I'm thinking: could it be possible to cook up a Firefox extension that would automatically (and silently) subscribe to a feed, add the relevant post to my "shared items", and then immediately unsubscribe all in one glorious motion?

It's such a dirty hack, I know, but that's what makes it interesting.  Could be a fun side project.  I haven't the slightest clue how to develop Firefox extensions, but this could be an opportunity to learn.

Important Blog Posts, Part 3

This is the third part of an ongoing series in which I list blog posts that have profoundly impacted my personal thinking.  The second part is here.


1. Reg Braithwaite: We have lost control of the apparatus

This is my favorite thing Reg Braithwaite (a.k.a. Raganwald) has ever written.  It's a wonderful parody that sends up a certain mind-set out there among corporate IT developers.

Your users are not a captive audience.  They're exposed to an amazing variety of applications out there on the Web, and they realize what sucks and what doesn't.


2. Frans Bouma: Stored procedures are bad, m'kay?

Frans Bouma, creator of LLBLGen Pro, puts the final nail in the coffin for stored procedures.  All the common myths you've heard about stored procedures being "faster" or "more secure" than dynamic SQL are thoroughly debunked here.

This is the ultimate post to point to when you hear someone arguing about this topic.


3. Joel Spolsky: Bionic Office

Joel describes the perfect work environment for a software developer and how he made it a reality for his company, Fog Creek.

Since reading this blog post years ago, I've compared every workspace I've seen to the Bionic Office.  We can all dream, can't we?

Reg Is Really Making Me Think Lately

...a language cannot be better without being unfamiliar. Well, how can it be “better” if they’re all Turing Equivalent? Only in a subjective way; only by making you better. And in that sense, a language is only better if the process of using it makes you better as a programmer.

- Reg Braithwaite

Drag-and-Drop Taskbar Buttons with Taskbar Shuffle

I just wanted to highlight a simple but handy little utility I've been using for a while now, Taskbar Shuffle.

Taskbar Shuffle allows you to rearrange buttons on your Windows taskbar through drag-and-drop, just like you do with tabs in your favorite web browser (Firefox, IE7, etc.).

Let's say you're working on your SQL Server database (among other things), and you receive an email from your project manager listing some columns that need to be added.

Here's what your taskbar currently looks like:


You're likely going to be popping back and forth between SQL Server Management Studio and that email quite a bit.  Wouldn't it be nice if those two were right next to each other on your taskbar?

If you have Taskbar Shuffle, you can simply drag the Outlook taskbar button and drop it next to SQL Server Management Studio.

Now your taskbar looks like this:


Much better!  Now when you want to refer back that email, you don't have to scan the whole taskbar looking for it.

You'll appreciate this capability much more if you're like me and commonly find yourself with tons of different programs running at once.

Here's another handy feature of Taskbar Shuffle that you should recognize from your favorite tabbed web browser: middle-click to close.

This is especially handy when you want to close a bunch of those programs you're not using in one quick sweep.  Rather than having to right-click each taskbar button and select "Close", you just middle-click them.  Much faster!

Here's a screenshot of the settings dialog.  I'd be sure that "Start with Windows" and "Allow middle-click to close task button/group" are checked.


Taskbar Shuffle is free, and you can download it here.  What are you waiting for?

Rails _Has_ A Ghetto

This provides some nice perspective on the "Rails is a ghetto" hysteria sparked off by Zed Shaw.