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?

yegge001

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.

Books

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.)

xp001

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.

vista001

 

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.

xp002

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

xp003

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.

vista002

 

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:

codesmith_screen

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.