The Difference Between Good and Great Coders

by chromatic

Jeff Atwood's recent Coding Horror essay, When Understanding Means Rewriting, argues that software developers spend most of their time trying to understand old code. In my experience, that's true -- and not just because as soon as I check in new code, it becomes old code I need to maintain.

Atwood's thesis is that developers should rewrite code rather than trying to understand it, because it's difficult to read source code and source code itself doesn't always reveal the vision or the domain rules behind the project.

At best, that logic is... well, confused.


2006-09-21 16:21:23
FIT, a very interesting tool. I was thinking on using FIT under PHP for a web project and found this:

2006-09-22 05:36:28
Time scales and program performance will often determine if code is to be written in a maintainable way or not. Given 3 days to code a solution which must run in 15 minutes, there is absolutely no use in writing a bit of maintainable code that takes 3 weeks to complete and 3 hours to run!
Jack, the grumpy old programmer
2006-09-22 08:12:13
Programmers must understand that there are 4 audiences of thier code:
1. the compiler
2. the end user
3. maintenace programmers
4. the hardware that the code will run on
keith ray
2006-09-22 11:06:08
Most programmers don't know how to write "intention-revealing" code.

Code that answers WHY the function is doing what it's doing.

Much head-scratching comes from figuring out what the goal of a piece of code is, and (unfortunately) fixing it actually achieve that goal.

"rewriting" is a vague term. If I change a method's name and argument-list from "frpt(int x)" to "printFooReport(FileDescriptor anOpenFile)" is that rewriting?

Rhetorical question - it's the Rename Refactoring applied to make the code more understandable.

With the original naming, the bug in code that did close(x); frpt(x) would be hard to spot.

2006-09-22 13:03:20
Cass, how often does that happen? I've definitely written code that way, but it's been rare.
Bart van Kuik
2006-09-27 03:09:14
When exploring a piece of code, I find it invaluable to use a debugger and step though the code. This can easily be done with even a commandline-based debugger such as perl -d or gdb.