DEV Community

Fagner Brack
Fagner Brack

Posted on • Originally published at fagnerbrack.com on

Why You Should Forget the Tooling and Refactor Code Manually

In the world of software development, tools are everywhere. There are automated tools for testing, deployment, and refactoring. But what if I told you that relying too much on tools can be counterproductive? What if I told you that manually refactoring your code can lead to a better understanding of the system without endless documentation? In this post, we explore why you should forget the tooling and refactor code manually.

First, let’s define what we mean by “tooling.” In this context, we refer to automated tools that assist developers in refactoring code. These tools are useful for identifying code smells, finding duplicate code, and making small changes to improve code quality. However, relying too heavily on these tools can lead to a lack of understanding of the system as a whole.

When developers manually refactor code, they become more familiar with the codebase and feel the pain of change. This creates incentives to design systems that are good enough, not too tightly coupled or too loosely coupled. Manual refactoring also forces developers to move code around in small steps. Otherwise, it’s very hard to keep control of the code. This helps developers create a mental model of how the system works.

Psychological science supports this approach to learning. When we manually perform a task, we engage in deliberate practice, repeating small, specific steps to improve performance. By manually refactoring code, developers also engage in deliberate practice with their code, leading to a deeper understanding of the system.

If everyone on a team engages in this approach to refactoring, everyone will eventually have a similarly deep understanding of the system's design. This eliminates the need for endless documentation that never quite matches the code. Instead, the code itself becomes the documentation.

In conclusion, while automated refactoring tools can be helpful, developers should not rely on them too heavily. Manual refactoring leads to a deeper understanding of the system and helps to create a mental model of how the code works. Developers can improve their skills and create better code by engaging in deliberate practice.

Forget the tooling; in order to be truly productive, it's time to start manually refactoring your code.

See also Don’t copy-paste code. Type it out.

Thanks for reading. If you have feedback, contact me on Twitter, LinkedIn or Github.

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

While many AI coding tools operate as simple command-response systems, Qodo Gen 1.0 represents the next generation: autonomous, multi-step problem-solving agents that work alongside you.

Read full post

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Instrument, monitor, fix: a hands-on debugging session

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️