justideas.io
Published in

justideas.io

Explaining the Joy of Refactoring (to the non-developer)

I thought of the above sketch when I recently was explaining why refactoring can be joyous for a developer.

A common workflow pattern is to make something work, however you can. Once you have it working, you clean up your code (refactor), such that the external behavior/functionality is unchanged, but the internal code design and organization is refined and improved. (This should be done in small doses; I would not recommend building an entire application and then trying to clean up its codebase.)

You start with a dilapidated mess (a shack), held together with duct tape, paper clips and whatever you can find. And through disciplined refactoring, you have an elegant, organized and manageable codebase. The transformation is very rewarding and can make a developer happy and proud of their work.

And as noted in the sketch, you should refactor with an automated test suite, so you can verify everything still works. Otherwise a light switch in one room might control the lights (or worse) in another room.

--

--

--

justideas.io — startups, software development, and process — by Christian Sepulveda

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Christian Sepulveda

Christian Sepulveda

espresso fanatic, coder (still), VP Engineering Bastille, …yeah, espresso comes first. https://christiansepulveda.com

More from Medium

Research of KLAYDICE

Miscommunication in Innovation

Dignity and Agile working: a Catholic-informed perspective

1st Conference of the Researcher Mental Health Observatory (ReMO 2022)