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.

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:

screen1

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:

screen2

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.

screen3

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.