Code for your Fellow Humans

According to the classic book Clean Code, the ratio of time spent reading code to writing code is well over 10 to 1. And most of the time “writing” code is for maintenance reasons. So writing any “brand new” code represents a tiny fraction of a developer’s day. It’s critical to get that right.

“We are constantly reading old code as part of the effort to write new code”

Robert Martin, Clean Code

Think back to college when you had to write a paper for a class. You probably waited to the very end to start working on it (at least if you were me).

But guaranteed, you never turned in your first draft. You cleaned it up, condensed the word count, or consulted the thesaurus to make it sound more impressive profound awe-inspiring.

Yet I’ve seen hundreds of developers commit their first draft of code. It got the job done and was good enough.

Another truth I’ve learned: you never fully understand your project until the very end. That’s when everything finally clicks. Use that moment. Go back. Refactor. Rename variables and functions. Add documentation. A few extra minutes polishing your code for your fellow humans will pay off enormously down the road.

Do not turn in your first draft!

Jeff Atwood agrees:

The longer you write programs and the older you get, eventually you come to realize that in order to truly succeed, you have to write programs that can be understood by both the computer and your fellow programmers.

Jeff Atwood, Coding: It’s Just Writing

So do everyone a favor - code for your fellow humans and don’t turn in your first draft.

This post was inspired by colleague Jim Brikman on the importance of writing well when coding.

« PREVIOUS
Want a Good Team Now or a Great Team Later?
NEXT »
Finding the Reasons for your Team's Performance Problems