Hacker News new | ask | show | jobs
by mattacular 25 days ago
What are some traditional automated refactoring tools that can do stuff like those tasks from the example?
5 comments

???

Mature workflows for those kinds of tasks have been mostly ubiquitous across professional-grade engineering tools like those from JetBrains or Visual Studio itself for longee than many people here have even been working in the trade.

It's clearly not the case for simonw, but much of what many people task AI tools to do foe them are only a novelty for the "VS Code"-type users who stubbornly refused to explore more professional-grade paid tools in the past.

Yet for many tasks, those mature paid tools provided reliable and efficient features that make the AI approach look like an expensive, slow, and dangerously nondeterministic regression.

Oh I'd definitely classify myself as a "'VS Code'-type users who stubbornly refused to explore more professional-grade paid tools in the past."

I've never liked the larger IDEs - VS Code only won me over because it was indistinguishable from a lighter text editor at first, and the IDE tools then emerged slowly as I used it.

I used JetBrains IDEs for years. The refactoring tooling was fancy find-replace as far as I recall? Pretty cool in 2015, though.
It goes deeper than this, you have features like rename function / change method signature that will update your whole code base and even suggest applying such changes to related(-looking) functions.
VSCode "rename symbol" is a basic example. Jetbrains products have way more and it's pretty great: https://www.jetbrains.com/help/idea/refactoring-source-code....
https://www.jetbrains.com/help/idea/refactoring-source-code....

This has a list, but some of them that I've used extensively:

- Rename anything, can also do smart renames that apply patterns, deal with capitalization differences, pluralization, etc

- Move function, constant to a different file

- Change function signature, including adding, removing, reordering, and renaming arguments

- Turn a chunk of code into a constant, variable, or function, including replacing other similar patterns or calculations with the new constant/variable/function

- Inline any of the above.

- Replace a class with an interface, have the class implement the interface... same with field accesses

- Move functions up/down the type hierarchy

I'm sure there's others. This has all been there for at least a decade.

Eclipse IDE since like 2001
Literally any IDE or decent text editor?