Saturday, June 23, 2012

Development: Why Eclipse *is* the IDE

Probably many of you have seen question like this one: What IDE to use for GNU/Linux?

Many of the answers are from people who are really far away from what developers need. Some of the people simply suggest vi/emacs, gcc/g++, gdb, make and friends. Nothing wrong with that but can you handle a *project*?

And by handling project I mean you can:

- debug in a reasonable amount of time (also in large projects)
- be able to find fast in the code: definition, cross-referencing, call graph, etc
- refactor code fast and easy
- to be able to go from a message window directly to referenced file/line in the code
- to be able to integrate easily with multiple libraries or projects

An editor and a compiler/debugger is good enough to write some programs like the entire command line utilities (cd, ls, which, grep, sed ... ), but I'm pretty sure that for large projects you will end up using an IDE, or you will struggle with those tools (vi/emacs+gcc+gdb) just to prove that it might be possible.

Why do I think will you struggle?

Because for a large project things quickly start to get out of control:

- many (source) files
- the need to refactor some huge parts of code when you found out that something doesn't fit
- inefficiency when it comes to check for errors (working on huge code with command line tools is not an easy job)

Try imagining you need to copy some code from one file and moving into another file, or rename a function in all the places where the function is called (imagine there is a function with that name already... ). Can you do that with "sed" and friends. No! Or yes, after you've built yourself a language interpreter that makes the difference between function A from class X and function A (that will become A1) from class Y.

Let's face it, it is not an easy job, not even for an experienced programmer.

So use an IDE at least as good as Eclipse.

My reasons to use Eclipse:

- it ready to use with many languages via some plugins (c++, python, java ...)
- it has nice features like refactoring
- it is not slow as some people say. Just because it is Java doesn't means it is slow... things have evolved since Java version 1.2 you know?
- it supports different types of code style that you can use. You can format all your code to use a certain code style.
- has code completion
- has very good code searching
- has an internal language interpreter that helps you with errors before starting to compile
- it works on many platforms
- ... many others
- and yes, IT WORKS



I know that there are many tools that cumulated do just that (cscope, ctags, vi with some "nice" .vimrc, gdb, sed, grep, awk ) but I don't have the time and the patience to INTEGRATE them. I somehow know how to use each tool and I will use it if needed but hey, I need to be PRODUCTIVE. Using a tool is not cool for me, and certainly it is not my purpose. My purpose is to get the job done. If I know some command line shortcuts I will use them, I won't rely only on the IDE if I smell that the job can be done faster in a different way.


This is where I think there's a problem with the command line folks. They don't want to start some IDE because it is "heavyweight", "bloated" and that IDE simply wraps around some command line tools and hide everything for you. But that's the fucking purpose, to hide some complexity so you can focus on the job and not on the tool. For simple tasks you might make it with command line and an editor, but for larger projects you will fuck up fast, or die in anger.


So don't use a tool to be cool!

Use it to get the job done! No matter the tool is an IDE or some obscure perl script.

No comments: