I keep small test/experimental bits of code in sub-directories of top level directories labeled Java_stuff, Lisp_stuff, Scheme_stuff, Ruby_stuff, Python_stuff, etc. Each test/experiment is in a well named sub-directory. These small experiments are useful for both learning and for later reuse on real projects.
I keep each active customer project in a directory with sub-directories for documentation, code, and test data.
For work on books: similar to customer projects: sub-directories for source code, for figure files (OmniGraffle and exported vector PDF files), for code examples, and for Latex (or OpenOffice if I can't use Latex).
I also keep a temp directory for downloading, building, running, and perusing source code for projects that I read about on the web. I periodically delete stuff in temp that is older than a few weeks old.
Finally, not specifically for code: I use Google documents to make copious deployment notes which I use for reference for future projects.