How to program in "C"
- Use lots of global variables.
- Give them cryptic names such as: X27, a_gcl, or Horace.
- Put everything in one large .h file.
- Implement the entire project at once.
- Use macros and #defines to emulate Pascal.
- Assume the compiler takes care of all the little details you didn't
quite understand.
"It's 5:50 a.m., Do you know where your stack pointer is?"
How to debug a "C" program.
- If at all possible, don't, let someone else do it.
- Change majors.
- Insert/remove blank lines at random spots, re-compile, and excecute.
- Throw holy water on the terminal.
- Dial 911 and scream.
- There is rumour that "printf" is usefull, but this is probably
unfounded.
- Port everything to CP/M.
- If it still doesn't work, re-write it in assembler. This won't fix
the bug, but it will make sure no one else finds it and makes you
look bad.