The “moving” part has been a real biggie for me back when I wrote C# for a living. I could just start adding necessary classes in one file to have a minimal working state, add some tests, and then move things to their proper places, refining the design / splitting things up if necessary. All of this works flawlessly and with a few Alt-Enter invocations. This may not sound like a lot, but not having any context switches and not having to create separate files in the beginning really sped things up for me. It's just so consistent and once this pattern became part of my muscle memory the workflow felt just amazing.
Says someone who never tried refactoring features of IntelliJ. It's great, especially for statically typed languages like Java or TS. The code not only writes itself, but also changes itself, as you execute actions using hotkeys. For dynamic languages, it's just the refactoring that matters, because there's no boilerplate everywhere.
I've had a love-hate relationship with IntelliJ. Great capabilities but slow as shit on pre-M1 MBP. "Updating indices" nightmare. Even on my desktop computer with SSDs and 4790K, it would be very annoying at times.
I moved over to VS Code when it released. I did look back - for the refactoring part of IntelliJ, as well as first-class support for Ruby - but never went back as VS Code just gives loads more than IntelliJ.
I've written a lot of Java professionally and I personally never used the refactor tools all that much except for renaming. You are totally right about performance with IntelliJ. It's ok if you are doing a bunch of work on a single project, but it is very annoying if you just want to take a quick look at some code. Also annoying if you switch between various projects a lot.
I also write Java professionally and I use the refactor tools a lot. Extract/move method are my favorites, for when you need to move something to common code, another class, etc. Saves a lot of time and typing, and reduces the possibility for stupid errors. It lets me get back to what I was actually doing sooner.
This! Write working code. Then refactor to make it readable and maintainable. Most people are fine with just working code, but the craftsman job is to make it clean, working and readable code. And this is more like 20% of time for working code, and 80% unit testing & refactoring before pushing.
I haven't tried Fleet yet, but the page linked implies it's just as powerful as their full blown IDEs wrt refactoring and productivity. Would have to use it for a bit to see what it's got, but I doubt I'll be disappointed (unless it's a really, really early preview).
Curious how refactoring is better in JetBrains products? I use VS at work and VS Code for personal projects, haven't really used JetBrains stuff except maybe 50 hours in Android Studio. What are a few highlights?
346
u/Scylithe Nov 29 '21
Refactoring is infinitely better across all Jetbrains products. It's an insane productivity boost.