Image by fulopszokemariann
I recently came across a tweet by Kyle Shook that simply read What is your coding folder called? I didn't think much about it as I'd used the same folder structure for years. After reading some of the replies it occurred to me that I really should rethink how I store my code. This is the system I came up with.
Originally I used the same pre-made layout most everyone who uses Git does with one small twist, I had a trash folder;
- Source
- Repo
- Where all of my projects lived
- Trash
- Where my short term experiments lived
I really didn't think much of it since I used one or two projects at a time. When I saw some of the more elaborate layouts it got me thinking that maybe I should organize things in such a contextual way that I could quickly find whatever I needed without much thought.
I started out by making a root folder called Dev and a clear divide between personal and professional.
Personal was sub-divided into the more common project types I tend to work with:
- Challenges
- Things like AdventOfCode
- Exercises
- Mentor Assignements
- Tasks assigned to me by various mentors throughout the years
- Playground
- Where temporary things like proof of concepts live
- Projects
- Any active project I'm working on
- Inactive
- Projects I'm not working on
- Info Projects
- Copies of informational projects like Awesome lists, onboarding steps, workflow outlines, etc.
Professional was mostly modeled after Grant Harwood's layout:
Client, Deployment Target, Role.
professional/fooinc/site/fooinc-api, professional/fooinc/managers/fooinc-managers-fe
Though there is also a folder called Interview Code Assessments where I keep a copy of every take-home interview test I've ever done.
Lastly, there's a folder at the top directory called nuget-packages where I store local nuget packages while developing them. I find it easier to publish them all to one place so I don't have to keep track.
After I got the folders in place and everything moved over I set up a task to back up my Dev directory to an external hard drive that I leave plugged in.
I personally use FreeFileSync to manage my file backups but you could make a script and schedule it with whatever your operating system uses. Just remember to filter out node_modules. In my case, FreeFileSync can save a profile as a batch script and I use Task Scheduler to run it when I'm asleep, well when I should be asleep anyway.
Just in case you want to copy and paste the folder names here they are all together:
- personal
- challenges
- exercises
- mentor-assignements
- playground
- projects
- inactive
- info-projects
- professional
- interview-code-assesments
- client
- deployment-target
- role
- nuget-packages
I hope this helps you the way it's been helping me recently.
How do you organize your code folder? Leave a comment below and let me know!
Top comments (0)