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

Ruby at GitHub

Ruby at GitHub

Brandon Keepers

April 05, 2013
Tweet

More Decks by Brandon Keepers

Other Decks in Programming

Transcript

  1. Frequently Asked Questions:  Which languages are used at GitHub?

     Where is Ruby not used?  Why Ruby?  Which libraries do you use?  How do you handle updates?
  2.  602 github.com/github  228 inactive  42 forks 

    7 ignored  342 * 602 - 228 - 42 - 7 = 325 some repos met multiple conditions
  3. 58% Ruby JavaScript 11% Objective-C 8% Shell 5% CoffeeScript 5%

    Other 6% C 4% C# 3% Internal GitHub Projects by primary language 342 repositories
  4. 33% Ruby JavaScript 15% Objective-C 13% Puppet 3% CoffeeScript 7%

    Other 6% 15% C C# 6% Java 2% 342 repositories Internal GitHub Projects by total bytes
  5. In France, you can speak English, but it will be

    obvious that you are not French.
  6. The hardest part of learning iOS Development 3.53% Objective-C syntax

    iOS APIs 96.47%* *These precise numbers may not be accurate.
  7. class User < ActiveRecord::Base include FeatureFlags end app/models/user.rb module FeatureFlags

    def preview_features? staff? end def time_travel_enabled? preview_features? end end app/concerns/feature_flags.rb
  8. class User < ActiveRecord::Base include FeatureFlags end app/models/user.rb module FeatureFlags

    def preview_features? staff? end def time_travel_enabled? preview_features? end end app/concerns/feature_flags.rb class ApplicationController flags = FeatureFlags.public_instance_methods delegate *flags, :to => :current_user, :allow_nil => true helper_method *flags end app/controllers/application_controller.rb
  9. <%- if time_travel_enabled? -%> <%= link_to 'Time Travel', time_travel_path %>

    <%- end -%> app/views/home/index.html.erb class TimeTravelController < ApplicationController before_filter :ensure_time_travel_enabled def ensure_time_travel_enabled not_found unless time_travel_enabled? end end app/controllers/time_travel_controller.rb
  10. – @tmm1 “Compared to REE, average cpu response time for

    browser requests last week was reduced by over 25ms. The 99th percentile cpu response time for browser requests was reduced by over 125ms!”