Quality literature isn’t produced by just writing; it’s in the rewriting that excellence is achieved. This is also true with code. Readability is crucial to code quality and is best achieved by switching your mind-set from writer to reader. That switch fits naturally into the act of refactoring.
Bruce Gray shines a spotlight on swapping hats, moving fluidly from problem solving (writer role) to communicating (editor role) and back. Refactoring is to programmers as lifting is to UPS workers: so basic that it gets overlooked, yet so fundamental that doing it naively can hurt. Refactoring is worth practicing as a discrete skill, bound to an implied value judgement of better code, best served with a separate commit workflow, and unsafe without automated testing.
Bryce Gray is the owner of Gray & Associates, as well as a consultant and contract programmer, specializing in software archeology and dynamic languages. He’s a graybeard of the Perl community, speaking at most iterations of the Perl Conference (YAPC), running hackathons, mentoring Google Summer of Code, contributing to Perl 6 for 14 years, and writing Blue Tiger (a tool for automatically modernizing Perl code). He’s been a release manager and 13-year contributor for Parrot and Rakudo Perl 6, as well as a regular contributor to Rosettacode.org. Bruce is also researching refactoring for dynamic languages. Shakespeare, modern theater, and ballroom dance are his outside interests, yet they’re often spotted in his technical presentations.
©2019, O'Reilly Media, Inc. • (800) 889-8969 or (707) 827-7019 • Monday-Friday 7:30am-5pm PT • All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. • firstname.lastname@example.org