4 ms·
I don't want to dis IDE makers. There are folks such as jetbrains that make an amazing product. But at the end of the day, for us linux-type professional develo
by shanemhansen 14y ago
I don't want to dis IDE makers. There are folks such as jetbrains that make an amazing product. But at the end of the day, for us linux-type professional developers, it's all text. You have maximum leverage with unix text editing tools. Refactoring 50 files at once by doing something like:
grep -lR 'old_method' | xargs sed -ie 's/old_method/some+other()+expression/g'
is just plain awesome. Want to find out what libraries a process is using?
cat /proc/$pid/maps
Want to find out where that process is logging to?
ls -hal /proc/$pid/fd/
Basically it's often hard to use a gui ide to accomplish an arbitrary task if the IDE wasn't built for it, or if no one has taken time time write plugins. At the risk of gushing, the command line is just one of the most extensible, composable environments ever invented, and it's success over the past 40 years proves it.
- wvenable 14y agoIt's all text is the lowest form. Renaming a method by mass replacing text won't always yield the correct result. A tool that understands the language represented by the text can do a much better job. Also right-clicking on a method name, clicking rename, and getting a preview I can manipulate seems far more efficient. But you are right, if an IDE wasn't built for a task you're SOL and you can likely compose something together on the command line to solve it.
- gjulianm 14y agoI really love console, but I don't think that command is so awesome (don't tried it so I'm asking just for curiosity): What if you only want to refactor Class1.Foo() method while not changing Class2.Foo()? That is, could you refactor taking context into account with the CL? I use Visual Studio to develop for WP7, and refactoring is even more awesome: change any name, click the little popup (non-intrusive at all) and select refactor. Done. Not only in that file, but also in your project and any other project you have opened. I'm not trying to bash command line tools (I'd really love to know them better), but I think that there are things that are far easier with a graphical IDE.
- ashleyblackmore 14y ago"I'm not trying to bash command line tools" hehe "if you only want to refactor Class1.Foo() method while not changing Class2.Foo()" vim has functionality for scope in most languages (see http://vimdoc.sourceforge.net/htmldoc/eval.html#internal-variables http://vimdoc.sourceforge.net/htmldoc/eval.html#internal-var...). If vim doesn't have the functionality, it is a one-liner in your config file. Additionally, there are language-specific vim refactoring options such as eclim (eclipse functionality in vim and vice-versa) for java, and rope/bicycle repair man for python edit: on a side note, these religious discussions are great for unearthing great links and cli tricks!
- shanemhansen 14y agoI'm not very opinionated actually. IDE's for static languages do a great job at refactoring, especially for things like java where the language was designed more for tooling. When sed fails, and I don't have pycharm open, I stick with something like: grep -lR 'thing_i_need_to_change(' | xargs emacs To get a listing of files and pull them all up in buffers.
- einhverfr 14y agoWhile I generally use sed sparingly because of testability issues, I agree with the general point. The UNIX console tools are extremely powerful for text processing and graphical IDE's don't even come close. I have never found a graphical IDE that could match even VIM in text processing. Sure maybe it adds a file browser or a couple of menu commands for building and running. But in terms of actual coding, VIM rules (I am sure EMACS fans feel the same way about EMACS and for similar reasons). The selling point of an IDE is generally that it's "integrated" whatever that means. The selling point of UNIX or Linux is you can string the tools together, loosely integrated, to accomplish a better job, but it's not integrated in the same way out of the box. I don't think there is any question that the UNIX approach leads to better productivity in my mind. The issue is that like all high productivity tools, it has a learning curve.