SlideShare a Scribd company logo
1 of 26
Ruby the Core Language
         Fall 2012
Introductions



Renée De Voursney   Background
renee@nird.us       Hidden Talent
Class Structure


Lecture, Demos, In-Class Exercises

Experimentation & Exploration

Resources & Homework

Questions & Parking Lot
Grades?!


Attendance (2 absences) - 25%

Homework (1-2 hours a week) - 25%

2 Take-Home Tests - 25%

1 Project - 25%
Office Hours


Renée: Monday 6pm-8pm

  HipChat, Phone, Skype, E-mail, iChat
Nell: Sunday 4pm-6pm

 HipChat, Skype, E-mail, gChat

 (Will also gladly respond to Hipchats and
 emails throughout the week)
Ruby


Created by Yukihiro "Matz" Matsumoto

Ruby 1.0 released in 1996

Ruby is for People

MINSWAN
The Ruby World


Toolsets

Best Practices

Common Uses
Install Check

Command Prompt

Git

Ruby

Rspec

Editor (Syntax Highlighting)
Install Check

Command Prompt (CLI)

  Mac: Terminal, iTerm, etc...

  Unix: bash, zsh, csh, etc....

  Windows: Command Prompt w/ Ruby on
  Rails
Git


which git

  ex: /usr/local/bin/git

git --version

  ex: git version 1.7.10.2
Ruby

which ruby

  ex: /Users/renee/.rvm/rubies/ruby-1.9.3-
  p194/bin/ruby

ruby -v

  ex: ruby 1.9.3p194 (2012-04-20 revision
  35410) [x86_64-darwin11.3.0]
Ruby Interpreter

irb

  ex:

  1.9.3-p194 :001 > 1+2

      => 3

  1.9.3-p194 :002 > exit
RSpec
gem install rspec

   ex: Fetching: rspec-core-2.11.1.gem (100%)

gem list

   ex:

   diff-lcs (1.1.3), rspec (2.11.0), rspec-core (2.11.1), rspec-
   expectations (2.11.3), rspec-mocks (2.11.3)

rspec -v

   ex:

   2.11.1
Editor


Sublime, Komodo, RubyMine, Vim (!), Emacs (!),
Redcar

Mac: TextMate
Git


Source Control System

Timeline, Track Changes

Branching and Merging

Code Safety
Git Commands
git clone / init

git status

git add / rm

git commit

git push

git log
GitHub
Setup a GitHub Account

 Sign-up: https://github.com/signup/free

 Set-up: https://help.github.com/articles/set-
 up-git#platform-all

 SSH Key: https://help.github.com/articles/
 generating-ssh-keys#platform-all
HipChat


https://www.hipchat.com

In-Class Back-Channel

Questions, Discussion
Demo!

Fork on GitHub

Clone my copy

Make changes

Commit and Push changes

Send a pull request
In-Class Exercise!

Fork

Clone

Change

Push

Pull Request
RSpec Intro

Code that Tests code!

Test Driven Development

  Red-Green-Refactor

Test First Teaching

Ruby Domain Specific Language (DSL) for
testing
RSpec Specifics

Describe (What) / Context (When)

It (Does)

Should

Matchers

  http://rubydoc.info/gems/rspec-
  expectations/2.4.0/RSpec/Matchers
Rspec Demo!


make a new rspec file

run rspec

walk through rspec_spec.rb
In-Class Exercise


Run exercises/rspec_spec.rb

Fix the broken in-class test

Add the 3 pending in-class tests (don’t forget
the do/end and should!)
Homework!


Read Chapter 3 Classes, Objects, and
Variables

Read p.90-94 Strings

More Related Content

What's hot

What's hot (20)

Ruby Presentation - Article
Ruby Presentation - ArticleRuby Presentation - Article
Ruby Presentation - Article
 
A Quick Start - Version Control with Git
A Quick Start - Version Control with GitA Quick Start - Version Control with Git
A Quick Start - Version Control with Git
 
Git slide
Git slideGit slide
Git slide
 
Git inter-snapshot public
Git  inter-snapshot publicGit  inter-snapshot public
Git inter-snapshot public
 
SouthEast LinuxFest 2015 - intro to git
SouthEast LinuxFest 2015 -  intro to gitSouthEast LinuxFest 2015 -  intro to git
SouthEast LinuxFest 2015 - intro to git
 
FTP Commando to Git Hero - WordCamp Denver 2013
FTP Commando to Git Hero - WordCamp Denver 2013FTP Commando to Git Hero - WordCamp Denver 2013
FTP Commando to Git Hero - WordCamp Denver 2013
 
Quick and easy way to get started with Git & GitHub
Quick and easy way to get started with Git & GitHubQuick and easy way to get started with Git & GitHub
Quick and easy way to get started with Git & GitHub
 
git入門取得編
git入門取得編git入門取得編
git入門取得編
 
Subversion To Mercurial
Subversion To MercurialSubversion To Mercurial
Subversion To Mercurial
 
4055-841_Project_ShailendraSadh
4055-841_Project_ShailendraSadh4055-841_Project_ShailendraSadh
4055-841_Project_ShailendraSadh
 
Dockerized ROS Package
Dockerized ROS PackageDockerized ROS Package
Dockerized ROS Package
 
Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!
 
Luis atencio on_git
Luis atencio on_gitLuis atencio on_git
Luis atencio on_git
 
Dependency management in golang
Dependency management in golangDependency management in golang
Dependency management in golang
 
Mission ImpAnsible - NSM at (RobotFrame)work
Mission ImpAnsible - NSM at (RobotFrame)work Mission ImpAnsible - NSM at (RobotFrame)work
Mission ImpAnsible - NSM at (RobotFrame)work
 
Git Heaven with Wakanda
Git Heaven with WakandaGit Heaven with Wakanda
Git Heaven with Wakanda
 
Native hook mechanism in Android Bionic linker
Native hook mechanism in Android Bionic linkerNative hook mechanism in Android Bionic linker
Native hook mechanism in Android Bionic linker
 
Learn Git Basics
Learn Git BasicsLearn Git Basics
Learn Git Basics
 
Presentacion git
Presentacion gitPresentacion git
Presentacion git
 
Mini git tutorial
Mini git tutorialMini git tutorial
Mini git tutorial
 

Viewers also liked

How to sell a new car
How to sell a new carHow to sell a new car
How to sell a new car
drewking21
 

Viewers also liked (6)

Fasilitator Pembangunan Air Minum dan Penyehatan Lingkungan
Fasilitator Pembangunan Air Minum dan Penyehatan LingkunganFasilitator Pembangunan Air Minum dan Penyehatan Lingkungan
Fasilitator Pembangunan Air Minum dan Penyehatan Lingkungan
 
How to sell a new car
How to sell a new carHow to sell a new car
How to sell a new car
 
Think Globally, Act Locally: Undergraduates Share International Experiences w...
Think Globally, Act Locally: Undergraduates Share International Experiences w...Think Globally, Act Locally: Undergraduates Share International Experiences w...
Think Globally, Act Locally: Undergraduates Share International Experiences w...
 
Creating Buy-In and Consistency: Using Workgroups to Create Change in a Natio...
Creating Buy-In and Consistency: Using Workgroups to Create Change in a Natio...Creating Buy-In and Consistency: Using Workgroups to Create Change in a Natio...
Creating Buy-In and Consistency: Using Workgroups to Create Change in a Natio...
 
Vers une place renouvelée du citadin dans les démarches d’expérimentation urb...
Vers une place renouvelée du citadin dans les démarches d’expérimentation urb...Vers une place renouvelée du citadin dans les démarches d’expérimentation urb...
Vers une place renouvelée du citadin dans les démarches d’expérimentation urb...
 
Indonesia Water and Sanitation Highlight 2005. PERCIK. Indonesia Water and Sa...
Indonesia Water and Sanitation Highlight 2005. PERCIK. Indonesia Water and Sa...Indonesia Water and Sanitation Highlight 2005. PERCIK. Indonesia Water and Sa...
Indonesia Water and Sanitation Highlight 2005. PERCIK. Indonesia Water and Sa...
 

Similar to Week1

Ruby 1.9 And Rails 3.0
Ruby 1.9 And Rails 3.0Ruby 1.9 And Rails 3.0
Ruby 1.9 And Rails 3.0
ArrrrCamp
 
