Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Developer's Directories Tree

by Ido (Hermit)
on Nov 23, 2002 at 11:47 UTC ( [id://215367]=perlmeditation: print w/replies, xml ) Need Help??

I'm really sorry if I'm going way too much off topic with this post. It's just that after breaking my jaws looking for keywords that will lead me through a Super Search or google to a discussion of the subject, I've decided to ask you fellow monks.
To make long story short, my problem is that I can't find a good way to manage the loads of code files that pile up in my hard drive everyday. Currently, I have a directory called "C:\Perl Scripts", which contains all my perl files. But I don't like it that way for two main reasons:
1. I do have code files in other languages. (And no, I'm not really proud of it;) And wouldn't like to have a directory in my root directory for every language.
2. I have a lot of files there and it becomes a real mess. Some files should be grouped together, and some are old and redundant codes I don't want to see (but do want to keep, somewhere, far from my eyes;).

So...Where and how do you monks keep your code files? How do you organize them?

Replies are listed 'Best First'.
Re: Developer's Directories Tree
by valdez (Monsignor) on Nov 23, 2002 at 14:23 UTC
Re: Developer's Directories Tree (CVS, ~/bin/lang/, one-liners)
by ybiC (Prior) on Nov 23, 2002 at 14:25 UTC

    caveat: not necessarily a direct answer

    If you're not already using it, CVS may be of some benefit in organizing your code, with The CVS (free online) Book being a good tutorial.   A Monastery search on 'cvs' also turns up a passel o'hits, hopefully some being relevant.
        cheers,
        Don
        striving toward Perl Adept
        (it's pronounced "why-bick")

    Update A: to more directly answer your question, I keep current executable versions of my own scripts/programs in a structure pretty much like what you expressed dissatisfaction with, and experience some of those same concerns.

    ~/bin/bash/ /java/ /perl/
    Fwiw, I try to give my scripts/programs descriptive names, to make it easier on my feeble recall.   Although this often runs counter to the principle of short-names-for-oft-used-tools.   *shrug*   In addition, I try to use one-liners when possible, rather than writing piles of throw-away snippets.   Seems to help a bit in avoiding clutter in ~/bin/perl/ directory.

    Update II: For what little programming I do on Win32, I've yet to need anything more complex than this:
    c:\perl   Perl install of course
    c:\perls   for my scripts/programs

    Like you, hoping to hear how other other monks do it...

Re: Developer's Directories Tree
by revdiablo (Prior) on Nov 24, 2002 at 00:12 UTC

    I like to keep each project in it's own directory. I have a big directory called ~/apps/dev/ with a bunch of project directories. I have a directory in there called scripts/ for my often used mess of perl and shell scripts. I also have an oldscripts/ directory which contains stuff from scripts/ I don't use any more.

    The tree looks something like so:

    ~/apps/dev/
               oldscripts/
               project1/
               project2/
               scripts/
    

    Hope this helps. :)

    PS: as ybiC mentioned, version control is always quite helpful. I have used CVS to manage my perl scripts for years, and it works quite well. Lately I've also been playing with Subversion, and it seems to work quite nicely too. One really nice thing about Subversion is versioned renames, which allows me to move my stuff from scripts/ into oldscripts/ easily.

    Update: another small point I forgot to mention is I don't execute scripts directly out of ~/apps/dev/scripts/. I make symlinks into ~/scripts/ (which is in my path). This way I can be a bit more picky, and only link to the scripts I actually use (this code tree is shared across multiple machines). This also helps me decide what to move into oldscripts/... if something isn't symlinked anywhere, it goes byebye. :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://215367]
Approved by ybiC
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-19 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found