If you’re not writing code for your users, you’re doing it wrong

Paul Querna recently asked in his blog, "Who are you writing code for?"

He listed several possible people/goals: the deadline, management's metrics (lines of code, test coverage, etc.), the computer, yourself, and the programmers who will maintain your code. What surprised me is that nowhere in Paul's post did he mention the only person you should be writing your code for: the user.

Unit tests, good comments, modular code, readability, and all the other best practices of coding are simply means to deliver better programs to the user. The fact that you did some really cool performance tweaks, or that other coders will thank you, is incidental.

You write code for your computer (i.e. for performance) because the user needs performance. You write clean code with lots of tests because that lets you deliver programs to your users with fewer bugs. You write modular code that is easy to maintain because that lets you fix bugs, add features, and extend your program to better serve the user.

This kind of myopia is pretty common among programmers. I'm sure that Paul is a good programmer, and he's obviously passionate about programming, since he's taken the time to write about it, but his post is indicative of a tendency to confuse best practices with the ultimate goal. The ultimate goal is to deliver good software to your users; the best practices are only a means to that end.

Leave a Reply




You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>