Hacker News new | ask | show | jobs
by sushimako 2234 days ago
Over the past ~half year I gradually established a workflow consisting of a simple directory structure, a handful of bash-aliases and chromium profiles. It looks like this:

Each project gets its own directory somewhere in my $home with some subdirs. There might be various others specific to the project-domain, but these are the most common:

notes/ contains plaintext files of everything i write down. File-name structure is <date-str>:<note-type>, e.g. 2020-05-09:call (:call are the most typical ones). As others have also suggested, I take a lot of notes for record keeping & plannning purposes.

workspace/ contains all source code repositories, or other files necessary to work. Pretty much anything I might touch while coding.

auth/ for things like ssh public keys used on the project

downloads/ Project-specific downloads.

Then I create new entries in my ~/.bash_aliases that "get me" right into the coding-env of a project. Say I work on a python project, I might have an alias that looks sth like:

  alias fb='cd ~/fooproject/workspace/foobot && echo "loading virtualenv..." && source .venv/bin/activate';
On of my current side-projects is a full-stack clojure(-script) app with these aliases:

  alias foh='cd ~/opendecks/workspace/foh';
  alias fohj='cd ~/opendecks/workspace/foh/src/clj/opendecks/foh';
  alias fohs='cd ~/opendecks/workspace/foh/src/cljs/opendecks/foh';
First one gets me into the the source-root of the project, the other two into respective sub-paths for back- and front-end. These aliases allow me to immedeiatly "jump into a project" from any open terminal.

Lastly, I started employing chrome/chromium's user-profiles to seperate browsing for each project. This isolates work-related browsing from my personal activity (cookies, logins, passwords etc), and provides a nice cognitive barrier against procrastination. I'm not logged into any social networks on those work-profiles and switching to my private profile to browse facebook is a more concious act than opening a new tab in the current window. Each browser profile is set-up to save all downloads to the project-specific `./downloads` directory, again not to mingle (potentially confidential) resources.

I haven't automated any of the above steps, because it's so simple and takes me at most 10-15 mins to create a new instance. This has worked really well for me so far, because it clearly seperates almost all resources associated to a project, while being friction-less in tooling/switching between workspaces (versus e.g. waiting for a VM or docker instance to start). Another nice side-effect is that I can easily archive or clean-up past projects.