Hacker News new | ask | show | jobs
by whirlycott1 5369 days ago
It's not a matter of forgoing unit tests. Example: rename a method to something more clear. It's used 1000x in your codebase. You can do that in probably 5 seconds and know that it's done correctly. It says nothing about how the method functions, but rather that the code hasn't suffered because of this trivial operation.

Another example: you want to abstract a chunk of code into a new method. Easy, select the code, refactor it out and provide a method name. 2 seconds.

You want to reorder the way the arguments appear in the method? 1 second.

You want to know if a variable is in use anywhere? 1 second.

This stuff is painful without an IDE. I don't know what you do in life, but I find this functionality indispensable.

2 comments

I was responding specifically to the somewhat alarming claim that faith in the operation of one's IDE is a substitute for regularly running tests. I wasn't denying that automated refactoring tools are nice to have; they obviously are.

Regardless, I don't really think that the examples you give have much to do with the IDE vs (editor+plugins) debate; they're to do with the amenability of one's language to static analysis. Certainly code modification features are available to statically typed languages that aren't available to dynamically-typed ones (and this may explain why users of the latter are less drawn to IDEs), but there are compensatory benefits to using a dynamic language. Let's not get into that one, though, eh? One eternal flame-war per thread is probably sufficient. :-)

Well, here's the thing. I don't have an easy way to do those things, so I rarely if ever do them. And guess what? I don't miss that at all.

And I'm guessing your fancy refactoring tools probably don't correctly handle the case where part of your code is in one language, which then automatically builds code in another language to compile into the main project. I've never seen an IDE that didn't get in my way with that workflow, and that's the secret sauce that my programming style cannot live without.

And I'm guessing your fancy refactoring tools probably don't correctly handle the case where part of your code is in one language, which then automatically builds code in another language to compile into the main project. I've never seen an IDE that didn't get in my way with that workflow, and that's the secret sauce that my programming style cannot live without.

Yes, they do. IntelliJ products are capable of updating XML bindings for renamed Java classes/methods, reasonably good guesses about JavaScript/Python functions used in maps (i.e. with their names used as string keys, outside of the AST).

I don't want to be judgemental here, but it seems like you yet have to meet the really big codebase.

Umm, your XML binding stuff is great, but I would need a refactoring tool to go into Perl code, figure out what bits of it are actually C++ that are going to be output later, and change that. I would be really, really surprised if you have a tool capable of handling that routinely.

It's true I've never really worked on a project with more than a million lines of code, though. My core work is more on the scale of 300,000 lines of code.