Adventures in programming in C