Even though I work as a programmer, I've never actually been trained as one. Everything I know is self-taught. As part of my continual process of self-improvement, I want to develop better habits/techniques. I'm wondering how most of you design your code before you actually begin coding? Right now, I write an empty program with all my methods and variables commented, and pseudo-code in place of blocks of logic. Do you guys have other tricks/techniques you can share?
Right now, most of my work is in client-side Javascript development but of course, these techniques should be global.