May [Online] Meetup: Taming Wild Code - Practical Legacy Codebase Refactoring
Details
In May we continue our streak of talks from our expert organizers. Grant will be bringing us some practical advice from the trenches of “Taming Wild Code”. Once again this month will be streamed online via Zoom, so strap in for anecdotes and advice on that chore we all fear most: refactoring legacy code bases.
Grant describes his talks as follows:
So, you're the proud custodian of a new codebase. Epic. You pour a steaming coffee, crack open your favourite IDE and peel back the covers. Let’s see what we've got.
"WTF? How? But more importantly WHHHHY????""
A tangled mess greets you. Procedural code, not a class to be seen, weird framework standards. Oh yes, we've got it all. Also, the update you need to do needs to be deployed by the end of the week, and you can't break anything.
You don't have time for a rebuild, the client doesn't have the budget. Do you hack on what's there, hoping you don't break anything? Or progressively refactor this mess into something usable? If you do refactor, where do you even start?
No worries homie, I've been there, from WordPress, CodeIgniter to bespoke 15 000 line switch statements, I've refactored them all, I've gone through the pain, take my learnings so that you don’t have to.
I'll show you some tools that make life easier, and some techniques to wrangle this code right.
I'm not showing you a theoretical talk, this is real life, we're going to refactor real code and covering:
- Tools to make your life easier
- Ensuring you don't break things (Unit Testing and Feature / UAT made real good)
- Migrations (because foreign keys and indexes are your friends)
- Refactoring some hairy SQL and ORM into sweet, sweet Laravel/Eloquent tastiness (You can use Doctrine if you like working harder)
- Events / Listeners / Observers
- Middleware
- Controllers
- Error Handling
- Routing
- Transformations
- And… passing data between systems (Scary stuff here).
