On Thu, Mar 25, 2010 at 7:08 AM, Omar Velez <dr_omar_velez / hotmail.com> wro=
te:
> Ok, =A0I have been programming for two days now. =A0Ruby is my first
> language ever.

Welcome ! I hope you enjoy it.

> But all the books I look for already assume you have a
> good deal of knowledge in programming. =A0Does anyone know where I can ge=
t
> a good basic start that will give me lots of examples?

I've seen people telling good things about Chris Pines' book:
http://pine.fm/LearnToProgram/
although I haven't read it.

> Also if it is
> possible can someone please tell me what I am doing wrong? =A0This is my
> first program so please do not make too much fun of me. =A0Thanks yall.
>
> This is my program...
>
> # Program will ask for a persons personal information and then display
> # the results on the screen. =A0Finally it will ask a person to give thei=
r
> # favourite number and then add it to their age and suggest a new
> # favourite number.

Your program looks fine. The only comments are idiomatic stuff:

> puts 'What is your first name?'
> Fname =3D gets.chomp

In Ruby the convention is to use snake_case. Also names that start
with an uppercase letter are constants, so I'd do:

first_name =3D gets.chomp # also, don't be afraid to have longer
variable names if they are clearer

> puts 'What is your middle name?'
> Mname =3D gets.chomp

middle_name =3D gets.chomp

> puts =A0'What is your last name?'
> Lname =3D gets.chomp

last_name =3D gets.chomp

> puts ''

puts #no need to pass an empty string


> puts 'What is your age?'
> Age =3D gets.chomp

age =3D gets.chomp

> puts ''

puts

> puts 'What is your favourite number?'
> Fnum =3D gets.chomp

favourite_number =3D gets.chomp

Also, my preference is to transform strings into integers the earliest
possible if the concept is really a number so, I'd do:

age =3D gets.chomp.to_i # or Integer(gets.chomp) for more strict tranformat=
ion
favourite_number =3D gets.chomp.to_i

> puts ' '

puts

>
> puts 'This is your information...'
> puts 'You are ' +Fname+ ' ' =A0+Mname+ ' ' +Lname+ '.'
> puts 'Your age is ' +Age+ '.'
> puts 'And your favourite number is ' +Fnum+ '.'

String interpolation is preferred to concatenation (less objects to create)=
:

puts "This is your information..."
puts "You are #{first_name} #{middle_name} #{last_name}."
puts "Your age is #{age}."
puts "And your favourite number is #{favourite_number}"

> C =3D Fnum.to_i
> A =3D Age.to_i

not needed anymore

> NFnum =3D C + A

new_favourite_number =3D favourite_number + age

> puts 'Maybe, your favourite number should be ' +NFnum+ '.'

puts "Maybe, your favourite number should be #{new_favourite_number}"

which by the way removes the problem you were having, since string
interpolation calls to_s automatically.

Jesus.