[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hi this is bill







>...when I was actively collecting stuff for this page, someone
>emailed me a 5 MEGABYTE source file that someone on his computing
>course had written to sort (IIRC) 40 numbers into ascending order.
>
>The code started off:
>void sort ( int a, int b, int c, ...int aa, int bb, ...,
>            int *A, int *B, int *C, ....int *AA, int *BB, ...)

>I don't believe it will be possible for there EVER to be worse
>code than that.

Grin.

I worked for a client who used roughly that level of development throughout.
Throughout the ACCOUNTING SYSTEM they sell. [Fail to sell]. Hohohohohoho.

Here's just a snippet. They have a nice little function that takes a float (no
doubles here) and checks if it's zero to a number of decimal places. (The whole
accounting system works in floats. Yes, that's right. Not fixed point or any
custom monetary handling library. Normal floating point numbers.)

By sprintf()ing it to a buffer and counting the zero digits after the decimal
point...


People who know me, will tell of my incredible talent for not tolerating stupid
behaviour, usually very loudly. Several counties couldn't hear me over that
incident because it was two days before I wasn't actually speechless with
apoplexy.

Then I discovered how the routine that trims the numbers off at a number of
decimal places worked. Let's just say it was a natural extrapolation of their
already well developed number handling technique...