[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby Newbie Advice.

Samantha

2/6/2007 1:10:00 AM

Hello all.

I've decided after about a week or so of being on the list to come out
of hiding and ask a couple of questions. My email addy of
rubygeekgirl is not a reality, but more of an aspiration. :)

Real quick background on my knowledge and skill level -- I played
around with BASIC on my Commodore VIC 20 at the age of 8 (which was 22
years ago). A couple of years ago I started to try and learn Python.
Fast-forward to Fall of 2006, I decided to try and pick it up again.
In addition, I also decided to go back to college and my first class
this last semester was Programming Logic and Design. The course was
pretty much about logic (imagine that) and we covered loops and mostly
procedural programming, print charts, arrays, and that's pretty much
it. Anyway, as I started to look at Python again, I happened to
discover Ruby. I spent about a month deciding on whether I wanted to
learn Ruby or Python, and as I looked at what was available, I felt
more at ease in Ruby. I read a few tutorials, went out and bought the
PickAxe about four months ago, and did my best to get through it. I
think a lot of it is a bit over my head. I also looked at the Pine
online book and the Why's Poignant guide, in addition to the Little
Book of Ruby and a couple of other resources.

Okay, enough of THAT. I'm now at the point where I feel like I'm
reading the same thing over and over and over again. I'm not the most
patient person and I want to start coding something. I've already
made some small interactive 'kiddie' command line programs and the
such, but I'm getting bored. I just don't know where or what or HOW
to start.

I'm starting to look at code snippets over at Ruby Forge... I also
just got laid off a few weeks ago, so money is tight, otherwise, I'd
go out and buy The Ruby Way, which I perused at Barnes and Noble last
week and fell in love with.

So, I ask you, the gurus... Where do I start? This feels like a
writer's block and I'm sick of reading. I want to start *doing*

I have the IDEs installed, I have Ruby installed on my Gentoo Linux
box...

I'm sick of writing things asking for the user's name and if they want
to try a chocolate chip cookie. :)

Thanks so much in advance. I apologize for my verbosity.

Samantha

http://www.bab...


25 Answers

Tim Hunter

2/6/2007 1:21:00 AM

0

Samantha wrote:
> Hello all.
>
> I've decided after about a week or so of being on the list to come out
> of hiding and ask a couple of questions. My email addy of
> rubygeekgirl is not a reality, but more of an aspiration. :)
>
> Real quick background on my knowledge and skill level -- I played
> around with BASIC on my Commodore VIC 20 at the age of 8 (which was 22
> years ago). A couple of years ago I started to try and learn Python.
> Fast-forward to Fall of 2006, I decided to try and pick it up again.
> In addition, I also decided to go back to college and my first class
> this last semester was Programming Logic and Design. The course was
> pretty much about logic (imagine that) and we covered loops and mostly
> procedural programming, print charts, arrays, and that's pretty much
> it. Anyway, as I started to look at Python again, I happened to
> discover Ruby. I spent about a month deciding on whether I wanted to
> learn Ruby or Python, and as I looked at what was available, I felt
> more at ease in Ruby. I read a few tutorials, went out and bought the
> PickAxe about four months ago, and did my best to get through it. I
> think a lot of it is a bit over my head. I also looked at the Pine
> online book and the Why's Poignant guide, in addition to the Little
> Book of Ruby and a couple of other resources.
>
> Okay, enough of THAT. I'm now at the point where I feel like I'm
> reading the same thing over and over and over again. I'm not the most
> patient person and I want to start coding something. I've already
> made some small interactive 'kiddie' command line programs and the
> such, but I'm getting bored. I just don't know where or what or HOW
> to start.
>
> I'm starting to look at code snippets over at Ruby Forge... I also
> just got laid off a few weeks ago, so money is tight, otherwise, I'd
> go out and buy The Ruby Way, which I perused at Barnes and Noble last
> week and fell in love with.
>
> So, I ask you, the gurus... Where do I start? This feels like a
> writer's block and I'm sick of reading. I want to start *doing*
>
> I have the IDEs installed, I have Ruby installed on my Gentoo Linux
> box...
>
> I'm sick of writing things asking for the user's name and if they want
> to try a chocolate chip cookie. :)
>
> Thanks so much in advance. I apologize for my verbosity.
>
> Samantha
>
> http://www.bab...
>
>
>
Welcome to Ruby!

If you like solving puzzles, why don't you try some of the quizzes at
http://www.rub... There are easy quizzes and hard ones, and
probably at least one that's at a level you'll feel comfortable with.

