Welcome, Guest. Please Login
 
  HomeHelpSearchLogin FAQ Radified Ghost.Classic Ghost.New Bootable CD Blog  
 
Page Index Toggle Pages: 1
Send Topic Print
Ruby AND Rails (Read 3765 times)
Rad
Radministrator
*****
Offline


Sufferin' succotash

Posts: 4090
Newport Beach, California


Back to top
Ruby AND Rails
Aug 3rd, 2009 at 11:11pm
 
Now that I'm done with my study of the Unix shell .. I was looking for my next avenue .. and reading some stuff about Ruby .. which seems to be very popular .. particularly:

http://www.amazon.com/Well-Grounded-Rubyist-David-Black/dp/1933988657/

.. which is brand-spanking new (May/June 2009, for Ruby 1.9.1, which is the latest version):

http://www.ruby-lang.org/en/downloads/

.. and has strong reviews.

But some comments made me think .. is it possible to use Rails without knowing Ruby?

I don't see how.

Quote:
Mind you, I don’t mean for Rails developers not to read The Well-Grounded Rubyist. On the contrary: I’m optimistic that in the three years since R4R was published, the idea that Rails developers should learn Ruby has become commonplace, and many people who first got into Ruby through Rails have gotten interested in Ruby in its own right. I want this book to be there waiting for them—and for the many people who are discovering Ruby through completely different channels.


I currently have v1.8.6 installed on my laptop. Interesting that 186 is their "One-click installer version" .. and not 1.9.1
 
WWW  
IP Logged
 

MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: Ruby AND Rails
Reply #1 - Aug 3rd, 2009 at 11:59pm
 
Rad wrote on Aug 3rd, 2009 at 11:11pm:
and reading some stuff about Ruby .. which seems to be very popular

I've mentioned it before - I like Ruby.  As a language it seems to me to get out of your way and just provide tools for you to program.  It seems simple and expressive - the code is easy to write, easy to read, and a little bit of code can do a lot.

Rad wrote on Aug 3rd, 2009 at 11:11pm:

I'm not sure about that book.  I like this one:

http://www.pragprog.com/titles/ruby/programming-ruby

There is a slightly older version available online (free as in beer):

http://whytheluckystiff.net/ruby/pickaxe/

Rad wrote on Aug 3rd, 2009 at 11:11pm:
which is brand-spanking new (May/June 2009, for Ruby 1.9.1, which is the latest version):

With so little experience, your biggest concern should be learning the fundamentals of how to program.  Those fundamentals change very little over time.  The SICP course I worked through online was filmed in the 80's and was still 100% relevant.  So, the most recent book may not be the best.


Rad wrote on Aug 3rd, 2009 at 11:11pm:
But some comments made me think .. is it possible to use Rails without knowing Ruby?

You have to know at least some basic Ruby or there isn't much point.  If you are going to write pure html anyway, Rails will just slow you down.  Now, some people can learn the little bit of Ruby they need while they are learning Rails (and you don't need Ruby to learn Rails, just to use it,) but those people are generally experienced (professional) web developers.

For you, having very little programing experience, I highly recommend you learn Ruby before Rails.  The experience will be less stressful, more enlightening, and more beneficial in the long term.  Ruby is a language, and the things you learn will translate to almost any language.  Rails is just a web framework - its very useful, but what you learn won't be nearly as universally applicable.

The only catch about learning Ruby is that it is dogmatically object-oriented.  Being object-oriented provides a lot of convenience, but you have to understand objects.  I never understood objects until I learned Ruby.  So, while I think Ruby is a great way to learn objects, I'm not sure if it will click for you as quickly as it did for me (since I'd seen them once or twice before.)

I'd say give Ruby a shot.  If you don't feel things clicking right away, you can easily learn some Perl instead.  Perl and Ruby are syntactically similar, but Perl is more of a functional language than object-orientated (although it is capable of both.)  Once you get a little comfortable, it'll be easy to go back to Ruby.  Hopefully, things will click and you'll enjoy Ruby.
 
WWW  
IP Logged
 
MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: Ruby AND Rails
Reply #2 - Aug 4th, 2009 at 12:05am
 
Rad wrote on Aug 3rd, 2009 at 11:11pm:
I currently have v1.8.6 installed on my laptop. Interesting that 186 is their "One-click installer version" .. and not 1.9.1

1.9 is pretty new.  The Ruby community still mostly uses 1.8.X.  Most Linux distro's still install 1.8.x by default as well.  1.9 has some compelling improvements, but it isn't perfectly compatible, so it's adoption will take a little time.
 
WWW  
IP Logged
 
Rad
Radministrator
*****
Offline


Sufferin' succotash

Posts: 4090
Newport Beach, California


Back to top
Re: Ruby AND Rails
Reply #3 - Aug 4th, 2009 at 3:36am
 
MrMagoo wrote on Aug 3rd, 2009 at 11:59pm:
With so little experience, your biggest concern should be learning the fundamentals of how to program. 

yeah.

MrMagoo wrote on Aug 3rd, 2009 at 11:59pm:
Those fundamentals change very little over time.The SICP course I worked through online was filmed in the 80's and was still 100% relevant.

remarkable if you think about it, considering how quickly things change in the world of digital technology.

MrMagoo wrote on Aug 3rd, 2009 at 11:59pm:
There is a slightly older version available online (free as in beer):

the pickaxe book was the first english book on ruby, i think.

MrMagoo wrote on Aug 4th, 2009 at 12:05am:
The Ruby community still mostly uses 1.8.X.

i'm surprised you're so up on ruby, being a linux guy.
 
WWW  
IP Logged
 
MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: Ruby AND Rails
Reply #4 - Aug 4th, 2009 at 4:19am
 
Rad wrote on Aug 4th, 2009 at 3:36am:
remarkable if you think about it, considering how quickly things change in the world of digital technology.

If Nigel were here, I'm sure he'd be anxious to point out that Computer Science depends much more on mathematical concepts than it depends on the state of digital technology.  They make the point in SICP that we often associate Computer Science with computers because computers are the tools we happen to use to do it.  The Ancient Egyptians supposedly made the same mistake by thinking Geometry was about compasses and rulers when it's actually about the mathematics of shapes.

Really, computer science is about how to mathematically describe procedures for getting something done.  So, computer science evolves at the pace mathematical theory evolves, rather than the pace that computers evolve.  You can run programs on any Turning machine, electricity not required.

http://en.wikipedia.org/wiki/Turing_machine

Rad wrote on Aug 4th, 2009 at 3:36am:
i'm surprised you're so up on ruby, being a linux guy.

I'm not necessarily a Linux guy as much as I am a computer guy.  I started my career doing tech support of cable modem customers, and my first several promotions were to successively more challenging networking positions.  I actually know networking better than Linux.  Large technology companies can afford to have specialized people and will hire people who are experts at Linux or Solaris but know little else.  Smaller companies need people who are flexible enough to fill in gaps and have broader knowledge.  Since I prefer smaller companies, I've learned a broader range of skills.

My mom was a computer programmer for a long time, so I started programming in 5th grade as a science project.  I picked it up again in high school to impress a girl (sounds weird, but it worked,) and then picked it up again last year when my team needed a few problems solved and I was the only one with extra time to try to solve them.

When I switched jobs at the beginning of this year, a bunch of guys on my new team were REALLY into Ruby, so I decided to see what the fuss was about.  I've found it usefully a number of times since then, so I've been tinkering with Ruby code a few hours a week ever since for one reason or another.
 
WWW  
IP Logged
 
Rad
Radministrator
*****
Offline


Sufferin' succotash

Posts: 4090
Newport Beach, California


Back to top
Re: Ruby AND Rails
Reply #5 - Aug 4th, 2009 at 1:20pm
 
I've gone back to looking at HtDP.

Already introduced my brain to the course, months ago, so everything I still remember must be stored in long-term memory.

I was thinking of doing the same with Ruby .. introducing myself, and then putting it aside for a season .. to let it 'gel' so to speak. That seeems to be the way I learn best.

Once the foundation is set, I can move thru it much more quickly, and enjoyably.

The problem I'm finding with HtDP .. is that it doesn't seem to be written cleanly . or maybe it's just not tuned to the way my brain works. Or maybe I need to adapt.

But it feels like I have to wade thru the swamps in order to get to the orchids. (if you've ever seen the movie 'the orchid thief').

maybe this is just the way the first few pages start out and things will get cleaner as i progress.

but you know how sometimes techies don't always make the best instructors.

Feels like I have to interpret most of the things they're saying. Lots of words that say nothing.

I like what they're doing . with the Dr. Scheme programming environment. Maybe they just need to invest in a good technical-writing editor.

Repeatedly choosing big, multi-syllabic terms over their shorter, simple cousins seems to go against the very thing they profess to despise (unnecessary complexity).

Seems like I'm frequently asking myself, "Okay, what are they trying to say here?" Gets tiring after a while. As if the text were written for an academic rather than some poor sap trying to learn programming.
 
WWW  
IP Logged
 

MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: Ruby AND Rails
Reply #6 - Aug 4th, 2009 at 3:33pm
 
Good luck.  Let me know if you have any questions and I'll do my best (although I'm still mostly amateur at programing.)  Most likely, we'll both learn something...
 
WWW  
IP Logged
 
Spanky
Radmeister
**
Offline


Rad's non-Admin Test profile
in Seamonkey

Posts: 73
Same as Rad


Back to top
Re: Ruby AND Rails
Reply #7 - Aug 4th, 2009 at 3:56pm
 
It's not that I don't/can't understand what they're trying to say, but rather the 'flow' is .. isn't there   .. even when the text isn't saying anything particularly technical. Probably need to just put my head down and plow.
 
WWW  
IP Logged
 
Rad
Radministrator
*****
Offline


Sufferin' succotash

Posts: 4090
Newport Beach, California


Back to top
Re: Ruby AND Rails
Reply #8 - Aug 4th, 2009 at 4:24pm
 
okay .. i'm starting to get some flow. (after putting my head down)

familializing myself (previously) with the dr. scheme programming environment seems to have paid off.

i'm cruising thru practice problems more quickly than b4 and getting correct solutions on the first try .. surprising myself.

these first exercises are mostly math, and i'm good at math.

Quote:
The local supermarket needs a program that can compute the value of a bag of coins. Define the program sum-coins. It consumes four numbers: the number of pennies, nickels, dimes, and quarters in the bag; it produces the amount of money in the bag.

Code:
(define (amount p n d q)
  (+ (* p 1) (* n 5) (* 10 d) (* 25 q)))
(amount 1 5 10 1)

hope i didn't sound winey.
= 151
 
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print