SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Frustrated Newbie looking for Ruby literature

    I have some programming experience, but not with OOP style languages. I have been looking through some of the online Ruby tutorials, but am getting extremely frustrated. They give cutsey examples that are very limited in their scope, and aren't good for much. For example, I want to create a Hash. I can see how to create a basic hash, but I want to know everything about a hash, such as how to add records, how to delete records, etc. I don't want a pre-populated hash, I want to build one on the fly. I haven't found anything that shows me this. The technical reference manuals are too technical, and the tutorials are too simple. Isn't there anything out there that just gives complete, simple information (including examples), of whatever part you want to learn about? Sorry, but I've been looking at it for a few days, and can't seem to be able to get anything to work right. It is very frustrating!

  2. #2
    SitePoint Zealot
    Join Date
    Jul 2004
    Location
    Oklahoma
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jeryst
    I have some programming experience, but not with OOP style languages. I have been looking through some of the online Ruby tutorials, but am getting extremely frustrated. They give cutsey examples that are very limited in their scope, and aren't good for much. For example, I want to create a Hash. I can see how to create a basic hash, but I want to know everything about a hash, such as how to add records, how to delete records, etc. I don't want a pre-populated hash, I want to build one on the fly. I haven't found anything that shows me this. The technical reference manuals are too technical, and the tutorials are too simple. Isn't there anything out there that just gives complete, simple information (including examples), of whatever part you want to learn about? Sorry, but I've been looking at it for a few days, and can't seem to be able to get anything to work right. It is very frustrating!
    Here are a few samples I just whipped through in IRB. This is obviously simple, but I can't imagine what else you'd need to know about inserting something into a hash.
    Code:
    irb> h = Hash.new
    => {}
    irb> h["something"] = "something else"
    => "something else"
    irb> h
    => {"something"=>"something else"}
    irb> i = {"something"=>"something else"}
    => {"something"=>"something else"}
    irb> i.class
    => Hash
    irb> s = "key"
    => "key"
    irb> v = "value"
    => "value"
    irb> h[s] = v
    => "value"
    irb> h
    => {"something"=>"something else", "key"=>"value"}
    irb> h.delete(s)
    => {"something"=>"something else"}
    irb> h.delete("something")
    => {}

  3. #3
    Web developer Carl's Avatar
    Join Date
    Sep 2003
    Location
    sweden
    Posts
    320
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A few things. The Programming Ruby Book is good and is online in several places. But the organization of the book makes it a terrible reference guide. As of yet there is no website similar to that of php.net that is organized by usage rather than program language objects, methods and classes. I am going to try and put up as much as I can on my site because I am frustrated by this also.

    Another thing I am frustrated by is the link rule at Sitepoint. I understand why it is so but it does not make it any less frustrating. If you go to my site and do a search for Arrays and Hashes you will the information you need.

  4. #4
    Web developer Carl's Avatar
    Join Date
    Sep 2003
    Location
    sweden
    Posts
    320
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I forgot to mention. If you are coming from a language like ASP,PHP, Perl ....ad infi..then the best book to get is the Ruby Cookbook by O'reilly.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •