views:

287

answers:

11

I would like to learn to program using the Linux environment. What do you suggest for Editors/ IDEs?

+7  A: 

Eclipse CDT

Dean
CDT is the tool to go too for medium to large scale (not huge applications). I love it
dassouki
+24  A: 

If you really want to learn to program in a Linux environment, I'd recommend a simple text editor and the GNU toolchain (GCC, GDB, make).

Some popular editors:

This route is great if you eventually have to work on a system without other tools available. Most Linux distributions will come with the toolchain and 1 or more of these command line editors installed. It's also beneficial to have a good understanding of these tools, as programs like the Eclipse CDT use these as a back-end, and you will be able to understand error messages brought forth which will make debugging easier.

John T
+1 for going command line. It is the best way to learn the compile, assemble and link processes, which will prove invaluable later.
sybreon
Agree. An IDE an make a beginner appear to be more productive initially, but it's largely an illusion because they never learn the basics required for true mastery.
DaveParillo
And also good when you can't get X to start!
James Morris
+1 for Emacs. Not so for viper-mode. Good answer though. :)
Noufal Ibrahim
Totally disagree. Editor/command line skill does come in handy, but it's a completely orthogonal skill. That's like answering "what tools should I use to learn to make chairs?" with "you should learn to use a milling machine first so that you can repair your own tools when they break". It's definitely great to know how to use the low level tools, but maybe he really only has time to learn to make chairs.
sblom
@sblom he hasn't indicated a time frame, and he's asking how it's normally done in a Linux environment. Just because you're a C# programmer with your cuddly Visual Studio IDE, doesn't mean there aren't other ways of doing things. Think outside the box for once.
John T
@John T, why do you have to bring (rather incorrect) personal insults in to this? Flagged abusive.
sblom
@sblom... hmm wonder who randomly downvoted all of my answers? We'll see what the moderators think of that. And it wasn't intended as an insult, I used the word cuddly for God's sake. Judging by your profile, with C# questions being the ones you primarily answer, it's safe to assume you do a fair bit of work in Visual Studio. I do my homework before saying things.
John T
+4  A: 

Someone else suggested vim, emac and nano, but I wouldn't suggest them. For Vim and Emacs you'd spend more time learning how to use the editor than how to program, and nano is just like Gedit except you can't use the mouse to select where you want the cursor to be.

I do agree with the idea of doing things the Linux way (tm), which would be a text editor and makefiles. They're very easy if you start off looking at a simple one. Look at this if you're interested. They're nice because it's generally easier to build Linux packages if you have a Makefile. (If you're going the simple editor and a Makefile route, I suggest Gedit because it does syntax highlighting).

If you're not interested in learning how to write makefiles, I suggest Eclipse, KDevelop (if you use KDE) or Netbeans (my favorite -- similar to Eclipse).

Brendan Long
John T
DaveParillo
My comment about not being able to use the mouse to navigate was only directed towards nano. I realize that vim and emacs have commands for moving the cursor quickly. I've never had trouble using an IDE. They have the same sort of complexity as vim or emacs, but they're much easier to use because there's menus instead of remembering a bunch of a commands.
Brendan Long
Emacs and vim are 'different' from IDEs. They're extensible in a way that I can't really express. The effort you put in into learning how to use them will repay itself multifold.
Noufal Ibrahim
Since writing this answer, I found out about nanorc files. With that, you can get things like auto-indent, syntax highlighting and there's a setting to let you use the mouse to click around.
Brendan Long
+3  A: 

I personally like Geany. It offers everything I could need in an editor.

aperson
+1  A: 

NetBeans is nice, and it has decent integration with Qt, which is the toolkit used for KDE.

Joe Internet
+8  A: 

Qt Creator is nice and small C++ IDE (you don't have to develop Qt applications if you don't want to).

Grzenio
+1 it's young, but very promising and very pleasant to use
Tristram Gräbener
+1 I recently discovered the wonderful world of Qt and Qt Creator. :)
missingfaktor
Qt Creator probably has a better visual interface than pretty much every other IDE out there. And it's pretty competent to boot
Dasuraga
they should really change the name and focus if they want to be taken seriously as an all purpose IDE.
Omry
+3  A: 

Using an IDE for programming is perhaps a bit faster at the beginning. But this is a double-edged sword. You will grow into a lazy programmer who doesn't know the basics, the internal things behind the curtain.

By using a text editor and the Linux console you will progress slower, but you will learn a lot of additional useful tricks. You will also grow into a humble programmer, who thinks more before typing some code, before copypasting some code, before running a test/build process just for the sake of it. At some point it might become obvious for you that an IDE would speed up your development process, without getting into your way. Then you could try to switch to an IDE. But even then you'll observe some of the advantages of using simple tools: you can hook them together the way you want.

I would also like to mention a third approach, that is somehow different from "IDE vs text editor". It is called Literate programming. I won't claim it is absolutely better, but it certainly has some advantages. Consider having a look at leo, that is a great tool for this job.

+1  A: 

KDevelop v4 (from SVN), it is very powerful and surprisingly stable, built in support for qmake and cmake.

OneOfOne
+3  A: 

Try Code::Blocks. It's a high quality C++ IDE, like the Visual Studio.

grigy
+2  A: 

Try Anjuta. Nice C++ IDE for Linux.

missingfaktor
The user wants to know what to use in the Linux environment, not Windows.
Christy John
anjuta works perfectly fine on linux. its a gnome project
chub
@chub His first answer was DevC++ @GreyMatter Ok, u edited ur answer. Taking off the -1.
Christy John
A: 

I think the priorities should be:

  • gcc / g++ understand that little bugger. Setup your libraries properly, any specially requests you need, cmake, compiling techniques, etc ...
  • Start with a simple to use IDE such as CDT. That way you focus on the language and the environment
  • Backtrack and slowly move away from CDT into VIM or emacs
dassouki