• Forum
  • Lounge
  • New C++ tutorial for beginners - opinion

 
New C++ tutorial for beginners - opinions wanted!

Hello!

I was thinking that there are no really good C++ tutorials for total beginners, so I decided to create one.

At this moment, I would like to get some feedback. So, if you would be so kind, take a look there and state what you think. Your feedback will be appreciated.

Here is the computer programming tutorial for beginners, in the C++ language:

http://www.learn-programming-book.com
Last edited on
I suggest to move this thread into Lounge. It will not be buried under constant stream of new topics here.

I did not read it that closely, but on first glance it looks good.
However I sugest to move "integer division" closer to beginning. Somewhere where you are describing difference between integer and floating point types.
Integer division is a source of many problems to the beginners, so the sooner they will learn about it, the better.
Thanks for your feedback!

I moved the topic to the Lounge.

About Integer Division: if it really is so hard, that would be more of an argument to move it back, not in front. It's better to expose beginners to harder topics later.

Early in the tutorial the type double is introduced (chapter 4). The type int in introduced in chapter 9, and there is some discussion about types there. Integer division is chapter 15. I had no need to place it closer to front (there are no chapters depending on chapter 15 until PART 2). It would also not be very good to explain integer division, and then not use it for too many chapters.
Last edited on
if it really is so hard
It is not hard. It is surprising that this: double S = a * b / 2; gives 4 for a and b = 3.

type double is introduced (chapter 4). The type int in introduced in chapter 9
This is kinda backwards. Integral types are used way more widely (actually I did not write code containing floating point operation at work in last week at all) and you are likely to use them in loops etc. Not to mentions that FP numbers are way more complex: precision problems, special values.

It would also not be very good to explain integer division, and then not use it for too many chapters.
It needs explaining so users will be not stumped by code giving seemingly wrong results.
Yes, thanks for the clarification.

Of course that the type int is used much more often. But, for beginners, there is nothing wrong with starting with type double only. The type double is intuitively more familiar to them: it behaves like calculators do, and it produces just the results that they expect. I thought that there is no need to confuse beginners with integer arithmetic until some much more essential basics were explained.

After introducing type int in chapter 9, where there are a few examples of how automatic conversion can round down values, this type takes over as the most dominant type in programs.

The beginners don't have to know about precision problems and special values at this stage of their education. Those issues are better to be postponed.

The integer division does need thorough explanation, of course it does, but the question is: when.

Anyway, thank you for sharing your opinion!
beginners don't have to know about precision problems
Be ready about questions why adding 0.1 10 times will not give you 1 and questions why something does not compare equal to other value when it should.
And I doubt you mention that comparing FP values with == or != is inherently wrong in majority of cases (Many compilers warn you about this: http://puu.sh/iRumi/9996e24c08.png)
You got some points there.
Are the tutorials assuming the reader is using Visual Studio? In 6. Debugger / Step by Step you say what keys the user should press but these things could differ between IDEs. In 10. Arrays / Index out of Bounds you assume the user is using Visual C++ in debug mode. If you disable debug mode or use another compiler you are not guaranteed to get an error message when you access a vector element out of bounds.

Not sure using the word array when talking about vectors is such a good idea. If the reader go out and read about C++ topics on his own or communicate with other C++ programmers there will be confusion because arrays and vectors is not really the same thing.
Yes, for the time being, the tutorials are assuming Visual Studio 2013, because the step-by-step IDE installation guide in chapter 3 recommends VS2013 and it was written for it.

My research shows that most computer users are using MS Windows. I have planned to write another version of chapter 3 for Linux and Mac users, but at this moment I don't have sufficient time to do that. The tutorial does hint in a few places how to use Code::Blocks and makes note of some differences, but I would say that the explanations are far from sufficient if the reader wants to use Code::Blocks . Perhaps the reader could ask for more instructions on the forums in the time being.

About using the word "array" for vectors, I have noticed that the issue is somewhat controversial. My rationale was that this tutorial was about learning programming first, and about learning C++ second. I was thinking that this might cause some confusion that you mention, but that a reader will be able to figure it out quickly.

Perhaps I should add a footnote to explain this terminology issue. Edit: or a note in a frame.
Last edited on
Topic archived. No new replies allowed.