RE: Human minds on Windows(?)

From: Chuck Kuecker (ckuecker@mcs.net)
Date: Fri Jul 09 1999 - 19:18:21 MDT


At 04:38 PM 7/9/99 -0500, Billy Brown wrote:
>
>With modern hardware you don't need to do that anymore. Instead of devoting
>50 man-years to build a hand-coded assembler program that runs in 50KB of
>memory, you can spend 1 man-year to write a program that does the same thing
>but needs more like 500 KB. The idea that there is something wrong with
>that approach is a serious mistake: the scarce resource today is human
>effort, not memory. The same goes for speed optimizations .
>

When 'Hello, World!' takes over 350 K in Borland's C++ to function,
SOMETHING is wrong. Think of how much incredibly faster our present
machines would seem if the massive overhead of 'everything to everyone'
library code and functions were coded with the love lavished in days of yore.

Yes, I know - we can't afford to hand code modern software. But a bit of
time spent in producing optimized libraries and thinking about what is NOT
needed would skinny things down quite a bit. This effort only needs to be
done once - at the compiler writer's workstation.

I believe a serious problem with programmers today is that they are forced
in many cases by managers with little or no knowledge of coding to use
things like C++ in places where they are not needed. Some 'good rules' of
modern programming, slavishly followed, result in bloatware.

One of my customers makes appliance controllers. These are four, eight and
sixteen bit microcontrollers with as little as 4K of ROM, and as much as
256K. Their parent corporate managers have decreed that 'all programs
written from now on' will use 'object oriented design'. The libraries they
have produced so far are almost twice as complex as the same code written
by 'hand', and they end up being modified anyway once the programmer finds
that the code misses fitting into the processor by a few hundred bytes. Oh,
yeah - another of management's hot buttons is ROM size, since they can save
a few cents using a smaller processor.

I write a lot of C for embedded processors like the 8051, and the resulting
machine language is very close to what I would have done if I was writing
in assembly. Why can't modern high level compilers at least attempt to
produce tight code?

>The smart way to write an application today is to concentrate your efforts
>on good overall design, appropriate feature sets, user interface issues,
>etc. If the final result is a little slow, you can always go back and
>re-write the most resource-intensive 1% of the program. Most of the time
>you won't even need to do that, because your program isn't going to put a
>serious load on a modern system. Either way, you will spend far less money
>and end up with a much better (in the user's opinion) program that you would
>if you obsess on efficiency issues.
>

I agree fully. If only we could keep management out of the coding arena!
They should supply the specifications at the most, not dictate coding styles.

Chuck Kuecker



This archive was generated by hypermail 2.1.5 : Fri Nov 01 2002 - 15:04:26 MST