Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Lessons from the Other Side: Effectively Contributing to Open Source

nzkoz
May 21, 2012

Lessons from the Other Side: Effectively Contributing to Open Source

Talk given at Red Dot Ruby Conf in singapore, may 2012.

nzkoz

May 21, 2012
Tweet

Other Decks in Technology

Transcript

  1. Lessons From The
    Other Side
    Michael Koziarski
    [email protected]
    Tuesday, 22 May 12

    View full-size slide

  2. Who am I?
    Tuesday, 22 May 12

    View full-size slide

  3. Tuesday, 22 May 12

    View full-size slide

  4. Tuesday, 22 May 12

    View full-size slide

  5. Tuesday, 22 May 12

    View full-size slide

  6. Tuesday, 22 May 12

    View full-size slide

  7. Tuesday, 22 May 12

    View full-size slide

  8. Tuesday, 22 May 12

    View full-size slide

  9. Long Time
    Tuesday, 22 May 12

    View full-size slide

  10. 6 Years!
    Tuesday, 22 May 12

    View full-size slide

  11. Tuesday, 22 May 12

    View full-size slide

  12. Tuesday, 22 May 12

    View full-size slide

  13. Learned Many Lessons
    Tuesday, 22 May 12

    View full-size slide

  14. Help Us Help You
    Tuesday, 22 May 12

    View full-size slide

  15. Koz Lesson #1:
    Listen to Users
    Tuesday, 22 May 12

    View full-size slide

  16. How do you spot a
    User?
    Tuesday, 22 May 12

    View full-size slide

  17. It’d be cool if...
    Tuesday, 22 May 12

    View full-size slide

  18. It’s a bit annoying how...
    Tuesday, 22 May 12

    View full-size slide

  19. Why do I have to ...?
    Tuesday, 22 May 12

    View full-size slide

  20. Here’s a patch that ...
    Tuesday, 22 May 12

    View full-size slide

  21. I’ll never use your
    software until ...
    Tuesday, 22 May 12

    View full-size slide

  22. More Modular
    Tuesday, 22 May 12

    View full-size slide

  23. Has Tail Call Optimization
    Magic Beans
    Tuesday, 22 May 12

    View full-size slide

  24. Supports full
    internationalization
    Tuesday, 22 May 12

    View full-size slide

  25. Supports a real
    database
    Tuesday, 22 May 12

    View full-size slide

  26. Runs on Windows 8
    Tuesday, 22 May 12

    View full-size slide

  27. Supports the ‘enterprise’
    Tuesday, 22 May 12

    View full-size slide

  28. You Stop Swearing At
    Conferences
    Tuesday, 22 May 12

    View full-size slide

  29. Tuesday, 22 May 12

    View full-size slide

  30. I’ll never use your
    software
    Tuesday, 22 May 12

    View full-size slide

  31. Implications for You
    Tuesday, 22 May 12

    View full-size slide

  32. How could I add function
    X?
    Tuesday, 22 May 12

    View full-size slide

  33. Has anyone tried fixing Y?
    Tuesday, 22 May 12

    View full-size slide

  34. I can’t use this until Z!
    Tuesday, 22 May 12

    View full-size slide

  35. Why doesn’t your
    craptastic hunk of junk
    do Z?
    Tuesday, 22 May 12

    View full-size slide

  36. “This is the very reason I don’t
    use Rails, and I know there’s
    many others who think like
    me.”
    Tuesday, 22 May 12

    View full-size slide

  37. “This is the very reason I
    don’t use Rails, and I know
    there’s many others who think
    like me.”
    Tuesday, 22 May 12

    View full-size slide

  38. “[blah blah] I don’t use
    Rails [blah blah blah]”
    Tuesday, 22 May 12

    View full-size slide

  39. Tuesday, 22 May 12

    View full-size slide

  40. Koz Lesson #2:
    Users Make The Best
    Contributors
    Tuesday, 22 May 12

    View full-size slide

  41. Koz Lesson #2:
    Users Make The Best
    Contributors*
    Tuesday, 22 May 12

    View full-size slide

  42. Scratching Their Own
    Itch
    Tuesday, 22 May 12

    View full-size slide

  43. Solves a Problem They
    Actually Had
    Tuesday, 22 May 12

    View full-size slide

  44. Help Your Users
    Tuesday, 22 May 12

    View full-size slide

  45. Users as Contributors
    Tuesday, 22 May 12

    View full-size slide

  46. Users as Contributors
    Users
    Tuesday, 22 May 12

    View full-size slide

  47. Users as Contributors
    Users
    Contributors
    Tuesday, 22 May 12

    View full-size slide

  48. More Users
    Tuesday, 22 May 12

    View full-size slide

  49. More Contributors!
    Tuesday, 22 May 12

    View full-size slide

  50. Better Product!!
    Tuesday, 22 May 12

    View full-size slide

  51. Even More Users!!!
    Tuesday, 22 May 12

    View full-size slide

  52. Problem!
    Tuesday, 22 May 12

    View full-size slide

  53. Our Users are
    Developers
    Tuesday, 22 May 12

    View full-size slide

  54. Our Users are
    Engineers
    Tuesday, 22 May 12

    View full-size slide

  55. Our Users are
    Computer
    Scientists
    Tuesday, 22 May 12

    View full-size slide

  56. Rewrite Stuff
    Tuesday, 22 May 12

    View full-size slide

  57. Rewrite Stuff
    Endlessly
    Tuesday, 22 May 12

    View full-size slide

  58. <% if !protected_attributes.empty? %>
    ...
    <% else %>
    ...
    <% end %>
    Tuesday, 22 May 12

    View full-size slide

  59. Tuesday, 22 May 12

    View full-size slide

  60. <% if !protected_attributes.empty? %>
    ...
    <% else %>
    ...
    <% end %>
    Tuesday, 22 May 12

    View full-size slide

  61. <% if protected_attributes.any? %>
    ...
    <% else %>
    ...
    <% end %>
    Tuesday, 22 May 12

    View full-size slide

  62. <% unless protected_attributes.empty? %>
    ...
    <% else %>
    ...
    <% end %>
    Tuesday, 22 May 12

    View full-size slide

  63. Tuesday, 22 May 12

    View full-size slide

  64. Tuesday, 22 May 12

    View full-size slide

  65. Tuesday, 22 May 12

    View full-size slide

  66. Tuesday, 22 May 12

    View full-size slide

  67. Tuesday, 22 May 12

    View full-size slide

  68. Tuesday, 22 May 12

    View full-size slide

  69. Tuesday, 22 May 12

    View full-size slide

  70. 34
    Tuesday, 22 May 12

    View full-size slide

  71. Tuesday, 22 May 12

    View full-size slide

  72. Implications for You
    Tuesday, 22 May 12

    View full-size slide

  73. The Bike Shed is Green
    Tuesday, 22 May 12

    View full-size slide

  74. Cope
    Tuesday, 22 May 12

    View full-size slide

  75. Focus on small,
    digestible fixes.
    Tuesday, 22 May 12

    View full-size slide

  76. Focus on minor
    annoyances
    Tuesday, 22 May 12

    View full-size slide

  77. Koz Lesson #3:
    Listen to Contributors
    Tuesday, 22 May 12

    View full-size slide

  78. Contributors are like
    Super Users
    Tuesday, 22 May 12

    View full-size slide

  79. Trust
    Tuesday, 22 May 12

    View full-size slide

  80. The Patches Problem
    Tuesday, 22 May 12

    View full-size slide

  81. The Early Days
    Volunteers Work To Do
    Tuesday, 22 May 12

    View full-size slide

  82. Equilibrium
    Volunteers Work To Do
    Tuesday, 22 May 12

    View full-size slide

  83. Eventually
    Volunteers Work To Do
    Tuesday, 22 May 12

    View full-size slide

  84. Trouble
    Volunteers Work To Do
    Tuesday, 22 May 12

    View full-size slide

  85. Danger
    Tuesday, 22 May 12

    View full-size slide

  86. Neglected Patches
    Tuesday, 22 May 12

    View full-size slide

  87. Tuesday, 22 May 12

    View full-size slide

  88. Tuesday, 22 May 12

    View full-size slide

  89. Tuesday, 22 May 12

    View full-size slide

  90. Fork! Fork! Fork!
    Tuesday, 22 May 12

    View full-size slide

  91. Tuesday, 22 May 12

    View full-size slide

  92. Tuesday, 22 May 12

    View full-size slide

  93. Implications for you
    Tuesday, 22 May 12

    View full-size slide

  94. Do the grunt work
    Tuesday, 22 May 12

    View full-size slide

  95. We mess up
    Tuesday, 22 May 12

    View full-size slide

  96. We mess up
    Constantly
    Tuesday, 22 May 12

    View full-size slide

  97. Don’t take it personally
    Tuesday, 22 May 12

    View full-size slide

  98. Lesson for You #1:
    Maintainers are Human
    Tuesday, 22 May 12

    View full-size slide

  99. Busy
    Tuesday, 22 May 12

    View full-size slide

  100. Tuesday, 22 May 12

    View full-size slide

  101. Tuesday, 22 May 12

    View full-size slide

  102. Tuesday, 22 May 12

    View full-size slide

  103. Tuesday, 22 May 12

    View full-size slide

  104. Tuesday, 22 May 12

    View full-size slide

  105. Make Mistakes
    Tuesday, 22 May 12

    View full-size slide

  106. Tuesday, 22 May 12

    View full-size slide

  107. Tuesday, 22 May 12

    View full-size slide

  108. Need Persuading
    Tuesday, 22 May 12

    View full-size slide

  109. Tuesday, 22 May 12

    View full-size slide

  110. Tuesday, 22 May 12

    View full-size slide

  111. Tuesday, 22 May 12

    View full-size slide

  112. Tuesday, 22 May 12

    View full-size slide

  113. Tuesday, 22 May 12

    View full-size slide

  114. Tuesday, 22 May 12

    View full-size slide

  115. Use Concrete
    Examples
    Tuesday, 22 May 12

    View full-size slide

  116. It’s a POLS violation
    Tuesday, 22 May 12

    View full-size slide

  117. It’s a POLS violation
    Tuesday, 22 May 12

    View full-size slide

  118. It’s not compliant with
    RFC2549
    Tuesday, 22 May 12

    View full-size slide

  119. It’s not compliant with
    RFC2549
    Tuesday, 22 May 12

    View full-size slide

  120. It could be more elegant
    Tuesday, 22 May 12

    View full-size slide

  121. It could be more elegant
    Tuesday, 22 May 12

    View full-size slide

  122. This breaks when ...
    Tuesday, 22 May 12

    View full-size slide

  123. This doesn’t let me ...
    Tuesday, 22 May 12

    View full-size slide

  124. Lesson for You #2
    Applying Patches is
    Hard Work
    Tuesday, 22 May 12

    View full-size slide

  125. Tuesday, 22 May 12

    View full-size slide

  126. Tuesday, 22 May 12

    View full-size slide

  127. Tuesday, 22 May 12

    View full-size slide

  128. Tuesday, 22 May 12

    View full-size slide

  129. What’s So Hard!?
    Tuesday, 22 May 12

    View full-size slide

  130. Why does the change
    fix it?
    Tuesday, 22 May 12

    View full-size slide

  131. Is it the right fix?
    Tuesday, 22 May 12

    View full-size slide

  132. def some_huge_method
    # 100 lines snipped
    rescue
    nil
    end
    Tuesday, 22 May 12

    View full-size slide

  133. Tuesday, 22 May 12

    View full-size slide

  134. Lesson for You #3:
    Contributions should
    be a by-product
    Tuesday, 22 May 12

    View full-size slide

  135. Don’t go looking for
    problems to solve
    Tuesday, 22 May 12

    View full-size slide

  136. Solve the problems you
    find as you work.
    Tuesday, 22 May 12

    View full-size slide

  137. Example
    Tuesday, 22 May 12

    View full-size slide

  138. $ ./script/generate model Person
    Tuesday, 22 May 12

    View full-size slide

  139. CREATE TABLE `people` (
    id int(11) NOT NULL AUTO_INCREMENT,
    name varchar(255),
    employer_id int(11),
    PRIMARY KEY (`id`),
    KEY `index_people_by_employer` (`employer_id`)
    )
    Tuesday, 22 May 12

    View full-size slide

  140. Writing SQL is hard
    Tuesday, 22 May 12

    View full-size slide

  141. $ ./script/generate model Person
    Tuesday, 22 May 12

    View full-size slide

  142. class CreatePeople < ActiveRecord::Migration
    def self.up
    create_table :people do |t|
    end
    end
    def self.down
    drop_table :people
    end
    end
    Tuesday, 22 May 12

    View full-size slide

  143. class CreatePeople < ActiveRecord::Migration
    def self.up
    create_table :people do |t|
    t.column :name, :string, :null=>true
    t.column :employer_id, :integer, :null=>false
    t.column :created_at, :datetime
    t.column :updated_at :datetime
    end
    end
    def self.down
    drop_table :people
    end
    end
    Tuesday, 22 May 12

    View full-size slide

  144. $ rake migrate
    Tuesday, 22 May 12

    View full-size slide

  145. Why do I have to edit
    the migration?
    Tuesday, 22 May 12

    View full-size slide

  146. $ ./script/rails generate model Person name:string \
    employer_id:integer
    Tuesday, 22 May 12

    View full-size slide

  147. class CreatePeople < ActiveRecord::Migration
    def self.up
    create_table :people do |t|
    t.string :name, :null=>true
    t.integer :employer_id, :null=>false
    t.timestamps
    end
    end
    def self.down
    drop_table :people
    end
    end
    Tuesday, 22 May 12

    View full-size slide

  148. $ rake migrate
    Tuesday, 22 May 12

    View full-size slide

  149. class Person < ActiveRecord::Base
    end
    Tuesday, 22 May 12

    View full-size slide

  150. class Person < ActiveRecord::Base
    belongs_to :employer
    end
    Tuesday, 22 May 12

    View full-size slide

  151. Why do I have to edit
    the model?
    Tuesday, 22 May 12

    View full-size slide

  152. $ ./script/rails generate model Person \
    name:string \
    employer:belongs_to
    Tuesday, 22 May 12

    View full-size slide

  153. class CreatePeople < ActiveRecord::Migration
    def self.up
    create_table :people do |t|
    t.string :name, :null=>true
    t.integer :employer_id, :null=>false
    t.timestamps
    end
    end
    def self.down
    drop_table :people
    end
    end
    Tuesday, 22 May 12

    View full-size slide

  154. class Person < ActiveRecord::Base
    belongs_to :employer
    end
    Tuesday, 22 May 12

    View full-size slide

  155. class CreatePeople < ActiveRecord::Migration
    def self.up
    create_table :people do |t|
    t.string :name, :null=>true
    t.integer :employer_id, :null=>false
    t.timestamps
    end
    add_index :people, :employer_id
    end
    def self.down
    drop_table :people
    end
    end
    Tuesday, 22 May 12

    View full-size slide

  156. class CreatePeople < ActiveRecord::Migration
    def self.up
    create_table :people do |t|
    t.string :name, :null=>true
    t.integer :employer_id, :null=>false
    t.timestamps
    end
    add_index :people, :employer_id
    end
    def self.down
    drop_table :people
    end
    end
    Tuesday, 22 May 12

    View full-size slide

  157. Why do I have to add
    an index manually?
    Tuesday, 22 May 12

    View full-size slide

  158. $ ./script/rails generate model Person \
    name:string \
    employer:belongs_to
    Tuesday, 22 May 12

    View full-size slide

  159. class CreatePeople < ActiveRecord::Migration
    def self.up
    create_table :people do |t|
    t.string :name, :null=>true
    t.integer :employer_id, :null=>false
    t.timestamps
    end
    add_index :people, :employer_id
    end
    def self.down
    drop_table :people
    end
    end
    Tuesday, 22 May 12

    View full-size slide

  160. What Next?
    Tuesday, 22 May 12

    View full-size slide

  161. Small Incremental
    Improvements
    Tuesday, 22 May 12

    View full-size slide

  162. Motivated By Real
    Frustration
    Tuesday, 22 May 12

    View full-size slide

  163. Huge Net
    Improvement
    Tuesday, 22 May 12

    View full-size slide

  164. Not Just For Toy
    Features
    Tuesday, 22 May 12

    View full-size slide

  165. singapore_now = Time.zone.now
    # => Thu, 17 May 2012 18:12:11 SGT +08:00
    wellington_now = singapore_now.in_time_zone("Wellington")
    # => Thu, 17 May 2012 22:12:11 NZST +12:00
    singapore_now == wellington_now # => true
    Tuesday, 22 May 12

    View full-size slide

  166. Conclusions
    Tuesday, 22 May 12

    View full-size slide

  167. Find Improvements
    During Your Day Job
    Tuesday, 22 May 12

    View full-size slide

  168. Submit Them In Small,
    Digestible Chunks
    Tuesday, 22 May 12

    View full-size slide

  169. Don’t Take Our
    Mistakes Personally
    Tuesday, 22 May 12

    View full-size slide

  170. Thanks!
    Michael Koziarski
    [email protected]
    @nzkoz
    Tuesday, 22 May 12

    View full-size slide