So You Want to Teach Ruby and Rails...

3,934 views

Published on

My RubyConfPH 2014 talk on how to introduce intermediate-level web development to newbies.

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

No Downloads
Views
Total views
3,934
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
9
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

So You Want to Teach Ruby and Rails...

  1. 1. So You Want to Teach Ruby and Rails... Bryan Bibat
  2. 2. So You Want to Teach Ruby and Rails... Bryan Bibat
  3. 3. Not as easy as it looks...
  4. 4. You have to take many things into account in order to be an effective teacher.
  5. 5. Unfortunately, I only have 30 minutes so I'll just cover the main points.
  6. 6. 0. Students
  7. 7. 1. Domain
  8. 8. Web Development Knowledge Layersincreasingcomplexity
  9. 9. Web Development Knowledge Layersincreasingcomplexity PRESENTATION
  10. 10. Web Development Knowledge Layersincreasingcomplexity PRESENTATION APPLICATION
  11. 11. Web Development Knowledge Layersincreasingcomplexity PRESENTATION APPLICATION DATA
  12. 12. Web Development Knowledge Layersincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE
  13. 13. Web Development Knowledge Layersincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE
  14. 14. Web Development Knowledge Layersincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING
  15. 15. Web Development Knowledge Layersincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  16. 16. Rails is an intermediate-level toolincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  17. 17. Rails is an intermediate-level toolincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  18. 18. 1. Domain
  19. 19. 0. Students 1. Domain
  20. 20. Beginners
  21. 21. True Beginner
  22. 22. True Beginnerincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  23. 23. True Beginnerincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  24. 24. True Beginnerincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  25. 25. Ruby is great for True Beginnersincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  26. 26. Rails is notincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  27. 27. Web Beginner
  28. 28. Web Beginnerincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  29. 29. Web Beginnerincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  30. 30. Veteran
  31. 31. Veteran Web
  32. 32. Veteran Webincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  33. 33. Veteran Webincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  34. 34. Veteran Webincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  35. 35. Ninja
  36. 36. Polyglot / Full Stack Developer
  37. 37. Polyglotincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  38. 38. Polyglotincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  39. 39. When I started Rails...
  40. 40. me c.2009 - Veteran Webincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  41. 41. me c.2009 - Veteran Webincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  42. 42. me c.2009 - Veteran Webincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  43. 43. me c.2009 - Veteran Webincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  44. 44. Migrations class CreateUsers < ActiveRecord::Migration def self.up create_table :users do |t| t.string :email t.string :password t.string :crypted_password t.string :password_salt t.string :persistence_token t.timestamps end end def self.down drop_table :users end end
  45. 45. Migrationsincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  46. 46. Migrationsincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  47. 47. Migrations made sense to me.
  48. 48. Migrations mind = blown
  49. 49. Migrations - experience overlapincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  50. 50. now compare this with newbies'...
  51. 51. Migrationsincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  52. 52. Migrations - WTF?!?increasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  53. 53. Migrations
  54. 54. Migrations Routing ActiveRecord Convention over Configuration Test Driven Development
  55. 55. Migrations Routing ActiveRecord Convention over Configuration Test Driven Development Ruby Idioms Higher Order Functions
  56. 56. Migrations Routing ActiveRecord Convention over Configuration Test Driven Development Ruby Idioms Higher Order Functions Asset Pipeline Turbolinks DevOps
  57. 57. Wow such migrations much unit tests very omakase railz so amaze @doge ||= 9000 so turbolinks so restful
  58. 58. Wow such migrations much unit tests very omakase railz so amaze @doge ||= 9000 so turbolinks so restful screw this, I'm going back to [language]
  59. 59. You have to bridge the gapincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  60. 60. 2. Purpose
  61. 61. To understand how our students think, we must first ask ourselves: Why are we here?
  62. 62. To understand how our students think, we must first ask ourselves: Why are we here? How did it come to this?
  63. 63. The Hype Cycle Image: http://en.wikipedia.org/wiki/User:Jeremykemp
  64. 64. But there are other hype cycles... original image: http://en.wikipedia.org/wiki/User:Jeremykemp
  65. 65. Also the technology is far from perfect...
  66. 66. Ruby - a multi-paradigm scripting language
  67. 67. Ruby... ● is slow ● is memory intensive ● developers are hard to find ● has all the cons of a dynamically typed language
  68. 68. Ruby on Rails - an MVC framework
  69. 69. Rails... ● is huge and bloated ● has magical abstractions ● is hard to deploy
  70. 70. So why?
  71. 71. It's not the technology but the way of thinking
  72. 72. History of Web Languages/Platforms up to mid-00s
  73. 73. CGI/Perl scripting →
  74. 74. CGI/Perl scripting → Compiled Language (Java, C#) Templating Language (PHP)
  75. 75. CGI/Perl scripting → Compiled Language (Java, C#) Templating Language (PHP) → Object/Functional Scripting as an option
  76. 76. ● is slow ● is memory intensive ● developers are hard to find ● has all the cons of a dynamically typed language BUT ALSO ● expressive ● functional, OO, with metaprogramming ● developers examples of the Python Paradox ● has all the pros of a dynamically typed language
  77. 77. History of Web Applications up to mid-00s
  78. 78. big ball of mud →
  79. 79. big ball of mud → over-designed frameworks
  80. 80. big ball of mud → over-designed frameworks → a compromise
  81. 81. ● is huge and bloated ● has magical abstractions ● is hard to deploy BUT ALSO ● a decent package of design patterns ● good for prototyping ie. has a good amount of features built-in while being extensible ● continuously improving along recent trends
  82. 82. A way of thinking that worked
  83. 83. AND...
  84. 84. It took advantage of the hype cycle. original image: http://en.wikipedia.org/wiki/User:Jeremykemp
  85. 85. It took advantage of the hype cycle. original image: http://en.wikipedia.org/wiki/User:Jeremykemp One of the first to use it successfully to achieve critical mass
  86. 86. history lesson over...
  87. 87. 2. Purpose
  88. 88. 0. Students
  89. 89. The HYPE is what got us in... Image: http://en.wikipedia.org/wiki/User:Jeremykemp
  90. 90. The HYPE is what got us in... Image: http://en.wikipedia.org/wiki/User:Jeremykemp
  91. 91. The HYPE is what got us in... Image: http://en.wikipedia.org/wiki/User:Jeremykemp
  92. 92. ...but the HYPE is also what keeps newbies out. Image: http://en.wikipedia.org/wiki/User:Jeremykemp
  93. 93. Image: http://en.wikipedia.org/wiki/User:Jeremykemp
  94. 94. Expectations are not met. Image: http://en.wikipedia.org/wiki/User:Jeremykemp
  95. 95. Manage Expectations
  96. 96. ● is slow ● is memory intensive ● developers are hard to find ● has all the cons of a dynamically typed language BUT ALSO ● expressive ● functional, OO, with metaprogramming ● developers examples of the Python Paradox ● has all the pros of a dynamically typed language
  97. 97. ● is huge and bloated ● has magical abstractions ● is hard to deploy BUT ALSO ● a decent package of design patterns ● good for prototyping ie. has a good amount of features built-in while being extensible ● continuously improving along recent trends
  98. 98. Don't stop explainingincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  99. 99. 3. Retention
  100. 100. Tailor your course according to the students you wish to teach
  101. 101. Veterans need only a little pushincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  102. 102. Of course, teaching beginners is hardincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  103. 103. Especially total beginnersincreasingcomplexity PRESENTATION APPLICATION DATA INFRASTRUCTURE ENGINEERING PRACTICE
  104. 104. One-day workshops will not cut it. You'll need to use some techniques for them to continue learning on their own.
  105. 105. One technique that people often misuse:
  106. 106. rails generate scaffold
  107. 107. rails generate scaffold
  108. 108. rails generate scaffold ● gives students a "taste of power", piquing their interest
  109. 109. rails generate scaffold ● gives students a "taste of power", piquing their interest ● produces good sample code (esp. tests) for future study
  110. 110. rails generate scaffold ● gives students a "taste of power", piquing their interest ● produces good sample code (esp. tests) for future study ● many students (and workshops) don't go past it
  111. 111. Wow such migrations much unit tests very omakase railz so amaze @doge ||= 9000 so turbolinks so restful
  112. 112. rails generate scaffold ● gives students a "taste of power", piquing their interest ● produces good sample code (esp. tests) for future study ● many students (and workshops) don't go past it ● in turn, it gives others the wrong impression
  113. 113. rails generate scaffold ● gives students a "taste of power", piquing their interest ● produces good sample code (esp. tests) for future study ● many students (and workshops) don't go past it ● in turn, it gives others the wrong impression "Rails? Oh, that's just scaffolding scripts."
  114. 114. Follow through
  115. 115. Give them a road map http://techiferous.com/2010/07/roadmap-for-learning-rails/
  116. 116. Let them try things on their own pace
  117. 117. and this also leads us to the last point...
  118. 118. 4. Culture
  119. 119. Wow such migrations much unit tests very omakase railz so amaze @doge ||= 9000 so turbolinks so restful
  120. 120. original image: http://en.wikipedia.org/wiki/User:Jeremykemp
  121. 121. Polyglot / Full Stack Developer
  122. 122. Constantly Improving http://blog.newrelic.com/2013/10/10/infographic-state-stack-ruby-edition/
  123. 123. Sharing Knowledge
  124. 124. On the other hand...
  125. 125. Myopia
  126. 126. most obvious:
  127. 127. You need to accept that most of your trainees will be Windows users...
  128. 128. ...so give them a clear path for migrating to *nix ie. not just "Get a Mac!"
  129. 129. and other stuff in the culture that may turn off interested developers...
  130. 130. and other stuff in the culture that may turn off interested developers...
  131. 131. tl;dr: You have to introduce them to the culture.
  132. 132. In closing...
  133. 133. 1. Domain
  134. 134. 2. Purpose
  135. 135. 3. Retention
  136. 136. 4. Culture
  137. 137. 0. Students
  138. 138. ( °□°)╯ ╯ ︵ Or you could just teach Ruby
  139. 139. Thank you for listening! bryanbibat.net | @bry_bibat speakerdeck.com/bryanbibat

×