... but this code is easier for newbies to understand! Your code is too complicated!
See Spot Run is easier for novice readers to understand than The Name of the Rose, but the latter is the better book.
Why optimize for people inexperienced with the language, platform, or problem domain when you could optimize for fixing the problem? (Though if your problem is teaching how to program, obviously your goal is different.)
Who fixes the fixers? (Score:2)
Why optimize for people inexperienced with the language, platform, or problem domain when you could optimize for fixing the problem?
Because those are the people who'll be doing maintenance. Or so goes the reasoning.
Re:Who fixes the fixers? (Score:1)
I know you know this, but if this is the reasoning on your project and if your project matters at all, you have bigger problems than inscrutable code.
shades of gray (Score:1)
Spot, on (Score:1)
I tend to agree. For maintainance reasons I can see helping people ignorant of the platform, or perhaps even the language in some rare cases, but definitely not the problem domain. It's not worth writing kernel code so that programming newbies can understand. You may be able to write much of it so that *kernel* newbies could pick it up and maintain it. Even then, some prob
use Occam's razor (Score:2)
Complicated code is necessary at times, but the vast majority of the code should be so clear and easy to read that maintenance actions are obvious without requiring an in depth study.
Re:use Occam's razor (Score:1)
Concise, normalized, idiomatic code is very understandable to an expert, but opaque to a novice. Long, spelled-out, heavily commented code is most understandable to a novice, but frustrating to an expert who now has to read (and evaluate) maybe two to ten times as much code as is necessary. Some (short!) things that are obvious to experts may have no meaning at
Re: See Spot Program! (Score:1)
But without seeing the code in question how do we know whether the code is incomprehensible because it's a "better book". Maybe it was written by a gibbon given access to a keyboard and liberal quantities of scotch :-)
For me the danger is thinking that