back

by mark_l_watson·16y ago·view on hn ↗
I have a system that works well for me, basically separating small test/experimental bits of code from code for customer projects. I'll talk about the layout of book code later.

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.

1 comments
BTW, I also use git for almost all of the materials in the parent comment. I use a very small managed VPS for my git repositories.

For extra backup (in addition to git remote repositories): I have a script that mounts a EBS volume on my always running EC2 instance, does an rsync to the EBS volume of almost everything but decrypted sensitive files, and then unmounts the EBS volume. EBS volumes are reasonably reliable.