[Tutor] Paths

Kirk Bailey highprimate@howlermonkey.net
Sun, 9 Dec 2001 17:49:11 -0500


I am a heretic.

There is a really popular standard for how to organize directory trees on a un*x computer, and it drives me 
bats. It is functionally structured. But I'm apparently dysfunctional, and give not a damn for this 
approach. 
I like my data safe, and organized on a conceptual association basis.

For instance, it is unwise to let the world run files located in the same dir as many system files. so 
instead 
of execiting web or email cgi scripts in /bin or /sbin with a link, I place them right in the cgi-bin, which 
is the ONLY place the world can run or access such stuff. I make sure the scripts are owned by a identity 
with 
restricted permissions.

The files for an application are placed in directories under the cgi-bin, and if more than one is needed, I 
try to keep them gogether on  one bag (parent direcory) under the cgi-bin.

Do let's assume a function FOOBAR uses 3 directories, FOOBAIT, FOODATA, FOORECORDS.

The tree would be:

/www/cgi-bin/+foobar
             +/foobar+
                     +/FOOBAIT
                     +/FOODATA
                     +/FOORECORDS

Which seems to make sense to me somehow, whereas the system some people want to declare the offical standard 
leaves me drooling on my keyboard as the brains turn into sludge.

Now, I am working on a simple list management program, and to make each part simpler and smaller, it will be 
modular. Each module will only entail a narrow scope of tasks. The part I posted now (which is not yet 
complete) is the one to handle incoming posts to existing lists, the posttime module. 

One way to organize information is to place every list in a directory called TinyLists. Each list has a flat 
text file of addresses alone, which has the name of that list. other files for that list should also wear 
that 
list's name, and a word to describe what the file is. So if there was a footer file, and the list was named 
Teddybearclub, the footer file would be called 'teddybearclub.footer'. Using name conventions such as this 
let 
me place all the list stuff in a single directory. 

Sorting them out to a group of directories would mean each directory had the name of the list, and all sich 
contained a pile of files which had identical names from dir to dir, the ontly thing which changes is the 
PATH. Although this makes the bath more complex, handling the file names is simpler. Just change the path 
ONCE, and the program referrs to the standard files in that location, no firther stuff required. I am 
wunderins what the advantages of each are, such as speed of access, potential for operator mindfuck, and 
other  
possibly not noticed as of yet issues. 

I invite discussion.




end

In total confusion,
                   Kirk D Bailey

|----------------------------------------------------|
|           Consulting  Agent  Provecateur           |
|    Webmaster, Howlermonkey Email services Co.      |
|   Please visit us at http://www.howlermonkey.net/  |
|----------------------------------------------------|