However, I learn best when I pick my own problem to solve. If you're
like me, think of some problem you have that can be solved by a Ruby
script. Some bit of system administration that you need done, for
example. Then start coding. It doesn't matter if you can't figure out
how to do it at first. Attack the bits you can do, then work on the
rest a piece at a time. Search this list for advice, read The Ruby Way
and The Ruby Cookbook, and post questions here.

Good luck!

Philip Hallstrom

2/6/2007 1:27:00 AM

0

Samantha

2/6/2007 1:34:00 AM

0

On Feb 5, 8:20 pm, Timothy Hunter <TimHun...@nc.rr.com> wrote:

> Welcome to Ruby!

Thanks, I like it.

> If you like solving puzzles, why don't you try some of the quizzes athttp://www.rubyquiz... are easy quizzes and hard ones, and
> probably at least one that's at a level you'll feel comfortable with.

I'm over there now checking things out.

> However, I learn best when I pick my own problem to solve. If you're
> like me, think of some problem you have that can be solved by a Ruby
> script. Some bit of system administration that you need done, for
> example. Then start coding. It doesn't matter if you can't figure out
> how to do it at first. Attack the bits you can do, then work on the
> rest a piece at a time. Search this list for advice, read The Ruby Way
> and The Ruby Cookbook, and post questions here.

The unfortunate thing, is that I really don't have any system
administration things to do. :) Most of the stuff I would want to
do, (ie get a directory listing and put it to a file so I know what
documents I have where, etc.) I can do with Linux commands. But, I
suppose it couldn't hurt to rewrite the wheel for learning purposes.

> Good luck!

Thanks again!

Samantha

http://www.bab...


Samantha

2/6/2007 1:37:00 AM

0



On Feb 5, 8:27 pm, Philip Hallstrom <r...@philip.pjkh.com> wrote:

> Well, I've never been able to learn anything unless I had a reason to
> learn it... I think you just hit that point.
>
> You've got to find something that interests you... based on your situation
> I would suggest a "resume builder".
>
> Define your resume in YAML. That is, put all your past jobs, your
> experience, anything that is "repeatable" into a YAML file. Then write a
> script to parse those YAML files and spit out nicelly formatted ascii
> text, HTML, and PDF files.

I think you just hit the proverbial nail on the head. I've not looked
at YAML, so now I get to learn a few things and not just obsessively
focus on the fact that I don't know what to write. ;)

> You'll learn a lot and it will be useful.
>
> Then when you're done with that, move it to the web and create your first
> Rails project to do the same thing.

I've actually been wanting to take a look at Rails. My mom does SEO
and has been trying to get me to learn PHP, but I want to learn Ruby
and RoR, not PHP. Sometimes things just spark your interest, and PHP
didn't really spark mine.

> I did that several years ago when I wanted to learn the Smarty template
> language for PHP and it worked great. My project was small enough that I
> understood it, but big enough to let me play around with somethings I
> normally didn't get to play with.
>

That's awesome. I really appreciate the input and my first project!


> But I like chocolate chip cookies! :)

Me, too. Especially when they are made with dark chocolate chips.


>
> Good luck!

Thanks, I'll keep ya'll posted!

Samantha

http://www.bab...


James Gray

2/6/2007 2:12:00 AM

0

On Feb 5, 2007, at 7:10 PM, Samantha wrote:

> I've decided after about a week or so of being on the list to come out
> of hiding and ask a couple of questions. My email addy of
> rubygeekgirl is not a reality, but more of an aspiration. :)

I bet you will be teaching us new Ruby tricks in no time. Welcome to
the club! ;)

James Edward Gray II



Jeremy McAnally

2/6/2007 3:07:00 AM

0

I'll give you four extra credit points if you can make you resume
builder spit out a PDF using PDF::Writer or use LaTeX. ;)

--Jeremy

