Subject: Re: CL & CORBA
From: Erik Naggum <>
Date: 1998/09/06
Newsgroups: comp.lang.lisp
Message-ID: <>

* Erik Naggum (quoting horrible code _not_ his own)
|   if (( Buffer[ 0] | 0x20) == 'f' &&
| 	( Buffer[ 1] | 0x20) == 'l' &&
| 	( Buffer[ 1] | 0x20) == 'o' &&
| 	( Buffer[ 2] | 0x20) == 'w') {
|     Flow = 1;
|     Buffer+=4;
|   }

* Kent M Pitman <>
| You can hardly blame them.  I don't write much C but I'll come right out
| and admit I did this very thing myself until I caught onto the "trick" of
| C; that is, (a) the language is kept "small" by having absolutely
| essential stuff (i'm sorry, but I don't consider strings optional) into
| libraries that don't count as part of the language and (b) programs like
| strcmp are named in obscure ways that defy easy recognition as what you
| want.

  ok, so I won't try to detract from your points, either, but when out of
  those 25,000 lines, 8,000 lines are individual character comparisons like
  this, instead of being smart enough to save himself a _lot_ of work and
  write a _new_ function that did whatever strncasecmp does if he didn't
  know it, he did this, there's no way I'm going to give him any lenience,
  and certainly not when he must have been a "novice" for a least 10 years
  (he had quoted "10 years experience in C" on his resumé at he time he was
  hired by the consluting company).  novices are cool only as long as they
  don't stay that way for very long.  I don't think a _real_ novice would
  do the "| 0x20" bit (sorry), either.

  however, the reason I picked this one particular example was that this
  stupid "programmer" compared the second character of the "Buffer" against
  _both_ `l' and `o', causing the test to fail always, and it's damn hard
  to _spot_ that mistake because of the boneheaded way he wrote his code.
  (it seems you missed this on your first reading.  I won't blame you...)

  incidentally, if this has been code delivered in the course of some
  education the poor sap was _paying_ for, it'd been OK, but when you pay
  for a programmer, you should be able to expect him to be fully educated.
  (however, "C programmers" who can barely spell "C" get jobs these days.)

  oh, the system has been completely reimplemented in 2500 lines of Common
  Lisp, runs about 10 times faster on similar hardware, does not crash, and
  is a _lot_ easier to administrate.  further, it could _easily_ have been
  written in "only" 10,000 lines of C.

-- is about my spam protection scheme and how
  to guarantee that you reach me.  in brief: if you reply to a news article
  of mine, be sure to include an In-Reply-To or References header with the
  message-ID of that message in it.  otherwise, you need to read that page.