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

Limited Red

Joseph Wilk
September 22, 2011

Limited Red

Joseph Wilk

September 22, 2011
Tweet

More Decks by Joseph Wilk

Other Decks in Programming

Transcript

  1. ‣Parallel Change ‣Narrowed Change ‣Sequence Change ‣Graceful Retreat ‣Piecemeal Change

    ‣Gradual Change ‣Evolved Target ‣Unified Methods Joshua Kerievsky Patterns Tuesday, 20 September 11
  2. Parallel Change class ImageResizer if FeatureFlipper.active?(:fast_resizer) include FastThumbResizer else include

    ThumbResizer end end module ThumbResizer def resize(x,y) ... end end module FastThumbResizer def resize(x,y) ... end end Tuesday, 20 September 11
  3. <%- if @game.player?(@active_user) && @black_player.present? && @white_player.present? %> <%= render

    :template => 'messaging' %> <%- end %> <%- if @game.player?(@active_user) && @black_player.present? && @white_player.present? %> <%= render :template => 'messaging' %> <%- end %> Narrowed Change Tuesday, 20 September 11
  4. Narrowed Change class GamePresenter def initialize(game, black_payer, white_player) @game, @black_player,

    @white_player = game, black_player, white_player end def show_messaging?(&block) messaging_should_be_visible = @game.player?(@user) && @black_player.present? && @white_player.present? yield block if messaging_should_be_visible end end <%- game_presenter.show_messaging? do %> <%= render :template => 'messaging' %> <%- end %> Tuesday, 20 September 11
  5. Narrowed Change class GamePresenter def initialize(game, black_payer, white_player) @game, @black_player,

    @white_player = game, black_player, white_player end def show_messaging?(&block) messaging_should_be_visible= @game.human_player?(@user) yield block if messaging_should_be_visible end end <%- game_presenter.show_messaging? do %> <%= render :template => 'messaging' %> <%- end %> Tuesday, 20 September 11
  6. Learning more from Red ‣ Smart Continuous integration ‣ Failure

    rate ‣ Performance ‣ Flickering Tuesday, 20 September 11