Semantic Workspace
Semantic Workspace is just a fancy name I came up with about half a year ago for a small set of simple principles for organizing the projects directory on your local machine.
Recently, while going over work things with a coworker, we were sharing screens and doing various things across several related projects. I’m sure plenty of you have been in a situation where you’ve heard something like: “Hold on, hold on, let me find where I keep that one” — while someone hunts for the right directory. It always takes a moment and leaves an unpleasant impression — you start feeling like the other person’s drive is a mess.
What do I suggest to keep your projects “neatly on the shelves”? Nothing new or complicated, really. First, the template:
Workspace
├── github.com
│ ├── user/group/org
│ │ ├── project-1
│ │ ├── project-2
│ │ ├── project-3
├── gitlab.com
│ ├── user/group/org
│ │ ├── project-1
│ │ ├── project-2
│ │ ├── project-3
├── your-company.tld
│ ├── user/group/org
│ │ ├── project-1
│ │ ├── project-2
│ │ ├── project-3
...
Now let’s walk through what’s going on here.
- Create a root
Workspacefolder in your home directory. You can call itProjects,Work,Development— whatever suits you. I preferWorkspaceas the most neutral option. - Inside that folder, group projects by their origin. Create a
github.comfolder for projects cloned from GitHub. Similarly, if a project comes fromgitlab.comor any other host, create a folder for it. - Create a separate folder for your company’s projects.
- Inside the per-domain folders, lay out your local copies according to the user, organization, or group they belong to.
This makes it easy to navigate your working directory’s project structure quickly. The predictability of this layout helps you keep it tidy.
A separate note for happy Mac owners: don’t put your Workspace folder
and projects inside Documents. If you do development on virtual
machines and sync filesystems over nfs, it won’t work. A few years
back Documents started syncing with iCloud, and nfs-server, citing
“security settings,” refuses to expose files from that folder. The simple workaround is to keep the projects root directly in your home
directory.
Organize your local development!