Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Head First Rails

samzenpus posted more than 4 years ago | from the read-all-about-it dept.

Books 57

Anita Kuno writes "I suggested Head First Rails to a friend before I even finished it. He was asking me questions that I didn't have time to answer, and I knew the book could explain better than I. My friend is impatient, and I was uncertain what his experience would be. At first he was frustrated, but I assured him the answers were in the book. The incremental style of Head First Rails includes some exercises that are designed to fail to reinforce the learning process. I was confident that his answer would be found in the pages and he trusted me enough to go back and continue the exercises. He later told me he is very happy with the book and grateful that I suggested it." Read on for the rest of Anita's review.

Rails is a framework for creating web applications. It is written in Ruby. It uses a structure called MVC which stands for model view controller. Rails separates tasks so that operations are modularized. Once a development team understands Rails, its use can increase the speed of creating web applications. Head First Rails explains the beginning steps needed to create Ruby on Rails applications. It introduces vocabulary; teaches the basic relationships that comprise Rails: the model, the view, and the controller; and demonstrates code creation that controls the MVC interaction. The title 'Head First Rails: A Learner's Companion to Ruby on Rails' describes the approach of the book. The author acknowledges that this book is one of many that will assist the active learner to begin Ruby on Rails. Proficiency in the Rails framework requires accumulating information from a number of sources and the book mentions quite a few and encourages consultation of those resources.

While previous Rails experience is not required (nor is previous Ruby experience) it is expected that the reader have a working understanding of HTML & CSS as well as a basic understanding of a scripting language. Java, C# or PHP are mentioned as scripting examples. I had tried several beginning Rails books previously and Head First Rails was the first I could complete. I feel it is a reflection of the speed of development of the framework and the fact that most of the people that I know involved with Rails are so busy creating apps, they don't have time to teach the n00bs.

Head First Rails assumes that you already have Rails installed on your system. The home page for Head First Rails provides a link to the download page at rubyonrails.org by way of providing installation instructions. I didn't see a reference in the book's index to Rails installation, which I find rather odd. It would be a simple matter to include a short paragraph explaining why detailed instructions aren't included with the book (as is explained on the home page for the book) with a URL to the book's homepage. Ruby and Rails are both opensource software so they are freely available for all systems.

Head First Rails has images, illustrations and graphics that are used to introduce and underscore one concept at at time. The book is designed so that each page and its facing page comprise an experience of one concept. As you turn each page you are introduced to a concept, given details and challenged in some form. When you turn the page you are on to the next piece of information which builds upon what you have already learned. The format of the book is designed to promote information retention and some of the exercises may prove frustrating at certain points. The frustration promotes original thinking and information retention. I feel it is a valuable part of learning. Since I rarely have the time to focus on a book exclusive to the rest of my life, I find the format helpful. I can attend to other things and pick up the book after two weeks and continue from where I left off. It is helpful to have access to information that I can pick up and put down and still accumulate knowledge.

Head First Rails is conversational and encourages original thought. The exercises, which are the foundation of the book, are accompanied by code samples for download to encourage comparison. The first time we dive into an app and edit the specific files, I felt that the identification of which file we were editing and how to locate the file in the Rails application directory tree needed to be clarified a little better. Soon the examples fell into a rhythm and I knew where to find the information I needed.

One thing that did get my attention was the use of whitespace or lack thereof in code. I have been taught to use 2 spaces to indent Ruby code (which affects Rails code as well) and while the code samples did use the convention, I didn't see the indent by 2 spaces rule explicitly stated. I'm not confident that a n00b would just pick that up. They would probably have to be informed. My other whitespace comment concerns hashes. I have been taught to have one space between the key and hash delimiter and another single space between the hash delimiter and the value. I did not see this in the code samples. I frequently saw no space whatsoever separating the key, delimiter and value. I have come to understand that developers rate another developer's worth based upon code samples, and lack of whitespace when it is expected is viewed as a bad habit. The composer of said code might be either chastised or dismissed due to poor technique. Perhaps my understanding of the situation is extreme but again in a book for n00bs, the reader will copy exactly what they see. So if there isn't whitespace on either side of the hash delimiter in the book, how will the reader know to compose code using that convention?

