Simon Willison’s Weblog

4 items tagged “refactoring”

2019

Optimizing for the mobile web: Moving from Angular to Preact. Grubhub reduced their mobile web load times from 9-11s to 3-4s by replacing Angular with Preact (and replacing other libraries such as lodash with native JavaScript code). The conversion took 6 months and involved running Angular and Preact simultaneously during the transition—not a huge additional overhead as Preact itself is only 4KB. They used TypeScript throughout and credit it with providing a great deal of confidence and productivity to the overall refactoring. # 5th August 2019, 12:26 pm

2018

The test for extracting common code should not be “Are they the same right now?” but “Do they have the same reasons to change?”

Chris Ford # 24th May 2018, 2:33 pm

2008

RefactorMyCode.com. Neat community for discussing improvements to code snippets. Login using OpenID. # 28th June 2008, 11:46 pm

2007

The Elements of JavaScript Style. Douglas Crockford illustrates better coding practises through refactoring of old code. # 13th September 2007, 8:22 am