Wrox Programmer Forums
|
BOOK: Beginning Ruby on Rails
This is the forum to discuss the Wrox book Beginning Ruby on Rails by Steve Holzner Ph.D.; ISBN: 9780470069158
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Ruby on Rails section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 15th, 2007, 05:46 PM
Registered User
 
Join Date: Mar 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ruby on rails>>chomp

on p 17 of begining ruby on rails by holzner, he talks about how you cant use the chomp method with any other variable than the built $_ variable and goes on to demonstrate this very strange and convoluted code example:

print "Please enter the temperature: "
temperature = gets
$_ = temperature
chomp
temperature = $_
puts "The temperature is #{temperature}

That code above is just insane, one of the main points of ruby is making things simple

why not try this code instead

print "Please enter the temperature: "
puts "The temperature is #{gets.chomp}. This is after the chomp"

or to demonstrate that the author is in fact wrong about why he needed to create that convoluted code example why not do it like this

print "Please enter the temperature:"
temp = gets
puts "The temperature is #{temp.chomp}. this is after the chomp"

that works fine even though he says it shouldn't. I dont know if i want to use a book to learn something new from an author who makes a simple error like this, how many more errors are there in the book? who knows.

 
Old March 15th, 2007, 06:51 PM
Registered User
 
Join Date: Mar 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

================================================== =================
I dont know if i want to use a book to learn something new from an author who makes a simple error like this, how many more errors are there in the book? who knows.
================================================== =================

*I agree

Anyone know any good 'Ruby on Rails' books for beginners? I'm starting to get fed up w/ this one...
 
Old March 16th, 2007, 05:49 AM
Friend of Wrox
 
Join Date: Dec 2003
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
Default

The O'Reilly one is pretty good. Agile web development with RoR IRIC.

--
Charlie Harvey's website - linux, perl, java, anarchism and punk rock: http://charlieharvey.org.uk
 
Old March 16th, 2007, 02:05 PM
Registered User
 
Join Date: Mar 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

any major errors with the O'Reilly? I'm looking through the Errata section, it seems like it has the same amount of errors as this book.

 
Old March 28th, 2007, 02:24 AM
Friend of Wrox
 
Join Date: Dec 2003
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Might be fixed in the second edition?

--
Charlie Harvey's website - linux, perl, java, anarchism and punk rock: http://charlieharvey.org.uk





Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help with Ruby on Rails - Please Help sfazel Other Programming Languages 1 April 8th, 2008 05:03 AM
Beginning Ruby on Rails - chapter 11: Ajax & Rails rornet BOOK: Beginning Ruby on Rails 1 June 22nd, 2007 04:10 PM
Chpt 7 >> Pg 245 >>Try It Out #4-5 harrison4411 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 March 2nd, 2006 06:26 PM
Achitecture ? SQL -> XML -> ASP -> PDF or HTML Frm jstrong Classic ASP XML 0 July 9th, 2005 01:18 PM
VB.Net -> Filename -> DTS Package -> tempdB daniel Pro VB.NET 2002/2003 1 October 7th, 2004 01:46 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.