De-code



  • A number of years ago, I received reference code from a large DSP supplier (located in the biggest state in the contiguous US) that I was to use as a basis for our software.  The code was, to be kind, a bit lacking.  Besides being a brittle dance of multiple tasks with little pretense of thread safety, terrible C code (the code that scrolls the file names on the display has all local variables declared volatile, which I later discovered helpfully masks a buffer overflow) intermixed with undocumented assembly code, and generally having no discernable architecture, the code also had some very interesting naming tendencies that made it at times maddening to follow.  I thought I would share an example here to give you a feel for the system.

    error = DECODE_decode(decode.decode, decode.decodeBitstrm, (Int *)pipe->writerAddr);
    At least the above example had all of the words spelled correctly (unlike many other functions), though I guess you get pretty good at spelling the same word after so much practice.  After a couple of months of hacking at it, I was able to convince my boss that we should switch to a different supplier.



  • This place wouldn't make instruments, would it?

    I've seen this sort of thing in other libraries as well.  One that comes to mind is a graphics-processing library from a particular chip manufacturer that named itself after the first five letters of its brainpower....



  • Next time my code will have stuff like:

    foo = FOO_foo(foo.foo, foo.foobar)!



  • [quote user="H3SO5"]Next time my code will have stuff like:

    foo = FOO_foo(foo.foo, foo.foobar)![/quote]

    You mean: 

    foo.fooBr


Log in to reply