Seven Truths of Good Code

What is “good” code? Some define it as “beautiful.” Some equate it with experience. Some with cleverness. Some can’t tell you what it is. Others know it when they see it. For me, “good” means maintainable.

Good code, yes, has grace and beauty. But what makes it worthwhile is that it’s easy to work with. It’s easy to add to good code. It’s easy to take away. It’s easy to make changes. It’s easy to fix bugs. And bugs are rare. Good code does what you want it to, usually the first time. Good code is a joy, not a burden.

This should be the normal state of software. How many developers live in the opposite state? They think that adding a feature always takes a long time and many lines of code. They think that getting cozy with your debugger is part of the process. They think that long hours sitting in front of the computer screen means you’re doing your job. It doesn’t. Long hours means you’re doing your job poorly.

Consider these truths of quality code. The best developers know them without thinking. To them, good code is second-nature. They’ve internalized these truths. They’ve reached nirvana. They are one with the code.

Continue reading

Posted in Uncategorized | Tagged | 7 Comments

Quick and Dirty May Be Dirty, But Is It Quick?

I’ve been meaning for some time to write about how slow “quick and dirty” is, how misnamed the term is, how misguided are the hoards of managers (many of them former and current software developers) who embrace “quick and dirty” as a fast solution to pressing problems, as though it could ever deliver an actual solution.

I’ve been meaning for some time to write this. It took Lidor Wyssocky’s latest blog post to push me into it. And just in case someone out there couldn’t tell you were joking… (You were joking, right?) The sad truth is that “quick and dirty” may be dirty, but it’s never quick, at least not if you actually want to deliver a usable product.

Continue reading

Posted in Uncategorized | Tagged , , , | 2 Comments

Fix for w3mir With Latest URI.pm

What brought this all on was that one of my computers died. So I updated software on another computer, and discovered I needed a fix. It’s a fix for a recent improvement in a Perl library, URI::file::Base, that coupled with behavior in URI::file::Unix happens to invoke different behavior in URI::URL, which… Basically, w3mir no longer works.

Continue reading

Posted in Uncategorized | Tagged , | 1 Comment

Dead Fish and Other Things People Wear

Lidor Wyssocky at The Mindset writes about “The Emperor’s New Clothes Syndrome.” This reminded me of a talk Tim Lister gave earlier this year at the Boston SPIN. “The problem is that although we know exactly what doesn’t work right and how it should be fixed, most of us will never say anything,” Lidor writes.

Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Please Don’t Share Your Bodily Fluids With the Rest of the System

Have you ever been here? Refactoring old code, seeing new code that partially de-factors it, and taking out my frustrations in code comments.

The old comment for a struct declaration:

// This structure will be generated
// and stay with each connection

The new comment:

Continue reading

Posted in Uncategorized | Tagged , , | 3 Comments

Top Eight Reasons to Abandon SourceSafe

How many of us work in Microsoft shops? I’m ashamed to admit that I do. When I took the job, I thought the benefits of working in a new domain with new technologies would outweigh the fact that I had to use Microsoft tools and program for Windows. Well, the benefits are real. The costs are also real. And one of these costs is SourceSafe.

The worst part about it is that there’s no particularly good reason why we have to use SourceSafe. Continue reading

Posted in Uncategorized | Tagged , , | 9 Comments

When the Best Tool Isn’t, and Why a Growing Team Doesn’t Care

Kathy Sierra excellent post on When the “best tool for the job”… isn’t misses an important point. It’s not that she missed the point so much as she just didn’t go into it. But I think it deserves going into.

Many software developers become very attached to their favorite programming languages, methodologies, practices, and so forth. Checking the link-backs for my post “Twelve Benefits of Writing Unit Tests First” demonstrates this. One commenter on another blog even said he saw no value in reading the whole post, since it was specious and had no redeeming value. I took great joy in that comment, because it means I must be doing something right to push someone’s righteous buttons so accurately. Regardless, would test-first be the right tool for that programmer?

Continue reading

Posted in Uncategorized | Tagged , , , , | 8 Comments

Five Things Software Teams Can Learn From Build-A-Bear Workshop About Customer Relations

I never would have bought this book for myself. I won it in a drawing at InBubbleWrap.com. I’m not sure what made me enter the drawing. Maybe it was, Eh, it sounds moderately interesting, and it’s free. Or maybe it’s that I have a soft, cuddly spot in my heart for Build-a-Bear Workshop. And as I read through, I recognized lessons I had learned in developing software, especially from Agile development.

Continue reading

Posted in Uncategorized | Tagged , , , | 5 Comments

How DeMarco, Lister, and Cockburn Helped Me Find a Better Job (Part 2)

How DeMarco, Lister, and Cockburn Helped Me Find a Better Job (Part 2)

(Part 1 was posted yesterday.)

After four months of teamicide, Peopleware-style, I was ready to die. And when HR or my manager asked me, I told them the truth.

Continue reading

Posted in Uncategorized | Tagged , , , , , | 3 Comments

How DeMarco, Lister, and Cockburn Helped Me Find a Better Job (Part 1)

Two years ago, I was enthusiastic, energized, and about to plunge into depression. I was enthusiastic and energized because I had started a new job two months before, and I was in a position where I could make choices, and I knew I could make the right choices. I was stretching myself beyond what I had done before, and I wanted to prove myself. Within two more months, that would change.

Continue reading

Posted in Uncategorized | Tagged , , , , , | 4 Comments