Hacker News new | ask | show | jobs
by christophclarke 2667 days ago

  ~/Code/
      L python/
          L project1/
          L ...
      L dotnet/
      L web/
      L work/
      L ...
  ~/Documents/
      L school/
          L Spring2019/
          L ...
      L personal/
      L work/
That's about all I really access other than Downloads which is a huge mess that gets purged every so often. Anything of lasting value gets moved out of there asap.

~/Documents/ is backed up to iCloud so I can access them anywhere. (Tip: Any directory you don't want to be backed up can be suffixed with ".nosync" e.g. SecretStuff.noSync).

This all started after getting into Go, which mandates a central directory under which all Go code is stored. [1] nesting scope also helps namespace resources.

[1] https://golang.org/doc/code.html#Overview

3 comments

Incidentally, Go doing that made my first foray into it a very easy "Oh, yeah, this programming language isn't gonna be for me." decision.
Go modules has removed that restriction, although previously you could also get around it by avoiding Go’s build system (e.g. use Bazel instead). Some people would also just stick their go code in <repo>/go/src/example.com/pkgname, which is not that different from the way you might structure Java code anyway.
This is similar to my setup, except in place of iCloud Document Syncing I have a Syncthing folder. I like and use iCloud but it’s a little too easy to accidentally sync things that shouldn’t be synced if cloud Docs/Desktop is enabled. With Syncthing, I have to take the explicit action of placing items in my ~/Sync/ directory.
Folders to the rescue. /s

But really, that's usually all you need to organize.