This is from my experience, but still believe it can be applied and goes along the lines of what GlenH7 mentioned.
I work between 3 companies doing various projects. The companies are sisters of each other with some standard practices and work methodology, but are also unique in a lot of ways. With that said, I generally begin each project fresh and want to just get it done or show progress. Then if I run in to a scenario where I remember a piece of code or functionality that I wrote for a previous project, I'll do one of two things (time dependent):
- Fastest Method
Copy the previous code from the the other project (don't have a lot of time) in to my current project.
Copy the previous code and place it in to a common library, then include that library in the current project (to make moving forward easier).
2b. If I make changes to the other (original) project, I'll refactor it to use the new library [but generally won't do so unless I have to re-touch that project].
Just be warned, test the heck out of the common libraries. Common libraries mean creating dependencies. Dependencies create points of failure. Although you may need something tweaked slightly for your current implementation, you don't know how it will change anything else using that library.