DEV Community

Cover image for What do you call your folder where you keep your code?
Nočnica Fee for Heroku

Posted on

What do you call your folder where you keep your code?

On each new PC I make a folder named after some version of the afterlife: 'xibalba,' 'elysium,' 'outerdark.' And that's where I keep all my code. I assume everyone does this? And I'm curious where you keep your code on your own PC.

Discussion (57)

Collapse
c_v_ya profile image
Constantine

That's interesting 😄

Mine is simple ~/projects for all my.. well, projects. And inside are dirs by technology for personal stuff, e.g. python/, react/, etc. And %company_name%/ for full-time job projects.

Collapse
peacefullatom profile image
Yuriy Markov

Mine is ~/repo 😁
As a second level I'm using a customer name.
Finally, a project name.
Something like this pattern:
~/repo/customer/project

Collapse
nirlanka profile image
Nir Lanka ニル

~/Dev
It matches other folder names in ~.

Collapse
thecodepixi profile image
Emily A. Pixi

I'm boring/lazy. Mines literally just "Code" and it's a top level directory so I can just cd code and find what I need haha

Collapse
chakrihacker profile image
Subramanya Chakravarthy

Me too

Collapse
din0s profile image
dinos

Same here!

Collapse
nocnica profile image
Nočnica Fee Author

This makes more sense than the people calling it “github”

Collapse
thecodepixi profile image
Emily A. Pixi

Is that a thing people do!?

Thread Thread
nocnica profile image
Nočnica Fee Author

on here and on Twitter it is, I think, the most common answer

Collapse
cmanique profile image
Carlos Manique Silva • Edited

I use variants of ~/_git/repo_domain/repo_group/repo_name depending on the hosting.
Allows me to quickly browse stuff that is either local, github, gitlab, etc...

Anything related to software tools I keep in ~/work/tools, organised in concept, vendor, tool, version (ie: ide/jetbrains/intellij/20201).

Project related stuff like documents, assets I keep in variants of ~/work/projects/customer_name/initiative/project

Many people place code together with projects, but having separate folders is useful to avoid long paths, and I get a clear ideia of what's transient and versioned or not.

Collapse
ashkanmohammadi profile image
Amohammadi2

Nice 👍

Collapse
ekafyi profile image
Eka

I'm a bit obsessive-compulsive when it comes to organizing my files (either it has be consistent OR I'd leave it completely messy). After trying complex structures, now under the default Mac OS Documents, I just have:

  • _Work --> has subdirectories for Day Job and each paid side project
  • Foo --> all non-paid/personal coding projects go here
  • Bar
  • Baz

Last two directories will be for non-code personal projects but currently they are empty. I recently changed laptop (~3 months ago); my old projects are in my external HDD.

Collapse
itsasine profile image
ItsASine (Kayla)

Echoing love for ~/dev. It's short enough that it's easy to get to my files, though I am liking some of the organizing in this thread. ~/dev is a mix of Github, GitLab, and local on my Mac which is a tad unwieldy, especially when most of those haven't been touched in ages. My current Chromebook's ~/dev at least is pretty clean since it's new.

Collapse
alaindet profile image
Alain D'Ettorre
.
|---dev
    |---projects
        |---my-cool-website
        |---a-fun-side-project
        |---my-company-stuff
    |---learn
        |---react
        |---angular
        |---whatever-youre-learning
Enter fullscreen mode Exit fullscreen mode
Collapse
jakesweb profile image
Jacob Colborn

I keep all my projects in ~/code/, breaking down each project into its own directory. I don't have my first customer yet, but when I do I'll have a directory in the code directory called customers and store that data in each customers own directory.

I save creative names for my hostnames. Each host in my network is named after a Norse god.

Collapse
nikoheikkila profile image
Niko Heikkilä

Mine follows this pattern:

~/src/<gitserver>/<owner>/<repository>

Example:

~/src/github.com/nikoheikkila/cv

Mostly I use z to jump to correct directory by repo name which is neatly supported by this.

Collapse
zoedreams profile image
☮️✝️☪️🕉☸️✡️☯️ • Edited
~/.code

. prefix hides the directory and i set my perms to 'drwx------'. Then I change the user and group to myself and admin. Then i move all of the code to an external and sym link it. I also run a simple node watchdog script that starts in my init.d that notifies me if anyone access the dir or runs an 'ls' etc..

im a paranoid fuCX0r. i no.

Collapse
phortx profile image
Benjamin Klein

workspaces

Then I have a workspace for the projects of my job (i22), one for hobby projects (personal), one for experiments (lab) and one when cloning foreign open source projects (external).

Collapse
rohitshetty profile image
Rohit Shetty

I have a ~/dev where all my projects reside.
Inside I've subfolders for work and personal projects. Work is further divided into client-name folders.

The client-name folder is the home for that particular client and all their projects reside here.

I've resources and notes inside each client-name. resources contains well, any resources (AWS/Azure stuff, any documentation, or any resources) and notes contains timestamped txt file with my thoughts working on the project at the moment. It helps me visit back and see my thoughts few days down the feature/task. I use VSCode project manager so switching between projects/ clients is easy too.

