Integrate Early and Often
When you are working as part of a software development team, the software you write will invariably need to interact with software written by other team members. There may be a tempation for everyone to agree on the interfaces between your components and then go off and code independently for weeks or even months before integrating your code shortly before it is time to test the functionality. Resist this temptation! Integrate your code with the other parts of the system as early as possible, or maybe even earlier. ;-) Then integrate your changes to it as frequently as possible.
Why is early and frequent integration so important? Code that is written in isolation is full of assumptions about the other software with which it will be integrated. Remember the old adage "Don't ASSUME anything because you'll make an ASS out of U and ME!" Each assumption is a potential issue that will only be discovered when the software is integrated. Leaving integration to the last minute means you'll have very little time to change how you do things if it turns out your assumptions are wrong. It's like leaving studying until the night before the final exam. Sure, you can cram, but you likely won't do a very good job.
High-performing development teams practice continuous integration. They break their work into small tasks --as small as a couple of hours-- and integrate their code as soon as the task is done.