I am working now full time as a Developer/Analyst... I have to get used to some of the ins and outs of being a full time code monkey.
I am at Microsoft this week and next week on a Proof of Concept for a large project that the team is starting. We have a Microsoft developer here that I have been writing code with. I was constantly behind in my completion of my coding tasks. We would need something built and the both of us would attempt to build it. The Microsoft guy would be done with the entire project before I even got my structure created. I thought that it was because this is essentially my first job where I am developing software full time, and this guy has been writing code for his entire career.
He then gave me a nugget of advice that he uses to write code. He said that there are many tasks that you will do all of the time, and there are some tasks that are difficult that you will do only once in a while. What Microsoft Guy suggested was after you have completed the task, make your code "generic."
He said to take my completed code and strip out all of the project specific code so that you could plug anything in to the code and make it work. You then carry this code with you wherever you are working. He then showed me how he writes code so quickly. For any set of requirements he has, over the course of his career, written something that can handle it. So all that he does is paste his generic code in to his new project and then modify it as needed. In the span of just a few moments not only does he have his structure layed out, but most of his code is already written. All he does from there is wire everything up.
He actually has Visual Studio configured with various macros so that he can just insert his snippets through his right click.
Of course you have to keep your generic code snippets up to date, and re create them when something is deprecated, but the time it saves is amazing.
I wonder if there is somebody out there selling generic code snippets... Possible business opportunity!!