6 ms·
grepping for "foobar" is very different from finding invocations of the function named "foobar". Cross-file search and replace, which is doable from emacs, is d
by geophile 15y ago
grepping for "foobar" is very different from finding invocations of the function named "foobar". Cross-file search and replace, which is doable from emacs, is different from refactoring. I love emacs and unix, but sorry, it's not an IDE. Intellij, now that's an IDE.
- udp 15y agoYes, you're right. But a whole bunch of people don't need or use things like automatic refactoring, and more often than not write better code than the people who do.
- kleiba 15y agoI don't use IDE's and I love Emacs, but sorry, for "more often than not write better code than the people who do" I feel like I have to invoke "citation needed"...
- robfig 15y agoJeff Dean uses emacs
- beothorn 15y agoThe automatic refactoring on IDEs are error proof (I'm thinking about eclipse and java here). Saying that you can do a line without a ruler is one thing, but saying your line will be straighter, I really doubt it. IDEs are important for people that do refactorings. If you don't, fancy IDEs will slow you down. I don't do refactorings that I'm not sure if they will break my code. It's the same reason I don't code with dinamically typed languages and avoid using reflection.
- philbo 15y agoHow do you know that the automatic refactorings in your IDE are "error-proof"? I've no experience to suggest otherwise, but it strikes me as a bold claim. Presumably, you've got a suite of unit tests etc that you are using to verify your code still works post-refactoring. The same test suite would of course work outside of an IDE environment, so I don't think correctness is a valid argument here (but I agree that speed of refactoring is).
- beothorn 15y agoI work with smalltalk and java/eclipse so what I say come from this background. With statically typed languages and a IDE to aid, refactorings like rename, pull up, pull down, extract interface and such can be done without changing the code behaviour (if your code don't use reflection).This is a characteristic of statically typed languages, not IDEs, but IDEs can do it automatically. You could do this refactorings without a IDE, but not with text replace. For example, if you need to change the name of a method, category(), and two unrelated classes implements it, your refactor using text replace will change the method signature for both classes. You need to check every place where the code will be changed, and if your codebase is too big with too many calls, this is nearly impossible. The IDE rename the method calls based on the varible type, without risks of errors, if the refactoring is not possible eclipse warns you.
- philwelch 15y agoPresumably you still have someone review the automated refactor, right? Plus, smalltalk isn't a statically typed language.
- Arelius 15y agoYes or no. Static code transformation with well defined equilivency is many orders of magnitude more reliable than the error finding rate of a code reviewer. You still review to make sure it was an improvement, and to make sure that the person making the changes didn't make the mistake. But you don't review the correctness of the transformation itself, at least not any more than you need to review the original code.
- beothorn 15y agoNever said that smalltalk is statically typed, I said I work with both on my job. A refactoring don't change the code behaviour by definition. I don't need someone to review my refactoring to look for errors from an automated refactoring, maybe to tell me that the refactor didn't improve my code.
- r00fus 15y ago
- geophile 15y agoThere are people who write bad code, with and without IDEs. There are people who write great code, with and without IDEs. I suspect that everyone who writes great code does refactoring. Some prefer to do it manually, and some prefer the automation.
- truncate 15y agoProblem with IDE is that they are often bloated and take lot of space. Also I think I don't use more than half the features they provide. You infact get slower there when you get used to something like Vim/Emacs.
- skrebbel 15y agoIf UNIX gets language-aware tools that allow me to search-replace methods of a particular name (and not other identifiers with the same name), and if Vim gets autocomplete* that understands which packages/libraries/headers/assemblies I'm importing, then I'll seriously consider moving to UNIX as an IDE. Until then, I fully agree with you. * To be ahead of the haters: autocomplete isn't a trick for avoiding having to type some extra characters. It's a way for exploring an API you're only vaguely familiar with. I guess you need to be at least somewhat familiar with statically typed languages in a decent IDE to really appreciate what this can do to your productivity. I seldom need to refer to the API docs of libraries I use.
- vog 15y agoAutocomplete is not tied to statically types languages. For instance, in the Python command line prompt you have autocomplete directly on the live objects.
- skrebbel 15y agoSmart! But will it work without actually running the code? Will you be sure that the method which is available on the object now is available on each object passed to the method you're writing?
- WayneDB 15y agoVisual Studio autocompletes Javascript by executing the Javascript and using stub objects for anything that they don't actually want to run (e.g. window, XmlHttpRequest, etc).
- ori_b 15y agoThat sounds incredibly baroque, complicated, and fragile.
- aaronblohowiak 15y ago
- muks 15y agoTry cscope and xrefactory for emacs. cscope is very good for searching through C codebases. You can use this with vim too. It has emacs integration using xcscope, and you can use sequences like C-c s g to quickly jump to a symbol. xrefactory (though non-free) is very good with C++ navigation and can do refactoring. I have used IntelliSense with VAX and xrefactory is much better. This less known program is something incredible for C++.
- rhizome31 15y agoAlso worth mentioning Rope for Python refactoring. Rope's extract method works rather well in Vim.
- agumonkey 15y agogrammar/language oriented libs/functions are missing, nothing more. People still process language with regexps over bytestreams, while they shouldn't. Eventually, and not too long from now, this idea will sink in.
- deleted 15y ago[deleted]