News for hackers. Stuff that matters.
Re:Ask HN: Your project/folder structure for /home/*username* by edanm on Friday September 17, 2010 @11:28AM (#1701469)
Firstly, everything I'm talking about sits in my Dropbox folder, so for all intents and purposes Dropbox is my root. I highly recommend doing this - it makes backups automatic, and you don't have to worry about the backup problem ever again.

Inside Dropbox, I have several folders relating to various things (Pictures, Music, Documents, etc.) The most interesting are:

Resources - A folder where I keep all my resources. This basically means my KeePass database, various fonts and web templates I've bought or collected over the years, my .emacs and vimrc files, and various other software resources.

Software - Here I keep all my portable software, the stuff I have to have on me to use a computer without pulling my hair out in frustration.

Projects - All my software projects (I have a separate "Graphical Projects" folder for graphical stuff, etc.).

Inside Projects, I have several folders by project name. These are arranged like so:

ProjectName/ <- Root, holds any subfolder with anything related to the project.

ProjectName/db <- Hold the sqlite database, which I usually use on my personal computer (most projects are Python/Django).

ProjectName/site_media <- Holds my static and dynamic media for Django projects. Static Media holds symlinks to the actual project folders.

ProjectName/repos <- Holds all the repos.

ProjectName/repos/main <- The main source code repo. Mercurial is used for SCM.

ProjectName/repos/design <- All my design-related documents.

ProjectName/repos/* <- Any other copies of my main for fixing small bugs and trying new things. I use Mercurial, so this is a standard practice.

And this is how the actual project folder looks:

ProjectName/repos/main/* <- All the files related to environment, for example, my Sublime Text project file, .bat files to automatically start the Django server, .hgtags and .hgignore, etc. Basically, things that are "meta" to the project, and not actual source code. Makes for good separation.

ProjectName/repos/main/.hg <- Mercurial folder

ProjectName/repos/main/project_name <- The actual source code

Hope that helps.

Re:Ask HN: Your project/folder structure for /home/*username* by theBobMcCormick on Friday September 17, 2010 @02:03PM (#1702133)
You're putting a lot of faith in Dropbox not to ever corrupt any of your file.
Re:Ask HN: Your project/folder structure for /home/*username* by edanm on Friday September 17, 2010 @02:18PM (#1702179)
So far, Dropbox has never corrupted anything. I don't think I've ever heard of it corrupting someone's files, either.

Plus, factor in the fact that Dropbox keeps backups of all your files, so in the worst case, I'm guessing they can restore anything that breaks.

Put that against the fact that not using Dropbox means I'm trusting my hard disk not to die on me, and I think Dropbox comes out ahead by far.

Do you know of any reason I should be more worried?

Re:Ask HN: Your project/folder structure for /home/*username* by theBobMcCormick on Monday September 20, 2010 @01:39PM (#1709731)
Depends on the criticality of the data you're hosting. For casual data I think that's fine. For stuff you absolutely need to be sure never gets lost or destroyed, I think you really need a backup routine that incorporates separate physical media.
Re:Ask HN: Your project/folder structure for /home/*username* by appl3star on Tuesday September 21, 2010 @12:56PM (#1713266)
Even worse: Your files readable to support staff from Dropbox. Do you trust them that much? I would recommend encrypted backups.
Re:Ask HN: Your project/folder structure for /home/*username* by fragmede on Friday September 17, 2010 @08:40PM (#1703340)
What's the reasoning for putting the version control of a project in a separate folder?

Using your names and RCS, I'd have

  ~/Projects/ProjectName/.hg
(with subfolders for design/ docs/ scripts/ etc - which are also saved in version control)
Re:Ask HN: Your project/folder structure for /home/*username* by edanm on Saturday September 18, 2010 @03:04AM (#1703843)
I don't want everything sitting in the same repository. This might just be paranoia, but since I'm using a DVCS (Mercurial), I don't want everyone who downloads the project to have to download the source code + design documents + anything else. The design, especially, is mostly made up of binary files, which don't play too well with source control since they're not diffable.

Also, I really only have 2 subfolders - a design folder which is kept under SVN (so that I don't worry about the really large files), and a main folder kept under Mercurial. All other folders are just clones of the main folder for when I want to mess around with different ideas, and these have to be different repos anyway.

Is that clearer?

Re:Ask HN: Your project/folder structure for /home/*username* by kroger on Friday September 17, 2010 @12:25PM (#1701693)
Just curious, what type of account you have on Dropbox?
Re:Ask HN: Your project/folder structure for /home/*username* by edanm on Friday September 17, 2010 @12:39PM (#1701759)
50Gb. 25Gb is enough for all the things I really care about, and 15Gb of that is my music collection!

I recommend Dropbox every chance I get, since I really think it's an amazing service. You pay 10$ a month for never having to worry about the backup problem every again (not to mention the fact that my laptop and other desktop are always synced). Well worth the money, IMO.

Re:Ask HN: Your project/folder structure for /home/*username* by mitchellhislop on Friday September 17, 2010 @12:38PM (#1701751)
I do the same thing as the parent does. I have the 50gb account on db, have a bunch of code/docs/other things, and use like 15%.

highly recommend using dropbox as your root.