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

Working With Legacy Rails Apps

Working With Legacy Rails Apps

Ahmed Omran

July 10, 2015
Tweet

More Decks by Ahmed Omran

Other Decks in Programming

Transcript

  1. legacy code • untested code (Michael C. Feathers) • code

    someone else wrote (old gems, outsourcing, maintainers left) • difficult to work with • risky to change • but serves a useful function
  2. • learning & experimenting • ambitious applications • big project,

    developer churn, hiring outside help • bad code … even with the best of intentions • “Technical debt”
  3. –Robert C. Martin “Even the most disciplined development team, knowing

    the best principles, using the best patterns, and following the best practices will create messes from time to time.”
  4. –Robert C. Martin “…taking a tangled, opaque, convoluted system and

    slowly, gradually, piece by piece, step by step, turning it into a simple, nicely structured, well-designed system.”
  5. cover and modify • add unit test • test passes

    • modify code • test passes
  6. review • boy scout rule • cover and modify •

    break dependencies with mocks and seams • understand code with archeology
  7. • code review • small git branches • add lots

    of context in pull request / commit message