I'd be curious to see how everyone organizes their source code.
Let's see some screenshots or terminal dumps of your set up.
Here's what I've been doing for the last 5 or 6 years:
I like to organize my code by what it's used for rather than by language.
I've been a freelance developer for about 20 years and inside of those folders are hundreds of projects ranging from Visual Basic 6 from the mid 1990s to more recent projects written in Flask, Rails and Phoenix.
Top comments (32)
Below is how my sources are organized (for personal codes)
(Please ignore the poo.💩 file.)
GitHub has another top level directories, "Docker", "Aspnet", etc by technology.
I don't differentiate much by languages though.
I've been using above set up last 3 years and been working great.
throwaway
is where all my one-offs or test/useless code are located.I have a different structure for work as I have to follow the conventions at work.
I had no idea you could use emojis in filenames.
var mind = "blown";
You can also search by emojis 😎.
This looks pretty crazy. Just learnt as well.
oh man this emoji discovery is pretty friggin awesome, such wow
Apparently POO is an OOP language.
Day job:
~/Projects/CompanyName/ProjectName
Personal serious side projects or regular open-source contribution:
~/Projects/Personal/ProjectName
Practice non-serious side projects:
~/Projects/Practice/TechnologyName/ProjectName
Some open-source apps/scripts that I use and tinker with or have to self-host:
~/Projects/Applications/ProjectName
One-off scripts and POCs:
~/Projects/tmp
ongoing
is where I have the projects that I'm currently (or I've reasonably recently been) working on.archived
is where I move my projects after I abandon them. I try to be honest with myself and move projects fromongoing
to here when I haven't worked on them in a few weeks and it's unlikely that I will take them up in the next few days. Also, sometimes I move projects fromarchived
toongoing
if I decide to resurrect them.tutorials
is where I store the code I write following tutorials. I have a special consideration for those because usually when I'm learning something new and I follow a tutorial, I create a project with all the examples and stuff, that is handy to review when I'm working on a project with that stuff.~/dev
is where I dump everything since that's an easy path tocd
to.I should probably care more than this, but it works for now.
Exactly what I do. I let GIT handle everything for me.
The only exception: In dev is a directory called Clones, and as the name tells: I Dump all the cloned public repositories in here.
I have a Prog folder where there are all my repos localy that are mainly scripts or stuff that later I move on /var/www where I have the webserver or my vagrant machines.
Compared to you I am a bit disorganized.
For contracts and courses I use folders on external drives just to be sure that they are backup with my Nextcloud instance.
Keep in mind, I didn't start out like this.
The legacy folder alone as of today has 102 projects. That directory structure was slowly built up over many years.
Say in that way seems very scary!
I like the idea of having everything on my home.
Any kind of
~/Developer
or~/Projects
would be a good fit for me. However, in the last year I settle on~/Code
. And since then I store all my repos on that folder. And I try to keep only projects that I am working on. I use GitHub, GitLab and Bitbucket for store all of them remotely.I have three exceptions though. First, my dotfiles repo is at
~/.dotfiles
. Second, a spells repo is at.spells
which contains some shell scripts.The third exception is anything that I might use for learning purposes. I store those at
~/Desktop
.Most of my projects are in a ~/Projects dir. I have a bunch of shell scripts in an another dir that does not make much sense (~/Other/Scripts)... I should move this dir but it has been there for years so... it's tradition now I guess 😀
I try to keep my ~/Projects dir tidy by removing any project that I'm not actively working on, since most of them are either on GitHub or my Gitea instance anyway.
I'd like to say I'm organised but I'm actually quite scrappy. I'll go so far as to make a directory called
work
or something, but that's about it.One thing you do I don't understand is have a directory called
github
. I wouldn't do that unless I was working on the code for github :) Other than that, everything I do is version controlled and I don't care what company provides remotes for it.The github/ folder is dedicated to open source projects, not necessarily all projects that happen to use git (2 different things).
I could probably rename it to opensource/ but in this case, 100% of my open source work is on github.
I inserted some directories into CDPATH for easy use.
Normally I throw everything in a
development
folder on any machine I'm working on.Not every project is on every machine, these are just my desktop projects.
One folder for one project. My mobile projects are on the MacBook.
Private projects go on Bitbucket, public projects go on GitHub.