Secure programming in UNIX HOWTO
David Wheeler has put together a set of design and implementation guidelines for programming securely in several languages. The document is actually in a ton of different formats, even ones suitable for Wireless devices. So, take yours with you and learn it well!
Secure Programming for Linux and Unix HOWTO
There is also a set of overview slides that are definitely worth a look.