As a learner should I use an IDE?

Pages: 1234
closed account (3CXz8vqX)
Probably the eternal question but, I wanted to take this debate out of another thread.

I'm a newbie to C++ there's no real argument there, pointers confuse me more than Algebra did -_- and anything Classes I or above I'm screwed on. Yet some people seem to be of the opinion that even I should be using Code::Blocks or Eclipse to write my software.

I disagree, I don't have that big of a program and I can always use CMake. So...should I use an IDE or not?
Didn't you just heavily advice against using an IDE in another thread as a beginner?

I reckon that it comes down to each individual, try it out?
Yet some people seem to be of the opinion that even I should be using Code::Blocks or Eclipse to write my software.


I would agree with those people. So yes... you should use an IDE.

Learning how to write makefiles is almost like learning another language on top of the difficulties of learning C++. And invoking the compiler directly and/or writing batch files to build your programs is a tremendous waste of time.

Aside from being generally easier and letting you focus on learning C++ rather than build junk... IDEs often come bundled with an interface for a debugger, which will be an invaluable tool. Coding without a debugger is a real hardship.


I disagree


Why?


EDIT:

I just found your other thread....

For everyone's reference, it's here:
http://cplusplus.com/forum/beginner/97909/

As for your points for reasons why not to use an IDE:

* increased learning time overall (due to all the shortcuts and management)


This seems contradictory. The definition of a shortcut is that it's faster. So how would a shortcut increase learning time?

* increased learning time until learning c++ (due to installation and set up).


Installing an IDE (bundled with a compiler) takes no longer than installing the compiler on its own.

If anything, using an IDE decreases learning time because you don't have to worry about learning stuff that isn't directly related to C++ code.

* if something goes wrong with the IDE...you have to get another IDE.


The likelyhood of this is extremely low unless you're using some experimental beta version of an IDE or something. Well established, commonplace IDEs are extremely stable and reliable.

* Might not always work out of the box with your OS *ahem*.


Ah, a Linux masochist, eh? No wonder you don't want to take the easy way out ;P

I tease, I tease.

Anyway I don't have a good solution for this. If you can't even install programs designed for your OS with confidence that they'll work.. then I don't know what to tell you. It sounds like you have bigger problems if that's the case.

* Allows you to gloss over important parts of C++ understanding... (perhaps Python2 would be better?)


It does let you gloss over and largely ignore the difference between the compiling and linking.... but those are hardly beginner topics anyway. It's safe to disregard them completely until you get to a more intermediate level.

And in fact trying to understand them prior to an intermediate understanding of C++ is kind of silly.
Last edited on
As a beginner, I would think using a bulky IDE like Eclipse is about the same as using anything else. A beginner will not be taking advantage of the features available for quite some time, except for the integrated debugger--which is the biggest selling point of an IDE, IMO.
except for the integrated debugger--which is the biggest selling point of an IDE, IMO.


That's 90% of what an IDE is anyway.

Or at least that's 90% of what I use them for.
Last edited on
Learning who to use all the features of an IDE is a task in it's self so you might as start now.

I have been using Visual Studio for 3 years now and I still only know about 60% of it's features. Maybe even less.
Ravenshade wrote:
I happen to disagree, just because you plan to be a Formula 1 or Nascar driver someday, doesn't mean you should be using a Forumula 1 or Nascar vehicle from day 1. You should start off with Karting first.
Starting out with an IDE is like starting out with a customizeable kart. You can eventually add plugins and macros to it to make it into a formula 1, but for now it is just a standard distribution kart. Doing text files and commandline compilers is like building the kart from scratch, which is a good for advanced users that need e.g. an automated kart that drives itself once a week and sends emails to people (e.g. weekly automated build).
Ravenshade wrote:
A formula 1 car has lots of different features and gadgets that are, somewhat essential to winning a race. I will give you that point. However if a gadget fails, free or not how do you cope without it? The point of starting with a Gokart first is that you understand what makes things tick and how to handle problems.
As above, the default-settings no-plugins no-macros IDE is the kart. The text file and compiler is you building the kart by hand.
Ravenshade wrote:
You could build an epic RPG with some incredibly sophisticated IDE however if for some reason the IDE software gets corrupted...perhaps a virus or an update has gone catastrophically wrong...*stares at Visual C++* how do you do anything with your software without it?
Uninstall and reinstall. A broken IDE does not mean your code is also broken.
Ravenshade wrote:
An IDE *stares at Visual C++* can also include a lot of fluff that you don't need to include with your program and a program that could be only a few KB, turns out to be a few MB instead just because of includes. Not to mention that they don't always work out of the box. (Could never get Code::Blocks nor Netbeans, nor eclipse to work).
Then don't compile it with the IDE, just use the IDE to develop it.
Ravenshade wrote:
I'm completely on your side that if you have a grasp of C++ say...just above understanding classes, or your program has become quite complex then you should use an IDE as it helps manage the software much more efficiently. Kinda like...do you really need Tiger Woods Professional Golf Set to play...crazy golf at the seaside. *glares at VIM*
I'm not sure what you're trying to say here :\
Ravenshade wrote:
The disadvantages for using an IDE are as follows
1. increased learning time overall (due to all the shortcuts and management)
2. increased learning time until learning c++ (due to installation and set up).
3. if something goes wrong with the IDE...you have to get another IDE.
4. Might not always work out of the box with your OS *ahem*.
5. Allows you to gloss over important parts of C++ understanding... (perhaps Python2 would be better?)
1. Isn't this the same with a text file and compiler?
2. Isn't this also the same as with a text file and compiler?
3. Or just reinstall it. What if something goes wrong with the compiler?
4. Have you even tried getting a compiler working on Windows? IDEs are much easier because 95% of the time they work out of the box.
5. How?
Ravenshade wrote:
Of course, the advantages outweigh the disadvantages 3:1 but for a beginner, you're not even going to be using the advantages anyway. I just don't think that it's suitable to learn with. You don't give a learner driver a Bugatti Veyron and expect them to come back in anything but a smaller wooden box, there are just things that need to be learned =P.
If you're a beginner, you're not going to be using the disadvantages.
Ravenshade wrote:
sudo yum install libstdc++ gcc gcc-c++ gedit cmake
A beginner to programming probably doesn't even know what a command line is, let alone how to use it. An example from a quick tutorial would probably be copy and pasted without changes.
This was an amusing thread. Thanks for the laughs. I especially liked this quote.

"Ah, a Linux masochist, eh?"


If someone is really intent on doing things the hard way, then so be it. Some people like that. Personally, eclipse is a pain in the neck for C++ development. The debugger doesn't even work for STL containers (out of the box). You have to play games trying to install the python pretty printer or whatever it is just so that you can do basic debugging. I would think that a mosochist would love that IDE! I'm a big fan of the QT compiler simply because you also get the free GUI development kit as well. The user interface of QT seems far more intuitive than the eclipse interface.
closed account (3CXz8vqX)
Disch allow me to respond to you,

Are you telling me that I am supposed to know all of the short cuts and intricacies of whatever chosen IDE before I have even downloaded it? That's like playing an arcade fighting game for the first time and expecting to be able to KO the opponent in your very first round. Most newbies don't understand the intricacies of programming and aren't even familiar with all the stuff the rest of us are, they might not even known what Ctrl-C does for example.

A Shortcut is only useful if you know the shortcut in the first place, therefore useless to a beginner. You also still have to learn what the shortcut does anyway so what was the point?

LB this also ties in with your 1st point, to be honest no it's not the same. A text file and a compiler can be up and running in a total of ten lines of text from the newbies point of view, this equates to about 5 minutes and it's usually laid out for them in a tutorial. With an IDE this isn't the case, they need to learn specifically about the IDE before they can start programming efficiently, taking days let alone minutes.

