What is you coding style?
Keep it simple, keep it documented and make it robust. There's no need to re-invent the wheen for every new project when you can make all of your code robust so that it can be re-used for multiple projects.
It may take longer to write robust code (maybe 3 times longer than just slapping together code that works for the one job), but that time is saved when the code is re-used (if you use it for 10 projects or functionalities within a project, you've more than reduced the work by 3 times).
In addition, when you program software for other people, you learn very quickly that the client will often add new requirements into the project. This is all fine when you've only wrote a few lines of code, but more often than not, the client will ask for new things when there are thousands of lines already developed; the more you write, the more difficult it becomes to add unexpected features and the more chances there are of new bugs being introduced. By making code as modular and robust as possible, it becomes easier to add new features.
Do you comment your code or do you feel that code should be easily readable if you have done things properly in the first place?
This is a must. It only helps you to be able to re-use your code at a later date, plus helps if you need to bring in other programmers to the project. Having re-usable code will help you to be more productive and save you money (in terms of time and if you have to hire other programmers).
Do you use include files or do you have everything in one source file.
I put everything in separate files. For commercial work, I have developed my own engine in PHP which has specific classes (each in their own file) that are responsible for specific functionalities. These include:
* database operations
* gui drawing - I have defined gui elements such as combo boxes from CSS, plus have various functions for drawing file requesters; all I have to do is call a function and it will create the HTML that is needed
* Graph drawing
* File management - uploading, directory reading, etc
* XML creation
* etc.
Do you plan thoroughly before even typing a line of code or do you play it by ear?
Yup. When you program applications for other people, you need to get a specification down in writing, or there will be a fair chance you'll get shafted by the client and end up delivering more than what you agreed to for the price.
This would probably be good advice if you are ever approached by a games publisher to develop a game; always get the specification in writing so that all is clear. The problems that occur is often due to non-programmers thinking that a feature is easy to develop because it sounds easy.
Finally, do you use a todo list?
First I split a project into milestones, then I create a to do list from each milestone that I work on. After this, the process goes back the drawing board for maintenance and design due to changes in demands from clients. Check the waterfall model
http://en.wikipedia.org/wiki/Waterfall_model Other stuff
I have developed a variable an class naming convention to help keep everything understandable and consistent. Example:
exVar - is a variable
exVar_exGrp - is a variable within the group of variables starting with exVar
exVar_newGrp - is another variable within the group of variables starting with exVar
This style helps when searching for related variables. Same can be used for classes and functions.