I've been programming for about 20 years now, going back to my days using basic on my commodore 64.
Here are a few tips I use regularly to speed up coding and debugging of my applications. I usually use php
/ perl in a web environment, but these apply to wide range of programming languages.
Code in small chunks - When I was in college, some Comp Sci. majors would write their programs using what we called the "Big Bang" approach. They would code the whole thing (maybe a few hundred lines), then try compiling / running it. Then they spent the next few days poring over pages of errors, trying to figure out why it didn't work. The method I use is to write a few lines of code, save it, run it, and test the results. I make sure variables contain what I expect, test functions, etc. This results in an application that works from the start, and as I add functionality, I continually test each piece - the minute something breaks I know it's got to be with the last few lines of code I added.
Print often - I use lots of print statements to show what values each variable has, and what conditions are being triggered. This assists with step 1 above, in knowing exactly what is going on with your application as you code it.
Save your work often - I'm in the habit of hitting save (:w for vi users) on a regular basis (every few minutes for sure). Especially when working remotely via ssh, or rdp, you can never be sure when a connection might lock up on you, or a server crash. This means you'll never lose very much code if something should happen.
Use appropriate comments and variable names - Ideally, you should comment often, but let's face it, nobody does. You *should* comment things that are not obvious. When you revisit the code 6 months later, you'll be glad you did. Also, use well named variables so they will make sense to anyone reading the code. Only use $x or $i for junk incrementers or looping variables. Usually, I find the variable names much more helpful than comments for figuring out what's going on.
Be a code surgeon - when debugging a live application, or adding a new feature, spend time figuring out what the code is doing, and exactly where you should put your changes / bug fixes. If you start coding too quickly, you'll usually put too much code in and make a mess of things. Make surgical changes, and only touch what you need.
I hope you find these useful. I try to follow these guidelines every day!