Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A full-featured refactoring tool should be smart enough to only rename functions/methods that belong to the same class for example. This is generally possible only when the tool "understands" the language. A search and replaceable can't do this correctly.


This. Vim is great for simple scripts and small projects, but once a project grows beyond a certain size I really prefer an environment with more robust refactoring like Intellij.


I've just vim a bit, but I'm no expert.

It seems to me that IDEs such as Eclipse, VS etc. are much better suited to large scale development than vim.

For example, recently I worked on the HotSpot JVM, beginning by analysing the codebase. I started with vim and got cscope and related tools working, but they didn't seem to always work, and were much less useful than those I'd used in IDEs. In the end I switched to Eclipse, and was able to carry out the analysis very easily.

One of the Oracle JVM engineers told a friend - they generally use emacs for development, but when someone is trying to get their head around the code, they use an IDE.

So it seems to me that this guy and others "internalize" the way they codebase works, and then subsequently switch back to editors.

Thing is, this all seems rather baffling to me. Surely IDEs are designed to remove a lot of the burden of memorizing syntax, APIs, and the way the codebase works. Intuitively, this sounds like a step forward.

But - lots of experienced and smart programmers still use vim and emacs rather than VS, Eclipse, Qt creator, IntelliJ. Those people know a lot more than me about coding. So there must be a rationale for sticking to text editors.

Can anyone enlighten me please? Should I invest more time in emacs/vim? If yes, why?


I've found that the biggest problem with IDEs is that they let you get away with a sloppy architecture/modularization and having tightly coupled code.

Why bother thinking about a clean separation of concerns, isolated modules and good interfaces? The IDE will let me change any method or class name at any time, so I can just use everything everywhere as much as I please. Why bother making minimal well documented interfaces that make sense? I can just make sloppy, huge interfaces with 100s of little functions and use my refactoring and completion tools to find out which ones to call.

I call systems built this way "boogeymen". They are really scary to work on. You're changing some method in some class and you have no idea what will be affected by that method (until you run the system or the tests). You have no idea if that public method is part of an interface to the larger module, or its just public because another class from the same module is using it. Come to think of it, there is no "real" modularity and isolation.

I strongly believe that "necessarily complex system" meme is a myth and complex systems are the result of sloppy work on architecture, modularization and tiny interfaces that make sense. IDEs help perpetuate this sloppiness by helping mitigate the consequences, not by solving the underlying problem


On the other hand, IDEs, when used correctly do help with getting better architecture. Refactoring tools and dependency analysis are there for some reason. How often do you get the right architecture the first time? Seriously, I almost always get it wrong and I have to refactor. If there were no easy way to do it, it would just stay like that and technical debt would accumulate up to the point where you'd have sloppy, huge interfaces with 100s of little functions (little functions are in fact OK; huge functions are the real pain).


brilliantly put, just what I think too.


one aspect is speed. every ide i've tried is orders of magnitude slower at startup, and switching from 1 big codebase to another quickly is something I can't do without.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: