loading...
Cover image for How do you organize development projects on your computer?

How do you organize development projects on your computer?

andrewmcodes profile image Andrew Mason Updated on ・1 min read

I have tried different methods to keep development projects on my computer organized but between work projects, open source, side projects, issue reproductions, demos, and little test projects, it gets tough. I did a quick peruse through my computer and counted over 100 repos (some on GitHub, some not). They are all over the place, and I have only had this computer for 3 months! 😱

Discussion

pic
Editor guide
Collapse
evanplaice profile image
Evan Plaice

~
Code

  • contribute <- forks
  • deprecated <- archived repos
  • legacy <- EOL repos
  • personal <- my repos
  • vanillaes <- org
  • vanillawc <- org

Sites

  • somesite.com
    • _assets <- raw images, etc
    • content
    • public
    • server

Work

  • _assets
  • work repo

I tried many complicated systems to separate by content type, language, platform, etc. They always ended up becoming aggravating over time.

Ironically, this more-or-less reflects the 'feature based' directory convention I use for web dev.

I aggressively curate this; as well as my GH repos.

I never fork a project unless I'm going to contribute to it or I neeed a custom fork. Custom forks should -- ideally -- be killed as soon as I find a workable alternative.

I don't hold on to forks of all the projects I've contributed to. Best case scenario, it becomes a big pile of outdated trash. If I want to look up something I worked on in the past, it's all recorded and reaadily available online.

I don't keep a collection of snippets either

My motto is...

"If it's not in production, it's not maintained. If it's not maintained, it's probably not worth using."

I'd rather master the ability to quickly and efficiently locate info on anything. Than be a master archivist of bit rotten code that only I care about.

Digital hoarding is still hoarding. I treat my local setup like a desktop. Keep it as free of clutter as possible so I have more (mental) space to work.

Collapse
danciupuliga profile image
Dan Ciupuliga

I am definitely borrowing this method. Thanks sharing

Collapse
mpkarlo profile image
Karlo E. Meléndez Peña

I might borrow from this method. Currently, I store everything by language, but that always gets unwieldy after a while as you have said.

Collapse
tamouse profile image
Tamara Temple

I hear you on the digital hoarding— it's a hard habit to break since it's mainly invisible

Collapse
andrewmcodes profile image
Andrew Mason Author

Incredibly helpful, thanks for a detailed response. I caught myself with lots of forks and created a ruby gem (Dishwasher) to help me bulk delete them.

Collapse
alexdhaenens profile image
Alex Dhaenens

I have different folders on my C drive: ‘Projects’ for my work projects, ‘Side projects’ for my work related side project, ‘Personal projects’ for my personal projects and sonon. Each project has a root folder (named after the project) inside the allocated folder(e.g. Personal projects), which contains ALL the files related (git, src and other files) to that project (since I’m a web dev, it also contains the webroot of that site). Then every root project folder has a different icon (for clients it is the client logo, otherwise it is a related icon). Hope this helps you out!

Collapse
andrewmcodes profile image
Andrew Mason Author

The icon trick is a good idea - I’ll have to try that. I had a similar structure at one point that quickly fell apart. I probably need to figure out exactly why it fell apart and address that. And I probably need to delete some projects I have hanging around

Collapse
alexdhaenens profile image
Alex Dhaenens

Yeah, the icons are a great help and the folders are quite okay, the only issue is that aside from tons of files I have alot of services running per project (a db, an indexing servie, iis website etc) which fry my pc alot, the way I solved that was to by default not start the process (classic windows config) and I crated a star script which I run when I start a project. In the future I might create a ui for this.

Thread Thread
felixdorn profile image
Félix Dorn

Take a look at Docker. I had the same problem and Docker was the solution.

Collapse
codemekathy profile image
Kathy

Great idea about the folder icon! Thank you! I take a similar approach, but I house all named sub-folders in one Dev parent directory on my hard drive.

Collapse
mpkarlo profile image
Karlo E. Meléndez Peña

Icons? Where do you source them from?

Collapse
alexdhaenens profile image
Alex Dhaenens

I download them onto my pc, but since I am a Webdev I often pick the favicon of the project as it is more recognizable.

Thread Thread
mpkarlo profile image
Karlo E. Meléndez Peña

Ah! Makes sense, being primarily a data developer, I don't get so many...

Thread Thread
alexdhaenens profile image
Alex Dhaenens

You can also use some default windows icons if you don't have any yourself

Collapse
idoshamun profile image
Ido Shamun

I usually try to keep it simple. I have a Development directory with all the repos and projects. Sometimes I add another dir in-between for projects with more than one repo.
I usually navigate with terminal and I've oh-my-zsh installed with fuzzy completion, so it's enough to remember even a tiny bit of the folder name.

Collapse
andrewmcodes profile image
Andrew Mason Author

Do you use ‘Z’? Honestly, the only reason I can find anything is because I use this tool. It’s definitely something that I can’t do without at this point.

Collapse
idoshamun profile image
Ido Shamun

Not sure if I heard about it. Could you please send a link?

Thread Thread
andrewmcodes profile image
Andrew Mason Author

github.com/rupa/z

It’s zsh plugin to help you navigate your files via the command line by learning the ways you want to access a certain folder and providing that shortcut.

For instance, when I want to go to CodeFund’s codebase on my computer, I type z code in my command line and cd’s me right to the project, which the real path is ~/work/gitcoin/code_fund_ads (I think, I’ve accessed it with z since day 1).

I have a GitHub action for rubocop and a demo app for trying to recreate bugs people report for it which I can get to with z rubocop action and z rubocop playground respectively.

It’s an amazing tool and I can’t imagine not having it at this point. Let me know if I can say more! 😁

Thread Thread
andrewmcodes profile image
Andrew Mason Author

It’s also perfect for me because I can never remember where anything is. Whether it’s a folder on my computer or my car keys, I can lose anything. Z helps me not lose things on my computer. As for my car keys though... 😬

Thread Thread
idoshamun profile image
Ido Shamun

Thanks for sharing! I'll give it a go

Collapse
hopsoft profile image
Hopsoft
~/work/COMPANY_NAME/PROJECT_NAME

I use this pattern for everything. Primary work projects, consulting projects, personal projects, github forks, etc... Namespacing via company/user + project seems to cover pretty much everything I've encountered.

Collapse
j4ng5y profile image
Jordan Gregory

I basically follow the GOPATH structure for everything because I like it.

I usually have an Engineering folder in my user directory, under that, folders for languages, under those, at least a "src" folder, under that, the root VCS name (e.g. - GitHub.com), under that, my user name at said VCS, under that, my repo names.

It feels awkward at first, but it's been the only thing that has stuck with me.

Collapse
ioveracker profile image
Isaac Overacker

I keep all of my projects in ~/Source/ organized in the same way that they're organized on GitHub: ~/Source/${organization-name}/${repo-name}. Everything I work on ends up in a private or public GitHub repo, so this makes it simple to find what I'm looking for and to remember where it exists on GitHub. For temporary projects / scratch space, I put those under ~/Source/tmp/ and clear it out frequently to keep it from getting out of hand.

Collapse
tamouse profile image
Tamara Temple

mine is similar to others:

Examples/
— learning and teaching examples, toy apps
Projects/
— side projects
Sites/
— my personal websites
Work/
— stuff i am paid for

A lot of stuff is on GitHub and GitLab, archived. I'm trying not to keep everything I ever wrote on my main computer, but rely on those sites as deep repositories.

Collapse
scrabill profile image
Shannon Crabill

Mine are all over the place too.

Most older "projects" exist within my /sites folder.

When I downloaded VSCode last year, it created a /development/code folder (I guess) so I started putting lab projects in there. I recently started organizing them by sections (/javascript, /sql, etc)

Side projects end up in project folder in /documents.

Collapse
andrewmcodes profile image
Andrew Mason Author

Side projects are really my downfall. Do you think you’d organize them differently if you way more of them then other types of projects?

Collapse
xanderyzwich profile image
Corey McCarty

I keep a 'workspace' directory in my user directory so that work computer migrations will pick them up. It is then broken down by team name, with my github account name as a team. Everything fits into this for me. If you have too man (I only have around 20) then you could break down by various means such as language or framework.

Collapse
earthenexplorer profile image
Aaron

I tend to try and keep it relatively flat and simple. I have a Projects folder in my user directory and within that I have all my solution folders named using namespaces in the form of {Organisation}.{Project}.{Platform}. I then have a folder called Spikes for any on the side work or experiments that don't have a place yet.

I find this removes any issues of trying to categorise projects or separate them into languages when they may span multiple languages and platforms or having to navigate separate folders for different sources like GitHub etc. It's also easy to sort and get to what you want.

An example would be:

Projects/
----MyCompany.AwesomeApp.Web
----MyCompany.AwesomeApp.Api
----MyCompany.AwesomeApp.Android
----MyCompany.ServiceBus
----RandomClient.CrappyWebsite.Web
----MyPersonalBrand.MyNextBigIdea.Api
----MyPersonalBrand.Auth
----Spikes/
--------RandomIdea.Web
--------ThisWillNeverWork.Api

Collapse
voanhcuoc profile image
Khoa Che

Zen on minimalism. I have 2 directories: projects for anything I work on and git for any repo I cloned to use. I try to name my projects smartly so the autocomplete works, and just delete any repo I'm not working on for a month from now, I can clone it again any time I want. Test projects are in ~/temp dir which is completely fine to be deleted, if some are crucial, put it in a repo that makes use of it.

Collapse
manuelojeda profile image
Manuel Ojeda

Well, in my case I have separated in a folder named with the main technology it's been developed.
PHP, JS, React, Vue, etc etc

If I need to check an specific project I just look into the desired folder.

Collapse
andrewmcodes profile image
Andrew Mason Author

Nice idea. My issue is almost all of them are rails or ruby and the rest are gatsby sites so I don’t have things spread across that many languages/frameworks. Maybe I could drill down another level and still use this pattern

Collapse
khrome83 profile image
Zane Milakovic

I have a GitHub folder that I drop everything into. Every repo is top level of that folder. It’s called GitHub because I have been using that same folder name for years and am use to it. It s from a intro to git tutorial when I was younger.

Collapse
andrewmcodes profile image
Andrew Mason Author

Interesting idea. Probably the only reason I don’t do this is bc it makes it easier to cd around but I may give this a try.

Collapse
nicolasbrousse profile image
Nicolas Brousse

I use ~/Projects as root for all my devops/web projects, like I saw in some other comments.

.
├── _archives
├── _forks
├── _sandox
├── _scripts
├── _tmp
├── ...
├── nicolas-brousse
└── pantographe

First folder (all who start without _) is always "organization" mainly its a client name. I do the same inside _forks that contain GitHub project I contribute. The inside an "organization" folder its the project name (ex: pantographe/website).

I also have a p alias to quickly go into a project.

p () {
    cd ~/Projects/$1
}

I try to take time to move older projects in _archives, then after some time, I move them to my NAS or delete them to free some space on my laptop.

Collapse
kaanguru profile image
Collapse
tamouse profile image
Tamara Temple

These look useful. For organizing projects themselves, I have built my own rather specific generators with Thor and yeoman (or used bundle gem for example). I like building my own tools, but these seem like good ones in general.

Collapse
andrewmcodes profile image
Andrew Mason Author

Thanks for sharing! This looks cool👀

Collapse
madza profile image
Madza

Same here, actual coding is the easiest part.
Hardest part has always been setting up projects and keeping them organized.

Collapse
andrewmcodes profile image
Andrew Mason Author

Absolutely. I find myself fighting tools much more than I’d like.

Collapse
damlight profile image
Daei_F

I have folders per year, each containing folders with client names in which I'll put the folder for each project, if my client brings with two or more brands or projects for different stuff, I'll separate them in folders, for example "Bus travel app" and "Delivery app" if they're from the same client, in each folder I'll see how I'll organize the files but in general, the source codes for websites and/or apps will have their own sub-folders even if that's the only item in there, because I most probably get reference pictures, logo, assets and whatnot, that way I'm never lost with my file organization :)

Collapse
jeastham1993 profile image
James Eastham

I tend to have a folder for different bits (full time work, freelance, experimental), client name within that and then the relevant repos.

However, I'm pretty anal about deleting local copies I'm not working on currently.

'tidy desk(top) tidy mind' :-)

Collapse
javiermendonca profile image
Javier Mendonça

I have few workspaces.

  • ~/github: where I usually clone things from GitHub.
  • ~/AndroidStudioProjects: contains my android apps.
  • ~/FlutterProjects: contains my flutter apps.
  • ~/go: for programs written in golang.
  • ~/dev: contains whatever else that is not flutter nor android, i.e. scripts and such.

Perhaps a bit messy but I haven't had problems navigating this structure.

Curious to know about how others do since I feel this is not optimal.

Collapse
dpashutskii profile image
Dmitrii Pashutskii

I don't have much of a structure, but if be honest I only have 20-25 repos locally because I periodically clean them up and store everything at GitHub (Just make sure you have a good README to set it up in the future :). I only have local projects which I work with currently.

My structure of folder "Projects":
Freelance - legacy name, but right now it's all projects from work.
Learning - projects from online tutorials/courses
OpenSource - OS projects, in most cases it's clones from the forks
Pet - My pet projects.

Collapse
u8nc profile image
MiAn

Code: by project > by year of last edit > version >
Graphics: on separate volume > by project
Translations: in parallel with graphics, but not embedded with them
Other: ( research docs, spreadsheets etc ) by project, again on graphics volume

but what really gets complicated and messy for me is all the web links I collect. I've set browsing history to auto discard after 3 months, because I notice my browser does slow down in loading otherwise.

If there was a way to harmonise my web links with my storage I would even alter my storage schema. Maybe its as simple as taking an extra moment to paste them over to a text file in my Other pile, then I can only keep 2 dozen or so bookmarks.

Collapse
vlasales profile image
Vlastimil Pospichal

I have main directories:

  • Project
  • gitlab
  • prototype

for different purposes.