Search code examples
code-organization

Good File Organization Suggestions for Developer


I am struggling a little with folder organization to organize the many projects that I work on. I work on OS X - right now I am using ~/Development/ as the root folder, and I have many types of projects. For example, I have my iPhone apps under ~/Development/Xcode

I develop in many languages, from PHP, to Ruby, to Python, to Objective-C. So, for example, I might have a couple of open-source apps based on PHP where I am using the Zend framework. Some of these projects are for clients, others are tests/experiments when learning a new language or general experimenting.

I am really interested in how other developers have organized code/projects and could pass along some advice to make it very easy to navigate through code/projects related to many languages and types of projects.


Solution

  • I'm in a similar boat, and I have two folders in my home directory: Projects and Reference. I don't make any distinctions on the project's language. Code I'm working on goes in Projects and projects whose source I want to read go in Reference. This is useful because typing ~/PrTab and ~/RTab is quick on the command line and I empty my Downloads directory often.

    I usually have aliases set up for working with projects on the command line. For example, my gerbils project has a Python virtual environment, so my g alias gets me going quickly from a new shell:

    function g () {
        export PIP_RESPECT_VIRTUALENV=true
        cd ~/Projects/gerbils
        . ../bin/activate
    }