<p>Arduino, it's  full C++ 2011 underneath the "Arduino Language". What they call "libraries" are classes. The physical computing aspect is a good way to keep interest.</p>

CC BY-SA 4.0
2019-05-26T16:04:42.963Z
Hi! What you say is true, but it's unclear how this answers the question. If you include explanations relevant to teaching (for example: how one can use arduino to teach), it would greatly improve the answer.
ItamarG3
CC BY-SA 4.0
2019-05-25T15:17:20.740Z
2019-05-25T15:17:20.740Z
Louis B.
<p>There are many ways to do this, they basically rely on the "culture" of students and the purpose that they should learn. C++ is a multiple model and not "pure" in any of them, so... Teaching language and realism is a process: start with some courses before the process: Make them know about the two, compilers, etc. do not go into detail, but tell the path to learn. Avoid the IDE: Use the command-line editor. You can insert the IDE later. But always give a wide look. Variables, and jobs must run ads together. Study Module C++ and indicators "problem combo", consider: string "base type", with Device: Table, Composite: Products and Model style: Map. Presenting the template as soon as possible, and teaching the context recursion. Also show recursion in specialization. Introducing the concept of "recollected" "Position indicator". </p>

CC BY-SA 4.0
2019-05-25T16:34:09.860Z
2019-05-25T16:34:09.860Z
Raja Ali Haidar
<p>While I would suggest a different language for beginners, I'll take it as given here that the students need to learn C++ and not just programming for general use. </p>

<p>In that case, teach them Modern C++. That means C++ versions 14 and 17 and don't bother with anything earlier. To do this find a good book that focuses on those versions (or later if you are reading this in the future) and has been developed by someone who has good knowledge of pedagogy as well as the language. There are a couple of books available on Amazon that meet this criteria. </p>

<p>Note that you give up nothing by starting with the current version. The book will still cover the low level details that were inherited from C and that are still useful. You won't spend time trying to learn the things that have become obsolete for modern software development. </p>

<p>But, the important point is that a modern language comes with a set of idioms that enable its proper use. A language is <em>not</em> just a collection of features that you combine arbitrarily. It was designed with a vision. </p>

<p>So, once you get beyond trivial programs, you want to learn the current idiomatic usage of the language (whatever it is) along with the lower level details. In particular, you don't want to spend time on the idiomatic usage of an earlier version of the language once they have become obsolete. </p>

<p>I will also note that programming in a language requires the programmer to adopt some mental model. If a language is well designed, then it is possible to program completely within that model without worrying about how that model is implemented in some lower level model. That is to say, the model will be both <em>consistent</em> and <em>complete</em>. So, a book with good pedagogy will emphasize how you use that model to create useful artifacts. </p>

<p>The advantage of Modern C++ is that many of the pitfalls of earlier versions (and especially those of C) have been removed through the use of standard libraries. Lots of the kinds of errors that seem invariably to creep into commercial software don't occur at all (and so fewer viruses,...) if the programmer understands the libraries and the proper idiomatic use. </p>

<p>There is no need to take an historical approach to computing, starting with machine level programming and working UP to some higher level. That was my approach, actually, since I grew up with that history and have been programming for over 45 years. I didn't then use the languages that I use today since they didn't exist, not because it was better, in some way, for me to use primitive languages first. </p>

