Does anyone have a particular IDE that they like? I’m working my way through online courses and exercises in C++ and I find that I like Eclipse very much, but I’m curious if there is anything even better out there.
Depends on what sorts of projects you aim to work on, and your level of skill as a developer.
Some IDEs have features that you won’t really need until you’ve been developing for awhile. I’ve been developing for only about 2 years, and I used Sublime / Atom for the fist year or so, then started learning vim. My friends insisted it was worth the learning curve despite my stubbornness to make the switch. Once it becomes second nature I have to agree they were right.
If you’re working on mobile projects and “need” an IDE, I think alot of people prefer IntelliJ / Android Studio. I think alot of people treat Eclipse as a legacy IDE. I don’t know of many new developers that are learning in Eclipse…unless they’re under the tutelage of some old school developers.
I used to use Code::Blocks a lot a while ago, but I’ve since migrated to command-line tools and whatever editor is the most convenient to use on a given platform; I would have probably used Code::Blocks for longer, but it took a while to them to add a decent amount of C++11 support in its code completion engine and using a half-broken code completion engine is really annoying. I also still didn’t have much luck building it recently with the latest version of wxWidgets, and sometimes it seems like they’re planning on staying on the ancient 2.8.12 version forever.
That said, I’d still recommend giving it a try if you want in case they’ve improved it a lot since the last time I looked at it.
I haven’t programmed in months but… Spacemacs (emacs + vim) is my favorite.
I’m taking a rest from Vim for now because I just wanted to get on with my programming and I was spending too much time to get its plugins to function.
I am enjoying Atom.
I was using emacs, but the temptation to customize it was always a distraction.
Yeah I use a mixture of Sublime Text and Vim. Normally Vim because it’s installed by default on Linux machines. Eclipse I find too sluggish although it does have a good selection of features built in.
Vi - vim is for lazy n00bs.
Ah, if we’re going that road: ed instead of vi.
For c++ perhaps more important than ide is use of static/dynamic analysis tools (like sanitisers in clang etc.) xcode on osx does much of that, visual studio has excellent visual debugger which also helps. vscode is a lightweight version which is cross platform without the visual debugger. lldb and gdb are for sure your friends, get to know these very well (unless you use visual studio perhaps). On this be very aware of undefined behaviour and open to implementation parts of the standards. These catch everyone, absolutely everyone,
Good c++ code will not be huge in terms of functionality of a unit, it wants to enforce strong types. So small modular approach is good, where each compilation unit (header + src) can be checked. Then use sanitizers, static analysis tools etc. with tests that give great coverage (gtest as good as any here, but smaller libs such a
check are good and fast).
The ide becomes a little less important really, that is why many folk use vanilla vim or emacs etc. I know I am not stuck with IDE in c/c++ work but those who are seem to really like visual studio for the aforementioned debugger/intellisense etc.
All a matter of choice, but good c++ will take years to learn (well worth it), but the most important thing is read a lot, watch c++now video channel9 (Herb Sutter etc.) and listen to people like
Chandler Carruth (deep llvm / c++ clang etc.)
Bjarne himself (wrote c++ )
Alexander Stepanov (wrote STL in 15 years)
Andrei Alexandrescu (template king)
Scott Meyers (great easy to read gotcha type books)
Sean Parent (amazing insights into code design for correctness)
Herb Sutter (at the metal level thinking, will suprise you with what doesn’t work, like code not executing in order you write it etc.)
And many many more (some amazing deep thinkers in this field)
If possible read some Knuth (art of programming)
The tool to write the code becomes much less of an issue (i.e. check out the Stepanov series he did for Amazon Engineers, it’s very good). After seeing some of this you can see why c++ can hack off your legs easily or produce amazing code, but also the dangers and knowledge required to get around them.
All in all an admirable task, but perhaps the IDE is less important here than it is in many languages, well my opinion anyway.
As a beginner, I find that the main appeal of Eclipse is that it automatically flags any basic errors that I make (syntax, undefined variables, etc) as I type. Extremely useful. It is also supposed to be a graphical front-end for the GNU debugger (GDB), which is on my list of things to learn. So far, for the simple exercises I’m doing, the built-in debugging has been sufficient.
If I could get the macro-recorder plug-in working (lol), broken by the latest version of Eclipse, then I’d be set for the time being.
Jetbrains does all the syntax tips/highlights too and there is a community edition that is free. Darkula theme is lovely in it too!
The last time I used eclipse, it was so slow it put me off using an ide for a while. Intellij and PHPStorm by jetbrains were far quicker though and are great tools.
I had a look at IntelliJ but neither of its editions has language support for C/C++ (or Rust): https://www.jetbrains.com/idea/features/editions_comparison_matrix.html
I haven’t noticed any lack of speed in Eclipse, probably because the exercises I’ve done so far have been small programs. So as a training environment it is sufficient for my needs.
Intellij is the version for Java, but they have lots of different flavours for different languages. It looks like CLion may be what you need.
You can download a trial here: https://www.jetbrains.com/clion/
Or you can get the early access version for free (cutting edge, with a few warts): https://confluence.jetbrains.com/plugins/servlet/mobile#content/view/54342566
I haven’t tried this flavour before, but if it is like the others, it should be good.
The early access page says this: “Please, note that this EAP build requires an active subscription (or you can start a 30-day evaluation period).”
So it really doesn’t appear that there is a free version that supports C/C++. The 30-day trial is just that, and there’s no point getting accustomed to something that will stop working, or will nag me.
Truth is, I won’t pay for software.
EDIT: A sidenote: since visiting the Jetbrains site I now get popup ads for their products on Youtube. Sigh. That sort of stalking confirms my low opinion of developers as a class, that they spend all day long building new ways to stalk, harass, and screw people over, on your own clock-cycles. Something I look forward to SAFEnet being the final cure for.
Ah, it looks like the EAP program is different for CLion than PHPStorm at least, as I am sure I never had to license that (before we got a corporate license at work). I think the same is true for IntelliJ.
Fair enough re paying. As you say, unless you plan on splashing some cash, there is no point trailing it.
@dirvine I agree that it could take years. A systems programming language is not the easiest route to follow (and C/C++ does seem the most marketable such). But it seems to me that the easier options such as the cluster of languages surrounding web development (principally Java) are most susceptible to off-shoring (particularly Java). And competing directly with people asking $10 an hour is a losing battle.