Collapse
jsn1nj4 profile image
JSn1nj4‍‍👨‍💻

On my work laptop, it's on a secondary storage drive. So it's like this:

Z:\projects\<project-name>

Of course I'm on Windows and need them accessible via stuff like FileZilla and Explorer, otherwise I'd probably have them all in WSL directly. 🤷‍♂️

Collapse
leonlafa profile image
Leon Lafayette

Be prepared to be underwhelmed.

I name my folder... dev/ 😀

Collapse
nejos97 profile image
Nenba Jonathan

i use this pattern
~/workspace/<project>/src

Collapse
sergix profile image
Peyton McGinnis

~/dev/<language>/<project> for local projects,

~/dev/git/<project> for projects on GitHub

Collapse
christianguevara profile image
Christian Guevara • Edited

I call it Developer, so I get a nice icon :) Developer folder

The internal structure is:

~/Developer/%company%/%project%/

If the project is not part of a company or just for fun, it goes directly to ~/Developer root.

Collapse
ashkanmohammadi profile image
Amohammadi2

I use this pattern ~/src/{project_name}/...

I can quickly jump into my terminal and type "$ code ~/src/proj + tab" and start coding.

Collapse
jwesorick profile image
Jake Wesorick

~/src/

Collapse
henryjw profile image
Henry Williams • Edited

Mine is ~/projects. Gotta keep it simple.

Collapse
kyleboe profile image
Kyle Boe

I use this pattern:

~/<version control host>/<repo name>

This looks like:

~/github/railsdock

Collapse
qainsights profile image
NaveenKumar Namachivayam ⚡

Just gits :)

Collapse
oseifrimpong profile image
Obed Osei Frimpong

~/development

Collapse
jacoby profile image
Dave Jacoby

In general, ~/dev, because I'm not generally inclined to use my originality on directory names.

Collapse
modsognir profile image
Jared Fraser • Edited

~/dev for open source stuff i'm contributing to. ~/mod for personal projects (based on my username). When i'm working for a company i'll make a 3 letter folder for them too (~/mas, ~/amc etc)

Collapse
fhsinchy profile image
Farhan Hasin Chowdhury

~/repos/<language or framework>/project

Collapse
gabedunn profile image
Gabe Dunn

For most projects I stick with the default ~/WebstormProjects, but if it's not created by WebStorm and I don't plan on using WebStorm for the project it goes into ~/code.

Collapse
thiht profile image
Thibaut Rousseau • Edited

I use ~/workspace.
And I usually declare a ws alias which simply does cd ~/workspace.

Collapse
djviolin profile image
István Lantos

.\www

Collapse
botanical profile image
Jennifer Tran

I call mine Code 👀 I like to keep it simple

Collapse
cescquintero profile image
Francisco Quintero 🇨🇴

I've always gone with ~/projects/

Collapse
slackerzz profile image
Lorenzo

Just ~/code

Collapse
ashleyjsheridan profile image
Ashley Sheridan

It depends, if they're CLI apps then they go in ~/bin, if they're websites then whatever the default www root is (/var/www/html on Fedora).

Collapse
jpetrzilka profile image
jpetrzilka

c:\src

Collapse
wolf00 profile image
Rahul lad

Mine is ~/codes for work projects and ~/exp for personal experiments

Collapse
samelawrence profile image
Sam E. Lawrence

~/src/

Collapse
dhelbegor profile image
Adailton do nascimento

I use workspace/ and inside it projects/ works/ and limbo/

Collapse
sukhejavarun profile image
Varun Sukheja

Mine is just /dev

Collapse
mrjjwright profile image
John Wright

Code

Collapse
frankoprifti profile image
Franko • Edited

{type}/projectname
type={React,ReactNative,Flutter,NodeJS,Electron etc}

Collapse
memahesh profile image
Medam Mahesh

I do not do anything fancy.
I separated them into two directories Freelance, Git. I name the folders inside them self-explanatory.

Collapse
kartikpuri95 profile image
kartik puri

Mine is
~/workspace/tutorials/{tutorial name}
~/workspace/project/{python or javascript or vuejs}
~/workspace/freelance/{client-name}
~/workspace/tutorials/graphics/{asset name}

Collapse
abimaelmartell profile image
Abimael Martell

Mine is ~/Code, and i usually organize projects by company.

Collapse
mattxo profile image
Matt Searles

/src/{client}/{project}

Simple but effective

Collapse
munch141 profile image
Ricardo Münch

_projects/ ✨

Collapse
stevcooo profile image
Stevan Kostoski

Mine is just C:\Source, on every PC I'm using.

Collapse
premjeet profile image
PremJeet

Git_repo and then obviously there are sub directories d3,p5 etc 👨‍💻

Collapse
gwutama profile image
Galuh Utama

~/Workspace

Collapse
fr33k3r profile image
George Tzavaras

I call mine BS... :)