Refactoring is making code better. We all want to make things better. Making thing better makes us feel good.
We watched Therapeutic Refactoring by Katrina Owen to see what pointers she could give about making things better. Turns out, quite a few. She tells a story about a horrible block of code from an untested segment of a legacy application.
Legacy applications are talked about by programmers with a mix of anxiety and apprehension. If a legacy application has no tests you never know if a change you made just broke something you haven't noticed. At Resolve when we pick up a client with an existing codebase there's a chance it will be one of those legacy applications with no tests.
Fortunately, Katrina lays out, step by step, how to add tests to a legacy application that will tell you what the application currently does. Once you have these not only can you develop new features without fear, you can start refactoring!
Katrina walks through refactoring her example code. She finished the story by discusses removing "codejunk," bits of code that don't do anything and make it hard to understand what other code does. Next comes the moral of the story, why refactoring makes us feel good; it gives us back our brains and stops us panicking. When we aren't panicking we write better code for the future.
Refactoring makes existing and future code better, clearly a good programming and business practice.
Let's work together
Tell us about your project and we'll get back to you shortly.
Join The Conversation
More On The Blog
8 Best Ruby On Rails Gems For eCommerce Applications
Everyone within the eCommerce space knows of Ruby On Rails. This framework is used by approximately 3,866,870 websites right now, showing just how efficient it can be for creating efficient yet beautiful web applications. Now, this unique Ruby-based framework comes with its fair share of add-ons and extra features to discover as well. One of the most important ones is the gems in Ruby On Rails.
Sol Dieguez — Nov 30, 2022
How To Improve Your eCommerce With PHP
With the ever-changing state of the IT industry and the fluctuating eCommerce development trends, it’s more than necessary to be flexible in trying out different tech stacks for your eCommerce site. Now, PHP is one of the most popular programming languages out there, and one with a long-standing track record.
Sol Dieguez — Nov 24, 2022
Tips For Getting The Most Out Of Your AWS Free Tier
This cloud computing service currently has over one million users, with enterprise-scale customers making up about 10% of their clients. This shows just how widely used AWS is and gives a solid reason to try it out: it seems to work for most eCommerce businesses out there. Now, there’s a way to check out AWS for free and see if it works for your online business.
Sol Dieguez — Nov 18, 2022