A few of the author's terms were confusing. He uses the term 'scriptlets' to refer to ERB output tags, and 'expressions' to refer to ERB expression tags. The Rails developers I questioned about this were able to figure out what he meant by 'expressions' but none of them had ever heard of ERB output tags being called 'scriptlets'. Also, the author uses 'finder' to refer to dynamic finders and I think it would have been useful to use the term 'dynamic finder'. It is more specific and the keyword 'dynamic' is useful when employing a search engine to research the functionality of dynamic finders. A search for 'finders' doesn't return one Rails related hit on the first page, while a search for 'dynamic finders' gives me a Rails related hit as the first return.

These are small points and perhaps this is more reflective of the culture of Rails developers that informs me, but in a n00b book it is important to provide clear vocabulary and conventions. These small points may be the techniques that have the longest shelf life to the reader.

I have been waiting for this book to be written and available for at least a year and a half. This was the first beginning Rails book that I found that didn't assume I was transitioning from a background in PHP. I have been spending time with the Ruby and the Rails community for close to 2 years now and am grateful that I finally have an explanation of the topic that is accessible for me.

Rails is changing very quickly and even now is about to merge with Merb to create Rails 3.0. It is tough to say how long the information in Head First Rails will be relevant. If you are interested in this book because you think Rails is fashionable, you might be distracted by a new trend before you finish the book. If you are interested in Rails because you have seen what it can do, you recognize its power and you want to learn how to get that for yourself, you will recognize the value in these pages.

You can purchase Head First Rails from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

cancel ×

57 comments

Sorry! There are no comments related to the filter you selected.

Fail To Reinforce (4, Funny)

