I found that on the job experience is ok at helping you to improve, but much of that has to do with the passion and abilities of those around you. I've worked with a lot of developers, but all seemed to take it as a 9-5 job, and lacked one important thing - continuous improvement.
I've found the best way to stay on top of things and improve is to pro-actively read blogs, not just read them when google says they have the answer to my question. Also podcasts are a good way to stay informed about things that are relevant and happening on whatever technology stack you are working with.
Books help too, but I think it helps to use blogs, podcasts and twitter to see what the current trends are, and then you can get more information from books. Get involved in community, check for user groups or code camps to build a network. You want to find like minded people who are also interesting in continuous improvement, and you may or may not find that at your 9-5 job.
Have a pet project. You don't have to release it, but it gives you a place to try out new ideas, or new technologies in an environment where there isn't money, or your job, or someone else's riding on the success of the project.
Look at open source projects. Dig into the code of a project or two to get an idea how other people are solving problems. There are a lot of smart people putting out a lot of great code, take advantage of it.