Hacker News new | ask | show | jobs
by mhitza 13 days ago
Shift-F6 (rename refactor) is my goto, and what I miss most in a code editor (maybe LSPs support that today for most languages).

It also takes away the mental tax burden of thinking up good names for things when writing out code quickly on the first pass.

Works very well with PHP (in PHPStorm), and I'd expect somewhat similar reliability in PyCharm on a Python project with some type annotations (or maybe even with none?).

With the advent of LSPs and treesitter parser approach I wished to see higher level refactorings possible by now, but innertia in tooling space died down as most focus switched to LLMs.

1 comments

The point of good names is not just readability but also to sharpen your cognitive model of the solution. That moment when you realize you don’t know what to name a thing is a valuable prompt to deepen your thinking a bit.

And I sometimes prefer searching for the method names and changing them one by one (find-grip-dired followed by query replace) just to see where all the code is being used, if anything looks bad, if there is some opportunity for code reduction, etc. not that I don’t also prompt Claude to rename things, or better yet make sure all the SQL commands log enough etc.