Tools like coding style and design methodology are there to help you get
the job done. Don't confuse using all the tools with being successful -
there's less correlation between the two than the "software engineers"
want you to believe.
Engineering is inherently a matter of choosing the proper trade-off
between conflicting demands.
The appropriate degree of structure for a 300kloc business app is not
the same as for a 3kloc embedded app.
That said - most of my experience with programmers who did not clearly
structure their code was with those who did not think clearly, rather
than those who were accepting a reasonable tradeoff between efficiency,
size, or some other meaningful engineering criteria, and maintainability.
I've written code that consisted of one massive function with thousands
of goto's - because that was the clearest and most efficient way of
implementing a state machine in that environment, and a state machine
was the most effective way of solving that particular problem.
And it wasn't even terribly difficult to understand, if you understood
what a state machine was. Because while the language let you do damned
near anything with a goto, I imposed on myself the sort of discipline
that the structured constructs gives you, in terms of how each state
was coded, labels and jumps were placed, and named, etc.
It did it for specific reasons, in a specific situation, and I think my
reasons were valid.
In fact, the product that was based on this particular piece of code
currently has a 40% market-share in its industry, so if I didn't do
something right, at least I didn't do anything obviously wrong.
But that's one specific situation. It's not my normal coding style.
Most of that product was written in a fully OO paradigm, with extensive
use of OO design patterns. Which has made it extensible in ways we'd
never conceived, when we laid out the original architecture.
--
How can you rightfully ask another human being to risk his life to protect
yours, when you will assume no responsibility yourself? Because that
is his job and we pay him to do it? Because your life is of incalculable
value, but his is only worth the $30,000 salary we pay him? If you believe
it reprehensible to possess the means and will to use lethal force to
repel a criminal assault, how can you call upon another to do so for you?
- Jeff Snyder, "Nation of Cowards"