I write code mainly in R, and from times to times, in C, C++, SAS, bash, python, and perl. There are style guides out there that help make your code more consistent and readable to yourself and others. [Here](http://geosoft.no/development/cppstyle.html) is a style guide for C++, and [here](http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html) is Google’s style guide for R and [here](http://had.co.nz/stat405/resources/r-style-guide.html) read more
