views:

248

answers:

9

Over the years I have vacillated between having my project/source folders in a directory one level removed from the root (e.g. D:\Projects) and keeping them in the default location for Visual Studio.

In the past, I resisted storing anything in the various "My Documents" folders established by Win 95, Win 98, and XP. I finally switched to storing them in the Documents folder since Vista shortened the path and I got tired of changing default directories for my dev tools. However, now I find myself leaning toward creating a folder off root again since I am setting up a new machine.

I get tired of the long paths you have to navigate to when stuff is stored in the documents folders. Also, I don't backup source code and database files like I do with my other documents since I use a VCS for source code. However, it seems you are always fighting to maintain a "non-standard" source location since every dev tool generally wants to store stuff in a subfolder of documents.

I would like to hear other's opinions on this subject.

+2  A: 

In clear violation of my Unix past I use c:\dev (for development) or whatever other drive I use for development. Note: It is advisable NOT to use the system partition for development as software development really fragments the disk.

I never had any reason to use another directory - except for some projects where "company standards" forced everybody to have the development directory on the root of the C: drive. (really! They had hardcoded paths to c:\whatever)

During development I sometimes check out multiple versions of the source to different directoies - if only to find out that the version committed into the version control system of the day really has every file checked in. (Sometimes I add a file to the development directory but forget to check it in.)

So I think it is rather irrelevant where your development directory is, as long as the path is typable for you (I prefer short paths) and does not contain white space for the usual reasons on windows (if you want to do some scripting).

froh42
Set up a nightly defrag schedule ;)
David Anderson
@"and does not contain white space for the usual reasons on windows" : Like what? Having to type the quotes at the beginning and at the end? And if so what does this have to do with Windows? In UNIX-style OSs isnt't the same? (having to use the quotes to qualify a file path that has space(s) in it)
Andrei Rinea
On Unix the shell evaluates the arguments of a program file, so handling of file names is very uniform. On windows many old command line programs do very strange parsing of command lines themselves, so it's not always obvious how to quote correctly, especially in a scripting scenario when you might need several levels of quoting.So avoiding white space saves me some headaches. (As does using Powershell instead of .cmd and .bat scripting ... when you pass objects there are no whitespace issues as well ...)Andrea, this wasn't meant as Windows bashing, just I had some problems with WS earlier
froh42
+1  A: 

I think it depends on your use... I prefer to have my development projects on a separate drive/partition, so will usually use the following convention D:\projects\{company-name}\({client-name}|internal)\{project-name} Where the client-name comes into play is when the work is by a given company, but for another. I keep my projects under D:\projects\personal\... This allows for a better structure.

As to backup strategies, imho this is what source control is for. I prefer subversion, and have a backup strategy for the svn server. Although I didn't much care for ankh 1.x, the 2.x version, along with TortoiseSVN have worked pretty well for me. As a matter of practice, I tend to checkin often, and try to only checkin code in a runnable state (though new features/code may not work).

Tracker1
+1  A: 

I haven’t tried it myself, but I guess you can put your projects in My Documents and use a symbolic link to the directory in your root folder. By doing that you can access your files both ways and solve problems like changing directory for tools. Info about symbolic links in Vista

If you’re the only one using your computer I don’t really see why you should put your code in the profile directory, backup should be done using a version control system anyway.

JMD
+2  A: 

I preferred location at another partition. Because projects have many and many small files and if you use SVN or other revision control system this files have very high fragmentation and slowing system if are storing at OS partition.

MicTech
A: 

I store "active" projects on a secondary drive, one level from the root. It's much more easy to get quickly to that folder (even if VS2008 has this nice "Open Folder in windows explorer" now). It's also convenient for backups, format/reinstall, etc. The "less active" projects are stored on a NAS for quick reference. All are also stored on a remote SVN server that is backuped. (I'd also recommend not using # in folder for web application as it (sometimes) create strange errors from the development web server)

Bishop
A: 

I use SUBST (run on startup) to map some random folder to a high-lettered drive. Then I can put my stuff anywhere, and move it around, and yet I always get to refer to it by Y: or Q: or whatever.

This is one of those extra layers of indirection that are said to solve every problem.

brone
A: 

For personal projects I just put them on the desktop (although I do move the desktop to D:\Desktop). They are archived off to my documents when they become inactive.

For work I have all the projects in a C:\Sourcecode folder inside a dedicated development virtual machine.

Paul
A: 

Just one question, do your primarily develop desktop apps or web apps?

If you are constantly writing web apps, here's what works for me:

  1. Create a folder: c:\dev or c:\sites (keep it simple)
  2. Register the folder as a virtual directory in IIS
  3. Create a different folder for each of your projects and create a web application in IIS for each of them

One advantage this setup might have is that, its easier for you to navigate your site in the browser, i.e less typing, easier to remember, standardization for all your other apps.

my 2cents.

Ghazaly
A: 

it is better to keep your project in the other partition else than window and i think as i do d:\projects\"some grouping of project own your own choice"\projectname

e.g. d:\projects\UNIversty\admission d:\projects\universry\examination d:\projects\planners\ipp

Muhammad Haseeb Asif