Okay, I phrased it wrong.
Yes, it's a console, which does "exist" in the Windows OS, and in that sense it "is a part of" modern operating systems, but it still is something in the back-end, something that relatively few people even know about, and even those of us who do know about it,
don't use it. Oh sure, I use it when I'm debugging my network or something like that, but it still remains as something almost never used. The whole operating system is built around using a different set of interfaces.
And yes, I personally know how to use the command prompt. I grew up using DOS. And I know how to actually write code. But it still pisses me off that instructions that claim to be for "beginners" are in no way for beginners, that half of the instructions out there are ones that I can only follow because I already know this stuff. Nearly every programming tutorial and lesson out there is badly designed.
Several of you mentioned things about using other operating systems, like Linux. That still doesn't hold water. If someone was really and honestly starting with programming, from a true beginner or layman perspective, do you honestly believe they will be running a Linux system?
I'd like to remind you that most of the people contributing to this conversation know how to program in assembly. You really do not represent people who are "new to programming."
You could make the argument about MacOS, yes. And that would bring the total list of operating systems people might reasonably be trying to use to a grand total of: two.
rainwarrior wrote:
The reason they do that is that the console is one of the few input/output method that's actually part of the C++ standard.
If they try to do anything GUI, it'll get platform specific, or require specific libraries and understanding how to set that up, etc. That's like 10 extra lessons all at once, maybe not desirable for a "Hello World"?
I strongly disagree with that.
If we are talking about someone who is absolutely new to programming, I would say the first thing they need to produce is something they can recognize, something that is familiar to them so that they can actually so something they have done and feel like it really had an effect. And more to the core of things, something that looks like what they want to create.
New programmers in the year 2017 don't want to create DOS applications. They want to create programs for the system they are actually using. And let's be honest, that's going to be Windows.
A far more effective "Hello World" example would be a program that just pops up a small dialogue box that says "Hello world" (and then they can close the box.) Yes, it would require adding in a little extra code that the student won't understand right away, but it would produce something that honestly feels like it has value. Right away they can say "hey, look at this thing I made!" And it is not buried in some forgotten part of the operating system they never knew existed. It isn't running inside an additional program. It is an actual windows program that just barely starts to look like the very kind of program they want to create.
And then in the next step you can go back and show them what these various parts of their program do. You can show them that they can change the size of the window by changing these numbers, you can make the window be re-sizable by doing this, and so forth.
And it is situations like that that are going to fill the beginners with amazement as they see what they created actually has an effect in the very form and world that they are familiar with, as their efforts manifest in the very world they wanted to create within.
And THAT is what has been missing from programming lessons for the last twenty years. That is why people think "I want to make video games!" and then give up and drop out of their first class. These students don't get to build anything that they feel has
meaning. They are taught how to do things they don't feel have purpose. And when right off the bat, you are trying to teach these kids to make programs that interface with a text-based console they probably didn't even know existed, then yes, you are failing in your teaching.