#include<conio.h>
#include<dos.h>
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. #include<conio.h>
#include<dos.h>
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.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.
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.
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.
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
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,
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
> 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
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).
[0] this is my hypothesis around this in general tbh.
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
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).
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
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.
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.
But, even if you don't like Qt, QtCreator is still a great IDE. No need to keep using a Dosbox with Turbo C++.
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++.
When i studied CS at the uni ~2007 we also did it like that for our intro programming courses. I enjoyed it :)
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.