!SLIDE
The Complete Beginner's Guide to Programming
!SLIDE
What is a program?
!SLIDE
!SLIDE
!SLIDE centereverything
!SLIDE
How do I write one?
!SLIDE
- Learn about customer's requirements
- Translate to "stories"
- Pick a story that seems doable
- Write code that does it
- Show your work to the customer, get feedback
- Based on feedback, adjust your stories
- When a story is done, go back to "pick a story"
- Repeat until app is finished!
!SLIDE
!SLIDE
Windows | Mac OS X |
!SLIDE centereverything
irb
!SLIDE
> my_variable = 5
=> 5
> my_other_variable = "hi"
=> "hi"
!SLIDE
> fruits = ["kiwi", "strawberry", "plum"]
=> ["kiwi", "strawberry", "plum"]
> states = {"CA" => "California", "DE" => "Delaware"}
=> {"DE"=>"Delaware", "CA"=>"California"}
!SLIDE
> my_variable + 2
=> 7
> my_variable * 3
=> 15
> my_fruits = my_fruits + ["lychee"]
=> ["kiwi", "strawberry", "plum", "lychee"]
> my_fruits = my_fruits - ["lychee"]
=> ["kiwi", "strawberry", "plum"]
!SLIDE
> puts fruits[0]
|
VS |
> fruits.each do |f|
|
!SLIDE
> fruits.each do |f|
* puts f if f == "plum"
> end
plum
=> ["kiwi", "strawberry", "plum"]
!SLIDE
!SLIDE centereverything
!SLIDE centereverything