gbulmash (688770) | more than 4 years ago | (#27677527)

"designed to fail to reinforce the learning process"...

I'm sure that's meant as "designed to fail, so that figuring out why they failed reinforces the learning process" but it reads as they're designed so that they fail to reinforce the learning process.

Re:Fail To Reinforce (0)

Anonymous Coward | more than 4 years ago | (#27677803)

That's exactly how I read it. When I got to that part I was certain this book review was going to be giving it a thumbs down, only to find out the opposite. Makes for a confusing review.

Re:Fail To Reinforce (3, Funny)

Anonymous Coward | more than 4 years ago | (#27677831)

Public Schools: "designed to fail to reinforce the learning process"

Re:Fail To Reinforce (0)

Anonymous Coward | more than 4 years ago | (#27680059)

"designed to fail to reinforce the learning process"...

I'm sure that's meant as "designed to fail, so that figuring out why they failed reinforces the learning process" but it reads as they're designed so that they fail to reinforce the learning process.

Or simply:

"designed to fail, in order to reinforce the learning process"

A comma can go a long way in rectifying sentences.

Head First series (3, Insightful)

oldspewey (1303305) | more than 4 years ago | (#27677531)

I have to say, despite the goofy approach and crazy graphics in the Head First series, they are an effective learning tool and a more enjoyable read than a "standard" technical book for beginners.

After reading Head First Java, memory management shall forever be linked in my mind with worried ducks.

Re:Head First series (1)

styrotech (136124) | more than 5 years ago | (#27681723)

I have to say, despite the goofy approach and crazy graphics in the Head First series, they are an effective learning tool and a more enjoyable read than a "standard" technical book for beginners.

I hear that a lot and they've done a lot of research into their methods, so I'm probably atypical and possibly just weird...

I've spent some time with the Design Patterns one and I struggle with it (I really want to like it). Sure it did OK with higher level stuff like "why" you want to use them (and "why not" too, which is important), and getting a vague idea of what each example did.

But whenever I try to grok the nitty gritty bits I keep getting too distracted to concentrate on any of the details. It seems like the print version of a web page filled with flashing and blinking ads where you have to piece together bits from all over the place. Sifting through all the preliminary "not-quite-correct" examples also gets in the way of understanding the "correct" one later on. I seem to expend too much energy evaluating the value of the distractions instead of learning.

I get a mild but tiring sense of disorientation with "Head First" books that I don't get elsewhere. I suspect I'm quite different to the average reader :)

I don't know about you... (3, Funny)

the1337g33k (1268908) | more than 4 years ago | (#27677533)

But I wouldn't want to go head first down a rail...

Re:I don't know about you... (1)

oldspewey (1303305) | more than 4 years ago | (#27677569)

Skeleton racing [wikipedia.org] might not be for you then.

Head Over Fist (-1, Troll)

Anonymous Coward | more than 4 years ago | (#27677601)

Goatse [twofo.co.uk]

review fail (-1, Troll)

Anonymous Coward | more than 4 years ago | (#27677651)

first rule of writing a review...if your review doesn't explain what the book subject matter is in the slightest in the first few paragraphs...find another job.

Re:review fail (0, Flamebait)

creimer (824291) | more than 4 years ago | (#27677723)

That explains why the reviewer is writing for Slashdot.

Re:review fail (-1, Troll)

Anonymous Coward | more than 4 years ago | (#27677745)

Second rule of writing a review...

Any f*cktard dumb enough to use Ruby for anything CANNOT expect to have any credibility.

It is a shame (-1, Flamebait)

Anonymous Coward | more than 4 years ago | (#27677717)

Programming is getting full of n00bs.

Re:It is a shame (1)

creimer (824291) | more than 4 years ago | (#27677753)

Bookshelves are getting full of n00b programming books.

Re:It is a shame (1)

Fnord666 (889225) | more than 4 years ago | (#27677811)

Bookshelves are getting full of n00b programming books.

Come on, admit it. You always want to know how to program a n00b.

Re:It is a shame (1)

creimer (824291) | more than 4 years ago | (#27678495)

1. Find programming n00b.
2. Set programming n00b's assOnFire() function.
3. ???
4. Profit!

Re:It is a shame (1)

oodaloop (1229816) | more than 4 years ago | (#27677875)

I am a n00b, you insensitive clod!

"before I even finished it" (1)

melted (227442) | more than 4 years ago | (#27677793)

Do people actually read these books cover to cover? I at best just skim through them and read the parts that interest me. I don't have the time to read 700 page technical book where 70-80% of content is either redundant or irrelevant.

Re:"before I even finished it" (1)

laurelraven (1539557) | more than 5 years ago | (#27687949)

The redundancy is part of the point...it reinforces the point they are trying to make in different ways to improve recall. Oh, and I've read two of these cover-to-cover, and am working on my third. No other technical book has taught me any subject as well, nor have I been able to complete any technical book I've tried to read before these.

My Summary (3, Funny)

raftpeople (844215) | more than 4 years ago | (#27677849)

I picked up the book.
I opened it to the first page.
He said he hadn't read that page.
I hadn't either.
He read it.
Then I read it too.
We both read the page.
Then we talked about it.
The page had information.
We talked about the information.

Re:My Summary (3, Funny)

adavies42 (746183) | more than 5 years ago | (#27682227)

your post looks remarkably like minnesota

Scriptlet (1)

Mandrel (765308) | more than 4 years ago | (#27677851)

Xdoclet was the straw that drove me from Java to Rails. All that Java jargon just blew my mind.

So when I saw scriptlet used in a Rails context, I had a visceral reaction.

Re:Scriptlet (0)

Anonymous Coward | more than 4 years ago | (#27678955)

It was when I saw that word, that I felt my first instinct was confirmed: the author is begging for a parody, or at least some light trolling.

Think about it. He had an opening paragraph that didn't reveal a hint about what vague sector of human endeavor the book was about. It is a book around railroad models? Anatomy? Nope, it was programming.

He had a whole paragraph about white space. He's begging the python lovers and haters to make this their battlefield.

He keeps dropping hints of being a programming newbie. While there's nothing wrong with being a newbie, to post a review on Slashdot will at least .. ahem .. shall we say, draw attention. And he spells it "n00b."

But "scriptlet," yeah, that's a giveaway. The word "cripplet" has to be just around the corner.

According to tags (0, Troll)

Creepy Crawler (680178) | more than 4 years ago | (#27677855)

It's a bad summary.

Make your own then [rapidlibrary.com]

Re:According to tags (2, Informative)

Anonymous Coward | more than 4 years ago | (#27678075)

Oh, what nice viruses you have.

Re:According to tags (0, Offtopic)

Creepy Crawler (680178) | more than 4 years ago | (#27678167)

o rly anonfag?

prove it or GTFO!

Re:According to tags (0)

Anonymous Coward | more than 4 years ago | (#27678273)

i think that the burden of proof should be on the person with a obfuscated logout link in their sig.

not that AC, but a different one

what. the. (0)

Anonymous Coward | more than 4 years ago | (#27677883)

This is seriously what passes for a front-page review on Slashdot? The reviewer had been trying to learn Ruby for two years, and couldn't get his head around it until this book came along.

Huh? (1)

ultrabot (200914) | more than 4 years ago | (#27677885)

"Java, C# or PHP are mentioned as scripting examples."

Why not 8086 Assembly or Forth while we are at it, as opposed to oddballs like Python.

Fail Whale on Rails? (0)

Anonymous Coward | more than 4 years ago | (#27677891)

Fail Whale on Rails? Enjoy :)

{Excuse the work, its paint.net}

FWOR [tinypic.com]

RESTfully deficient (4, Informative)

mailman-zero (730254) | more than 4 years ago | (#27677897)

I started trying to learn Rails with this book, but found the dearth of RESTful development methodology leaves this book almost completely useless. Best practices are important to learn especially when just starting out. I would recommend Simply Rails 2 [sitepoint.com] as a much better starting point for the beginner. I switched over to Simply Rails 2 and it provided a much better foundation upon which to build a working knowledge of Ruby on Rails.

I am not alone in this assessment. Here is just two people that think the same thing [amazon.com] .

Re:RESTfully deficient (1)

ultrabot (200914) | more than 4 years ago | (#27678097)

I started trying to learn Rails with this book, but found the dearth of RESTful development methodology leaves this book almost completely useless.

Looking at the front cover picture, I would have been extremely surprised if it wasn't completely useless.

What's next, "Ashton Kutcher ROCKS THE COBOL"?

Re:RESTfully deficient (1)

mailman-zero (730254) | more than 4 years ago | (#27678177)

Looking at the front cover picture, I would have been extremely surprised if it wasn't completely useless.

What's next, "Ashton Kutcher ROCKS THE COBOL"?

The Head First series is actually excellent. The concept is good and I've used other Head First books and learned a lot with them. It isn't the Head First part that is bad, it is the code.

Re:RESTfully deficient (1)

IdahoEv (195056) | more than 4 years ago | (#27678199)

My favorite start point is RailsSpace [amazon.com] because it does a better job at introducing the basic concepts of Ruby than the other tutorials out there. I tried "Agile Web Development With Rails" for a while and learned much faster once I switched.

I think the name is poorly chosen - it uses a social networking site as an example app to build, but the concepts are applicable anywhere.
 

Re:RESTfully deficient (1)

youroldbuddy (539169) | more than 5 years ago | (#27684203)

I'm a n00b programmer but a decent technician. Head first books were the best for me when starting programming. Its not going to be the best for most slashdotters but for taking your first steps with a programming language its by far the best.

Rails? (1)

frosty_tsm (933163) | more than 4 years ago | (#27677911)

What about a book on Merb?

Some projects have already migrated from Rails to Merb, and Rails 3.0 is going to use Merb's code base.

Re:Rails? (3, Informative)

XMyth (266414) | more than 4 years ago | (#27678103)

Can you provide a reference for that? I thought the two projects were merging, not that Rails would just "use Merb's code base".

Thanks

Re:Rails? (3, Informative)

sammy baby (14909) | more than 4 years ago | (#27678657)

You sir, are correct [rubyonrails.org] .

Learn Rails Headon! (3, Funny)

Sponge Bath (413667) | more than 4 years ago | (#27678223)

Apply directly to the forehead!

Learn Rails Headon! (1)

hesiod (111176) | more than 4 years ago | (#27678889)

Apply directly to the forehead!

Terrible review (5, Insightful)

Moebius Loop (135536) | more than 4 years ago | (#27678497)

I've never felt compelled to post a "why is this on /." comment, but this review pushed me over the edge.

This was by far the least informative review I've ever seen posted here, and it's a close contender for the most poorly written one.

First there's the fact that the reviewer's greatest criticism was that the author failed to discuss whitespace usage -- in a non-whitespace-sensitive language no less. The reviewer mentions that many books assume expertise with PHP or another scripting language, I wonder what exactly this reviewer's background is to be so concerned with such a detail.

Next, we've got the constant usage of 'n00b'. Okay, using 'n00b' might be funny or quirky if you use it once, but the rest of the time, let's try for a modicum of professionalism. I've may have never written in Ruby before, but it's a gross understatement to refer to me as a 'n00b'.

The rest of the review reads like it was written by someone's 14-year-old cousin. I'm not looking for Chaucer here, but nearly every paragraph reads like an itemized list of loosely related topics. On top of that, five of the first six paragraphs could be describing basically *any* programming book: "The book is split into chapters that each cover a topic. Sample code is provided. Sometimes it's fully explained. Sometimes it's not. The book assumes you know some things already, but don't know other things."

Like I said, it's honestly not my habit to complain about free stuff, and I know the pointlessness of asking for greater editorial oversight from the /. staff. I would just like to suggest to anyone that's thinking about writing a technical book review to learn from these mistakes, or at least make an effort to study other tech reviews as guides to style and content.

Re:Terrible review (5, Funny)

Gizzmonic (412910) | more than 4 years ago | (#27679041)

I'm not looking for Chaucer here, but nearly every paragraph reads like an itemized list of loosely related topics.

Verily, the Goodwife of Bath bespouke of many a Challenge to Programming Railes Dexterously. Forthwith, Rails had Not Been Invented in the Twelfth Century of Our Lord. Thus, her gentle wares stoop'd belowest the Most Odious Keyboard festoon'd with Discarded Wrappers of Doritos. All at Comdex Merchant Festival were most mov'd by her mellifluous gabbing and comely visage.

Re:Terrible review (1)

Moebius Loop (135536) | more than 4 years ago | (#27679113)

Seriously, thanks for that ;-)

Re:Terrible review (0)

Anonymous Coward | more than 4 years ago | (#27679051)

I stopped reading after the third n00b.

Re:Terrible review (0, Offtopic)

HunterD (13063) | more than 5 years ago | (#27682659)

My 2c, this review is entirely the norm for the rails community.

This is a community of 'developers' who spend (so far as I can tell) the vast majority of their time coming up with names (rails, merb, cucumber, etc) and writing blog posts [zedshaw.com] (yes, I get the irony of pointing at *his* blog) about how badass they think are, while writing trivial libraries and using that to trumpet how 1337 they they think they are. Both this review and likely this book should be passed up, along with the rails community as a whole.

*Clue*, when looking for a development community, look for a group of people who spend time *coding [python.org] * at their conventions instead of a development community who spends the vast majority of their time grandstanding about how awesome they thing they are.

Re:Terrible review (0)

Anonymous Coward | more than 5 years ago | (#27682669)

bwahahaa

Odd review... (0)

Anonymous Coward | more than 4 years ago | (#27679235)

this review, reads like
someone is trying hard to
review by Haiku

Head first rails (2, Insightful)

tsa (15680) | more than 4 years ago | (#27679361)

Sounds like a way to commit suicide.

Re:Head first rails (1)

CopaceticOpus (965603) | more than 4 years ago | (#27680203)

That's what I thought too. I can only conclude, then, that any review is a bad review.

Re:Head first rails (0)

Anonymous Coward | more than 5 years ago | (#27682191)

Sounded to me like one of those annoying commercials.
RAILS -- APPLY DIRECTLY TO THE FOREHEAD!

The title of the book sounds painful... (1)

Slacksoft (1066064) | more than 4 years ago | (#27679585)

No wonder Ruby people look so dazed when using the technology.

... I knew the book could explain better than I. (0, Offtopic)

trouser (149900) | more than 4 years ago | (#27680851)

The objective form of the first person singular pronoun is 'me' not 'I' hence, '... I knew the book could explain better than me'. Some might argue that a verb was implied, eg. '... I knew the book could explain better than I *could*'. I would rightly counter that Ruby is a sissy language and only sissies use it and Rails is for Ruby sissies and you can all go to hell, hell, HELL!!!!

They lost their domain name! (2, Informative)

jml75 (923531) | more than 5 years ago | (#27682127)

Seems like the Ruby On Rails guys lost their domain name!!!! Try www.rubyonrails.org and you'll see!!! I can't believe this!!!

Re:They lost their domain name! (0)

Anonymous Coward | more than 5 years ago | (#27685247)

This also looks promising: http://groups.google.com/group/rubyonrails

Tried several, huh? (0)

Anonymous Coward | more than 5 years ago | (#27683031)

Maybe the reviewer should try a book written in his native language? Or, if his native language is English, perhaps a book written by an eight year old would be easier to relate to?

Rails to death (0)

Anonymous Coward | more than 5 years ago | (#27685283)

Why does this crap get onto slashdot?? (When it should be buried, burnt and forgotten forever)

Rails in general and Ruby on Rails in essential is the worst, ugliest, slowest and most sysadmin-hateful framework I've ever seen. I rather hack struts1 with jsp 1.0 in windows notepad than host/operate another ror-environment.

And yes, I do work as a sysadmin, where 98% of our application is written in Ruby on Rails, the other 2% that actually works is written in Perl & some bash.

Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?