1 Intro

550 views

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
550
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

1 Intro

  1. 1. Ruby<br />Class 1<br />
  2. 2. The Ruby Language<br />Originally by Yukihiro &quot;Matz&quot; Matsumoto<br />“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.”<br />http://en.wikipedia.org/wiki/Ruby_(programming_language)#History<br />Ruby 1.0 was released in 1996. <br />
  3. 3. What you will learn<br />Ruby<br />Language concepts & tools<br />Language syntax<br />Some standard library classes & gem<br />Common patterns<br />
  4. 4. Book<br />The Well-Grounded RubyistCovering Ruby 1.9David A. Black<br />
  5. 5. How you will learn<br />Exploration: experiment, play<br />Test-Driven Development (TDD)<br />Initially as a learning methodology<br />Later as a development methodology<br />Ask questions<br />Learn to find your own answers<br />Read<br />Plus whatever works best for you<br />
  6. 6. Class Structure<br />Talk<br />Live Coding Demonstrations<br />In-class coding<br />Coding at home (or in social groups)<br />Google Group<br />
  7. 7. Other Resources<br />SF Ruby Meetup<br />RailsBridge<br />Marakana Rails Class, Jan 19-22<br />See Last page of hand-out for more<br />
  8. 8.
  9. 9. Ruby Language Overview<br />Dynamically typed<br />Interpreted<br />Can be modified at runtime<br />Object oriented<br />Blocks & lambdas<br />Nice support for Regular Expressions <br />
  10. 10. Lets get started<br />IRB: InteractiveRuBy<br />&gt;&gt; 4<br />&gt;&gt; 4 + 4<br />
  11. 11. Everything is an object<br />“test”.upcase<br />“test”.class<br />“test”.methods<br />
  12. 12. Everything evaluates to something<br />2 + 2<br />(2+2).zero?<br />
  13. 13. Methods are Messages<br />thing.do(4)<br />thing.do 4<br />thing.send “do”, 4<br />
  14. 14. Operators are Methods<br />thing.do 4<br />thing.do(4)<br />thing.send “do”, 4<br />1 + 2<br />1.+(2)<br />1.send &quot;+&quot;, 2<br />
  15. 15. Write your first Ruby class<br />
  16. 16. Test-First Learning<br />Similar methodology to TDDwith a different purpose and workflow<br />Teacher writes the test<br />Student implements the code<br />
  17. 17. Test-Driven Development<br />Design<br />Focus / Project Management<br />Creation of Tests<br />
  18. 18. Rspec<br />
  19. 19. Time to Write Code<br />

×