Shane Dowling : Good Coding Practice Snippets

After reading through Code Complete I decided to make up mind-maps on each topic in the hope that I would peruse them every so often to brush up on my programming best practice. Recently I decided take a look over them and was dismayed at the amount of knowledge from the book I'd forgotten or that hadn't become habit. Sure I'd remember a decent chunk of the good stuff and it has certainly improved my programming ability but there was so much I'd missed, even from the tiny mind-maps I'd made.

I was trying to figure out a way to embed some of the 'good practices' into my programming, in a way to force myself to review them in the hope they would become habit. Luckily I'd recently come across the awesome snipMate plug-in for vim so I decided to include a number of good programming practices into the snippets themselves and while I could only really get in a tiny percentage of it I feel these tips will enhance my ability at the lowest level of programming.

It will probably really grate having to delete all of these dumped comments from my snippets, but I figure by having the text front of me every-time I create a new if statement or a new function I expect my coding standards to increase significantly. I will also start creating snippets that represent explanations of certain programming concepts, with actual pseudo-code.

Anyway, feel free to check-out the PHP snippet file here, will add to it as I find missing things/enhancements