Member-only story

Merciless refactoring — building a flexible codebase

Rabin Poudyal
1 min readFeb 24, 2021

Working on a large codebase is tough. Even a small change can cause many side-effects. The fear of not changing the codebase due to the fear of these consequences is even more harmful to the codebase in long run. The fear is because of lacking test cases. Running the test cases can give you instant feedback on all the side-effects.

If we want our codebase to be flexible, we need to flex it. Modern software engineering is all based on the principle of flexible software. The design patterns that we discovered, the SOLID principles we formulated are all based on the building software that is easy to change and maintain. So each time we work on a codebase we can make some changes like renaming the function names to something useful or applying some object-oriented features like inheritance and polymorphism without breaking the codebase. Even if something breaks we get instant feedback from our test case so there is nothing to lose.

The idea and reference of the above content are taken from Uncle Bob’s Clean Coder book.

If you like my article, don’t forget to follow me on Medium, or connect me on Linkedin, or follow me on twitter.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Rabin Poudyal
Rabin Poudyal

Written by Rabin Poudyal

Software Engineer, Data Science Practitioner. Say "Hi!" via email: rabinpoudyal1995@gmail.com or visit my website https://rabinpoudyal.com.np

No responses yet

Write a response