loading...
markdown guide
 

Welcome to the editor wars. Pick a side and grab a torch.

 

This idea that you'd trust an IDE over a person is completely foreign to me. I don't use an IDE. I don't trust developers that rely heavily on IDEs.

Perhaps an IDE can do some refactoring, but the type of refactoring I normally I doubt any of them can do. If they can, then they have an AI far more impressive than I've ever seen.

 

I try to have enough test coverage that any refactoring, automated or manual, poses minimal risk.

 

I rarely use refactors like that, so I guess I trust myself... :)

To be fair, most editors don't have a lot of built-in refactorings for F#. And the compiler catches a lot if you write pure functions.

 

Difficult to answer without context. (Although I lean towards "by hand")

Consider and older app with thousands of files and millions of lines. Unless you're intimately familiar with it, I'd recommend letting an IDE do the heavy lifting of refactoring.

Ultimately, the right way is the one that works best for the developer and project in question. I'd rather the dev use the tools they are familiar with and are productive with rather than forcing them to do it my perceived "right" way.

And by "by hand", I'm assuming still includes using tools such as grep, find, sed, etc.

 

I don't use an IDE that has this feature (or maybe I just don't know about it). I always refactor and extract duplicated code by hand.

 

Every time i try doing it manually i end up introducing bugs.

 

It's kinda natural if it's a technology/language you don't fully understand (for instance, trying to refactor code that uses a library you don't know, unless you take your time and understand it, you'll probably leave/delete a line that will unleash havoc in your software).

One of my usual ways to refactor "on-the-go" is to completely extract a code block, using IDE or not, and as I test, refactor that code block. That way I usually avoid mistakes like that and also stay productive, since the tests itself usually help me understand the flow my code should have.

Classic DEV Post from Nov 22 '19

What Status Page Provider or Project Do You Recommend?

What status page provider or project do you recommend?

kodengo profile image

Hey there reader...

Do you prefer sans serif over serif?

You can change your font preferences in the "misc" section of your settings. ❤️