Question Locked

How to do automatic code refactoring instead of manual?

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I write projects for a company, the projects are similar, but because of the identical application code, I have to rewrite, refactor.
Takes a lot of time manually
If there are proven services, I will be grateful
Thank you !

6 replies

by rproffitt edited

We NEVER rewrite or refactor without a good reason. The code is working so we don't fix it.

by Johnharper2020

Automatic refactoring removes dead and redundant code without changing a system's functionality and converts unstructured code into well-structured code and procedural code into object-oriented code.

by rproffitt edited

It's not done by seasoned programmers. Great way to automatically introduce system failures.

But hey, it may not be your responsibility but it could mean you could lose your job or company!

by Biz4SolutionsPvtLtd edited

Automatic code refactoring refers to the process of employing a program or a tool for making changes in the existing code while keeping its functionality intact. Code modifications are necessary when you need to improve the readability or structure of the code. Check out the options for carrying out the process of automatic code refactoring.
Today, several IDEs offer built-in tools for auto-code refactoring. Common examples of such tools are IntelliJ IDEA’s “Code” menu, Visual Studio’s “Refactor” menu, etc. Coming to standalone tools, there’s the “Rascal” tool that is language agonistic and the Facebook-created “Codemod” automation tool. “Codemod” is an open-source tool written in Python and can be used to refactor large-scale codebases.
If you need code refactoring for a specific requirement that is not supported by any of the refactoring tools available in the market, you can write customized programs for this purpose.
However, you need to note that code refactoring is a complicated process and for certain use cases it may not be possible to entirely automate the code refactoring process. In such scenarios, partial human intervention is needed along with automated code refactoring.

by SameekshaM edited

Code refactoring is the process of changing the code's structure without changing its external behavior and functionality. It consumes a lot of time and can be tedious when done manually.

Automated code refactoring leverages special software to streamline and simplify the process for you. Today, several IDEs, such as NetBeans, Visual Studio Code (VSC), IntelliJ IDEA, Eclipse, StepsizeRider, SonarQube, and many others, provide the feature of code refactoring.

Though you use tools for code refactoring, you still have to control them and measure results. However, they will undoubtedly save time.

by knifeplatoon22 edited

Use code analysis tools or manual code reviews to identify areas of the code that need refactoring. There are many refactoring tools available, such as ReSharper, Eclipse, and IntelliJ IDEA. Select the one that works best for the programming language and IDE you're using.

Once you've selected a tool, you'll need to configure it to work with your project. This may involve specifying the programming language, the version of the IDE you're using, and any other relevant settings.

This discussion is closed to new replies.