Quicky

Alright, can somebody point me to a guide that doesn’t leave me all
kinds of confused?
For instance.
def thingHere(self, params)
@params = so and so

I guess I just don’t “get it” I mean I do, I’m inches away but there are
still a ton of hurdles I need to get over, like…thinking correctly for
instance.

Somebody please help me. Haha


skt

[email protected]
“I sing a song, falling upon deaf ears; unsung.”

skt wrote:

Alright, can somebody point me to a guide that doesn’t leave me all
kinds of confused?
For instance.
def thingHere(self, params)
@params = so and so

I guess I just don’t “get it” I mean I do, I’m inches away but there are
still a ton of hurdles I need to get over, like…thinking correctly for
instance.

There is a lot of free, terrific information available to help you learn
Ruby, but you need to be patient and take it a step at a time.

Hi,

Alright, can somebody point me to a guide that doesn’t leave me all

kinds of confused?
For instance.
def thingHere(self, params)
@params = so and so

i can understand the confusion for somebody trying programming / a new
programming language for the first time. There are as Paul very rightly
said
a lot of free, terrific information available to help you learn Ruby" andyou need to be patient and take it a step at a time".

If your question is for an extremely simple(albeit a slightly outdated
page)
tutorial you can check this out :

http://www.math.umd.edu/~dcarrera/ruby/0.3/

If you are having specific difficulties on what @some_thing is then
please
read
this :

http://www.math.umd.edu/~dcarrera/ruby/0.3/chp_04/classes.html

Basic knowledge of simple Object Oriented concepts would help as well.

It would be prudent for you try all the examples and the exercises. It
requires some time and commitment, but then what doesn’t to get things
right
:slight_smile:

Regards,

  • vihan

On 09.11.2006 08:28, skt wrote:

Once again, I think you all kindly for your quick response to my “quick”
question.
I need to be patient, but for me it’s all or nothing. I WANT to learn
this, but these frustrating little roadblocks are driving me crazy.

I understand you can define them as self as well?

I do not know whether you can - actually I never bothered to try it out.
Since “self” is special it is a bad idea to use it for method or
variable names. My 0.02EUR

robert

On Thu, 9 Nov 2006, skt wrote:

Once again, I think you all kindly for your quick response to my “quick”
question.
I need to be patient, but for me it’s all or nothing. I WANT to learn this,
but these frustrating little roadblocks are driving me crazy.

I understand you can define them as self as well?
example
def self(username, pass, etc, etc)

You have just defined a method called self. This will confuse
the heck out of you later: self refers to the current “instance”
and is often left out in Ruby code. It is an object, not a method.
Basically, don’t do that.

Alright, can somebody point me to a guide that doesn’t leave me all

kinds of confused?
For instance.
def thingHere(self, params)

In Python and some other languages you make the first parameter of a
method refer to the object. You don’t need to do that in Ruby.

@params = so and so

@params = params
would be the Ruby idiom here. Set the “instance variable” value to the
supplied parameter.

@params is an “instance variable” – a variable that lives inside
each instance. If you read up on Object Orientation you will find
things about “Has-A” and “Is-A” relationships. An object “Is-A”
Type (which for Ruby is more than just it’s class, because
individual objects can be modified – see the stuff on Duck Typing
when you are ready to know that level of detail.) But in the simple
cases an Object “Is-A” Whatever-its-class-is. However, an object
“Has-A” instance variable, or it has more than one.

My friend’s car Is-A Nissan Micra. It Has-A steering wheel, but
then it Is-A Car, and all Cars have one. (A class is an object and
it can be substituted for its parent class. A Human Is-A Mammal, etc.)

    Hugh

On 11/9/06, skt [email protected] wrote:

Alright, can somebody point me to a guide that doesn’t leave me all
kinds of confused?

The Little Book of Ruby:
http://www.sapphiresteel.com/IMG/pdf/LittleBookOfRuby.pdf

It explains the complete basics. Assumes little on the part of the
user. You will quickly exhaust its usefulness, but as a bootstrap
guide for beginners its invaluable.

You can then wean yourself onto quick references like this:
http://www.zenspider.com/Languages/Ruby/QuickRef.html

And you should have enough foundation level stuff to make your
own programs, or follow the examples and content in some of
the main books.

skt wrote:

and so forth?
You’re skipping past concepts, trying to get working code without
actually knowing one bit of what you’re doing. Down on the caffeine, and
maybe tell us what programming experience you have already, if any?

Things will get much easier if you have some which other people can
establish analogues to, and if not, there’s resources which are targeted
at first-time programmers that take a different approach than ones aimed
at people who already know other object-oriented programming languages.

My guess is that you don’t have any experience with OO programming at
all, and are trying to follow the wrong material.

Also, dropping code snippets that make no sense and abuse “etc” and
“blah” isn’t really helping anyone.

David V.

On Nov 9, 2006, at 6:04 AM, David V. wrote:

at people who already know other object-oriented programming
languages.

My guess is that you don’t have any experience with OO programming at
all, and are trying to follow the wrong material.

Also, dropping code snippets that make no sense and abuse “etc” and
“blah” isn’t really helping anyone.

I find the abusive tone of this message equally unhelpful. There no
need for you to answer a question here, if it bothers you.

James Edward G. II

Once again, I think you all kindly for your quick response to my “quick”
question.
I need to be patient, but for me it’s all or nothing. I WANT to learn
this, but these frustrating little roadblocks are driving me crazy.

I understand you can define them as self as well?
example
def self(username, pass, etc, etc)
@username = blah
@pass = blah
and so forth?
Vihan Pandey wrote:

programming language for the first time. There are as Paul very

requires some time and commitment, but then what doesn’t to get things
right
:slight_smile:

Regards,

  • vihan


skt

[email protected]
“I sing a song, falling upon deaf ears; unsung.”

On Thu, 2006-11-09 at 21:04 +0900, David V. wrote:

Also, dropping code snippets that make no sense and abuse “etc” and
“blah” isn’t really helping anyone.

Much like the growing trend of programmers trying to (t/pr)each English.
Most unhelpful. If you can’t read it, skip it, I say.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs