Uploaded on

 

More in: Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
361
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
6
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Transcript

  • 1. Ruby the Core Language Fall 2012
  • 2. IntroductionsRenée De Voursney Backgroundrenee@nird.us Hidden Talent
  • 3. Class StructureLecture, Demos, In-Class ExercisesExperimentation & ExplorationResources & HomeworkQuestions & Parking Lot
  • 4. Grades?!Attendance (2 absences) - 25%Homework (1-2 hours a week) - 25%2 Take-Home Tests - 25%1 Project - 25%
  • 5. Office HoursRenée: Monday 6pm-8pm HipChat, Phone, Skype, E-mail, iChatNell: Sunday 4pm-6pm HipChat, Skype, E-mail, gChat (Will also gladly respond to Hipchats and emails throughout the week)
  • 6. RubyCreated by Yukihiro "Matz" MatsumotoRuby 1.0 released in 1996Ruby is for PeopleMINSWAN
  • 7. The Ruby WorldToolsetsBest PracticesCommon Uses
  • 8. Install CheckCommand PromptGitRubyRspecEditor (Syntax Highlighting)
  • 9. Install CheckCommand Prompt (CLI) Mac: Terminal, iTerm, etc... Unix: bash, zsh, csh, etc.... Windows: Command Prompt w/ Ruby on Rails
  • 10. Gitwhich git ex: /usr/local/bin/gitgit --version ex: git version 1.7.10.2
  • 11. Rubywhich ruby ex: /Users/renee/.rvm/rubies/ruby-1.9.3- p194/bin/rubyruby -v ex: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
  • 12. Ruby Interpreterirb ex: 1.9.3-p194 :001 > 1+2 => 3 1.9.3-p194 :002 > exit
  • 13. RSpecgem 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
  • 14. EditorSublime, Komodo, RubyMine, Vim (!), Emacs (!),RedcarMac: TextMate
  • 15. GitSource Control SystemTimeline, Track ChangesBranching and MergingCode Safety
  • 16. Git Commandsgit clone / initgit statusgit add / rmgit commitgit pushgit log
  • 17. GitHub
  • 18. 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
  • 19. HipChathttps://www.hipchat.comIn-Class Back-ChannelQuestions, Discussion
  • 20. Demo!Fork on GitHubClone my copyMake changesCommit and Push changesSend a pull request
  • 21. In-Class Exercise!ForkCloneChangePushPull Request
  • 22. RSpec IntroCode that Tests code!Test Driven Development Red-Green-RefactorTest First TeachingRuby Domain Specific Language (DSL) fortesting
  • 23. RSpec SpecificsDescribe (What) / Context (When)It (Does)ShouldMatchers http://rubydoc.info/gems/rspec- expectations/2.4.0/RSpec/Matchers
  • 24. Rspec Demo!make a new rspec filerun rspecwalk through rspec_spec.rb
  • 25. In-Class ExerciseRun exercises/rspec_spec.rbFix the broken in-class testAdd the 3 pending in-class tests (don’t forgetthe do/end and should!)
  • 26. Homework!Read Chapter 3 Classes, Objects, andVariablesRead p.90-94 Strings