SlideShare a Scribd company logo
Top 10+ Things
 Every .NET Developer
Should Know About Ruby

       Jeff Cohen
       @jeffcohen
jeff@purpleworkshops.com
Windy City Rails
 Sept. 12, 2009

      Essential Javascript
         Oct. 17, 2009

            Rails for Everyone
              Oct. 24, 2009
Top 10+ Things
 Every .NET Developer
Should Know About Ruby
1. History & Philosophy

SmallTalk    C++   Ruby   Java VB6     C#
 1983       Perl   1993   1995 1996   2000
            1989
1. History & Philosophy



Yukihiro Matsumoto
     "Matz"
1. History & Philosophy

2003 Interview with Matz:
http://www.artima.com/intv/ruby.html

Minimal Interface vs. Humane Interface

What You Feel > What You Can Do

Sapir-Whorff Hypothesis
2. irb


 "Immediate Mode"
for Ruby developers
3. Conventions
MyClass

methods_are_in_lowercase

methods_can_be_questions?

some_methods_have_consequences!

methods_can_set_a_value=

@instance_variable

MY_CONSTANT or MyConstant or MyClass
4. Objects

Everything is an object

A class is an object

No "primitives."

You can pass classes around like objects

Easy reflection/introspection
5. Messages

Think in Messages, not Methods

"hello".length

"hello".send(:length)

All message handlers (ok, fine: "methods")
return a value to the calling code
6. Blocks

Extremely Common Ruby Idiom

Most Seen in Iterators

Anoymous Methods

Can Be Saved For Later Use (lambda)
7. It's Just a Script


No compilation

A class "declaration" is code that's executing!
8. Dynamic Typing

The type of an object is deduced at runtime

Open Classes

Object-Specific Type (enables Singleton Methods)

Strongly Typed even though not Statically Typed

IntelliSense is hard to do
In Case You Rant At Me
About The Lack of Intellisense
   It rots your mind:
   http://www.charlespetzold.com/etc/
   DoesVisualStudioRotTheMind.html

   It forces bottom-up design

   It forces linear programming, not free-form
   experimentation

   It discourages Test-Driven Development

   It's a sign that your API is TOO FREAKING BIG
9. OOP

Use Modules to Mix-In Behavior

Don't Worry About Interfaces

Duck Typing

No Abstract Classes
10. Metaprogramming
method_missing

Add methods and attributes at run time

Can do prototype-style programming

Rails gained fame by intelligent usage of
metaprogramming techniques
11. Even More...

Ruby Class Methods vs. .NET Static Methods

begin/rescue/ensure vs. try/catch/finally

String interpolation

Other new things: symbols, lambdas, closures

No method overloading
C'mon in - the water's fine!

  Rails for Everyone
    Oct. 24, 2009
       $395.00
   purpleworkshops.com

More Related Content

What's hot (18)

PDF
Ruby memory model
Hari Krishnan‎
 
PPTX
Ruby
krupasuthar
 
PDF
Code analyzer: FindBugs and PMD
Kan-Han (John) Lu
 
PDF
Java Interview Questions-5
zynofustechnology
 
PDF
Moving to PHP from Java
Ivo Roberto Batistela
 
DOCX
Java Interview Questions - 1
zynofustechnology
 
PDF
Twins: OOP and FP
RichardWarburton
 
PDF
What are the benefits of reactive programming in java
Dmytro Melnychuk
 
PDF
Live Typing - California Smalltalkers
Hernan Wilkinson
 
PPT
Intro To Ror
myuser
 
PPTX
How to not suck at JavaScript
tmont
 
PDF
Ruby on Rails: a brief introduction
Luigi De Russis
 
PPTX
Java presentation
Md. Taiseen Azam
 
PDF
Metaprogramming in Ruby
jonromero
 
PDF
What is-pmd
3trg
 
PDF
Day1 - TDD (Lecture SS 2015)
wolframkriesing
 
PDF
Basics of Metaprogramming in Ruby
Digital Natives
 
PDF
TypeScript - An Introduction
NexThoughts Technologies
 
Ruby memory model
Hari Krishnan‎
 
Code analyzer: FindBugs and PMD
Kan-Han (John) Lu
 
Java Interview Questions-5
zynofustechnology
 
Moving to PHP from Java
Ivo Roberto Batistela
 
Java Interview Questions - 1
zynofustechnology
 
Twins: OOP and FP
RichardWarburton
 
What are the benefits of reactive programming in java
Dmytro Melnychuk
 
Live Typing - California Smalltalkers
Hernan Wilkinson
 
Intro To Ror
myuser
 
How to not suck at JavaScript
tmont
 
Ruby on Rails: a brief introduction
Luigi De Russis
 
Java presentation
Md. Taiseen Azam
 
Metaprogramming in Ruby
jonromero
 
What is-pmd
3trg
 
Day1 - TDD (Lecture SS 2015)
wolframkriesing
 
Basics of Metaprogramming in Ruby
Digital Natives
 
TypeScript - An Introduction
NexThoughts Technologies
 

Similar to Top 10+ Things .NET Developers Should Know About Ruby (20)

PPT
Workin ontherailsroad
Jim Jones
 
PPT
WorkinOnTheRailsRoad
webuploader
 
PPT
Rapid Application Development using Ruby on Rails
Simobo
 
PPTX
Optimizing for programmer happiness
Josh Schramm
 
PPT
Ruby On Rails Presentation
Paul Pajo
 
PDF
ORUG - Sept 2014 - Lesson When Learning Ruby/Rails
danielrsmith
 
PDF
10 Things you should know about Ruby
sikachu
 
PDF
Workin On The Rails Road
RubyOnRails_dude
 
PPT
Introduction to Ruby on Rails
mithunsasidharan
 
PDF
Ruby On Rails
Balint Erdi
 
ODP
Ruby On Rails - Rochester K Linux User Group
Jose de Leon
 
PPT
Ruby on rails
chamomilla
 
PPT
Ruby On Rails Seminar Basis Softexpo Feb2010
arif44
 
PPTX
Why Ruby?
IT Weekend
 
PDF
FGCU Camp Talk
Mark Brooks
 
PDF
Is Ruby on Rails Object Oriented? A Comprehensive Exploration
rorbitssoftware
 
PPT
Ruby On Rails
guest4faf46
 
ZIP
Meta Programming in Ruby - Code Camp 2010
ssoroka
 
PPTX
Ruby on Rails Introduction M&P - IT Skill Development Program 07
Muhammad Sunny ✈
 
PPTX
Ruby on rails for beginers
shanmukhareddy dasi
 
Workin ontherailsroad
Jim Jones
 
WorkinOnTheRailsRoad
webuploader
 
Rapid Application Development using Ruby on Rails
Simobo
 
Optimizing for programmer happiness
Josh Schramm
 
Ruby On Rails Presentation
Paul Pajo
 
ORUG - Sept 2014 - Lesson When Learning Ruby/Rails
danielrsmith
 
10 Things you should know about Ruby
sikachu
 
Workin On The Rails Road
RubyOnRails_dude
 
Introduction to Ruby on Rails
mithunsasidharan
 
Ruby On Rails
Balint Erdi
 
Ruby On Rails - Rochester K Linux User Group
Jose de Leon
 
Ruby on rails
chamomilla
 
Ruby On Rails Seminar Basis Softexpo Feb2010
arif44
 
Why Ruby?
IT Weekend
 
FGCU Camp Talk
Mark Brooks
 
Is Ruby on Rails Object Oriented? A Comprehensive Exploration
rorbitssoftware
 
Ruby On Rails
guest4faf46
 
Meta Programming in Ruby - Code Camp 2010
ssoroka
 
Ruby on Rails Introduction M&P - IT Skill Development Program 07
Muhammad Sunny ✈
 
Ruby on rails for beginers
shanmukhareddy dasi
 
Ad

Recently uploaded (20)

PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
PDF
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
PDF
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
PDF
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
PPTX
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
PDF
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PDF
Français Patch Tuesday - Juillet
Ivanti
 
PDF
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
Français Patch Tuesday - Juillet
Ivanti
 
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Ad

Top 10+ Things .NET Developers Should Know About Ruby

  • 1. Top 10+ Things Every .NET Developer Should Know About Ruby Jeff Cohen @jeffcohen [email protected]
  • 2. Windy City Rails Sept. 12, 2009 Essential Javascript Oct. 17, 2009 Rails for Everyone Oct. 24, 2009
  • 3. Top 10+ Things Every .NET Developer Should Know About Ruby
  • 4. 1. History & Philosophy SmallTalk C++ Ruby Java VB6 C# 1983 Perl 1993 1995 1996 2000 1989
  • 5. 1. History & Philosophy Yukihiro Matsumoto "Matz"
  • 6. 1. History & Philosophy 2003 Interview with Matz: http://www.artima.com/intv/ruby.html Minimal Interface vs. Humane Interface What You Feel > What You Can Do Sapir-Whorff Hypothesis
  • 7. 2. irb "Immediate Mode" for Ruby developers
  • 9. 4. Objects Everything is an object A class is an object No "primitives." You can pass classes around like objects Easy reflection/introspection
  • 10. 5. Messages Think in Messages, not Methods "hello".length "hello".send(:length) All message handlers (ok, fine: "methods") return a value to the calling code
  • 11. 6. Blocks Extremely Common Ruby Idiom Most Seen in Iterators Anoymous Methods Can Be Saved For Later Use (lambda)
  • 12. 7. It's Just a Script No compilation A class "declaration" is code that's executing!
  • 13. 8. Dynamic Typing The type of an object is deduced at runtime Open Classes Object-Specific Type (enables Singleton Methods) Strongly Typed even though not Statically Typed IntelliSense is hard to do
  • 14. In Case You Rant At Me About The Lack of Intellisense It rots your mind: http://www.charlespetzold.com/etc/ DoesVisualStudioRotTheMind.html It forces bottom-up design It forces linear programming, not free-form experimentation It discourages Test-Driven Development It's a sign that your API is TOO FREAKING BIG
  • 15. 9. OOP Use Modules to Mix-In Behavior Don't Worry About Interfaces Duck Typing No Abstract Classes
  • 16. 10. Metaprogramming method_missing Add methods and attributes at run time Can do prototype-style programming Rails gained fame by intelligent usage of metaprogramming techniques
  • 17. 11. Even More... Ruby Class Methods vs. .NET Static Methods begin/rescue/ensure vs. try/catch/finally String interpolation Other new things: symbols, lambdas, closures No method overloading
  • 18. C'mon in - the water's fine! Rails for Everyone Oct. 24, 2009 $395.00 purpleworkshops.com

Editor's Notes

  • #10: Class.new => Object Factory 1.class obj.nil? hello.methods.sort