Re: Segfault City
- From: Andrew Poelstra <apoelstra@xxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 24 Jun 2006 03:16:07 GMT
On 2006-06-24, Richard Heathfield <invalid@xxxxxxxxxxxxxxx> wrote:
[X-posted, and followups set]
I found something interesting on the Web today, purely by chance.
Just out of curiousity, did you stumble upon that while Googling your own
name? I'm not accusing you of arrogance, but it's interesting that he
mentions and insults you specifically in his preamble.
It would be funny if it weren't so sad. Or sad if it weren't so funny. I'm
not sure which.
http://www.developerdotstar.com/community/node/291
This "teacher of C" demonstrates his prowess with a masterful display of
incompetence in a 200-line program that travels as swiftly as possible to
Segfault City.
Ooh. Segfault City. Where all bad programs go to die. :-)
(Actually, using my normal gcc switches, it doesn't even get past TP3, but
it will at least compile if you just use gcc -o foo foo.c, after hacking it
around a bit to do things like mending the line-spanning single-line
comments and string literals, which - in fairness to the author - are
probably an artifact of the Webification of the code.)
I wonder how long I'll take to stop laughing.
I stopped reading after the first function. I wasn't sure why he kept
casting chars to ints, as though there wasn't implicit casting going on
by default. Then he tested for > '9', which made no sense to me. Realizing
that I wouldn't be able to trace that logic, I stopped.
What, if anything, can it be guaranteed will be > '9' in standard C?
--
Andrew Poelstra < http://www.wpsoftware.net/blog >
To email me, use "apoelstra" at the above address.
I know that area of town like the back of my head.
.
- Follow-Ups:
- Re: Segfault City
- From: pete
- Re: Segfault City
- From: CBFalconer
- Re: Segfault City
- From: spinoza1111
- Re: Segfault City
- From: Richard Heathfield
- Re: Segfault City
- From: Keith Thompson
- Re: Segfault City
- From: Eric Sosman
- Re: Segfault City
- Prev by Date: Re: Segfault City
- Next by Date: Re: Strings, Strings and Damned Strings
- Previous by thread: Re: Segfault City
- Next by thread: Re: Segfault City
- Index(es):