From: Bill Guindon Date: 2007-05-14T00:37:38+09:00 Subject: Re: Absolute Beginner - Where to run program? On 5/13/07, John Joyce wrote: > > On May 13, 2007, at 7:35 AM, mully wrote: > > > On May 12, 5:20 pm, MichaelCucul...@gmail.com wrote: > > > >> when creating these ruby files, is there a specific place that you > >> should put them and/pr run them from? in other words, when i create > >> this sample ruby program, should i just put it in the C:/ruby folder? > >> or is it better "form" to create a folder for them, etc.? just > >> wondering... > >> in any case, thanks! :) > > > > It's not only a Ruby issue, but organizing files is an interesting > issue. There are many approaches. Notice how files are organized in > the operating system. Windows and various *nix's organize things in > various ways. Web sites as well tend to have a few different ways > that files are commonly organized. > So you may want to create a directory (folder) that holds all or most > of the stuff you create for one language (such as RubyStuff). > Then another for each grouping. So if you start working through > exercises in a book on Ruby, create a directory just for that book's > exercises. Directory tree structure is as important as anything else > in planning a program. Rails for example has its own directory tree > structure. It is a pretty well thought out one too. There are a few > directories in Rails that are legacy things from older versions, but > most of it makes a lot of sense once you start to get familiar with > it. The environment (the OS and the way it is structured and the way > it works) is as much a part of your programs as anything else! > Just something to think about. It becomes more clear as you go along. > Different kinds of projects demand different sensibilities in > organization. I completely agree with John. Over time, you'll probably end up with not only a Ruby directory, but subdirectories below it. Of course, you don't have to do that immediately, but you might want to. Personally, I like to have at least one 'junk' directory, a place where I drop small experiments that may one day become something useful, or that I can turn back to when I get hit with the same question months later. In the past, I've called it 'sandbox', or 'playground', my current one is called 'anarchy' - it's where 'anything goes' ;-) Some ideas: ruby\learning # 'primitive' stuff that beginners write. ruby\sandbox # useful examples, or test scripts. ruby\apps\someapp # when you actually have working apps ruby\quiz # if you do the quizes, you should group them, with a dir for each. -- Bill Guindon (aka aGorilla) The best answer to most questions is "it depends".