Ask HN: What are good tips for personal project hygiene?
I start a lot of seemingly one-off projects that I forget about, and then months later either want to reuse or share with friends. Unfortunately, it ends up being a hassle because I don't remember all the hacks I used to get things off the ground so I have to reread things to figure out what commands to run in what order etc.
I've learned some good tips from my work experience, but I've never really done 0 to 1 in a work setting without there being some previous infrastructure for me to work off of.
Some of things I'm thinking of
- dockerize
- all env vars go in a .env file
- avoid absolute paths
- DDL should be in re-runnable migration files
Are there any other easy wins that people could recommend? My most important advice: Put a README.txt document into the top project folder containing setup information consisely in one place. If necessary, include code snippets and biolerplate command examples to copy&past from. If the project is larger, you may also include MANUAL.txt, SETUP.txt (for detailled setup infos), TIPS.txt, TODO.txt, HISTORY.txt files or similar to keep the README.txt small. I think much of the value of "dockerization" is that it forces you to write a script, specifically a dockerfile, to build your system. Most systems a few things that need to be customized to create an instance: database connections, filesystem paths and API keys. The other day we (HN) heard from somebody in Germany who was running out of capacity in Azure and wondering what to do, if he'd had a script to build a copy of his system he wouldn't have been stressing it so much. It's good to document and standardize your install process early in development as if you do it when you're not under stress you won't stress it when you are.