tags:

views:

591

answers:

12

First off, I know that this question is asked a lot. I have looked at several threads and I end up being more confused than anything because usually the thread question is vague so the answers are vague as well (ex - What is a good compiler to use? - followed by a list of compilers people recommend depending on who likes what).

I would like to know which editors/IDE would be best suited for a beginner, and then what I would like to learn in the long term (2 separate questions). I will try to be specific and list my priorities in order of importance.

I will be using Windows XP for learning. First a little background. I want to learn C++. I already know Java as far as syntax goes but only have a few years experience using it (nothing professional). I have used a few computational math / physics programming languages such as MATLAB, IDL, MATHEMATICA, MAPLE. I have done a lot of computational programming, but I want to switch over to software engineering.

I would appreciate an answer to two questions:

A - What is a good compiler and IDE/editor to use to learn C++?

Preferences:

1 - It needs to be free in the cost sense

2 - Easy to learn and use (probably somewhat minimalist)

3 - It NEEDS a good debugger!

4 - Very standard compliant (Compiler efficiency isn't important to me right now)

5 - Very short learning curve

I would like just a simple environment to learn the language in the short term.

B - What is a good IDE/editor for me to use long term?

Preferences:

1 - It NEEDS a really good debugger!!! Can't stress this enough.

2 - I would actually prefer a steep learning curve if it makes life a lot easier to code especially large programs.

3 - I like using a lot of key short-cuts. I am very annoyed to have to go through lots of menus or have to rely heavily on the mouse. On the other hand, I do like having the mouse as an alternate option, but probably only for very uncommon tasks.

4 - I am biased toward IDE's for the reason that they can collapse code, and present information more visually so I can find what I need a lot easier without having to hunt through too much code. If a good editor can collapse code and make finding code easier I would be willing to lose my bias.

5 - IDE/editor needs to extend to many other languages (I don't want to learn one for every language I use).

6 - I would like it to be free, but that isn't necessary.

7 - Start up time doesn't really matter to me.

Sorry for such a long post. I wanted to be very specific so that an expert could directly answer my question without stirring a holy war. I would like to see the differences between them that apply to my preferences. I would greatly appreciate any advice or information that you could give me that helps me make a decision.

I really don't want answers such as:

Use such-and-such because that is the one I like the most.

That really doesn't help me. I am sorry to be picky, but I have gotten lost or very little help in the related threads that I have read and I don't want to have to try more than a few different options to find what I would like the most.

EDIT

I forgot to mention a few things. Windows XP is for the short term. I currently have a dual boot and know how to use linux including basic command line scripts (though I am a bit rusty). I have used several editors (such as emacs to a basic level) and several IDE's that are more tailored for the languages I do know. My experience has been the easier it is to learn an IDE/editor, the harder it is to be efficient and have a fast workflow later on (unless the interface is very highly customizable or key shortcut oriented).

I did learn C++ to a very basic level, but it has been too long and I can't remember it. I really just need a short term solution for just a few months to learn the syntax very well.

Please let me know specifics about an IDE/editor such as how strongly it performs to my criteria. I also would really appreciate comparisons and contrasts. The more specific and detailed, the better.

A: 

The latest Netbeans IDE has support for C/C++ projects. You can find more about its C++ features here: http://netbeans.org/features/cpp/index.html

Mr. Will
+5  A: 

If you go the "MS Windows only" path, then there is probably no IDE better that Visual Studio. You have a choice of C++, C# and a number of .NET languages like F#, IronPython. The 2008 compiler is quite standards compliant. If you do get Visual Studio, try out the Visual Assist plugin for it.

The other options are : Eclipse - Really awesome IDE for C++ and Java, extremely well thought out application + it's cross platform. On windows, you can use Eclipse with the MinGW or cygwin gcc compilers

Borland Rad Studio / C++ Builder - If you are interested in building GUI apps without any pain, This is a good choice. There is even a free-for-commercial-use version called Turbo C++Builder

QT Creator : The Trolltech QT library comes with a decent IDE called QT Creator. QT is the way to go if you wish to build crossplatform GUI applications. The library is extremely comprehensive and a joy to use.

rep_movsd
A: 

You could also try Eclipse for C/C++. Maybe you got in contanct with it while learning Java. Eclipse is a free IDE, has a good debugger (at least I am very happy with it) has many useful functions and can be controlled a lot with shortcuts.

The learning curve however does not really depend on the IDE you use. Sure, if you use a simple editor and compile everything by hand you get the basic steps but this will be annoying and frustrating after some time. Try an IDE, do the basic steps (compiling by hand etc.) maybe once or twice and then let the IDE do it for you. The key to a steep learning curve is your own attitude. In order to learn programming well it comes down to three things: Practice, practice and practice. Learning by doing is all you need. Really. Don't just read some books but try everything that comes to your mind.

Ham
+1  A: 

For the long term your needs may be better met by finding a collection of utilities that you are comfortable with instead of a singular package. Vim has treated me very well and meets all your requirements for an editor. I have dozens of buffers and splits open at any given time and I'm hacking through large projects easily and quickly. As for a compiler/debugger, g++ and gdb make a good combination. You may find features in other compilers handy, but because you are a beginner and don't really even know about all the features to look for, it may be good form to start small and build to the next level or utility as need comes up.

Shamster
+10  A: 

Regarding section A, I recommend Microsoft Visual C++ 2008 Express.

A.1 You can download it for free.

A.2 It's not minimalist, but it's relatively easy to use.

A.3 Visual Studio has, in my opinion, the best debugger on the market.

A.4 Its standards compliance isn't perfect, but it's pretty good at it.

A.5 Unless you're doing fancy stuff, you can usually get started right away. Create a project, code, and press F5.


Regarding section B, I recommend Microsoft Visual C++ Express 2008 as well, or even better, Visual Studio 2008 Standard plus Whole Tomato Visual Assist X. (The express versions can't load plugins, so if you want Visual Assist, which I do recommend, then you gotta get the actual Visual Studio. The regular Standard edition suffices).

B.1 Again, best debugger on the market, IMHO.

B.2 Visual C++ itself is pretty good at this, but it's even better with the Visual Assist X plugin with a quick open source file dialog, a quick search symbol dialog, even better Intellisense, and very good refactoring support.

B.3 Most things are already mapped out to keyboard shortcuts, and you can map most things yourself if they're not mapped already.

B.4 Folding and all that is in Visual C++ and works great. Visual Assist X is even better with things like a quick goto definition shortcut, switch between header and source shortcut, etc.

B.5 It won't have the language support like Eclipse does, but C, C++, C#, and a few others are all in the playbook.

B.6 Visual C++ Express is still free. If you're getting Visual Studio Standard plus Visual Assist, it'll cost you a three-digit sum.

B.7 It's not super-quick, but it's faster than, say, Eclipse.

arke
+1: Only thing I'll add is that you *might* want to go Eclipse + CDT, because you're used to Eclipse and it's awesome (but I haven't tried it with CDT, so I'm not sure).
Edan Maor
Hmm, good point. I've only briefly tried CDT many many years ago, so I don't have experience with that. I hear it's pretty good these days.
arke
+3  A: 

Visual Studio 2010 Beta 2. Then Visual Studio 2010 when it comes out. You definitely don't need Visual Assist if you use Visual Studio 2010 - the new IntelliSense engine is awesome.

If you use Windows, any other option will be you hindering yourself - sometimes you can't help this if a team project is already using 2005 or 2008.

Edit: My post is already short, but I'll sum it up with this: I've been working with Visual Studio for a decade. I'm a "super power user" and I've written commercial language packages for Visual Studio 2005 and 2008. Visual Studio 2010 is so awesome that I'm trying to find ways to not have to deal with 2008 or before unless absolutely necessary.

Edit again: a few links to some of the cool things in C++ in Visual Studio 2010:

280Z28
Does VS2010 support the quick Open File, Open Symbol, Switch to Header, and all those other nice goodies that VAX does? I don't think I could live without them anymore :)
arke
@arke: Yes. And it has live syntax checking like the C# editor in VS2008 SP1 has. I'll add some things to my post about its new features.
280Z28
Oooh, looks delicious!
arke
What about the VAX features like:1) code surrounding - surrounds code with ( , /*, #ifdef, { etc.2) Refactoring - Extract method, create implementation3) Intellisense comment display4) Complete using fragments of code from nearby...Don't tell me VS 2010 has all of this :)
rep_movsd
So it looks like MS will compete with Whole Tomato... The beauty of creating a MS-only solution.
rpg
280Z28
FWIW, I haven't been able to load my VS 2008 C++ projects into VS 2010 B2, since some of the system header files won't compile. My experience with VS 2008 suggests that VS 2010 SP1 is likely to be good, but anything before it will be iffy.
David Thornley
That's interesting. It thought about attempting to bring a *very* large codebase (over 1M lines) from an acquaintence in, but I haven't had the time and they weren't interested in the results. That last part's the worst.
280Z28
+1  A: 

I highly recommend starting off with Notepad++ as an editor and gcc for compilation. It might be harder to get into and you don't have code-completion etc. but it will make you have to search for answers and understand better what is going on.

In the long term - any one that you feel comfortable with - best to try them all (VS, CodeBlocks, NetBeans, Eclipse etc.)

+1  A: 

A - What is a good compiler and IDE/editor to use to learn C++?

If you are a Windows only guy, then probably Visual Studio Express is the best choice.

If you want a portable environment I suggest you look at CodeBlocks: it is an opensource C/C++ IDE that goes with virtually every compiler available and runs on both Win and Linux (maybe other flavors of *ix too, but not sure). It has gone a long way since the early days and I find it quite user friendly, now. The debugger, AFAIK, is the one that comes with your toolchain (e.g. gdb if you use the GNU toolchain), but it is anyway integrated into the IDE.

B - What is a good IDE/editor for me to use long term? Preferences:

Since you listed the support for multiple languages in your preferences, the only real IDE that supports multiple languages through plugins in Eclipse (maybe NetBeans is as capable, but I haven't used it in the last few years). It is not as user friendly as other IDEs, but it is very powerful indeed. A little bit bloated, maybe.

On a sidenote I would recommend you not to rely too much on the debugger: I have learned this lesson myself. A good logging system (there are tons of free logging libraries for virtually every programming language on earth) can help you find errors better and faster most of the times. Once you found were you are stuck by logging, then you can think about debugging (if you did not already solve the problem).

NeXuS
+1  A: 

I am partial to Emacs, but i tend to use it mostly in UNIX environment over SH connection. In my opinion this is definitely long-term since it has a very sharp learning curve.

Lots of languages are supported. Full-blown IDE by the means of ede which has things like completion and synopsis, code snippets, collapse/show blocks, version control support

Lots and lots and lots of shortcuts. never use mouse. Move over all commands are a few keystrokes away and have pronounceable names, for example to replace regular expression he would do something like M-x replace-regexp

Very good debugging support, either through raw GDB or by the means of Emacs debugger which runs on top of gdb.

free in both senses. Runs on Windows. Maybe not as polished as eclipse or net beans but the real pleasure to use once you get used to it.

aaa
Emacs is probably the best editor on the market. It has a C++ IDE add-on, tho' I've not used it. It is an investment to learn, though, takes about 1 month before proficiency.
Paul Nathan
+1  A: 

Check out Qt Creator. This is a new, free IDE. They are really attempting to push this so expect new features frequently in the coming months. It mainly supports GCC (mingw on Windows), but I think it is possible to integrate with MSVC (although slightly awkward to get up an running). Note that using Qt Creator doesn't necessarily mean using Qt.

larsm
A: 

Dev C++ is also a good option :) It is a free integrated development environment (IDE) distributed under the GNU for programming in C and C++. It is bundled with MinGW, a free compiler. The IDE is written in Delphi. Dev-C++ runs exclusively on Microsoft Windows.

One additional aspect of Dev-C++ is its use of DevPaks, packaged extensions on the programming environment with additional libraries, templates, and utilities. DevPaks often contain, but are not limited to, GUI utilities, including popular toolkits such as GTK+, wxWidgets, and FLTK. Other DevPaks include libraries for more advanced function use.

atv
A: 

Thanks for all the advice. I really appreciate it. I think I am going to go with Visual Studio, but later I might try Eclipse, and maybe learn emacs a little more. I think using a combination of an IDE and an editor might be a good way to go in the future. Again thank you for the advice.

Laren Mortensen