<p>Note that if a language does <em>not</em> provide a complete and consistent abstraction model for programming (if it isn't <em>Turing Complete</em>) then you <em>would</em> have to try to understand its features in terms of some lower level implementation mode. Otherwise you can learn the language directly and understand how the parts fit together idiomatically to write <em>any</em> program using a single mental model. </p>

<p>If you, as an individual want to learn everything bottom up, then go ahead. But if you are a teacher, I suggest that you don't impose that way of learning on your students. It is inefficient and unnecessary. </p>

<p>Once the students learn to program at a given (complete and consistent) level of abstraction they can <em>then</em> learn about how things are built or use them to build higher level abstractions. </p>

<p>If I had a choice of first teaching language today, it would probably be either Haskell (functional) or Scala (Object oriented). Both of these offer complete and consistent mental (abstraction) models as well as rich libraries. The teaching method would be to teach the idiomatic usage, not just the features. There are others that would serve equally well. The mental model needs to be taught along with the language. That is a pedagogical issue. </p>

<p>However for someone with less background in language principles and in programming pedagogy, I'd probably rather recommend Python or Java, just because of the wealth of teaching materials available, combined with a rational abstraction model. Creating good teaching materials in any language is hard work. </p>

<hr>

<p>I'll also note here that many people have the experience that the second language they learn is the hardest, especially if it is either quite similar or quite different. That is due to the fact that your first language teaches you (you believe) <em>how to program</em>, so, the new language feels awkward and one tries to apply the idioms of the old language to the new one. It won't work. Even languages as close as Java and Ruby have different idioms. </p>

CC BY-SA 4.0
2019-04-23T12:22:31.170Z
Haskell as a first language is an insane approach. It’s probably older than C. So it’s not clear to me why would you suggest it after promoting modern C++. The same goes for scala which also quite old and impossible to debug. Both would be a nightmare to start with and certainly teach very bad habits. You can see this on folks who started with Java, a lot of them write wasteful and inefficient code
Aksakal almost surely binary
CC BY-SA 4.0
2019-04-23T12:26:34.957Z
Hmmm @Aksakal, so the age of the language is determinative? A lot of C programmer write extremely dangerous code. What is your point, exactly?
Buffy
CC BY-SA 4.0
2019-04-23T13:02:58.157Z
The comment was on Haskell really. Do you know a good programmer who really started with Haskell? They don’t exist. So you are suggesting a really unproven approach if not outrageous.
Aksakal almost surely binary
CC BY-SA 4.0
2019-04-23T13:18:33.870Z
Do I infer correctly that you believe the the only worthy goal is to become a skilled C programmer? Sorry if my disagreement with that stance offends you so deeply. I like Haskell for what it _is_ and for the mental model it engenders. I might have said _Scheme_, actually, but personally prefer languages with more syntax as a guide to the student. I know I can't convince you. I'm not trying, actually.
Buffy
CC BY-SA 4.0
2019-04-24T08:53:21.920Z
@Aksakal, it only takes 30 seconds on Wikipedia to find out when Haskell dates from, so why not invest that effort before spouting inaccurate guesses? Also, FWIW, Cambridge University's first teaching language is SML, which is not entirely dissimilar to Haskell.
Peter Taylor
CC BY-SA 4.0
2019-04-24T11:35:01.170Z
@PeterTaylor have you seen a good programmer who started with these?
Aksakal almost surely binary
CC BY-SA 4.0
2019-04-24T11:45:34.083Z
Errr, @Aksakal, have you seen a bad programmer that started with C? Give it up and let your answer stand on its own.
Buffy
CC BY-SA 4.0
2019-05-09T21:42:37.197Z
From the question it is clear that the learners have no programming experience and so it will be important to introduce the *basic concepts* of sequence, iteration and condition along with simple data types. Later one can introduce function call and structured types with a possible discussion of OOP and type inheritance at the end of the course. I also not that according to the question these learners are engineers and medical students. It is therefore unlikely that they will become professional programmers.
Jon Guiton
CC BY-SA 4.0
2019-04-23T12:13:13.070Z
2019-04-23T17:56:20.347Z
2019-04-23T17:56:20.347Z
Buffy
<p>I would make it hands on and C-based, with very little OOP in the beginning. You can code in C++ using it as a "better" C. You'd introduce classes by the way without making a big deal of OO stuff. I'd focus on I/O, data structures, particularly, containers such as lists and arrays, and algorithms such as search and sorting. </p>

<p>Maybe write simple utilities, e.g. renaming files in the directory using wild cards. Building pipes like in Unix tools, e.g. write on program that reads from input stream and replaces special characters with spaces, then output result into output stream. Then write another program that reads IOS and counts words, then outputs. Then you make a silly pipe out of these two etc. This type of exercise packs a lot of different concepts together and can make things interesting to non CS students. This stuff will easily fill the semester.</p>

CC BY-SA 4.0
2019-04-22T16:34:39.400Z
Unfortunately, this will instill lots of bad habits in programmers destined to be C++ programmers. You really want to avoid that. Don't teach things that need to be un-learned later. This goes beyond just heap management, actually.
Buffy
CC BY-SA 4.0
2019-04-22T17:06:05.083Z
@Buffy, what's your opinion based on? I'd argue one shouldn't learn C++ before C, which is I'm proposing. Linux kernel is written in "better C"
Aksakal almost surely binary
CC BY-SA 4.0
2019-04-22T17:10:27.693Z
Modern C++ has different idioms than C or early C++. There is no need to learn C first, and it will cause you mental anguish to switch. There is no more need to learn C before C++ than to learn it before Java. If you want to be a linux kernel programmer, then learn C by all means - even first. But not if you want to move to being a good C++ programmer without wasted effort and turmoil.
Buffy
CC BY-SA 4.0
2019-04-22T20:20:46.857Z
@Buffy, the reason I'm proposing to start with C is because it's simple enough to not distract from the objective of the first programming class: learn data structures and algorithms. for instance, you learn an array in its most basic form, closest to how it's implemented in hardware. you can focus on the essence of programming with C. also, starting close to hardware and OS helps in future development of a programmer in my opinion.
Aksakal almost surely binary
CC BY-SA 4.0
2019-04-23T00:49:13.723Z
This is the basic division of opinion on this site. Well, at least there are two of us holding the same view now...
Scott Rowe
CC BY-SA 4.0
2019-04-23T01:54:00.230Z
@ScottRowe, it's actually not my idea. I believe it was one of the C inventors who said that the success of C was due to it being close enough to hardware and OS architecture, to how things actually work in a computer. I learned C++ when it was a pre-processor for C compiler, not a real compiler, but don't code in it a lot these days. It's a great and powerful language, too rich to get into all its paradigms at once when first learning it. So sticking to its core C is a sound way to start its exploration
Aksakal almost surely binary
CC BY-SA 4.0
2019-04-23T11:28:55.940Z
I don't know what these "bad habits" are that people are concerned will have to be unlearned later. If I knew that, perhaps I could make a reply. The only thing that has to be unlearned is something that was incorrect all along. How things actually work can never be wrong, or distracting, or misleading. It is the definition of knowledge, to learn what is.
Scott Rowe
CC BY-SA 4.0
2019-04-24T12:22:00.947Z
@Aksakal The Linux kernel is written in C, but definitely not by beginners.  What chefs do in the kitchen of 4 stars hotels is not relevant when learning to cook spaghettis first time. Using C is a PITA for beginners when it comes to handling even basic things as character strings (try with utf-8...)
Michel Billaud
CC BY-SA 4.0
2019-04-24T19:11:58.363Z
@MichelBillaud, I don't know what would be my choice for the very first programming language these days. OP is not asking about it. OP wants to teach C++ for some reason, and all I'm suggesting is to start with "better C" part of C++, the multi-paradigm language. Linus started with BASIC, not Visual Basic. BASIC used to come with all computers such as Commodor, and was something like C to Unix, i.e. it was very close to hardware architecture. You could read/write directly into memory, for instance. I started with stack languages in machine codes, but wouldn't recommend it today
Aksakal almost surely binary
CC BY-SA 4.0
2019-04-24T22:11:32.257Z
Writing in basic and with peek and poke is ruthless and unforgiving, which is what makes it such a great learning tool. Off by one? Reboot and wait 2 minutes...
Scott Rowe
CC BY-SA 4.0
2019-04-25T13:13:14.997Z
@Aksakal at the good ol times of Basic on home computer, programming in "machine code" was "the real thing" for hobbyists. Anyway, of the OP wants to teach modern C++ (17) for some reason, we first have to investigate the reason before suggesting how to teach it. Does he really want to teach C++17 with lambdas, templates, smart pointers etc. or some enhanced version of C89 ?
Michel Billaud
CC BY-SA 4.0
2019-04-25T13:16:08.587Z
@MichelBillaud OP indicates that the students are coming from sci and engineering background, and had no prior exposure to any programming somehow. basically, C++ is going to be the first language for them.
Aksakal almost surely binary
CC BY-SA 4.0
2019-04-25T13:22:47.517Z
Title says beginners have not idea of *it*, where *it* probably stands for C++.  Is it possible in 2019 that students with sci and eng background have absolutely no idea about programming?
Michel Billaud
CC BY-SA 4.0
2019-04-25T15:25:08.560Z
@MichelBillaud, read the full question, not just the title. It's not only possible, but I have seen people like that, especially in medical. Even engineering is quite broad, you have civil engineer, who usually do not code at all. I have to assume that OP correctly describes her class. who am I to judge?
Aksakal almost surely binary
CC BY-SA 4.0
2019-04-26T12:47:31.670Z
Suppositions. Anyway the OP doesn't seem interested in giving us more details about the context. Seems it is "I have to teach C++ to students who don't care much about programming". What does BSCS stand for ? Biological Sciences Curriculum Study ? Bachelor of Science in Computer Science ?
Michel Billaud
CC BY-SA 4.0
2019-05-09T21:47:46.203Z
I note that the learners are destined to become engineers or to work in medicine. They are certainly not destined to become professional C++ programmers. They are learning some software development to gain an understanding of issues such as how software works, how expensive and time consuming it is to write etc. This is not their main course, focus on fun.
Jon Guiton
CC BY-SA 4.0
2019-04-22T14:44:34.133Z
2019-04-22T14:44:34.133Z
Aksakal almost surely binary
<p>Some students come to CS field but they have no idea about any programming language. Either they will have the background of engineering or medical. But still they want to make CS their field. What technique should be applied on them to take start, clear their initial concepts and make ready them how to code any program?</p>

CC BY-SA 4.0
2019-04-22T10:27:46.990Z
Are you required to teach C++? Or can you choose a language that is more "friendly" to beginners?
Buffy
CC BY-SA 4.0
2019-04-22T11:05:11.350Z
I don't mean to sound like a know-it-all or come across as someone who's full of themselves but the basics of C++ aren't actually all that hard.
Malekai
CC BY-SA 4.0
2019-04-22T11:08:08.393Z
@LogicalBranch, ah, if only the basics were sufficient.
Buffy
CC BY-SA 4.0
2019-04-22T11:11:26.397Z
@Buffy Now, I never said anything about null pointers, segfaults or the hell hole that is memory management.
Malekai
CC BY-SA 4.0
2019-04-22T11:20:45.620Z
@LogicalBranch, C and C++ programmers do it on the heap.
Buffy
CC BY-SA 4.0
2019-04-22T11:33:15.787Z
If the basics are no longer sufficient to get started then we deserve our fate.
Scott Rowe
CC BY-SA 4.0
2019-04-22T12:23:39.563Z
Here is a recent take on "unsafe" languages: https://alexgaynor.net/2019/apr/21/modern-c++-wont-save-us/
Buffy
CC BY-SA 4.0
2019-04-23T11:33:31.950Z
@buffy, no sensible person writes directly in C, they use a framework, perhaps one they have built. That doesn't make C bad or to be avoided. Domain Specific Languages have been around a long time, and they are, as far as I can tell, the best approach to writing a system. Something like Windows is really a large library, thus a kind of DSL. Pretty successful so far. But reading the actual C is how we know how it achieves these results.
Scott Rowe
CC BY-SA 4.0
2019-04-27T17:10:37.817Z
First teach them to program, then teach then a second language. Only then teach them C++.
ctrl-alt-delor
CC BY-SA 4.0
2019-04-27T17:16:37.007Z
@LogicalBranch The language was too big to learn (easily) before C++03, and it keeps getting bigger and bigger. It also has poor mapping to OO (a many to many relationship). It is hard to think in, requiring constant translation, and cognitive friction. And it requires editing two files simultaneously.
ctrl-alt-delor
CC BY-SA 4.0
2019-04-27T17:19:20.943Z
@ScottRowe well done for coming up with a good metaphor for Microsoft's Windows “a large library”. I was looking for one “Operating system” did not seem to be a good fit, as the programs seem to run independent of each other. (though the large library is implemented with an OS, and it does provide Processes).
ctrl-alt-delor
<programming><c++>
How to teach C++ language to beginners of (BSCS) students who have no any idea about it?
# How to teach C++ language to beginners of (BSCS) students who have no any idea about it?

(Asked by: username_0 on 2019-04-22)

Some students come to CS field but they have no idea about any programming language. Either they will have the background of engineering or medical. But still they want to make CS their field. What technique should be applied on them to take start, clear their initial concepts and make ready them how to code any program?

**Tags:** programming, c++

> **Comments:**
> **username_1**: Are you required to teach C++? Or can you choose a language that is more "friendly" to beginners?  
> **username_2**: I don't mean to sound like a know-it-all or come across as someone who's full of themselves but the basics of C++ aren't actually all that hard.  
> **username_1**: @LogicalBranch, ah, if only the basics were sufficient.  
> **username_2**: @username_1 Now, I never said anything about null pointers, segfaults or the hell hole that is memory management.  
> **username_1**: @LogicalBranch, C and C++ programmers do it on the heap.  
> **username_3**: If the basics are no longer sufficient to get started then we deserve our fate.  
> **username_1**: Here is a recent take on "unsafe" languages: https://alexgaynor.net/2019/apr/21/modern-c++-wont-save-us/  
> **username_3**: @buffy, no sensible person writes directly in C, they use a framework, perhaps one they have built. That doesn't make C bad or to be avoided. Domain Specific Languages have been around a long time, and they are, as far as I can tell, the best approach to writing a system. Something like Windows is really a large library, thus a kind of DSL. Pretty successful so far. But reading the actual C is how we know how it achieves these results.  
> **username_4**: First teach them to program, then teach then a second language. Only then teach them C++.  
> **username_4**: @LogicalBranch The language was too big to learn (easily) before C++03, and it keeps getting bigger and bigger. It also has poor mapping to OO (a many to many relationship). It is hard to think in, requiring constant translation, and cognitive friction. And it requires editing two files simultaneously.  
> **username_4**: @ScottRowe well done for coming up with a good metaphor for Microsoft's Windows “a large library”. I was looking for one “Operating system” did not seem to be a good fit, as the programs seem to run independent of each other. (though the large library is implemented with an OS, and it does provide Processes).  

---

## 4 answers

### Answer by username_7 on 2019-05-25. Score: 2 | Accepted answer

There are many ways to do this, they basically rely on the "culture" of students and the purpose that they should learn. C++ is a multiple model and not "pure" in any of them, so... Teaching language and realism is a process: start with some courses before the process: Make them know about the two, compilers, etc. do not go into detail, but tell the path to learn. Avoid the IDE: Use the command-line editor. You can insert the IDE later. But always give a wide look. Variables, and jobs must run ads together. Study Module C++ and indicators "problem combo", consider: string "base type", with Device: Table, Composite: Products and Model style: Map. Presenting the template as soon as possible, and teaching the context recursion. Also show recursion in specialization. Introducing the concept of "recollected" "Position indicator".


---

### Answer by username_1 on 2019-04-23. Score: 4

While I would suggest a different language for beginners, I'll take it as given here that the students need to learn C++ and not just programming for general use.

In that case, teach them Modern C++. That means C++ versions 14 and 17 and don't bother with anything earlier. To do this find a good book that focuses on those versions (or later if you are reading this in the future) and has been developed by someone who has good knowledge of pedagogy as well as the language. There are a couple of books available on Amazon that meet this criteria.

Note that you give up nothing by starting with the current version. The book will still cover the low level details that were inherited from C and that are still useful. You won't spend time trying to learn the things that have become obsolete for modern software development.

But, the important point is that a modern language comes with a set of idioms that enable its proper use. A language is *not* just a collection of features that you combine arbitrarily. It was designed with a vision.

So, once you get beyond trivial programs, you want to learn the current idiomatic usage of the language (whatever it is) along with the lower level details. In particular, you don't want to spend time on the idiomatic usage of an earlier version of the language once they have become obsolete.

I will also note that programming in a language requires the programmer to adopt some mental model. If a language is well designed, then it is possible to program completely within that model without worrying about how that model is implemented in some lower level model. That is to say, the model will be both *consistent* and *complete*. So, a book with good pedagogy will emphasize how you use that model to create useful artifacts.

The advantage of Modern C++ is that many of the pitfalls of earlier versions (and especially those of C) have been removed through the use of standard libraries. Lots of the kinds of errors that seem invariably to creep into commercial software don't occur at all (and so fewer viruses,...) if the programmer understands the libraries and the proper idiomatic use.

There is no need to take an historical approach to computing, starting with machine level programming and working UP to some higher level. That was my approach, actually, since I grew up with that history and have been programming for over 45 years. I didn't then use the languages that I use today since they didn't exist, not because it was better, in some way, for me to use primitive languages first.

Note that if a language does *not* provide a complete and consistent abstraction model for programming (if it isn't *Turing Complete*) then you *would* have to try to understand its features in terms of some lower level implementation mode. Otherwise you can learn the language directly and understand how the parts fit together idiomatically to write *any* program using a single mental model.

If you, as an individual want to learn everything bottom up, then go ahead. But if you are a teacher, I suggest that you don't impose that way of learning on your students. It is inefficient and unnecessary.

Once the students learn to program at a given (complete and consistent) level of abstraction they can *then* learn about how things are built or use them to build higher level abstractions.

If I had a choice of first teaching language today, it would probably be either Haskell (functional) or Scala (Object oriented). Both of these offer complete and consistent mental (abstraction) models as well as rich libraries. The teaching method would be to teach the idiomatic usage, not just the features. There are others that would serve equally well. The mental model needs to be taught along with the language. That is a pedagogical issue.

However for someone with less background in language principles and in programming pedagogy, I'd probably rather recommend Python or Java, just because of the wealth of teaching materials available, combined with a rational abstraction model. Creating good teaching materials in any language is hard work.

---

I'll also note here that many people have the experience that the second language they learn is the hardest, especially if it is either quite similar or quite different. That is due to the fact that your first language teaches you (you believe) *how to program*, so, the new language feels awkward and one tries to apply the idioms of the old language to the new one. It won't work. Even languages as close as Java and Ruby have different idioms.

> **Comments:**
> **username_8**: Haskell as a first language is an insane approach. It’s probably older than C. So it’s not clear to me why would you suggest it after promoting modern C++. The same goes for scala which also quite old and impossible to debug. Both would be a nightmare to start with and certainly teach very bad habits. You can see this on folks who started with Java, a lot of them write wasteful and inefficient code  
> **username_1**: Hmmm @Aksakal, so the age of the language is determinative? A lot of C programmer write extremely dangerous code. What is your point, exactly?  
> **username_8**: The comment was on Haskell really. Do you know a good programmer who really started with Haskell? They don’t exist. So you are suggesting a really unproven approach if not outrageous.  
> **username_1**: Do I infer correctly that you believe the the only worthy goal is to become a skilled C programmer? Sorry if my disagreement with that stance offends you so deeply. I like Haskell for what it _is_ and for the mental model it engenders. I might have said _Scheme_, actually, but personally prefer languages with more syntax as a guide to the student. I know I can't convince you. I'm not trying, actually.  
> **username_9**: @Aksakal, it only takes 30 seconds on Wikipedia to find out when Haskell dates from, so why not invest that effort before spouting inaccurate guesses? Also, FWIW, Cambridge University's first teaching language is SML, which is not entirely dissimilar to Haskell.  
> **username_8**: @PeterTaylor have you seen a good programmer who started with these?  
> **username_1**: Errr, @Aksakal, have you seen a bad programmer that started with C? Give it up and let your answer stand on its own.  
> **username_10**: From the question it is clear that the learners have no programming experience and so it will be important to introduce the *basic concepts* of sequence, iteration and condition along with simple data types. Later one can introduce function call and structured types with a possible discussion of OOP and type inheritance at the end of the course. I also not that according to the question these learners are engineers and medical students. It is therefore unlikely that they will become professional programmers.  

---

### Answer by username_8 on 2019-04-22. Score: 2

I would make it hands on and C-based, with very little OOP in the beginning. You can code in C++ using it as a "better" C. You'd introduce classes by the way without making a big deal of OO stuff. I'd focus on I/O, data structures, particularly, containers such as lists and arrays, and algorithms such as search and sorting.

Maybe write simple utilities, e.g. renaming files in the directory using wild cards. Building pipes like in Unix tools, e.g. write on program that reads from input stream and replaces special characters with spaces, then output result into output stream. Then write another program that reads IOS and counts words, then outputs. Then you make a silly pipe out of these two etc. This type of exercise packs a lot of different concepts together and can make things interesting to non CS students. This stuff will easily fill the semester.

> **Comments:**
> **username_1**: Unfortunately, this will instill lots of bad habits in programmers destined to be C++ programmers. You really want to avoid that. Don't teach things that need to be un-learned later. This goes beyond just heap management, actually.  
> **username_8**: @username_1, what's your opinion based on? I'd argue one shouldn't learn C++ before C, which is I'm proposing. Linux kernel is written in "better C"  
> **username_1**: Modern C++ has different idioms than C or early C++. There is no need to learn C first, and it will cause you mental anguish to switch. There is no more need to learn C before C++ than to learn it before Java. If you want to be a linux kernel programmer, then learn C by all means - even first. But not if you want to move to being a good C++ programmer without wasted effort and turmoil.  
> **username_8**: @username_1, the reason I'm proposing to start with C is because it's simple enough to not distract from the objective of the first programming class: learn data structures and algorithms. for instance, you learn an array in its most basic form, closest to how it's implemented in hardware. you can focus on the essence of programming with C. also, starting close to hardware and OS helps in future development of a programmer in my opinion.  
> **username_3**: This is the basic division of opinion on this site. Well, at least there are two of us holding the same view now...  
> **username_8**: @ScottRowe, it's actually not my idea. I believe it was one of the C inventors who said that the success of C was due to it being close enough to hardware and OS architecture, to how things actually work in a computer. I learned C++ when it was a pre-processor for C compiler, not a real compiler, but don't code in it a lot these days. It's a great and powerful language, too rich to get into all its paradigms at once when first learning it. So sticking to its core C is a sound way to start its exploration  
> **username_3**: I don't know what these "bad habits" are that people are concerned will have to be unlearned later. If I knew that, perhaps I could make a reply. The only thing that has to be unlearned is something that was incorrect all along. How things actually work can never be wrong, or distracting, or misleading. It is the definition of knowledge, to learn what is.  
> **username_11**: @Aksakal The Linux kernel is written in C, but definitely not by beginners.  What chefs do in the kitchen of 4 stars hotels is not relevant when learning to cook spaghettis first time. Using C is a PITA for beginners when it comes to handling even basic things as character strings (try with utf-8...)  
> **username_8**: @MichelBillaud, I don't know what would be my choice for the very first programming language these days. OP is not asking about it. OP wants to teach C++ for some reason, and all I'm suggesting is to start with "better C" part of C++, the multi-paradigm language. Linus started with BASIC, not Visual Basic. BASIC used to come with all computers such as Commodor, and was something like C to Unix, i.e. it was very close to hardware architecture. You could read/write directly into memory, for instance. I started with stack languages in machine codes, but wouldn't recommend it today  
> **username_3**: Writing in basic and with peek and poke is ruthless and unforgiving, which is what makes it such a great learning tool. Off by one? Reboot and wait 2 minutes...  
> **username_11**: @Aksakal at the good ol times of Basic on home computer, programming in "machine code" was "the real thing" for hobbyists. Anyway, of the OP wants to teach modern C++ (17) for some reason, we first have to investigate the reason before suggesting how to teach it. Does he really want to teach C++17 with lambdas, templates, smart pointers etc. or some enhanced version of C89 ?  
> **username_8**: @MichelBillaud OP indicates that the students are coming from sci and engineering background, and had no prior exposure to any programming somehow. basically, C++ is going to be the first language for them.  
> **username_11**: Title says beginners have not idea of *it*, where *it* probably stands for C++.  Is it possible in 2019 that students with sci and eng background have absolutely no idea about programming?  
> **username_8**: @MichelBillaud, read the full question, not just the title. It's not only possible, but I have seen people like that, especially in medical. Even engineering is quite broad, you have civil engineer, who usually do not code at all. I have to assume that OP correctly describes her class. who am I to judge?  
> **username_11**: Suppositions. Anyway the OP doesn't seem interested in giving us more details about the context. Seems it is "I have to teach C++ to students who don't care much about programming". What does BSCS stand for ? Biological Sciences Curriculum Study ? Bachelor of Science in Computer Science ?  
> **username_10**: I note that the learners are destined to become engineers or to work in medicine. They are certainly not destined to become professional C++ programmers. They are learning some software development to gain an understanding of issues such as how software works, how expensive and time consuming it is to write etc. This is not their main course, focus on fun.  

---

### Answer by username_5 on 2019-05-25. Score: 1

Arduino, it's full C++ 2011 underneath the "Arduino Language". What they call "libraries" are classes. The physical computing aspect is a good way to keep interest.

> **Comments:**
> **username_6**: Hi! What you say is true, but it's unclear how this answers the question. If you include explanations relevant to teaching (for example: how one can use arduino to teach), it would greatly improve the answer.  

---

