This appears to be for DOS, and I'm betting this was written in Turbo C++. From what I've heard from my friends, almost all schools in India still use Turbo C++ (in DosBox) to teach C++. Ew.
36 year old me is very glad to have learned VGA graphics programming with Turbo Pascal and Turbo C++ during high school. I've met kids these days coming out of university CS degrees in the U.S.A. that still don't have a solid grasp on how pointers work.
I believe it is in every programmer's interest to have a deep understanding of the system for which they are working on, even if they don't need to use the low level tools from day to day. Teaching C++ in DOS can still provide an excellent CS foundation IMO.
I would even argue it is much better than trying to do so on a more modern system, as you directly can just use graphics and color (which is both fun and helps teach a lot of programming concepts that are useful to know for building UIs later) without wasting a ton of time learning some UI toolkit that will be neither instructive nor actually-useful in the real world (as even if you choose a good one, it is almost certainly going to be obsolete by the time you go to get a job).
Raw pointers in C++ are an introductory concept at this point.
You also have l-value references, r-value references, smart pointers (unique, weak, shared, etc), and many of those have a use-case that overlaps with raw pointers.
As far as pure UX is concerned, Turbo Pascal and Turbo C++ are still a gold standard of text-mode IDE's.
Emacs has tried to add a bit of the same featureset lately, like it will show a primitive TUI menubar if you launch it from a terminal but it's quite half-baked; the look and feel is sub-standard, and mouse interaction (via gpm or xterm) doesn't actually work by default. (Of course I realize that capturing mouse events is not always desired but it should be reasonably easy to allow this, maybe even as a default.) And it still lacks other basic UX elements like floating windows for dialog boxes, or resizing/rearranging windows with the mouse.
FreePascal still ships a proper TUI IDE, and there's a FreeDOS text-mode IDE for C/C++ known as RHIDE.
Instead of displaying disgust, why not try to say something uplifting instead? Constraints like using a limited environment can do wonders for people’s creativity.
Constraints like using a limited environment can do wonders for people’s creativity
The problem is that the teachers (and the students by extension) don't know that they are learning helpessly outdated things.
Nothing would be lost if they were instead learning today's coding styles & paradigms and they could be actually much more creative by using modern practices where the compiler can infer a lot instead of trying to fight with older compilers and doing that: https://github.com/vibhoothiiaanand/CNotepad/blob/dlevel/CNo...
How many security issues will be caused because that student hasn't been taught about global variable issues, std::string, etc... ? I'm not hopeful.
Open framework surely looks promising, so do the manifesto,
At that point, I think I was mostly self-driven with the goal of making "it works" with little to no knowledge of security aspects of things. If I am doing the same thing now I would be knowing how to do, how to "Google", and also the right place to ask, but at that time I think I wasn't aware, I do also think this or even worse is the situation of school students at least here because there is no exposure to things and the bright side of the Internet.
Also, for this to solve, one thing we can do is start FOSS and cybersecurity Clubs and build a culture among them through various ways like competitions, workshops, code-sprints, hackathons, CTFs and lot more which can be solved.
Keeping that in mind, from our uni we have Started CTF competitions and bootstrapping them through workshops,
At that point, I think I was mostly self-driven with the goal of making "it works" with little to no knowledge of security aspects of things. If I am doing the same thing now I would be knowing how to do, how to "Google", and also the right place to ask, but at that time I think I wasn't aware, I do also think this or even worse is the situation of school students at least here because there is no exposure to things and the bright side of the Internet.
exactly, and that's not your fault at all, this is what teachers ought to teach you if they had any ethics and any level of pride in their work
Also, for this to solve, one thing we can do is start FOSS and cybersecurity Clubs and build a culture among them through various ways like competitions, workshops, code-sprints, hackathons, CTFs and lot more which can be solved. Keeping that in mind, from our uni we have Started CTF competitions and bootstrapping them through workshops,
super nice, but also super sad that things are so bad that students have to take the place of their teachers :) as it's the teachers who get paid
Well, teachers aren't interested in all these. They just teach in some rote learning fashion. But at least having CS as subject helps to create interest in students about programming. That's it.
Even in Engineering courses, some teachers don't even properly indent code and can't even write themselves a recursive algorithm for eg: printing a number in binary. This is not an issue limited to CS/programming, but manifests more because it is a practical subject and a fast growing fields.
But some students get interested in programming earlier rather than rote learning other choices of subjects (eg: biology). That's the benefit of having CompSci/Programming in curriculum.
Source: learned programming in turbo C++ in India during my HS (called +2 or Pre-university here).
How wide spread was this then? It seems like in the late 70s and 80s a lot of children (as in less than 15) learned programming young but this has dropped off in the 00s with the general rise of helicopter parenting and infantilization[0], and even with things like arduinos and such it seems like kids pick it up in class but then move on to other things. You certainly don't have young people actually end up developing actual things apart from the exceptions.
[0] this is my hypothesis around this in general tbh.
First year of programming is more about learning the basics and not the language. Like the students will learn basic stuff like finding the digits of a number or implementing other algorithms. Then passionate students discover the graphics libraries and then start playing with that draw different cool stuff like effects or make simple games like Tic Tac Toe.
conclusion, in first year in schools you might have different level of students, they do not learn a language so they start a career with that language, they start with the basic stuff and hopefully a large number of students are attracted. Probably the teacher is lucky if majority of the students could handle homework on their-own so attempting to add more information that is not relevant is not useful.
I am attempting to teach my son programming, he likes to play Gary's mod and there he can script stuff, I observe very interesting things(he is 14) like I need to explain and force him to ident the code to make it readable (imagine how extra messy would be with python) or I explain a few times that you can have local variables or function parameters reuse same names but for some reason he gets confused when 2 different things have same name. 1
If it's still the case then the Vietnamese curriculum (in middle and high school) still teaches Pascal using Turbo Pascal. They (the Ministry of Education) probably doesn't feel like modernizing it though because it's not widely taught, and from my own experience most students (and teachers!) neglect it anyway.
Actually I think TP is quite good for that. Compilation time is (really) fast, and it is close enough to the metal to learn about the foundational structure of the computer and programming languages; the language is well defined. Syntax is (sort of) shared by ada if one later needs production grade.
Of course, the counter argument is, that it is kind of boring (except for some kids). Alternative is a language, where you easily can get things done. So maybe Python, but thats about it. I am still sad, that LOGO is not used anymore (there is much more to logo than turtle graphics).
Yes, even Bjarne mentions this in one of his talks.
Not sure what to think really, should we get angry how younger generations get taught so outdated information, or be happy that at least they learn something that will allow them to jumpstart into something better years later.
Not sure what to think really, should we get angry how younger generations get taught so outdated information
(I'm an Indian that learned C++ in school using Turbo C++ 10 years ago.)
Outdated? The point of learning programming at that age is to understand the basics - functions / if / for / while, structs / classes, and pointers. All of those work the same in Turbo C++ or in the latest MSVC.
Sure learning C++ via Turbo C++ doesn't prepare the student for modern code that uses `<algorithm>` or `std::shared_ptr` (or `std` at all), but those can always be learned later. The basics are more important.
If anything, the fact that Turbo C++ came with graphics.h meant I could make screensavers like starfield and a visual sudoku solver by myself without any hassle. It made programming fun and was certainly part of the reason I'm a programmer today. I'm not even sure how I would do those with MSVC or gcc today, let alone 10 years ago. WinForms + GDI? SDL? Both are much more complicated than what I remember of graphics.h's API.
Edit: graphics.h was the header with the graphics API, not conio.h
I remember the time when I was a teen and started out with TurboPascal 8. It was a really polished experience with the inbuilt library being enough to do anything console (even a GUI framework). Very found memories and it did show me the basics that I use today without overwhelming with details, squabblings and arcanea (it was fairly consistent). Very different to the patchwork you find if you start today and the constraints to work with a limited set of tools was really great for starting out. Throw an NPM ecosystem with a million terms at a kid today who tries to start out and you have lost the spark. Kids only categorize programming as fun or chore once and it sticks. Luckily there is still Python (you can get very far by limiting yourself to the standard library and it leaves space to actually focus on the exploration of programming).
Yes, outdated, I used Turbo C++ when it came out fresh from Borland software factory, so I know what I am talking about regarding C++ support in Turbo C++. While C support was a mix of K&R and ANSI C, depending on the Turbo version.
All Turbo C++ versions for MS-DOS or the later Windows 3.x versions are older than ISO C++ and have semantics that eventually changed across versions.
Then there is the whole point of them being MS-DOS/Windows 3.x products that run in modern computers with various degrees of success.
There are open source clones of graphics.h and conio.h, and any good teacher could prepare the class material so that the students wouldn't have attrition.
And it isn't just talk, I spent one year doing TA activities so I know how much it costs to prepare such student materials.
Any talk of how compliant Turbo C++ is to modern C++ is missing the point of my post. I'll say again, the point of learning CS at that level of schooling is to learn programming, not learn C++ and instantly be hirable as a C++ developer.
I learned C++ at the 11 grade, back when Turbo C++ 1.0 was still quite recent on the market, and was giving classes to fellow classmates about OOP with Turbo Pascal 5.5, as payment for accessing school software packages and manuals, so I do know a couple of things what about matters at that age, and giving a good preparation for the work market.
Sute, basics are basics, but why not just install QtCreator? Modern day C++ with modern day tooling, GUI, that in all likelihood runs on the machines the students have.
I'd agree with you a decade ago, but nowadays Qt is all over the place (I still like it, just not good to start out - two GUI frameworks in the core library, which one do I choose; the docs certainly don't help). Today you fare better with something like Lazarus to start out or Python if you ignore the GUI.
Oh but you dont need to use Qt at all when using QtCreator. Its just the most fully featured free C++ IDE I know.
On top of that, regular old Qt is still one of the most fully featured GUI frameworks, QtQuick is mostly used for mobile and embedded, even though it also works on desktop. Lazarus or Tkinter aren't better choices for starters, I say as someone who used both.
Qt(Widgets) certainly is good if you know how to use it, you just need someone to tell you what parts to ignore when starting out. Here I put on the "teen who interacts first time with the concept of programming" glasses because of the thread, and consistency and constraints benefit that situation. Unguided first contact with programming through the mess that Qt is today is somewhat counterproductive in this respect. Look at the documentation page for Qt, that's certainly no place where an unguided newcomer could find their way around easily.
Granted, documentation isnt that great for Qt (but there's a ton of other resources). But doing anything more than the simplest of GUI is supereasy with Qt, much easier than TKinter, and IMHO even Lazarus.
But, even if you don't like Qt, QtCreator is still a great IDE. No need to keep using a Dosbox with Turbo C++.
Many teaching faculty are resistant to change because it requires them to learn something. That's the biggest problem. although some boards have successfully switched to teaching python.
Yeah, we were taught the basics of C++ in 7th grade using Turbo. However, the two major boards of education here use Java and Python in high school now so from 8th grade onwards we did most of our work in BlueJ (examinations still happen by writing programs on paper, though).
I wonder how many of us who started on the "wrong" language or outdated tooling were actually handicapped by doing so in the long run. I started on BASIC, the kind with line numbers.
When I was a TA (late 90's), we were using Windows 98 with Visual C++. Memory is fuzzy, I think it was version 5.0.
Each student had their own area on a file server which would be mounted locally and the exercises and respective support material for integration into VS as per exercise were available on the server as per lab session.
Comments
36 year old me is very glad to have learned VGA graphics programming with Turbo Pascal and Turbo C++ during high school. I've met kids these days coming out of university CS degrees in the U.S.A. that still don't have a solid grasp on how pointers work.
I believe it is in every programmer's interest to have a deep understanding of the system for which they are working on, even if they don't need to use the low level tools from day to day. Teaching C++ in DOS can still provide an excellent CS foundation IMO.
I would even argue it is much better than trying to do so on a more modern system, as you directly can just use graphics and color (which is both fun and helps teach a lot of programming concepts that are useful to know for building UIs later) without wasting a ton of time learning some UI toolkit that will be neither instructive nor actually-useful in the real world (as even if you choose a good one, it is almost certainly going to be obsolete by the time you go to get a job).
Here is a nice quick tutorial on using the frame buffer in Linux: https://cmcenroe.me/2018/01/30/fbclock.html
Raw pointers in C++ are an introductory concept at this point.
You also have l-value references, r-value references, smart pointers (unique, weak, shared, etc), and many of those have a use-case that overlaps with raw pointers.
As far as pure UX is concerned, Turbo Pascal and Turbo C++ are still a gold standard of text-mode IDE's.
Emacs has tried to add a bit of the same featureset lately, like it will show a primitive TUI menubar if you launch it from a terminal but it's quite half-baked; the look and feel is sub-standard, and mouse interaction (via gpm or xterm) doesn't actually work by default. (Of course I realize that capturing mouse events is not always desired but it should be reasonably easy to allow this, maybe even as a default.) And it still lacks other basic UX elements like floating windows for dialog boxes, or resizing/rearranging windows with the mouse.
FreePascal still ships a proper TUI IDE, and there's a FreeDOS text-mode IDE for C/C++ known as RHIDE.
Instead of displaying disgust, why not try to say something uplifting instead? Constraints like using a limited environment can do wonders for people’s creativity.
The problem is that the teachers (and the students by extension) don't know that they are learning helpessly outdated things. Nothing would be lost if they were instead learning today's coding styles & paradigms and they could be actually much more creative by using modern practices where the compiler can infer a lot instead of trying to fight with older compilers and doing that: https://github.com/vibhoothiiaanand/CNotepad/blob/dlevel/CNo...
How many security issues will be caused because that student hasn't been taught about global variable issues, std::string, etc... ? I'm not hopeful.
If you want to be "creative", you can do the same thing than this: https://github.com/vibhoothiiaanand/CNotepad/blob/dlevel/CNo... but in much prettier, portable, useful and much less lines of code with e.g. OpenFrameworks: https://openframeworks.cc/ofBook/chapters/lines.html - and at least the tutorial gives you an idea of non-one-letter variable names.
Dear student: please send that to your teachers please : https://github.com/jcelerier/cpp-teaching-manifesto
I agree with what you have said,
Open framework surely looks promising, so do the manifesto,
At that point, I think I was mostly self-driven with the goal of making "it works" with little to no knowledge of security aspects of things. If I am doing the same thing now I would be knowing how to do, how to "Google", and also the right place to ask, but at that time I think I wasn't aware, I do also think this or even worse is the situation of school students at least here because there is no exposure to things and the bright side of the Internet.
Also, for this to solve, one thing we can do is start FOSS and cybersecurity Clubs and build a culture among them through various ways like competitions, workshops, code-sprints, hackathons, CTFs and lot more which can be solved. Keeping that in mind, from our uni we have Started CTF competitions and bootstrapping them through workshops,
https://junior.inctf.in/
So last year(2019), we did try to have workshops and courses, classes online and offline for school students which did help them.
So the primary problem here I faced was lack of understanding of how really things work and how to explore in a better way.
exactly, and that's not your fault at all, this is what teachers ought to teach you if they had any ethics and any level of pride in their work
super nice, but also super sad that things are so bad that students have to take the place of their teachers :) as it's the teachers who get paid
Well, teachers aren't interested in all these. They just teach in some rote learning fashion. But at least having CS as subject helps to create interest in students about programming. That's it.
Even in Engineering courses, some teachers don't even properly indent code and can't even write themselves a recursive algorithm for eg: printing a number in binary. This is not an issue limited to CS/programming, but manifests more because it is a practical subject and a fast growing fields.
But some students get interested in programming earlier rather than rote learning other choices of subjects (eg: biology). That's the benefit of having CompSci/Programming in curriculum.
Source: learned programming in turbo C++ in India during my HS (called +2 or Pre-university here).
My high school taught BASIC PLUS on a DEC PDP-11. Granted this was in 1977.
How wide spread was this then? It seems like in the late 70s and 80s a lot of children (as in less than 15) learned programming young but this has dropped off in the 00s with the general rise of helicopter parenting and infantilization[0], and even with things like arduinos and such it seems like kids pick it up in class but then move on to other things. You certainly don't have young people actually end up developing actual things apart from the exceptions.
[0] this is my hypothesis around this in general tbh.
They teach "programming" but it's really making a simple web page.
First year of programming is more about learning the basics and not the language. Like the students will learn basic stuff like finding the digits of a number or implementing other algorithms. Then passionate students discover the graphics libraries and then start playing with that draw different cool stuff like effects or make simple games like Tic Tac Toe.
conclusion, in first year in schools you might have different level of students, they do not learn a language so they start a career with that language, they start with the basic stuff and hopefully a large number of students are attracted. Probably the teacher is lucky if majority of the students could handle homework on their-own so attempting to add more information that is not relevant is not useful.
I am attempting to teach my son programming, he likes to play Gary's mod and there he can script stuff, I observe very interesting things(he is 14) like I need to explain and force him to ident the code to make it readable (imagine how extra messy would be with python) or I explain a few times that you can have local variables or function parameters reuse same names but for some reason he gets confused when 2 different things have same name. 1
If it's still the case then the Vietnamese curriculum (in middle and high school) still teaches Pascal using Turbo Pascal. They (the Ministry of Education) probably doesn't feel like modernizing it though because it's not widely taught, and from my own experience most students (and teachers!) neglect it anyway.
Actually I think TP is quite good for that. Compilation time is (really) fast, and it is close enough to the metal to learn about the foundational structure of the computer and programming languages; the language is well defined. Syntax is (sort of) shared by ada if one later needs production grade.
Of course, the counter argument is, that it is kind of boring (except for some kids). Alternative is a language, where you easily can get things done. So maybe Python, but thats about it. I am still sad, that LOGO is not used anymore (there is much more to logo than turtle graphics).
Yes, even Bjarne mentions this in one of his talks.
Not sure what to think really, should we get angry how younger generations get taught so outdated information, or be happy that at least they learn something that will allow them to jumpstart into something better years later.
(I'm an Indian that learned C++ in school using Turbo C++ 10 years ago.)
Outdated? The point of learning programming at that age is to understand the basics - functions / if / for / while, structs / classes, and pointers. All of those work the same in Turbo C++ or in the latest MSVC.
Sure learning C++ via Turbo C++ doesn't prepare the student for modern code that uses `<algorithm>` or `std::shared_ptr` (or `std` at all), but those can always be learned later. The basics are more important.
If anything, the fact that Turbo C++ came with graphics.h meant I could make screensavers like starfield and a visual sudoku solver by myself without any hassle. It made programming fun and was certainly part of the reason I'm a programmer today. I'm not even sure how I would do those with MSVC or gcc today, let alone 10 years ago. WinForms + GDI? SDL? Both are much more complicated than what I remember of graphics.h's API.
Edit: graphics.h was the header with the graphics API, not conio.h
I remember the time when I was a teen and started out with TurboPascal 8. It was a really polished experience with the inbuilt library being enough to do anything console (even a GUI framework). Very found memories and it did show me the basics that I use today without overwhelming with details, squabblings and arcanea (it was fairly consistent). Very different to the patchwork you find if you start today and the constraints to work with a limited set of tools was really great for starting out. Throw an NPM ecosystem with a million terms at a kid today who tries to start out and you have lost the spark. Kids only categorize programming as fun or chore once and it sticks. Luckily there is still Python (you can get very far by limiting yourself to the standard library and it leaves space to actually focus on the exploration of programming).
I guess you mean Turbo Pascal 7. :)
Yes, outdated, I used Turbo C++ when it came out fresh from Borland software factory, so I know what I am talking about regarding C++ support in Turbo C++. While C support was a mix of K&R and ANSI C, depending on the Turbo version.
All Turbo C++ versions for MS-DOS or the later Windows 3.x versions are older than ISO C++ and have semantics that eventually changed across versions.
Then there is the whole point of them being MS-DOS/Windows 3.x products that run in modern computers with various degrees of success.
There are open source clones of graphics.h and conio.h, and any good teacher could prepare the class material so that the students wouldn't have attrition.
And it isn't just talk, I spent one year doing TA activities so I know how much it costs to prepare such student materials.
Any talk of how compliant Turbo C++ is to modern C++ is missing the point of my post. I'll say again, the point of learning CS at that level of schooling is to learn programming, not learn C++ and instantly be hirable as a C++ developer.
I learned C++ at the 11 grade, back when Turbo C++ 1.0 was still quite recent on the market, and was giving classes to fellow classmates about OOP with Turbo Pascal 5.5, as payment for accessing school software packages and manuals, so I do know a couple of things what about matters at that age, and giving a good preparation for the work market.
Sute, basics are basics, but why not just install QtCreator? Modern day C++ with modern day tooling, GUI, that in all likelihood runs on the machines the students have.
I'd agree with you a decade ago, but nowadays Qt is all over the place (I still like it, just not good to start out - two GUI frameworks in the core library, which one do I choose; the docs certainly don't help). Today you fare better with something like Lazarus to start out or Python if you ignore the GUI.
Oh but you dont need to use Qt at all when using QtCreator. Its just the most fully featured free C++ IDE I know.
On top of that, regular old Qt is still one of the most fully featured GUI frameworks, QtQuick is mostly used for mobile and embedded, even though it also works on desktop. Lazarus or Tkinter aren't better choices for starters, I say as someone who used both.
Qt(Widgets) certainly is good if you know how to use it, you just need someone to tell you what parts to ignore when starting out. Here I put on the "teen who interacts first time with the concept of programming" glasses because of the thread, and consistency and constraints benefit that situation. Unguided first contact with programming through the mess that Qt is today is somewhat counterproductive in this respect. Look at the documentation page for Qt, that's certainly no place where an unguided newcomer could find their way around easily.
Granted, documentation isnt that great for Qt (but there's a ton of other resources). But doing anything more than the simplest of GUI is supereasy with Qt, much easier than TKinter, and IMHO even Lazarus.
But, even if you don't like Qt, QtCreator is still a great IDE. No need to keep using a Dosbox with Turbo C++.
Learning C++ with Borland Turbo C++ for DOS can have some learning value, but landing a C++ job with that may not be easy.
gcc and clang are distributed free of cost, and so is Linux. They should switch to those compilers and teach a modern dialect of C++.
Many teaching faculty are resistant to change because it requires them to learn something. That's the biggest problem. although some boards have successfully switched to teaching python.
I had a professor who would update his slides during lecture to be more compliant with the newest version of C++
Yeah, we were taught the basics of C++ in 7th grade using Turbo. However, the two major boards of education here use Java and Python in high school now so from 8th grade onwards we did most of our work in BlueJ (examinations still happen by writing programs on paper, though).
”examinations still happen by writing programs on paper, though“
When i studied CS at the uni ~2007 we also did it like that for our intro programming courses. I enjoyed it :)
I wonder how many of us who started on the "wrong" language or outdated tooling were actually handicapped by doing so in the long run. I started on BASIC, the kind with line numbers.
What is used in other countries? I assume Visual Studio or Eclipse? We used Code::Blocks in our high school.
When I was a TA (late 90's), we were using Windows 98 with Visual C++. Memory is fuzzy, I think it was version 5.0.
Each student had their own area on a file server which would be mounted locally and the exercises and respective support material for integration into VS as per exercise were available on the server as per lab session.
I've also heard of gcc/g++ being used along with vim or Geany.