|
| |
C Language Programming Resources
This page deals with programming in C.
Last revised: Sunday January 19, 2003 05:50.

- Is Clarity More Important Than Correctness?
- If your program is clear you can make it correct.
Can you be sure your program is correct if it isn't clear?
- J. Blustein <jamie@csd.uwo.ca>,
How to
Debug.

Algonquin C Programming Information
These first items are selected to be of use to people writing programs in the
Algonquin environment.
Help with debugging
 | You can make sure all your malloc/free function calls are matched by using
the MEM software package. It replaces these C Library function calls: malloc,
calloc, realloc, strdup,
and free. Select here for
details. You can pick up the software itself by selecting
here. |
Miscellaneous

Highlights and Excerpts from the WWW
These are items that I think C programmers should see.
- Rob Pike on C program
style.
- A program is a sort of publication. It's meant to be read by the
programmer, another programmer (perhaps yourself a few days, weeks or years
later), and lastly a machine. The machine doesn't care how pretty the
program is - if the program compiles, the machine's happy - but people do,
and they should.
- Henry
Spencer's 10 Commandments of C Programming
- ...Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end...
- An excellent C topic reference
- This points to many useful topics about C programming, including a bit of
C history such as the B programming language that I used before I learned C:
B didn't believe in typechecking, period. There was only one type, the
machine word, and the programmer was responsible for applying to a variable
only such operators as made sense.

C on the World Wide Web

Security Issues in C Programs
The Internet is full of security incidents arising from code that forgets to
check for buffer overflow. This is a serious programming error, and I don't
accept student code that does not protect itself against overflowing its own
internal buffers. Check the size of the buffer before you append anything to it!

C oddities
The International
Obfuscated C Code Contest has some prime examples of how to write very
confusing C code.
Once you think you understand loops and switch statements, see Duff's Device.

Last revised: Sunday January 19, 2003 05:50.
Email comments to Ian! D. Allen idallen@freenet.carleton.ca
|