Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I don't know how to exactly search for this topic, so if there are a lot of answers to that, please just provide a link :)

I'm getting a new laptop in a few weeks and am thinking about setting up a logical, easy-to-use and clean folder structure for coding from the beginning.(mixing everything coding related now)
My question is: Does your folder structure look like:
C:\grails
C:\Java\jre-...
C:\JAVA\jdk-...
C:\eclipse
... etc

or do you always use the default directory?
or do you sort them, like: C:\ide\, C:\framewor and C:\CMS\
Do you put the frameworks and ide on a separate partition?

Do you map your projects accordingly? How do you name your projects and how is the saving file structure?

Is there a really good way that I've missed? I mean I just have a handful of projects to take care of and I mostly just do some light coding or minor changes, and still I'm confused every time I try to find anything or am often surprised to find several older versions still active...

A few information:

  • Dual boot to a second partition is out of the question, I do like convenience (#1 reason for me to try programming: make things easier for me.)
  • I'll be getting a SSD, so the space is limited.
  • Running Windows 7 Prof- 64bit
  • I'll need: Eclipse, NetBeans, Grails, Groovy, VisualStudio, Ruby, Perl.

Hopefully anyone has a good idea about that. It really annoys me and since I do have the opportunity to change that it's a good time to think about it.

share|improve this question
    
Why not just roll stuff in where the installation programs put them? –  user1249 Mar 26 '11 at 9:45
add comment

3 Answers

up vote 2 down vote accepted

IDE's are typically software you install, while frameworks and projects are more 'satndalone' ie you can move them to another location and everything should still work. For that reason alone, it is better if you use two partitions so you can reinstall or upgrade your OS without having to bother about first having to backup code. For software I tend to use the default directories. Unless it's portable, then I also put it on on a seperate partition. So in your case that would be

c:/eclipse
c:/java
c:/temp
...

d:/projects
d:/frameworks
d:/programs
d:/documents

Notice I added c:/temp an d:/documents, this is where things are getting interesting: I always do out of source builds (put all intermediate and output files on C:/temp), and also store the typcial 'My Documents' on D:. As a result, everything on D: only changes if code or documents are changed or if a certain tool or framework is added. And, it does not epend on the OS.

This makes it pretty easy to setup a backup, or even put D: in a VCS entirely. It's also extensible: suppose I decide putting everything on a network share (I currently do this at work), I just move everything from D: to Z: or whatever and have access to everything I need from multiple computers running different platforms. I could even decide to switch from Windows to linux now, wipe C: entirely and all I'd have to do is install linux on the first partition, install some software and make some symlinks to the other partition.

share|improve this answer
1  
+1 for "it is better if you use two partitions". I always use my D: partition (formatted as NTFS) as my 'docs' partition. In windows, you can re-map your "My Documents" folder by right clicking on it and changing the target. In Linux, I auto-mount it using fstab and symlink the folders on it into my 'home' folder. I don't move my whole 'home' folder to the partition because it would include all of the hidden user config folders/files too. Plus, file permissions on a NTFS drive can cause complications in *nix. –  Evan Plaice Mar 26 '11 at 9:41
    
(cont) I also place my Dropbox folder on that partition with projects that I consider public (like open source) so I don't have to have to keep two different copies of my dropbox files synced (one for each OS). This setup makes managing files a lot easier, especially if your system crashes. –  Evan Plaice Mar 26 '11 at 9:44
    
@Evan you're right, everything you say could basically be added to my answer, it's the same philosophy anyway. –  stijn Mar 26 '11 at 9:47
    
hey, thx a lot for that answer. I did forgot to mention the backup part - that's really important and I do it with my normal documents already. Building on your answer I think I will name my dir C:/Xeclipse, C:/Xjava, C:/Xtemp... so there kinda in one place... don't like how cluttered it has now become. [was too fast at sending and too slow at editing my last comment] –  PingLu Mar 27 '11 at 2:34
add comment

I exist on my portable hard drive, so I have all of my programming related projects in /programming. I also have tools and IDE's (ones that can be portable), in this folder. This makes things really nice and neat.

For a laptop you could use this, /programming/projects and /programming/tools, or another similar system.

share|improve this answer
add comment

I used to do put everything in c:\projects. Then change the docroot of Apache to c:\projects. Netbeans/eclipse even VS can use the path in c:\projects. Create a IIS virtual directory at c:\projects too, so the VS can run your web files.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.