Skip Navigation

What is your directory structure like for programming?

For most of college, I’ve kept it simple: I’d create a directory in my home folder for each project, then eventually move older or inactive ones into ~/programming/. When I change devices or hit file size limits, I’ll compress and send things to my NAS.

This setup has worked pretty well so far. But now that I’m graduating and my projects keep stacking up, I’m starting to wonder if there’s a more efficient system out there.

Curious—how do you all organize and store your projects? Any tips or methodologies that have made your lives easier over time?

The only person I’ve talked to about this is my mentor who’s been programming since the 60s (started on the IBM 1620 and Bendix G15) and he just mostly keeps projects in directories in his home directory and uses his godly regular expressions skills to find things that way. Makes me wonder if I’m overthinking it…

42 comments
  • As an addition to your post, I'm also in the process of learning C/C++, and I'm curious also how others arrange their actual project files and include directories. Like, for example, if there's a bunch of classes having to do with UI elements, do you just group them each under their own file all in their own directory? I've also seen projects where everything was just thrown into the top level directory, both headers and implementation files together in a giant pile of source files.

  • I keep a root folder. On Windows it's in c:\something on Linux it's in /something

    Under there I've got projects organized by language. This helps me organize nix shells and venvs.

    Syncthing keeps the code bases and synced between multiple computers

    I don't separate work from home because they don't live in the same realm.

    Only home stuff in the syncthing.

  • i use coding/languagename/project, where most if not all projects are git repos. so, coding/python/shira, coding/java/datetime examples i have some wildcards for the languages, most of my serverside js stuff lives in coding/node-deno and most of my fullstack webdev stuff lives in coding/webdev

    i used to have the coding directory on a hdd, but moving it to an ssd helped a lot when installing things made with node, among other things.

  • I don't have many so I just put them all in ~/own_repos (as opposes to another directory I have for other people's git repos). Maybe if/when I have more projects I'll have a more elaborate system.

42 comments