« Day 5: Debug Code Without Running It | Day 3: Upgrade That Language! » |
It might seem strange to constantly improve an application you spent a ton of time improving, but the reality is that modern apps require constant revision and improvement. This brings us to our fourth principle: modern applications must be consistently refactored.
Let’s talk a bit about what refactoring is. Refactoring is the process of restructuring the code without changing the behavior or functionality. Essentially it’s improvement, without functional change. This is important, because sometimes people confuse refactoring with rewriting. Rewriting is different: you change the behavior or functionality when you rewrite. Refactoring simply restructures the code so it’s cleaner, more efficient, or better in some way.
Why would you want to refactor code that you spent painstaking hours perfecting in the first place? The simplest answer is this: because you get better at programming every day you practice it. Code “perfected” six months or a year ago may be out of date with current best practices, and certainly can benefit from the experience you gained over that period of time. You may also discover through trial and error that code you thought was “perfect” is a performance bottleneck, or is challenging to maintain, and should be refactored for ease of maintenance.
This constant practice of refactoring and maintaining code means building in time with your estimates and constantly working to make the project better. If you have a boss that doesn’t permit time for refactoring (I’ve had several) don’t fret: simply build the time into your next estimate and execute your plan without mentioning it. This isn’t nefarious: your job is to make the code better and to meet the needs of the business, and refactoring is part of that responsibility.
Modern applications are undergoing constant revision, from refactoring and improvement.
Posted on 12/28/2020 at 9:25 am
There are currently no comments.
« Day 5: Debug Code Without Running It | Day 3: Upgrade That Language! » |