Advertisement
Guest User

Untitled

a guest
May 29th, 2015
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. Idea based on this tweet exchange:
  2. coreyhaines: Architecture where ever class is its own gem, communicating via drb. #thoughtleadering #thoughtlendering
  3. coreyhaines: better yet, every method is its won gem, classes are built up by requiring gems that monkey-patch. #truth
  4. josh_cheek: @coreyhaines As each method is a gem, it needs its a namespace, so it's defined in a module… Compose classes by including method's modules.
  5. coreyhaines: @josh_cheek I do like the idea of composing via module inclusions, as well. Interesting.
  6. coreyhaines: Seriously, though, the idea of defining classes via including single-method modules appeals to me.
  7.  
  8. So, here's my thought for the workshop. It is based a bit on some of the value that I saw doing coderetreats.
  9.  
  10. title: Super Awesome Happy Fun Coding Workshop, Great Job
  11. programming language used: Ruby
  12. format: This is an all-day workshop.
  13. The workshop consists of two sections, a morning and an afternoon, separated by a lunch.
  14. During each section, participants will pair up and work for 2.5 hours on a given, ruby-based console application. The problem will be easily understandable, although potentially difficult to "finish" in the time allotted.
  15. At the end of each session, each team of two will have 5-10 minutes to do a walk-through of their solution.
  16. The heart of the challenge (and the super fun) comes from the unique constraints placed on the design.
  17. Constraints:
  18. Every method can have AT MOST 3 lines of code (this might be relaxed, as I do more experimentation);
  19. A given class can have AT MOST one method defined (instance method, excluding initializer, which can only be used to set up instance variables based on passed in parameters);
  20. A given class can include as many modules as desired;
  21. A given module can have AT MOST one method;
  22. Module methods may not rely on instance variables.
  23. (and perhaps a couple other I'm mulling over, maybe no if statements most likely definitely no looping constructs)
  24.  
  25. Code should be written to emphasize readability.
  26.  
  27. The idea, as in coderetreat, is to push certain practices to the extreme and see what happens. This has the potential to degrade into a more function-composition-style solution, and I'm interested to see what happens.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement