You are a stupid programmer, you can't have that
Walter Bright
newshound2 at digitalmars.com
Tue Aug 10 18:29:35 UTC 2021
On 8/9/2021 12:23 PM, H. S. Teoh wrote:
> As Knuth once said:
>
> People who are more than casually interested in computers should
> have at least some idea of what the underlying hardware is like.
> Otherwise the programs they write will be pretty weird.
> -- D. Knuth
>
> That includes knowing the ugly realities of 2's complement arithmetic.
A friend mine (a very smart one) back in college one day decided to learn
programming. He got the Fortran specification(!), read it, and wrote a program.
The program ran correctly, but incredibly slowly. Baffled, he took it to his
programmer friend for help. The friend laughed, and said here's the problem:
you're writing to a file in a loop:
loop
open the file
append a character
close the file
instead of:
open the file
loop
append character
close the file
My friend said he followed the spec, which said nothing at all about how file
I/O actually worked.
More information about the Digitalmars-d
mailing list