Why are APIs talked about on here?

Pages: 123
You've misunderstood, using an IDE is step 1.
It's a problem because, as pointed out, most beginner programmers skip over that part of a tutorial (assuming the tutorial has it included) to get right into learning to program. Even our tutorials don't say a word about command-line compilation just the code. Looking at some of my books, one says to use DJGPP, Dev-C++, or even MSVC Express Edition. Online I've seen everything from DJGPP/Rhide, Vim, Emacs, Dev-C++, Qt Creator, and can't remember what else. None of them bother mentioning command-line compilation and leave it to the IDE to do it all which I consider a problem as I think knowing how to do command line compilation a major plus.
Last edited on by closed account z6A9GNh0
It is a big plus in my opinion as well, but it's often a lot easier for someone to learn something new if it has instant gratification.

For instance I had no idea how to use makefiles or g++ until I really got into programming. Instead I used MVSC++, which let me write code and compile it and I got to see what I'd done without having to learn about make and minGW and all the other bells and whistles that come with it.

This avoids a lot of frustration in the beginning, and once you get into coding it's pretty easy to pick up the extras since you already have a good understanding of how it's supposed to work.

Anyone who really does get into coding will have a hard time AVOIDING learning about command-line compilation.
I don't see how it's a problem.

If it's required, one can read the documentation for the compiler. If they can't figure out how to read the documentation for the compiler or manage to use a search engine to seek out the copious amounts of information available on this subject, well.. they seem to be missing the necessary problem solving skills for programming, so screw 'em.

It's hardly within the scope of a tutorial (or book) that is not specifically about command line compilation to teach someone how to do command line compilation.
People read documentation anymore? Ha! Like that ever happens -_-
Anyone who really does get into coding will have a hard time AVOIDING learning about command-line compilation.


I haven't had a hard time with it.
L B: It was my understanding the "learning to use the compiler" was considered to be step 1.

I haven't had a hard time with it.
Agreed.
cire wrote:
It's hardly within the scope of a tutorial (or book) that is not specifically about command line compilation to teach someone how to do command line compilation.

I disagree completely. You will be amazed at how many beginner programmers have no clue what gcc/g++ is because they use IDEs that just have them press a key or click a command to compile the code. Let us not forget how many times we have had new programmers refer to the IDEs as the compiler because they have no clue they are separate things.

It takes maybe one to two paragraphs just to cover a simple command line compilation g++ -o exename filename.cpp just for the simple ansi standard code. Then point to other sites that cover it in depth and maybe even link to makefiles and how to do them.

As for the question posed about Google for documentation. After being part of Gamedev.net, Allegro.cc, and a few other sites I can safely say this, how many new programmers do you know that actually google the answer? I mean even here we get regular questions that have been asked a dozen times and even the school work threads are the regular assignments where they could find the answer by googling it.

