How do I streamline my coding and work habits?
Get a good source control system, like Subversion. Set up your own personal standards for organizing your files and organizing your code. In PHP, for instance, keep similar functions together in the same include file and always prefix your functions with the name of the file they’re in. For instance, keep all your functions related to users in ‘/include/user.
Use a model-view-controller-based web application framework like CakePHP or CodeIgniter for PHP (they’re similar to Ruby on Rails). It makes your code organized and easy to understand. Models handle the database work, views are the screens that appear in the application, and controllers tie everything together.
You definitely need source control. I’d recommend Perforce, since it comes with some nice GUI tools & for a single user tends to work better than CVS. You also should a class/function browser, & generate whatever the PHP equivalent of doxygen docs are now & then to keep track of what you’re doing. Keeping a by-hand changelog is another option.
Seconding kirkaracha. Also have a look at Symfony. The documentation is superb and the development model it enforces has been a real revelation to me. It takes care of a lot of the grunt work and frees your mind to work out how you want things to work. It also integrates a database abstraction layer and object model. If you’re doing web apps, it can be a godsend.