Take your average hello world app, open up a terminal g++ helloworld.cpp . You have compiled your first program and didn't even need to set up any include paths. (Which you have to do with many IDE's).


Pfft. I've had Microsoft send me a corrupted update, Visual C++ went down for a lot of people (was a while ago). I had a deadline to meet, I failed my assignment because I couldn't figure out how the hell to get at my scripts. While the likelihood is very low, a corruption of a file is more likely with more files and there are multiple things that can go wrong. Many moving parts and all that.

Admittedly, I am a bit of a Masochist when it comes to programming, I want to understand what I'm doing so that I can do it better and more effectively in the future. (Something many tutorials don't teach). Not one IDE has worked out of the box for me, so I gave up and returned to basics. I couldn't personally see the advantage of using an IDE either. That's not to say other people haven't found them useful, it's like Vim if you can handle the learning curve, great...but if you're like me and activate VIM and expect something to happen, you're out of luck. There's a lot of prep that you need to do for IDE's, like setting various different paths...pain in the ass...

I agree with you that indepth discussion about Linking and Compiling so early on is somewhat of a higher level topic that can wait for a later date but I disagree that people shouldn't know at least a little about it. If you plan to build a car, having a fancy factory around you is great and all, but it's a little silly if you don't even know which parts are going where. The concept that you create a file or three, you then access the compiler, the compiler grabs the files and compiles them altogether is very important from an outside point of view, because then you can understand what is happening when you're pressing that F9 key. Without it, if something goes wrong and the error code is obscure, you're going to have to ask for help, when it was just a case that the compiler settings in the IDE weren't quite correct. =x Something you would have noticed if you knew what it did conceptually.



@LB

I agree somewhat but I still believe a fundamental understanding of what's happening is very important.

Heh, ^-^; If only it was that simple, when your IDE provider is giving out a faulty version... I didn't even know how to get the previous version at that point, but never mind.

What's the point of having the IDE to just develop? I might as well use Gedit with a few plugins since I want it to do more things...

I'm saying that if you understand what you're doing i.e not a complete newbie, go ahead, get the IDE you're playing on a gold course, you're going to need better tools. If you're a complete newb going into crazy golf, you're not going to need an IDE.

3. I can honest say I haven't had the compiler fail on me yet. I have had two faulty IDE's do something they weren't supposed to do however. Admittedly there's the same problem but, I'll refer to my "Many Moving parts" expression I used earlier. Two moving parts (compiler, text editor) are better than lots of moving parts (eg, an IDE which uses a text editor, compiler, it's own interface....).

Hm, interesting, MinGW worked straight out of the box for me and I don't actually see much of a difference (yet) between that and GCC (Linux). The only IDE that worked out of the box for me was Visual XD. But then it was an awful long time ago.

5. Shortcuts. Especially if you're using the shortcuts without understanding what they're doing. If it breaks, you're screwed and you're not really learning C++ at that point either. I'm not against plugins, shortcuts or custom classes but you should at least know what they're doing to begin with (i.e learn C++ then use the custom classes to achieve things better/faster).

That's why I promote build from the ground up method. If you don't understand what is happening to your C++ programming are you really learning C++. I don't mean that you should study assembly language, that's a layer or two down which you really don't need to know about (thanks to Ansi) what I do mean is that you should understand at least conceptually how your code transforms from a to A. With Linux, if you don't understand Sudo Yum...are you using Linux?

I get the point about the shortcut of being able to compile instantly but if you haven't set things up right because you don't understand how it works in first place, bad things will happen. For instance, if you build a car, you don't want your fuel going into your radiator now do you? Or use an engine from a Ford Transit in your Classic Mini. Sure, it might work but it may very well not do what you expect it to do.



Are you telling me that I am supposed to know all of the short cuts and intricacies of whatever chosen IDE before I have even downloaded it?


No. But you should understand the basic idea:

- Create a project
- Add files to that project
- Edit them
- Press the "build" button

These are very basic steps that anyone with any computer experience at all can figure out how to do in 5 minutes max.