I use IDEs once in a while, but for the most part I use Geany as a simple text editor because it has the terminal in the message window so I can do command line compilation (here it is while messing with python: http://twitpic.com/bufzq4 ) I did use Qt Creator while making a compo entry that I didn't get done in time.
cire wrote:
It's hardly within the scope of a tutorial (or book) that is not specifically about command line compilation to teach someone how to do command line compilation.
BHXSpecter wrote:
I disagree completely. You will be amazed at how many beginner programmers have no clue what gcc/g++ is because they use IDEs that just have them press a key or click a command to compile the code. Let us not forget how many times we have had new programmers refer to the IDEs as the compiler because they have no clue they are separate things.

Are we not on the same forum here? Why would I be amazed? What are you disagreeing with exactly? You're saying it is in the scope of tutorials and books that are not specifically about command line compilation to teach command line compilation? How does the above support that conclusion?

BHXSpecter wrote:
As for the question posed about Google for documentation. After being part of Gamedev.net, Allegro.cc, and a few other sites I can safely say this, how many new programmers do you know that actually google the answer?

Wouldn't, by definition, the people who actually google the answer not be posting here in that newbish sort of "My code doesn't work can you fix it?" way? My guess is the ratio of goobers to people-with-common-sense is smaller than you think.

So you are saying a C++ book or tutorial that is following the ANSI C++ Standard from say 98 can't have a small section when teaching the hello world example to say the methods for compiling in the command line for such a simple program and then give links or recommendations of where to learn more?

I think everyone, you included cire, are thinking of command line compilation as
g++ -o exename cppfile -O2 -Wall -Wno-write-strings -l......
and I agree that learning all the different flags would be a separate issue, but you are looking at the complex end of that. I mean if you are going to teach C++ it takes a paragraph or two just to whet their appetite with
g++ -o hello hello.cpp
and then maybe have some links for where to learn more about the flags and settings you can pass in the end of the book or tutorial.

cire wrote:
My guess is the ratio of goobers to people-with-common-sense is smaller than you think.

No I'm positive it is large. I've been part of Allegro.cc for 12 years and constantly see questions about making a screenshot function or a question where they reply is just a link to an older thread that had the same problem. Upon googling any problems I have, I am blown away at how many links I'm given for something and most of them are stackoverflow results for the same question.
So you are saying a C++ book or tutorial that is following the ANSI C++ Standard from say 98 can't have a small section when teaching the hello world example to say the methods for compiling in the command line for such a simple program and then give links or recommendations of where to learn more?

What I'm saying is that such a thing wouldn't be in the scope of the book or tutorial. Are you reading what I'm writing? Certainly they can, but most of them will not because it is outside the scope of what they are attempting to teach. In the case of a book, page real estate is expensive and including something about command line compiling means leaving something of more substance out. In the case of a tutorial, there are tutorials out there on that subject already, and well, tutorials that aren't about command line compilation aren't about command line compilation.


I think everyone, you included cire, are thinking of command line compilation as

I'm thinking of command line compilation as command line compilation.


No I'm positive it is large.

Clearly your 12 years at the allegro forums make you an authority on the subject.
Wow, this thread is completely derailed. Why does that always happen when someone says "IDE"?
cire wrote:
Clearly your 12 years at the allegro forums make you an authority on the subject.

No, seeing the 100+ results per site from stackoverflow, cplusplus.com, allegro.cc, gamedev.net, cprogramming.com, etc. for when I search for solutions to help someone find the answer to a question they had.

cire wrote:
What I'm saying is that such a thing wouldn't be in the scope of the book or tutorial.

And I'm saying that makes no sense because learning to compile your code goes hand in hand with learning to program in C++. Especially if it is a book that says Notepad is fine for entering the code, at that point you have to be told how to compile the code unless you just wanted the reader to have 100+ source code files on their computer for clutter.
NGen wrote:
LB: It was my understanding the "learning to use the compiler" was considered to be step 1.
Learning to use the compiler is Step 0
You will be amazed at how many beginner programmers have no clue what gcc/g++ is because they use IDEs that just have them press a key or click a command to compile the code.

I'm not entirely sure why that's a bad thing. Plus, if you're just teaching them the simple "g++ -o hello hello.cpp", I don't see how that's any better than pressing a Compile button. No command-line compilation that is easy on a beginner is actually going to show them anything worthwhile. You could argue that the beginner could go online and look up the other flags, but I can also say that they can just go into the project options of their IDE and get the same benefit. As far as I'm concerned, you get the same amount of flexibility with both since it often goes down to a command-line compiler in the end anyway.

Learning to use the compiler is Step 0
Then I missed what your step 2 was. To clarify, could you explicitly state the order in which you suggest, which each step fleshed out?
Last edited on
I'm not entirely sure why that's a bad thing. Plus, if you're just teaching them the simple "g++ -o hello hello.cpp", I don't see how that's any better than pressing a Compile button.


This.

Amen, NGen.
If command line compilation is out of the scope of programming books/tutorials, then wouldn't debugging be out of the scope them too?
Knowing command line compilation and debugging I consider part of knowing your tools. I consider makefiles important too, but that is a lot more intimidating to a beginner than learning to compile from the command line.
It's not out of their scope, it's just not something that should be brought up first-hand. Teach them that after they've at least gotten to separation of definition and declaration, then they'll better understand the need for certain pieces and messages.
In the case of a book, page real estate is expensive and including something about command line compiling means leaving something of more substance out.


This is not true, and even if it was it's not hard to find ONE paragraph in a book that could be removed and replaced with something crucial such as how to compile.


Why anyone would ever argue that how to compile a program from the command line should not be taught at the very beginning of a book (with the exception being books that are targeted for specific platforms or IDEs) is incomprehensible to me.
Why anyone would ever argue that learning how to use a command-line compiler is the first thing that a newcomer to a language should learn is incomprehensible to me.

Later on in the book is perfectly understandable. Having it any earlier than separation of symbol declaration and definition is unreasonable.
Pages: 123