~/talk

This Old Pony: Working With Legacy Django Apps

Talkat DjangoCon US 2016 · 2016-07-17..07-22· [django]
links:none on file
slides:none on file

Defines legacy as code in production often lacking tests and clarity and recommends concrete steps: do a disciplined code review with flake8 and PyCharm, add logging before tests (Sentry for stack traces), write bug-reproducing and smoke tests, silence flaky tests, speed slow suites, and use tox to test multiple Django versions aiming for an LTS. Handle dependency breakage by patch and PR or vendoring forks, run Bandit for secrets, and incrementally refactor big apps (move models with Meta db_table, push view logic into managers).

AI-written summary · about

  1. 0:00Start
  2. 0:42Legacy software?
  3. 1:11What is "legacy"?
  4. 1:24Code someone else wrote
  5. 1:47Code that has no tests
  6. 2:12Software that's in production
  7. 2:42Written software is an investment
  8. 2:59Ugly, old systems deliver value
  9. 3:16The world runs on legacy software
  10. 3:27What is legacy Django?
  11. 4:31Some assumptions
  12. 5:08Goal: improve code in discrete steps
  13. 6:57Step 0: Ask questions
  14. 7:11What's it supposed to do? What does it do? Known bugs? Planned features?
  15. 7:34Reading the code
  16. 7:45Confusing areas Architecture Code smell Style &c.
  17. 9:35Understand production errors
  18. 11:14Fix bugs Guide development Deployment confidence
  19. 11:36Tests provide information about code quality.
  20. 11:49Test suite scenarios
  21. 15:30Prioritizing new tests
  22. 16:01Smoke tests View-centric integration tests
  23. 16:42Refactoring
  24. 17:13Backwards incompatibilities
  25. 17:32Superpower: tox
  26. 19:18Tight integration with obsolete libraries
  27. 19:45Version support mismatches
  28. 20:14Upgrade!
  29. 20:29Patch and pray (upstream)
  30. 21:32Extract what you used
  31. 22:02Remove/replace
  32. 22:48Formatting
  33. 23:33Settings
  34. 24:20One big app
  35. 24:31Solution: Break up apps
  36. 25:01Big views (lots o' logic)
  37. 25:19Fat models
  38. 25:40Expansive forms
  39. 26:24New feature? New app!
  40. 26:34What didn't we talk about?
~/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.