On 2/5/07, Samantha <rubygeekgirl@gmail.com> wrote:
> On 2/5/07, Jeff Barczewski <jeff.barczewski@gmail.com> wrote:
> >
> >
> > Samantha,
> >
> > Welcome to Ruby!! You'll find one of the finest developer communities I've
> > even known. So when you get stuck, feel free to drop an email on the wire,
> > there seems to always be someone out there to help.
>
>
> Thanks so much, Jeff! That's exactly what I've gathered thus far.
>
> Gentoo Linux, that's a beautiful way to go!! Makes installing and upgrading
> > really wonderful! Good choice!
>
>
> Ya know, I started on Linux back in '99. I mostly played around with RedHat
> and ran a dual-boot system. I eventually went to straight Windows, and went
> back to having a dual boot in '05. I went to Mandrake, then to Fedora, and
> about six months ago decided to take the plunge into Gentoo. I must've had
> about six fresh installs in the first few weeks of using it, but I haven't
> had to do that in several months now. :) I have found that I've learned
> more in the six months of using Gentoo than I had in the several years of
> RedHat. I've even gotten brave enough to use ~x86 sources. :)
>
>
> Think of a project you would like to do and then see how you can tackle it
> > with Ruby. If you are wanting to build web applications then you have many
> > choices in Ruby, the most popular being Rails. For me Ruby and Rails
> > brings
> > all of the fun back into web application development after having done
> > things the hard way for so long (C++, Java, ...) :-)
>
>
> I'm researching stuff on YAML, as was suggested in a previous post and am
> going to work on the resume builder. At some point, I'm going to try and
> make an interactive one on Rails or maybe using a GUI, so that I can take
> input and then spit out a nice looking resume. Now that I have an idea of
> what to do, I'm really geeked.
>
> There are some great books out there, so check some of them out and you just
> > might come up with a bunch of ideas.
>
>
> Absolutely. I might be relocating to downstate Michigan (either Metro
> Detroit area or Ann Arbor) and I'm pretty stoked that there are user groups
> down there. I'm sure I can gleam some ideas there, too.
>
> Thanks again for the warm welcome!
>
>
> --
> Samantha
>
> http://www.bab...
>
> "Beware when the great God lets loose a thinker on this planet. Then all
> things are at risk."
> --Ralph Waldo Emerson
>
>


--
http://www.jeremymca...

My free Ruby e-book:
http://www.humblelittlerubybook...

My blogs:
http://www.mrneigh...
http://www.rubyinpra...

James Gray

2/6/2007 3:12:00 AM

0

On Feb 5, 2007, at 9:07 PM, Jeremy McAnally wrote:

> I'll give you four extra credit points if you can make you resume
> builder spit out a PDF using PDF::Writer or use LaTeX. ;)

I've used PDF::Writer recently and I think that should be worth more
than four points. ;) (No offense intended Austin!)

James Edward Gray II

Chris Carter

2/6/2007 3:13:00 AM

0

On 2/5/07, Samantha <rubygeekgirl@gmail.com> wrote:
> On 2/5/07, Jeff Barczewski <jeff.barczewski@gmail.com> wrote:
> >
> >
> > Samantha,
> >
> > Welcome to Ruby! You'll find one of the finest developer communities I've
> > even known. So when you get stuck, feel free to drop an email on the wire,
> > there seems to always be someone out there to help.
>
>
> Thanks so much, Jeff! That's exactly what I've gathered thus far.
>
> Gentoo Linux, that's a beautiful way to go! Makes installing and upgrading
> > really wonderful! Good choice!
>
>
> Ya know, I started on Linux back in '99. I mostly played around with RedHat
> and ran a dual-boot system. I eventually went to straight Windows, and went
> back to having a dual boot in '05. I went to Mandrake, then to Fedora, and
> about six months ago decided to take the plunge into Gentoo. I must've had
> about six fresh installs in the first few weeks of using it, but I haven't
> had to do that in several months now. :) I have found that I've learned
> more in the six months of using Gentoo than I had in the several years of
> RedHat. I've even gotten brave enough to use ~x86 sources. :)
>
>
> Think of a project you would like to do and then see how you can tackle it
> > with Ruby. If you are wanting to build web applications then you have many
> > choices in Ruby, the most popular being Rails. For me Ruby and Rails
> > brings
> > all of the fun back into web application development after having done
> > things the hard way for so long (C++, Java, ...) :-)
>
>
> I'm researching stuff on YAML, as was suggested in a previous post and am
> going to work on the resume builder. At some point, I'm going to try and
> make an interactive one on Rails or maybe using a GUI, so that I can take
> input and then spit out a nice looking resume. Now that I have an idea of
> what to do, I'm really geeked.
>
> There are some great books out there, so check some of them out and you just
> > might come up with a bunch of ideas.
>
>
> Absolutely. I might be relocating to downstate Michigan (either Metro
> Detroit area or Ann Arbor) and I'm pretty stoked that there are user groups
> down there. I'm sure I can gleam some ideas there, too.
>
> Thanks again for the warm welcome!
>
>
> --
> Samantha
>
> http://www.bab...
>
> "Beware when the great God lets loose a thinker on this planet. Then all
> things are at risk."
> --Ralph Waldo Emerson
>
>
Hi Samantha!

