[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

New to Ruby and Programming

Will Shattuck

1/2/2006 5:25:00 AM

Hi folks. Happy New Year!

I have lurked for a little bit to see what this list is like. I am
please to see how helpful people are. I have a couple of questions
for someone starting out with Ruby and Programming in general.

Some background... I have some fundamental understanding of
programming, but I have more holes in my foundation than not. I work
with some friends on a C# project, I learned some basics of Java so I
kind of understand OOP. But I still do not grasp a lot.

My question: Where should I start in learning to use Ruby? I have
some ideas, but I do not want to prejudice the discussion with my
ideas.

Also, I have a project in mind to use Ruby... A Nethack bot. A friend
programmed one in C# and I thought it would be fun to try and use
Ruby. I know I have a long way to go but it would be fun for me.

Anyway, thanks for any advice and help you can offer in this new adventure.

Will



--
Will Shattuck ( willshattuck.at.gmail.com )
Home Page: http://www.thewholecla...

When you get to your wit's end, you'll find God lives there.


31 Answers

M. Edward (Ed) Borasky

1/2/2006 5:36:00 AM

0

Chris Pine's "Learn to Program" is available now from Pragmatic
Programmers. I'd start there.

Will Shattuck wrote:

>Hi folks. Happy New Year!
>
>I have lurked for a little bit to see what this list is like. I am
>please to see how helpful people are. I have a couple of questions
>for someone starting out with Ruby and Programming in general.
>
>Some background... I have some fundamental understanding of
>programming, but I have more holes in my foundation than not. I work
>with some friends on a C# project, I learned some basics of Java so I
>kind of understand OOP. But I still do not grasp a lot.
>
>My question: Where should I start in learning to use Ruby? I have
>some ideas, but I do not want to prejudice the discussion with my
>ideas.
>
>Also, I have a project in mind to use Ruby... A Nethack bot. A friend
>programmed one in C# and I thought it would be fun to try and use
>Ruby. I know I have a long way to go but it would be fun for me.
>
>Anyway, thanks for any advice and help you can offer in this new adventure.
>
>Will
>
>
>
>--
>Will Shattuck ( willshattuck.at.gmail.com )
>Home Page: http://www.thewholecla...
>
>When you get to your wit's end, you'll find God lives there.
>
>
>
>

--
M. Edward (Ed) Borasky

http://linuxcapacitypl...



J. Ryan Sobol

1/2/2006 6:12:00 AM

0

Can you list and describe the programs you've developed in the past?
Were they school related or side projects for fun or for profit?

~ ryan ~


On Jan 2, 2006, at 12:24 AM, Will Shattuck wrote:

> Hi folks. Happy New Year!
>
> I have lurked for a little bit to see what this list is like. I am
> please to see how helpful people are. I have a couple of questions
> for someone starting out with Ruby and Programming in general.
>
> Some background... I have some fundamental understanding of
> programming, but I have more holes in my foundation than not. I work
> with some friends on a C# project, I learned some basics of Java so I
> kind of understand OOP. But I still do not grasp a lot.
>
> My question: Where should I start in learning to use Ruby? I have
> some ideas, but I do not want to prejudice the discussion with my
> ideas.
>
> Also, I have a project in mind to use Ruby... A Nethack bot. A friend
> programmed one in C# and I thought it would be fun to try and use
> Ruby. I know I have a long way to go but it would be fun for me.
>
> Anyway, thanks for any advice and help you can offer in this new
> adventure.
>
> Will
>
>
>
> --
> Will Shattuck ( willshattuck.at.gmail.com )
> Home Page: http://www.thewholecla...
>
> When you get to your wit's end, you'll find God lives there.
>



Will Shattuck

1/2/2006 6:31:00 AM

0

On 1/1/06, J. Ryan Sobol <ryansobol@gmail.com> wrote:
> Can you list and describe the programs you've developed in the past?
> Were they school related or side projects for fun or for profit?
>
> ~ ryan ~
>

Well... that's just it. I haven't developed anything really. I have
done some web programming with PHP, but that has usually consisted of
modifying someone else's work. So basically nothing :( That's why I
wanted to start with Ruby. I noticed that I can cut out many lines of
code by using Ruby so I figured it would be a good start.

Will


J. Ryan Sobol

1/2/2006 6:47:00 AM

0

Sounds like your at the cusp of a new and exciting thing, so I want
to give you the best advice I can.

Here's the table of contents from the book "Learning To Program" that
Ed Borasky suggested in a previous post. (http://
www.pragmaticprogrammer.com/titles/fr_ltp/) Just by glancing at the
chapter titles, which of them seem new, familiar, and old news to you
in terms of your past programming experience?

1. Getting Started
2. Numbers
3. Letters
4. Variables and Assignment
5. Mixing It Up
6. More about Methods
7. Flow Control
8. Arrays and Iterators
9. Writing Your Own Methods
10. There's Nothing New to Learn in Chapter 10
11 Reading and Writing, Saving and Loading, Yin and...
12. New Classes of Objects
13. Creating New Classes, Changing Existing Ones
14. Blocks and Procs

~ ryan ~


On Jan 2, 2006, at 1:30 AM, Will Shattuck wrote:

> On 1/1/06, J. Ryan Sobol <ryansobol@gmail.com> wrote:
>> Can you list and describe the programs you've developed in the past?
>> Were they school related or side projects for fun or for profit?
>>
>> ~ ryan ~
>>
>
> Well... that's just it. I haven't developed anything really. I have
> done some web programming with PHP, but that has usually consisted of
> modifying someone else's work. So basically nothing :( That's why I
> wanted to start with Ruby. I noticed that I can cut out many lines of
> code by using Ruby so I figured it would be a good start.
>
> Will
>



Will Shattuck

1/2/2006 7:19:00 AM

0

On 1/1/06, J. Ryan Sobol <ryansobol@gmail.com> wrote:
> Sounds like your at the cusp of a new and exciting thing, so I want
> to give you the best advice I can.
>

Yep, I am about as crispy... er... cuspy as they come right now :)

