~/talk

Our Fight Against Super Bad Patterns in Legacy Rails Apps

Talkat RedDotRubyConf 2016 · 2016-06-23..06-24· [legacy-modernisation, ruby-on-rails]
slides:none on file

Migrated three apps from Rails 2.3.5/Ruby 1.8.7 to Rails 4.2.1/Ruby 2.1 over about 11 months across three companies, kept production while refactoring and adding features. Replaced gems (file upload, pagination), moved assets to the asset pipeline, swapped Prototype to jQuery, removed attr_accessible for strong parameters, and wrote RSpec/Capybara specs after migration. Found and fixed four concrete anti‑patterns: too many layers (merged one‑to‑one models into rich ActiveRecord), dreamy methods (split and name methods), global hashes converted to value objects, and controllers split to avoid mass‑housing.

AI-written summary · about

  1. 0:00Start
  2. 5:35Ruby & Rails Migration (Upgrading)
  3. 8:01Our Applications Kind of health check service B to B Handed over to our company from the other development company which originally developed the system
  4. 20:54We love good patterns
  5. 21:59Too many layers
  6. 24:40Deamy method
  7. 31:32This is the combination of 2 bad patterns
  8. 31:51You need to chase the identifier not to harm other features
  9. 32:14Dreamy method Write a different method for a different need Doubt adding an argument and "if" Extract common parts Use polymorphism Stop this pattern in early stage
  10. 32:46Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.