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

Your First Legacy Codebase

Your First Legacy Codebase

So you've just graduated from a bootcamp and you're starting your first real job in software development. You've got several Rails apps under your belt and you're excited to get started. But few jobs offer the opportunity to build new apps; it's much more likely that you will be part of a team charged with maintaining and growing a legacy application. How can you get started working on an aging codebase when the sum of your experience so far was with greenfield apps?

Coraline Ada Ehmke

May 04, 2016
Tweet

More Decks by Coraline Ada Ehmke

Other Decks in Technology

Transcript

  1. A code base so large 
 that it’s difficult to

    hold
 in your head all at once.
  2. Act

  3. $ rspec spec/ --format documentation Membership determines its upgradeability calculates

    its expiration in days detects when it has expired detects when it is expiring soon Finished in 0.01401 seconds 12 examples, 0 failures
  4. def hours_occupied(date) if availability = get_work_hours(date) focus = "work" elsif

    availability = get_family_hours(date) focus = "family" elsif availability = get_friend_hours(date) focus = "friends" end end
  5. def hours_occupied(date) if availability = get_work_hours(date) focus = "work" elsif

    availability = get_family_hours(date) focus = "family" elsif availability = get_friend_hours(date) focus = "friends" end end
  6. def hours_occupied(date) if availability = get_work_hours(date) focus = "work" elsif

    availability = get_family_hours(date) focus = "family" elsif availability = get_friend_hours(date) focus = "friends" end end
  7. def hours_occupied(date) if availability = get_work_hours(date) focus = "work" elsif

    availability = get_family_hours(date) focus = "family" elsif availability = get_friend_hours(date) focus = "friends" end end
  8. Pry

  9. 36: def self.create_or_update(opts={}) 37: opts = opts.with_indifferent_access 38: content =

    opts.delete(:content) 39: user = opts.delete(:user) 40: return nil unless user && content 41: => 42: require ‘pry’; binding.pry 43: pry> user => #<User:0x007fdcd9008828 @first_name=“Coraline">