Recitation 4

The actual recitation portion today will be rather light because the pointers section is quite intensive and has a lot of information. I was going to spend time on the indexer today, but given that many of you aren’t done with the crawler and Winter Carnival is coming up, I know the number of people interested is NULL.

Style

You’re starting to become something of C experts, and that means the code you write should reflect that. With that in mind, we’re going to discuss style. So far I’ve not really been picky about style (with the exception of annoying facets like soft tabs), but now that you’ve matured into fairly advanced C coding, it’s time to start coding efficiently and following C conventions.

Here are some other pointers for style.

Standard C++ Coding style can also apply.

For those of you who are lazy, use automated style / indentation checkers. Popular ones are GNU Indent and indent, which is available on every Unix machine. Some really pouplar ones are A Style and Uncrustify.