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
WorkinOnTheRailsRoad
PPT
Workin ontherailsroad
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
WorkinOnTheRailsRoad
Workin ontherailsroad
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
Approach and Philosophy of On baking technology
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Spectroscopy.pptx food analysis technology
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Cloud computing and distributed systems.
PPT
Teaching material agriculture food technology
PDF
Empathic Computing: Creating Shared Understanding
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Encapsulation theory and applications.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Big Data Technologies - Introduction.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Approach and Philosophy of On baking technology
Encapsulation_ Review paper, used for researhc scholars
Machine learning based COVID-19 study performance prediction
Spectroscopy.pptx food analysis technology
sap open course for s4hana steps from ECC to s4
Cloud computing and distributed systems.
Teaching material agriculture food technology
Empathic Computing: Creating Shared Understanding
Reach Out and Touch Someone: Haptics and Empathic Computing
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Encapsulation theory and applications.pdf
MYSQL Presentation for SQL database connectivity
“AI and Expert System Decision Support & Business Intelligence Systems”
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Big Data Technologies - Introduction.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton

Ruby Class 1