> Here's the table of contents from the book "Learning To Program" that
> Ed Borasky suggested in a previous post. (http://
> www.pragmaticprogrammer.com/titles/fr_ltp/) Just by glancing at the
> chapter titles, which of them seem new, familiar, and old news to you
> in terms of your past programming experience?
>
> 1. Getting Started
It seems I am always doing this with learning to program

> 2. Numbers
> 3. Letters
a..b..c..d..e..f..g.. yep I know my numbers and letters, but I am sure
I don't know what they mean in the Ruby Context.

> 4. Variables and Assignment
Creating and assigning values to variables I understand. I have done
it in my C# scripting for the mud engine I am helping to create. foo
= bar; etc etc ... Then I know how to test for (in)equality... foo ==
bar, foo != bar, foo < bar, etc etc

> 5. Mixing It Up
Not sure what they mean here...

> 6. More about Methods
This is probably where I get hung up the most with classes, methods,
instances, instantiation, encapsulation,etc

> 7. Flow Control
IF, ELSE, THEN, WHILE, etc. I understand the concepts, but will have
to learn The Ruby Way to make them work.

> 8. Arrays and Iterators
I touched on arrays in the "Head Start Java" book I was learning from,
but never got very far. Iterators are like " foo = foo +1" or " foo
+= foo " right?

> 9. Writing Your Own Methods
Methods that are inside classes? Again another place I have a very
basic concept of, but haven't done much with.

> 10. There's Nothing New to Learn in Chapter 10
> 11 Reading and Writing, Saving and Loading, Yin and...
File operations.. I did very little of it. I wanted to write a file
parser in PHP for game group for editing files, but didn't understand
the functions very much. I understand the concepts, but not the
application.

> 12. New Classes of Objects
> 13. Creating New Classes, Changing Existing Ones
Well I have learned to modify templates, variables, etc in previous
applications, but haven't created any new classes or objects on my
own.

> 14. Blocks and Procs
One word... huh? ;)

>
> ~ ryan ~
>

Thanks for taking the time, Ryan, in helping me. I really appreciate
all the suggestions.

I'm looking at an older version of "Learn to Program" by Chris Pine
that I find in the links that James Britt sent. But I'm starting to
fall asleep now so I probably won't go very far right yet. heh

Will


Scott Smith

1/2/2006 7:29:00 AM

0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nah, iterating is where you step through the elements of an array. Your
examples are simply assignments--giving a value to a variable (think
basic algebra).

Methods are basically chunks of code split up so they can be reused in
other places. Also good for code maintenance--instead of having one huge
chunk of code, it is broken into smaller bits.

Do you actually have a need to write anything, or is it more of a "Hey
I'd like to learn this, it sounds interesting" thing? It sounds like
most of your prior forays into programming have been the latter. I find
that I learn (and more specifically RETAIN) much much better when I have
a direct need. I can't just grab a book and learn an arbitrary language
just for the hell of it. Something will eventually come up a few days
into it or whatever and I won't have a specific need to keep focused on it.

Scott

Will Shattuck wrote:

>>8. Arrays and Iterators
>
> I touched on arrays in the "Head Start Java" book I was learning from,
> but never got very far. Iterators are like " foo = foo +1" or " foo
> += foo " right?
>
>
>>9. Writing Your Own Methods
>
> Methods that are inside classes? Again another place I have a very
> basic concept of, but haven't done much with.

- --
scott@lackluster.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)

iD8DBQFDuNZQKBeC2yZ3EEsRAkWVAKCGm//cJaKzp1mZ/B/mSpK2ybtt/ACghue4
erRZIJPmDqCnF5uDQmPYjlA=
=tlVU
-----END PGP SIGNATURE-----


J. Ryan Sobol

1/2/2006 7:31:00 AM

0

Seems like this book is a good match for you. And the price is right
too: $20 for a paper back, $13 for the PDF version, or $25 for both.

