SlideShare a Scribd company logo
RubyClass
The Ruby LanguageOriginally  by Yukihiro "Matz" Matsumoto“Ruby is designed for programmer productivity and fun, following the principles of good user interface design. He stresses that systems design needs to emphasize human, rather than computer, needs.”http://en.wikipedia.org/wiki/Ruby_(programming_language)#HistoryRuby 1.0 was released in 1996.
The Ruby LanguageDynamically typedInterpretedCan be modified at runtimeObject orientedBlocks & lambdasNice support for Regular Expressions
Ruby ImplementationsRuby 1.8.x (MRI)Ruby 1.9.x (YARV)RubiniusJRubyMacRuby, HotCocoaIronRuby for .NET
What you will learnRubyLanguage concepts & toolsLanguage syntaxSome standard library classes & gemsCommon patterns
BookThe Well-Grounded RubyistCovering Ruby 1.9David A. Black
How you will learnExploration: experiment, playTest-Driven Development (TDD)Initially as a learning methodologyLater as a development methodologyAsk questionsLearn to find your own answersReadPlus whatever works best for you
Class StructureTalkLive Coding DemonstrationsIn-class codingCoding at home (or in social groups)Google Group
Other ResourcesSF Ruby MeetupRailsBridgeSee Last page of hand-out for more
Ruby Class 1
Ruby Language OverviewDynamically typedInterpretedCan be modified at runtimeObject orientedBlocks & lambdasNice support for Regular Expressions
Lets get startedIRB: InteractiveRuBy>> 4>> 4 + 4
Everything is an object“test”.upcase“test”.class“test”.methods
Everything evaluates to something2 + 2(2+2).zero?
Methods are Messagesthing.do(4)thing.do 4thing.send “do”, 4
Operators are Methodsthing.do 4thing.do(4)thing.send “do”, 41 + 21.+(2)1.send "+", 2
Write your first Ruby class
Test-First LearningSimilar methodology to TDDwith a different purpose and workflowTeacher writes the testStudent implements the code
Test-Driven DevelopmentDesignFocus / Project ManagementDocumentation / CollaborationCreation of Tests
Moving to TDDBuild tests before refactoring or upgradingTest-drive bug fixesWrite tests for anything you worry aboutContinuous Integration is essentialRemove unused (untested) code
RED – GREEN – REFACTORWrite the testWatch it failMake it passMake the code good, make sure it still passes
Unit Test FrameworksTest::UnitShouldaRspechttp://github.com/ultrasaurus/test-framework-comparison
Integration Test FrameworksCucumberWebratSeleniumAnd more…
RspecDescribe the featureVerify expectation
Demonstration

More Related Content

PPTX
1 Intro
PPTX
Ruby on Rails Fundamentals, Class 1
KEY
Keeping ruby reasonable
PDF
Class One: The Computer
KEY
Ruby performance
KEY
Código Saudável => Programador Feliz - Rs on Rails 2010
PDF
The ruby-way
PDF
Let's Learn Ruby - Basic
1 Intro
Ruby on Rails Fundamentals, Class 1
Keeping ruby reasonable
Class One: The Computer
Ruby performance
Código Saudável => Programador Feliz - Rs on Rails 2010
The ruby-way
Let's Learn Ruby - Basic

Similar to Ruby Class 1 (20)

KEY
Intro to Ruby (and RSpec)
PDF
Ruby an overall approach
PPTX
Ruby basics
PPTX
Ruby -the wheel Technology
PPT
Workin ontherailsroad
PPT
WorkinOnTheRailsRoad
PPT
Ruby Hell Yeah
PPTX
Ruby from zero to hero
PPTX
Ruby Basics
PPT
Ruby for C# Developers
PPTX
Code for Startup MVP (Ruby on Rails) Session 2
PDF
Introduction to Ruby & Modern Programming
PDF
Workin On The Rails Road
PDF
Ruby_Basic
PPTX
Ruby for .NET developers
PDF
Ruby training day1
PPTX
Ruby :: Training 1
PPT
Rapid Application Development using Ruby on Rails
KEY
Introduction to Ruby
Intro to Ruby (and RSpec)
Ruby an overall approach
Ruby basics
Ruby -the wheel Technology
Workin ontherailsroad
WorkinOnTheRailsRoad
Ruby Hell Yeah
Ruby from zero to hero
Ruby Basics
Ruby for C# Developers
Code for Startup MVP (Ruby on Rails) Session 2
Introduction to Ruby & Modern Programming
Workin On The Rails Road
Ruby_Basic
Ruby for .NET developers
Ruby training day1
Ruby :: Training 1
Rapid Application Development using Ruby on Rails
Introduction to Ruby
Ad

More from Sarah Allen (20)

PDF
Internet security: a landscape of unintended consequences
PPTX
RTMP: how did we get to now? (Demuxed 2019)
PDF
Communication is a Technical Skill
PPTX
Improving Federal Government Services
PPTX
Transparency Wins
PPTX
A Short History of Computers
PPTX
Making Software Fun
PPTX
Power of Transparency
PPTX
Designing for Fun
PDF
Ruby in the US Government for Ruby World Conference
PDF
Identities of Dead People
PDF
Let's pretend
PDF
3 Reasons Not to Use Ruby
PDF
Ruby Nation: Why no haz Ruby?
PDF
Why no ruby in gov?
PDF
People Patterns or What I learned from Toastmasters
PDF
Blazing Cloud: Agile Product Development
PDF
Crowdsourced Transcription Landscape
PDF
Lessons Learned Future Thoughts
PDF
Mobile Web Video
Internet security: a landscape of unintended consequences
RTMP: how did we get to now? (Demuxed 2019)
Communication is a Technical Skill
Improving Federal Government Services
Transparency Wins
A Short History of Computers
Making Software Fun
Power of Transparency
Designing for Fun
Ruby in the US Government for Ruby World Conference
Identities of Dead People
Let's pretend
3 Reasons Not to Use Ruby
Ruby Nation: Why no haz Ruby?
Why no ruby in gov?
People Patterns or What I learned from Toastmasters
Blazing Cloud: Agile Product Development
Crowdsourced Transcription Landscape
Lessons Learned Future Thoughts
Mobile Web Video
Ad

Recently uploaded (20)

PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
PDF
SparkLabs Primer on Artificial Intelligence 2025
PDF
Event Presentation Google Cloud Next Extended 2025
PDF
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
PDF
This slide provides an overview Technology
PDF
CIFDAQ's Token Spotlight: SKY - A Forgotten Giant's Comeback?
PDF
Why Endpoint Security Is Critical in a Remote Work Era?
PDF
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
PDF
Smarter Business Operations Powered by IoT Remote Monitoring
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
PDF
Reimagining Insurance: Connected Data for Confident Decisions.pdf
PDF
Chapter 2 Digital Image Fundamentals.pdf
PDF
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
CroxyProxy Instagram Access id login.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
Top Generative AI Tools for Patent Drafting in 2025.pdf
PDF
Dell Pro 14 Plus: Be better prepared for what’s coming
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
SparkLabs Primer on Artificial Intelligence 2025
Event Presentation Google Cloud Next Extended 2025
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
This slide provides an overview Technology
CIFDAQ's Token Spotlight: SKY - A Forgotten Giant's Comeback?
Why Endpoint Security Is Critical in a Remote Work Era?
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
Smarter Business Operations Powered by IoT Remote Monitoring
A Day in the Life of Location Data - Turning Where into How.pdf
Reimagining Insurance: Connected Data for Confident Decisions.pdf
Chapter 2 Digital Image Fundamentals.pdf
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
NewMind AI Weekly Chronicles - August'25 Week I
CroxyProxy Instagram Access id login.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
GamePlan Trading System Review: Professional Trader's Honest Take
Top Generative AI Tools for Patent Drafting in 2025.pdf
Dell Pro 14 Plus: Be better prepared for what’s coming

Ruby Class 1