From Code to Cloud - PHP on Red Hat's OpenShift
From Code to Cloud - PHP on Red Hat's OpenShiftFrom Code to Cloud - PHP on Red Hat's OpenShift
From Code to Cloud - PHP on Red Hat's OpenShift
Eric D. Schabell
 

Similar to Week1 (20)

Ruby on Rails 3 Day BC
Ruby on Rails 3 Day BCRuby on Rails 3 Day BC
Ruby on Rails 3 Day BC
 
The story of language development
The story of language developmentThe story of language development
The story of language development
 
Ruby
RubyRuby
Ruby
 
The details of CI/CD environment for Ruby
The details of CI/CD environment for RubyThe details of CI/CD environment for Ruby
The details of CI/CD environment for Ruby
 
How to Begin to Develop Ruby Core
How to Begin to Develop Ruby CoreHow to Begin to Develop Ruby Core
How to Begin to Develop Ruby Core
 
20140918 ruby kaigi2014
20140918 ruby kaigi201420140918 ruby kaigi2014
20140918 ruby kaigi2014
 
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
 
Open shift
Open shiftOpen shift
Open shift
 
Ruby 1.9 And Rails 3.0
Ruby 1.9 And Rails 3.0Ruby 1.9 And Rails 3.0
Ruby 1.9 And Rails 3.0
 
빈스톡 첫인상 with Git
빈스톡 첫인상 with Git빈스톡 첫인상 with Git
빈스톡 첫인상 with Git
 
The secret of programming language development and future
The secret of programming  language development and futureThe secret of programming  language development and future
The secret of programming language development and future
 
Codemotion 2012 Rome - An OpenShift Primer
Codemotion 2012 Rome - An OpenShift PrimerCodemotion 2012 Rome - An OpenShift Primer
Codemotion 2012 Rome - An OpenShift Primer
 
How to distribute Ruby to the world
How to distribute Ruby to the worldHow to distribute Ruby to the world
How to distribute Ruby to the world
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
Iron Languages - NYC CodeCamp 2/19/2011
Iron Languages - NYC CodeCamp 2/19/2011Iron Languages - NYC CodeCamp 2/19/2011
Iron Languages - NYC CodeCamp 2/19/2011
 
Ruby On Rails Intro
Ruby On Rails IntroRuby On Rails Intro
Ruby On Rails Intro
 
How to distribute Ruby to the world
How to distribute Ruby to the worldHow to distribute Ruby to the world
How to distribute Ruby to the world
 
Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1
 
From Code to Cloud - PHP on Red Hat's OpenShift
From Code to Cloud - PHP on Red Hat's OpenShiftFrom Code to Cloud - PHP on Red Hat's OpenShift
From Code to Cloud - PHP on Red Hat's OpenShift
 
Initiation à Ruby on Rails
Initiation à Ruby on RailsInitiation à Ruby on Rails
Initiation à Ruby on Rails
 

More from reneedv

More from reneedv (14)

Nginx caching
Nginx cachingNginx caching
Nginx caching
 
Week10
Week10Week10
Week10
 
Week9
Week9Week9
Week9
 
Week7
Week7Week7
Week7
 
Week6
Week6Week6
Week6
 
Week5
Week5Week5
Week5
 
Week4
Week4Week4
Week4
 
Week3
Week3Week3
Week3
 
Week2
Week2Week2
Week2
 
Fill Up your Bookshelves!
Fill Up your Bookshelves! Fill Up your Bookshelves!
Fill Up your Bookshelves!
 
Dealing with Legacy <del>Code</del> People
Dealing with Legacy <del>Code</del> PeopleDealing with Legacy <del>Code</del> People
Dealing with Legacy <del>Code</del> People
 
Whose Wife Are You?
Whose Wife Are You?Whose Wife Are You?
Whose Wife Are You?
 
How I Learned to Smell Code
How I Learned to Smell CodeHow I Learned to Smell Code
How I Learned to Smell Code
 
RailsBrdige Seattle Workshop Intro
RailsBrdige Seattle Workshop IntroRailsBrdige Seattle Workshop Intro
RailsBrdige Seattle Workshop Intro
 

Recently uploaded

Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 

Recently uploaded (20)

Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 

Week1

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n