On Fri, 14 Oct 2011 14:48:56 -0400
Dave McGuire <mcguire at neurotica.com> wrote:
Then explain why an OS (Windows and MacOS X for
example) is so slow
and bloated?
Part of the problem: Unexperienced programmers.
Recently a colleague showed a code snipet to me. It was 10..15 lines of
C++ from some Linux package manager GUI. There was a bug in it
regarding the call of a command line tool to do the actual work of
adding a package. It was clearly visible that the person who wrote that
code didn't know exactely what he did. (This is particularly bad in
C++.) I am sure he did it in the best aim to give something usefull back
to the Linux community. I am sure he did it as well as he could and
that he wasn't sloppy. But lacking experience and knowledge, his code
was awfully bad. (e.g. calling system(3) and using temp-files insted of
using popen(3) or pipe(2) / fork(2) / exec(3), passing std:string by
value instead const reference, ...)
So this is only one tiny example from one programmer. But today there
are many of those programmers and they write a lot of bad code. New
programmers come and they learn coding by reading that bad code and
extending it...
But regarding optimization, keep in mind, to cite Donald Knuth:
premature optimization is the root of all evil
The problem herin is: Sometimes the need for optimization arises later
and your boss doesn't give you the time needed to do the refactoring of
legacy, non-optimal code...
--
\end{Jochen}
\ref{http://www.unixag-kl.fh-kl.de/~jkunz/}