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

Double-Shipping Software For Profit

Double-Shipping Software For Profit

Selling a product once is fun, but selling that product twice is wildly excellent. GitHub does that with Firewall Install, our installable enterprise GitHub. This talk aims to discuss how you can repackage your existing product too, by covering code strategies for parallel codebases, supporting remote server infrastructures, and talking about the impressively stupid decisions we've made.

78b475797a14c84799063c7cd073962f?s=128

Zach Holman

May 17, 2011
Tweet

More Decks by Zach Holman

Other Decks in Programming

Transcript

  1. $—$—$—$—$—$—$—$—$—$—$—$—$— $—$—$—$—$—$—$—$—$—$—$—$—$— Double- Shipping Software For Profit

  2. @holman

  3. github github github github github github

  4. None
  5. This talk

  6. This talk Competitors

  7. This talk Competitors Long-running Branches

  8. This talk Competitors Long-running Branches Curious Motherfuckers

  9. Why?

  10. Users

  11. $

  12. Why not?

  13. FIJRUBY OWN BRANCH INSTALLER SPECIAL FEATURES ONE DEVELOPER*

  14. B-B-B-BUT OUR SECRETS! THEY’RE SO SECRET!

  15. None
  16. $ jrubyc secrets.rb

  17. $ jrubyc secrets.rb #=> secrets.class

  18. None
  19. $ rbx compile secrets.rb

  20. $ rbx compile secrets.rb #=> secrets.rbc

  21. $ rbx compile secrets.rb #=> secrets.rbc $ rbx compile -h

  22. $ rbx compile secrets.rb #=> secrets.rbc $ rbx compile -h

    #=> whoa.
  23. MRI

  24. HAX MRI

  25. HAX MRI

  26. Sales.

  27. Support

  28. More humans More time More money

  29. Make them pay for it.

  30. Differences suck

  31. github.com GitHub FI fs1 fs2 fs3 fs4 ... local filesystem

  32. class Repository < ActiveRecord::Base def file_server if Rails.fi? “localhost” else

    Smoke.find_fs(self) end end def refs tag_names + branches end def exists_on_disk? if Rails.fi? File.exist?(fs_path) else Smoke.exists_on_disk?(self) end end def route owner.route end def delete if Rails.fi? File.rm_rf(fs_path) else Smoke.delete end end def to_s “lol this is a repository / #{id}” end def online? return true if Rails.fi? CHIMNEY.storage_server_online?(route) end end
  33. class Repository < ActiveRecord::Base def file_server if Rails.fi? “localhost” else

    Smoke.find_fs(self) end end def refs tag_names + branches end def exists_on_disk? if Rails.fi? File.exist?(fs_path) else Smoke.exists_on_disk?(self) end end def route owner.route end def delete if Rails.fi? File.rm_rf(fs_path) else Smoke.delete end end def to_s “lol this is a repository / #{id}” end def online? return true if Rails.fi? CHIMNEY.storage_server_online?(route) end end
  34. class Repository < ActiveRecord::Base def file_server if Rails.fi? “localhost” else

    Smoke.find_fs(self) end end def refs tag_names + branches end def exists_on_disk? if Rails.fi? File.exist?(fs_path) else Smoke.exists_on_disk?(self) end end def route owner.route end def delete if Rails.fi? File.rm_rf(fs_path) else Smoke.delete end end def to_s “lol this is a repository / #{id}” end def online? return true if Rails.fi? CHIMNEY.storage_server_online?(route) end end if Rails.fi? File.exist?(path) else Smoke.exist?(path) end
  35. module Smoke def exists? # handle logic for # both

    FI and .com end end
  36. if Rails.fi? File.exist?(path) else Smoke.exist?(path) end

  37. Smoke.exist?(path)

  38. Get high.

  39. Strategy Pattern

  40. GitHub::RepoCreator handles repository creation

  41. module GitHub RepoCreator = if Rails.fi? Fi::RepoCreator else Web::RepoCreator end

    end
  42. module GitHub module Web class RepoCreator # implementation, lol end

    end end
  43. module GitHub module Fi class RepoCreator < GitHub::Web::RepoCreator # implementation,

    lol end end end
  44. module GitHub module Fi class RepoCreator < GitHub::Web::RepoCreator def setup_smoke

    # no-op end end end end
  45. Provide a standardized API between products.

  46. creator = GitHub::RepoCreator.new creator.setup

  47. Feature flipping makes things less frightening.

  48. if current_user.beta? beta_hotness end

  49. if GitHub::Beta.enabled?(:svn) subversion_hotness end

  50. None
  51. None
  52. None
  53. Mistakes

  54. Mistakes branches

  55. Mistakes branches documentation

  56. Mistakes branches documentation versioning

  57. Zach Holman, @holman http://zachholman.com/talks