Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Open Source > BOOK: Beginning Ruby on Rails
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 15th, 2007, 05:46 PM
Registered User
 
Join Date: Mar 2007
Location: , , .
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.

  #2 (permalink)  
Old March 15th, 2007, 06:51 PM
Registered User
 
Join Date: Mar 2007
Location: , , .
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...
  #3 (permalink)  
Old March 16th, 2007, 05:49 AM
Friend of Wrox
Points: 1,515, Level: 15
Points: 1,515, Level: 15 Points: 1,515, Level: 15 Points: 1,515, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2003
Location: Oxford, , United Kingdom.
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
  #4 (permalink)  
Old March 16th, 2007, 02:05 PM
Registered User
 
Join Date: Mar 2007
Location: , , .
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.

  #5 (permalink)  
Old March 28th, 2007, 02:24 AM
Friend of Wrox
Points: 1,515, Level: 15
Points: 1,515, Level: 15 Points: 1,515, Level: 15 Points: 1,515, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2003
Location: Oxford, , United Kingdom.
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
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 07:20 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.