Welcome to ruby! So now you have an idea for a project, and it sounds
like a good one too! For support, there is this wonderful list, and
there is the #ruby-lang channel on freenode. It is one of the best
resources you can find. Just don't be afraid to ask questions, no
matter how stupid they sound. The ruby community is pretty darn nice.

For you project, I would like to suggest you check out Ruport for
generating the pdfs:
http://rubyre...

--
Chris Carter
concentrationstudios.com
brynmawrcs.com

Matt Lawrence

2/6/2007 3:33:00 AM

0

Bernard Kenik

2/6/2007 5:12:00 AM

0

On Feb 5, 8:10 pm, "Samantha" <rubygeekg...@gmail.com> wrote:
> Hello all.
>
> I've decided after about a week or so of being on the list to come out
> of hiding and ask a couple of questions. My email addy of
> rubygeekgirl is not a reality, but more of an aspiration. :)
>
> Real quick background on my knowledge and skill level -- I played
> around with BASIC on my Commodore VIC 20 at the age of 8 (which was 22
> years ago). A couple of years ago I started to try and learn Python.
> Fast-forward to Fall of 2006, I decided to try and pick it up again.
> In addition, I also decided to go back to college and my first class
> this last semester was Programming Logic and Design. The course was
> pretty much about logic (imagine that) and we covered loops and mostly
> procedural programming, print charts, arrays, and that's pretty much
> it. Anyway, as I started to look at Python again, I happened to
> discover Ruby. I spent about a month deciding on whether I wanted to
> learn Ruby or Python, and as I looked at what was available, I felt
> more at ease in Ruby. I read a few tutorials, went out and bought the
> PickAxe about four months ago, and did my best to get through it. I
> think a lot of it is a bit over my head. I also looked at the Pine
> online book and the Why's Poignant guide, in addition to the Little
> Book of Ruby and a couple of other resources.
>
> Okay, enough of THAT. I'm now at the point where I feel like I'm
> reading the same thing over and over and over again. I'm not the most
> patient person and I want to start coding something. I've already
> made some small interactive 'kiddie' command line programs and the
> such, but I'm getting bored. I just don't know where or what or HOW
> to start.
>
> I'm starting to look at code snippets over at Ruby Forge... I also
> just got laid off a few weeks ago, so money is tight, otherwise, I'd
> go out and buy The Ruby Way, which I perused at Barnes and Noble last
> week and fell in love with.
>
> So, I ask you, the gurus... Where do I start? This feels like a
> writer's block and I'm sick of reading. I want to start *doing*
>
> I have the IDEs installed, I have Ruby installed on my Gentoo Linux
> box...
>
> I'm sick of writing things asking for the user's name and if they want
> to try a chocolate chip cookie. :)
>
> Thanks so much in advance. I apologize for my verbosity.
>
> Samantha
>
> http://www.bab...

>From one newby to another.

Well I do have an advantage in that I know C and Perl so I have had
experience in programming. I have been using Ruby for about 6
months. I learn best by doing rather than reading. But obviously
first you read and then you write code.
And then read some more and write more code.

It is best if you find something that you by hand that can be
automated by a program. In other find some task that you are familiar
and interested in writing a program that would do the task.


The first non-trivial program that I wrote does bridge hands
analysis.

The general scenario goes something like this.

1. Interface with a 3rd party program that generates a specified
number of hands

need to learn how to interface with this progam

need to learn how to import the hands

2. Call on another program to do what is known as "double dummy
analysis"

need to learn Win32API so I could communicate with the double
dummy analysis program

need to transform the bridge hands from one format to a format
acceptable to the
double dummy analysis program

need to learn how to interact with double dummy analysis
program

need to save the results

3. Analyze the results to obtain additional facts from the raw
data provided by the double analysis program.

4. Present the result in format that is easy and clear to read

Actually I save the result in a csv file and use Word's mail
merge to generate the output file and print the results ...
18 hands per page.

Now it took about a month to do it.

At each step of the way I had to go back an read how to accomplish
what I wanted to do.

First read, do some coding, test the code to verify that it did
what you expected.
If it didn't, then read some more to try to see where you failed
and rewrite that code.
Repeat until you succeed.

Note that I made use of other program and/or libraries to actually
do the bulk of the work.
True, I had to learn how to communicate with these programs on a
trial and error basis since
the authors of these programs did not provide any hand
holding...just the barely sufficient
written information.

If you want to really learn how to program you need to pick
something of interest to you.
Make a general plan on how the program should proceed. Then take
the first step.