Also, the "Pickaxe" book is pretty much the standard for learning
Ruby. I'm not sure if its at the appropriate level for you, but the
first edition is freely available online. http://www.rubyce...
book/

~ ryan ~


On Jan 2, 2006, at 1:47 AM, J. Ryan Sobol wrote:

> Sounds like your at the cusp of a new and exciting thing, so I want
> to give you the best advice I can.
>
> Here's the table of contents from the book "Learning To Program"
> that Ed Borasky suggested in a previous post. (http://
> www.pragmaticprogrammer.com/titles/fr_ltp/) Just by glancing at
> the chapter titles, which of them seem new, familiar, and old news
> to you in terms of your past programming experience?
>
> 1. Getting Started
> 2. Numbers
> 3. Letters
> 4. Variables and Assignment
> 5. Mixing It Up
> 6. More about Methods
> 7. Flow Control
> 8. Arrays and Iterators
> 9. Writing Your Own Methods
> 10. There's Nothing New to Learn in Chapter 10
> 11 Reading and Writing, Saving and Loading, Yin and...
> 12. New Classes of Objects
> 13. Creating New Classes, Changing Existing Ones
> 14. Blocks and Procs
>
> ~ ryan ~
>
>
> On Jan 2, 2006, at 1:30 AM, Will Shattuck wrote:
>
>> On 1/1/06, J. Ryan Sobol <ryansobol@gmail.com> wrote:
>>> Can you list and describe the programs you've developed in the past?
>>> Were they school related or side projects for fun or for profit?
>>>
>>> ~ ryan ~
>>>
>>
>> Well... that's just it. I haven't developed anything really. I have
>> done some web programming with PHP, but that has usually consisted of
>> modifying someone else's work. So basically nothing :( That's why I
>> wanted to start with Ruby. I noticed that I can cut out many
>> lines of
>> code by using Ruby so I figured it would be a good start.
>>
>> Will
>>
>
>



Wilson Bilkovich

1/2/2006 7:38:00 AM

0

On 1/2/06, Will Shattuck <willshattuck@gmail.com> wrote:
> Hi folks. Happy New Year!
>
> I have lurked for a little bit to see what this list is like. I am
> please to see how helpful people are. I have a couple of questions
> for someone starting out with Ruby and Programming in general.
>
> Some background... I have some fundamental understanding of
> programming, but I have more holes in my foundation than not. I work
> with some friends on a C# project, I learned some basics of Java so I
> kind of understand OOP. But I still do not grasp a lot.
>
> My question: Where should I start in learning to use Ruby? I have
> some ideas, but I do not want to prejudice the discussion with my
> ideas.
>
> Also, I have a project in mind to use Ruby... A Nethack bot. A friend
> programmed one in C# and I thought it would be fun to try and use
> Ruby. I know I have a long way to go but it would be fun for me.
>
> Anyway, thanks for any advice and help you can offer in this new adventure.
>

Others have already given very good answers on how to learn Ruby.. but
if you want to learn the fundamentals of programming as a concept
(rather than any specific implementation of that..), I don't think
there's anything better than:
http://www...
..and
http://www2.info.ucl.ac.be/people/PVR...
In theory the second book is only available in hardcover.. but the
Internet Archive still has the old free PDF version, from before it
went to press:
http://web.archive.org/web/20040202004840/http://www.info.ucl.ac.be/people/PVR/book...

(The final version has corrections and improvements. If you can afford
it, I recommend it.)


james_b

1/2/2006 7:39:00 AM

0

J. Ryan Sobol wrote:
> Sounds like your at the cusp of a new and exciting thing, so I want to
> give you the best advice I can.
>
> Here's the table of contents from the book "Learning To Program" that
> Ed Borasky suggested in a previous post. (http://
> www.pragmaticprogrammer.com/titles/fr_ltp/) Just by glancing at the
> chapter titles, which of them seem new, familiar, and old news to you
> in terms of your past programming experience?

<snip/>

Question: Is this teaching just the Ruby syntax for assorted constructs,
or does it also include algorithm analysis and selection,
speed/memory/resource considerations, application composition and
design, and other programming concepts?

Put another way, what does "program" mean in the book title, and is it
what Will means/expects when learning to program?



James
--

http://www.ru... - Ruby Help & Documentation
http://www.artima.c... - Ruby Code & Style: Writers wanted
http://www.rub... - The Ruby Store for Ruby Stuff
http://www.jame... - Playing with Better Toys
http://www.30seco... - Building Better Tools


Martin DeMello

1/2/2006 8:09:00 AM

0

Wilson Bilkovich <wilsonb@gmail.com> wrote:
>
> Others have already given very good answers on how to learn Ruby.. but
> if you want to learn the fundamentals of programming as a concept
> (rather than any specific implementation of that..), I don't think
> there's anything better than:
> http://www...

Seconded - this is an amazingly good book.

> http://www2.info.ucl.ac.be/people/PVR...

This one's excellent too, but pretty heavy going. I wouldn't recommend
it as a teach-yourself-programming book.

martin