I try and keep my "real world" curmudgeon tendencies under control, but once in a while, I just can't contain myself any longer.
The discussion on readibility of programs arrived in a mail box interspersed with an email conversation I was having with a member of our development team on interpreting a spec I had written. The person I was having the conversation with is possible the best developer and software architect I have ever met. His task was to add some additional functionality to an existing component, and he was having a very hard time understanding how the component worked. The component was written by a developer perhaps as good, and I can testify that his code is crystal clear; even though I'm an amateur when it comes to C++ ATL COM interfaces, even I could understand what he was doing. So what was the first developer's problem? Well, he was failing to internalize the important fact that there could be multiple instances of the component all running at the same time. Since he isn't an actual user of the application, it was fairly easy for him to make that assumption, regardless of what the spec actually said. Fortunately, this particular person is adamant about fully understanding the requirements before he writes code; what if I'd been working with someone who would have just gone ahead and coded up a single instance version of the modification, with beautiful typography? How common is this sort of thing? My claim is that with programmers who are experienced in a particular language or syntax, the readability of the code or particular syntactic constructs in the languages account for few if any of the bugs. Far, far more common and serious are problems that are either due to developer's failure to understand how the code was supposed to work, or incompatibilities between the new application/version and existing applications or hardware configurations. The problem of application compatibility is problem the most serious software development problem today. Most products get through unit testing and initial integration testing quite fast; it's when you start testing them together on a machine that has both kinds of networking adapters or both version of SuperAppPlus that the bug count starts to climb. Note that this is really an requirements problem, not a coding problem; most of the time, the problem turns out to be "I didn't know it did that!" as versus "I should have used a + instead of a ++" or "I really meant BigLoopinnerIndex but instead I typed BigloopIndex." In fact, even if someone came up with a system that improved code readability 300% and gave me a free tool that automatically did the formatting, I wouldn't be interested - the cost of testing the tool to make sure it wasn't screwing up the code would probably wipe out any savings that the improved readability brought with it. Ruven Brooks ---------------------------------------------------------------------- PPIG Discuss List ([EMAIL PROTECTED]) Discuss admin: http://limitlessmail.net/mailman/listinfo/discuss Announce admin: http://limitlessmail.net/mailman/listinfo/announce PPIG Discuss archive: http://www.mail-archive.com/discuss%40ppig.org/
