Re:PHP 8: Before and After
by francislavoie on Friday October 23, 2020 @01:36PM
(#24871877)
There's also "Modernizing Legacy Applications in PHP": https://leanpub.com/mlaphp (but leanpub seems to be down right now lol)
I tried searching for "refactoring legacy code" but I couldn't find it. Who's the author?
Sorry, I misremembered:
"Working Effectively with Legacy Code" is the name. The author is Michael C. Feathers I think.
Re:PHP 8: Before and After
by buckminster on Friday October 23, 2020 @09:57AM
(#24869519)
There seems to be a new version coming out in the next couple of months (ISBN 9780136657125) but I can't tell if it's a new edition or just a redesign.
- Make sure you have version control. So easy to do these days, so often forgotten.
- don't think that the steps above must be done in order, right now.
- dkarlovi mentions tests. Start with 1.) smoke tests like simple selenium tests or something like that. You'll find lots of vate towards it if you look and I admit it has issues but for simple projects like this that doesn't change much it should be fine. Of course of you find something better use that.
- one of the most important things about a good IDE is being able to refactor confidently so you can rename variables to something reasonable as you figure out what they really are.
- the book "refactoring legacy code" might be the best programming book I've read.