Most recently the whole namespaces pattern really helped me structure my code in a way that made sense. For the longest time I was trying to figure out a clean way to lay out all the different callbacks so that they weren't all nested 12 deep and tangled up. Now I'm starting to get good reuse and I can easily separate related code out into separate files.
This same hurdle keeps coming up. Every time I try to learn a new programming language one of the things I worry about the most is where do I put the files? How do I make packages/namespaces/modules? Where do 3rd party plugins/libraries/frameworks go? I need to understand that structure--I guess my mind just works that way. In .NET I have my VS projects and namespaces all there keeping my code in order. Same with java, packages are built into the language and components have well defined structure (WAR, EAR, JAR files). It doesn't feel like I know the language until I can create a "Project" from scratch and know where to put the files and how to structure the code in those files.