Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

10 Things you should know about Ruby

on

  • 9,254 views

Interrest in Ruby? I think these are 10 things you should know about it.

Interrest in Ruby? I think these are 10 things you should know about it.

This slide is released under CC-BY-NC-SA

Statistics

Views

Total Views
9,254
Views on SlideShare
3,469
Embed Views
5,785

Actions

Likes
10
Downloads
52
Comments
0

7 Embeds 5,785

http://sikachu.com 5772
http://feeds.feedburner.com 5
http://webcache.googleusercontent.com 4
http://orhowilearnedtolovetheperl.com 1
http://bitly.com 1
http://translate.googleusercontent.com 1
http://www.google.co.th 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

10 Things you should know about Ruby 10 Things you should know about Ruby Presentation Transcript

  • 10 Things You Should Know About Ruby
  • 1. Ruby != Rails
  • • Programming Language • 1995 – First public release • Many Implementations • MRI 1.8 – Matz’s Ruby Intepreter • YARV 1.9 • JRuby • IronRuby • Rubinius • MacRuby • MagLev
  • “I wanted a scripting language that was more powerful than Perl, and more object-oriented than Python. That's why I decided to design my own language”
  • { Smalltalk Perl Lisp Scheme Python CLU Eiffel Ada Dylan
  • • Web application framework written in Ruby • “Ruby” on “Rails” • David Heinemeier Hansson (DHH) • Extracted from 37Signal’s Basecamp in 2004
  • • Open Source • Currently maintained by Rails Core Team • git://github.com/rails/rails • Latest version: 3.0.1
  • No more confusion! http://www.flickr.com/photos/ecstaticist/2589723846/
  • 2. Simple syntax
  • Too Easy! http://www.flickr.com/photos/clairity/143368932/
  • 3. Pure Object-Oriented
  • Everything in Ruby is Object
  • No Primitive
  • Even nil ...
  • ... and class!
  • Related to duck! http://www.flickr.com/photos/gastev/2630867950/
  • 4. No method call
  • “Message sending”
  • http://www.flickr.com/photos/headlouse/1484615917/
  • 5. Mixin
  • Module
  • Module • Collection of methods and constants • Not-instanciatable • But callable • Append features upon included
  • Multiple inheritance is very bad
  • Mixin • Include methods you want from another module • No limit of how many modules you include
  • { 6. } (block)
  • “Closure”
  • Ruby’s Block • Passing a block as argument • Method “yield” or “call” the block • May passing a object as argument • Result from the block goes back to the method
  • 7. We love duck http://www.flickr.com/photos/ymorimo/3975152607/
  • Duck typing • If it quacks like a duck, it’s a duck! • Check for object’s property, not interface
  • Duck Punching!
  • Duck Punching (Monkey patch) • Objects and class are open • Add method to object even at Runtime! • Not really recommend, less maintainability, might break some stuff • But it’s awesome
  • 8. Testing is FFFF**... (FFFFUUNNN)
  • Encourage testing
  • Testing ... • Ensure everything still works after you make change to something else • Save you ass from client’s call at 3AM • Test driven development • Write test – watch it fails – write just enough code to make it pass – refactor
  • Testing tools • RSpec • Cucumber • Test::Unit • Rack::Test
  • 9. RubyGems
  • Libraries in Ruby
  • http://rubygems.org
  • Gem • Library written under Ruby or C • Packaged by owner and upload to RubyGems.org • Easy to install, just gem install gem_name
  • 10. IT’S FUN!
  • Question? Thank you! Prem Sichanugrist 3.9454 in Beautiful Software @sikachu http://sikachu.com