How long do you think it would take someone to write a makefile if they've never done it before? Or how long to sort through a compiler's commandline options to figure out how to build a multi-file program?

I'm sure it would unconditionally take longer.

A Shortcut is only useful if you know the shortcut in the first place, therefore useless to a beginner. You also still have to learn what the shortcut does anyway so what was the point?


The "Build" option in all IDEs is a shortcut. I assumed that's the kind of thing you were talking about. It's actually a shortcut for a multi-step process... all steps of which must be done manually if not using an IDE (or in the case of a build script or makefile, you'd have to write the scripts to do these):

- Saves all files
- Compiles only files which have changed since last build
- Links

A text file and a compiler can be up and running in a total of ten lines of text from the newbies point of view


An IDE can be up and running in zero lines of text. Just click the "install" button and let it install. Then open it up.

In fact... most newbies don't even think of things in terms of "lines of text". Hell I don't even think of things like that and I've been using computers pretty much my whole life.

this equates to about 5 minutes and it's usually laid out for them in a tutorial.


I could make an easily comprehensible tutorial on how to get started with an IDE that is shorter than 5 minutes.

Take your average hello world app, open up a terminal g++ helloworld.cpp


- Open up IDE
- Press the "Build" button

I don't see how your approach is any simpler.

You have compiled your first program and didn't even need to set up any include paths. (Which you have to do with many IDE's).


I have never, ever had to set up any paths for anything in an IDE except for 3rd party lib installations. Ever. Not even when I was on Ubuntu.

You certainly don't have to do it for a "hello world" program.

While the likelihood is very low, a corruption of a file is more likely with more files and there are multiple things that can go wrong. Many moving parts and all that.


I will concede to this. However I still find it to be extremely unlikely and the odds of it happening to a beginner are low enough for it not to outweigh all the other benefits of using an IDE.

Not one IDE has worked out of the box for me, so I gave up and returned to basics.


If you're on Linux, I'm not surprised. Virtually nothing works out of the box on Linux in my experience.

I agree with you that indepth discussion about Linking and Compiling so early on is somewhat of a higher level topic that can wait for a later date but I disagree that people shouldn't know at least a little about it.


Knowledge about that has zero application until you start getting into multi-file programs (which absolute begginers are not going to do). And at that point I'd agree that people should learn the basic idea.



EDIT:

Anyway you haven't really addressed the bigger point, here.

If you are not using an IDE... how do you debug?
Last edited on
closed account (3CXz8vqX)
Rofl. I debug by compiling and then working through the errors one or many at a time, depending on what the errors are of course. Secondly if I can't find the problem, I use if statements to check things and if all else fails I use cout << "statements" << endl; in order to find how far the program has managed to progress.

Of course, Segmentation faults, I may have issues with... on the other hand, before being able to solve Seg faults, I need to learn more about pointers and how they work -_-;
You can install an IDE. I have never been able to simply install a compiler.
closed account (3CXz8vqX)
Worked fine for me http://www.mingw.org/wiki/Getting_Started

edit

Of course, when I was developing on Windows...the Microsoft SDK came with a compiler that could be abused...
Last edited on
With MinGW you have to:
1. Navigate a maze of folders
2. Select one of two strange options in the installer and hope you picked the right one because sometimes the latest packages don't always work
4. Add it do your system %PATH% variable (no beginner should even try to do that)
5. Open a command prompt and test it from the command line

And don't even get me started on integrating Sublime Text with the sublime-clang plugin - at least clang for MinGW is a simple download and place it in a folder of your choice (plus system path variable ofc).
I use QtCreator or KDevelop on Fedora 17 & have never had any problems with them. I agree with everything Disch is saying though.

KDevelop is different because it can handle all kinds of languages & scripts, not just C/C++, and is a mature application.

QtCreator is fabulous - there are all kinds of technologies it can use, with cross compiling as well.

One other advantage of using an IDE, is that one can look at the make files & compilation options it uses, and learn from them.

Starting from scratch can be a very hard road. I taught myself C from the K&R book in 1987 with no internet on a SUN UNIX workstation. The only other resource I had was the man pages. I wasn't aware that debuggers in any form even existed, so printf was my only debugging tool, and that was after spending ages getting the code to compile. I spent interminable hours re-reading man pages & staring at code. Admittedly it is a lot easier these days with the internet, forums, tutorials & reference pages, other peoples code etc.

L B's analogy of the Go Kart is a good one - it is much easier to drive a Go Kart rather than having to learn to build it first. That knowledge is handy to know later on, but not at the start. Sure, one can learn from scratch, but be warned - it is much harder. I don't see how anyone can argue that compiling from the shell is easier than using an IDE.
closed account (3CXz8vqX)
Hehehe...okay okay, Windows not so good for compilers, right. Okay, I will go and try out Code::Blocks again lets see if it actually works this time, if only to make it easier for Windows users to follow my tutorials...
Ravenshade wrote:
Rofl. I debug by compiling and then working through the errors one or many at a time, depending on what the errors are of course.Secondly if I can't find the problem, I use if statements to check things and if all else fails I use cout << "statements" << endl; in order to find how far the program has managed to progress.


Are you sure you know the difference between compiling & debugging?

Sounds to me as though you are not actually using a debugger program of any kind.
I've noticed that most if not all beginners trying to get help here are on Windows. I wonder why beginner programmers don't use Mac?
closed account (3CXz8vqX)
TheIdeasMan... using Code::Blocks performs debugging in the exact same manner. Build...see errors in terminal output...solve errors...rebuild...solve more errors. Cycle repeats until the damn thing builds.

In other words, no I don't use a debugger, haven't needed to. *see first post*

L B. We probably can't afford a Mac. I use Linux because it's free =3 and not prone to viruses or spyware. That said it's also a hot bed of programming knowledge. Most people only have windows still of course and that's seen as the defacto standard for industry. It's particularly schools and educational establishments that try to force windows to be honest.
Last edited on
TheIdeasMan... using Code::Blocks performs debugging in the exact same manner. Build...see errors in terminal output...solve errors...rebuild...solve more errors. Cycle repeats until the damn thing builds.


That's not debugging. That's fixing compiler errors.

And even that is easier with an IDE because:

1) They often highlight syntax errors before you even compile
2) You can just double-click on the error message and it will immediately snap you to the line of code that the error is on. You don't have to hunt for the file/line number.


But yeah... that's not debugging. Debugging is fixing behavior that isn't what you desire in a compiled program.

In other words, no I don't use a debugger, haven't needed to. *see first post*


You cannot even fathom how great of a tool you are depriving yourself.

Secondly if I can't find the problem, I use if statements to check things and if all else fails I use cout << "statements" << endl; in order to find how far the program has managed to progress.


This is a poor man's solution to work around the lack of a debugger.

Basic debugger functionality (and this is not even getting into the fancy stuff -- this is just bare-bones functionality that every debugger will give you):

- Stop the program at any line of code
- Examine and modify any variable
- Step through the code line by line and watch exactly how the program is executing


If the program is not running how you'd like... and you have to debug it.... currently what you're doing is:

1) Stopping the program
2) Going to the line of code you're interested in
3) cout'ing all variables you're interested in
4) rebuild
5) run and reproduce the problem
6) Remember to remove the additional cout's

With a debugger:

1) Go to the line of code you're interested in
2) Set a breakpoint


What's worse... if the problem can't be solved with a single examination, you'd have to litter your code with dozens of couts.

And what if the information revealed in those couts makes you want to look at some other information? You have to close/rebuild/rerun.


For any problem that is even moderately complex... a debugger will literally save you hours of time and frustration (this is not an exaggeration).


Everyone should learn how to use debugger basics in their first two weeks of programming. Which is one of the big reasons why starting with an IDE is such a good idea.
Last edited on
Pages: 1234