|
The fact is student should know some basic concepts related pointer, memory allocation/addressing, basic string functions strcpy, strcmp ... and I personally believe C++ good for it.But C# and Java also an option. Not only programming they should also learn the basic computer architecture family, RAM, ROM, CPU ...
Wonde Tadesse
|
|
|
|
|
For teaching pointer arithmetics, memory allocation, etc. - simply all the basics -, I would prefer C over C++ because of its purity and simplicity. C++ just adds too much complexity and overhead to the beginner's story.
|
|
|
|
|
For the facts I stated, C also fits. But I won't recommend it for other issues like OOP ...Don't tell me you can do OOP. Even if you could,you will end up to C++.
Wonde Tadesse
|
|
|
|
|
You can do object orientation with C, but it is more awkward than C++: article[^] (several other articles exist, some better than others, but that is the best I could quickly find).
|
|
|
|
|
I know you can. But it's not meant to be it. That's why I favor C++ than C.
Wonde Tadesse
|
|
|
|
|
I chose C/C++ for pointers and memory management (and I would add assembly as this imparts knowledge of processor function and binary arithmetic). I chose Java for OOP and JavaScript to illustrate monolithic scripting (rather than OOP) as a comparison to OOP. I did not chose C#, since although this would be a great bonus, I feel that it is still essentially proprietary. I know others may argue that it is a general standard like C++ or Java, but nevertheless it is practically proprietary (correct me if I am wrong) and I don't think proprietary technologies should be taught in schools for ethical reasons. As for University, I guess C# could be taught as an option at this level.
|
|
|
|
|
I think assembly will be too low level and it won't be appealing for newbies. But it can be thought at latter classes.
Wonde Tadesse
|
|
|
|
|
Possibly, though I learned assembly language at school and enjoyed it. However, that was in the days when it was used to program home computers like the C64, I guess kids wouldn't see the point in it these days.
|
|
|
|
|
In the older days it was pascal that was taught since it is a very well structured and easy to learn language. Colleges can still use Lazarus to work on a Windows / Mac / Linux desktop thus allowing the student to learn and use this great language.
|
|
|
|
|
Because the poll asks "should " not "shouldn't " ...
--
The trouble with people, is that they want to hear only what they want to hear.
|
|
|
|
|
|
At the risk of starting a flame war... what about "Beginner's All-purpose Symbolic Instruction Code"; aka BASIC? This is what the syntax was designed for.
After all, VB.net === C#.net with different syntax.
- great coders make code look easy
- When humans are doing things computers could be doing instead, the computers get together late at night and laugh at us. - ¿Neal Ford?
|
|
|
|
|
Not VB, but actual basic with line numbers and everything. My first program ever was on a Commodore PET and was something like this:
10 PRINT "HELLO WORLD "
20 GOTO 10 That was all it took to get me hooked. Take a simple program and expand on it.
The problem with other languages like C/C++ or C# or any other is you spend more time teaching the runtime libraries than actual coding skill. You would want to keep it simple so the student actually sees some output from their program with out having to spend a pile of time debugging ( what #include/using did I forget? What is a class? etc. ).
Within you lies the power for good - Use it!
|
|
|
|
|
I had the same experience on a TRS 80. I like the old BASIC for the very first classes, but I’d fear losing students once they grasp the fundamentals. I feel we’d need a way to go from BASIC to the web and/or mobile apps to keep general interest; and that’s quite a jump. At least with VB, mono can be used to bridge web/mobile/desktop apps while utilizing the same skillsets.
Maybe BASIC -> VB.net is a good path. They’ll learn the old-school fundamentals then ease into more modern practices. Along the way they’ll see the industry’s logical progression. Once they get a strong handle of modern concepts in VB.net they can then branch to C/C++, C#, F#, Python, Ruby, etc... more easily.
- great coders make code look easy
- When humans are doing things computers could be doing instead, the computers get together late at night and laugh at us. - ¿Neal Ford?
|
|
|
|
|
Remember Pascal? Used to be the teaching language of choice.
|
|
|
|
|
Because those who cannot JOIN tables should wait tables
|
|
|
|
|
|
The trouble with all these languages is that they're grossly unsuitable for teaching anyone anything: they all start off at an advanced level. Students should be taught Pascal first - or Algol-60 - and when they've got the hang of that (and when they can actually produce working algorithms), then teach them machine code and assembly language - so that they actually understand what's happening... and then teach them something on this list. And Forth - just because they should understand something completely different.
C# is a problem: try explaining to a beginner student why everything is a class, and what instantiation means, and so forth. C is a problem: explain to a student why they have to allocate memory for things and then dispose of it, and why a ten character string occupies eleven bytes, and what a heap is, and so on. Functional programming is a non-starter for a new programmer. JavaScript (or anything else browser-based) is a complete waste of time: it's something which is impossible to teach without first teaching the entire DOM structure and so forth: you spend more time making concessions to bugs in browsers than actually doing anything useful.
|
|
|
|
|
Well, it shows that it's not a good idea to start teaching a programming language without covering some fundamentals first. For example, to explain why everything in C# is a class, you have to tell people about object oriented programming, what it is and how it works. The same is true for all the other languages. I'm not sure if that means you have to start at the bare metal level and let them write assembler code, but it would be a good starting point to understand how a computer program works and how much of that gets hidden by higher-level languages.
|
|
|
|
|
I did it by covering various languages at the same time: Algol-60, BASIC and Assembly... this way each language made the others make sense... and of course Algol-60 makes Pascal, C, C#, Java and all these other things make sense since it's their ancestor...
|
|
|
|
|
I strongly disagree with your reasoning for why C is a problem. All the things you list are not only things programmers need to know, but things that will bite them in the behind regularly, even if they use a language that allegedly handles all of that stuff for you.
FWIW, my first programming class was Assembly, on 8080 workstations with an octal keypad and 3 sets of 8 LEDs for output. Pretty much as primitive as you can get, but it gave me a foundation from which the "problems" of C were easily grasped.
|
|
|
|
|
You're missing the point. Of course programmers need to know these things: they just don't need to know them as soon as they start learning to program. Don't you think that learning how to think as a programmer should come first, then learning how to make concessions to the machine and the language should come once you've got the basic hang of things? Why should it be necessary to learn this stuff on the first day? It discourages a lot of people from continuing.
I've programmed things like your 8080 machine, too: MK14s and stuff like that: I've written entire enterprise-level solutions in 8086 Assembly language, back in the days when nothing else was fast enough -- it's not as though I don't know what I'm talking about, or that I'm somehow ignorant of how a machine works... but psychologically, most people just don't respond well to being thrown in at the deep end of, say, memory management, when they don't even know why they're thinking about memory in the first place (yet).
|
|
|
|
|
There isn't a need to teach what is class to beginner.
What they need to know/play is:
Console.Write("May I know your name: ");
string myname = Console.ReadLine();
Console.WriteLine("Hello, " + myname);
Console.WriteLine("Welcome to C#");
Console.Read();
Sooner and later, they will know what is Class is all about.
Teach functions, and this will arise their interest very quickly.
Once they have fun in the functions, they'll start to love the language.
and then learning the "Grammar" will not as hard as if the "Grammar" is being taught first.
You can always skip teaching "Using", "Class", "Constructor" to beginner.
Learn "What is Class" later.
modified 29-Oct-14 7:09am.
|
|
|
|
|
Right, but it's a horrible way to start. You have to tell them to ignore the fact that it says "Console" all over the place, and that they're not equipped to understand it yet. Then you have to explain why ReadLine and Read have to have parentheses on them: they can't write a single line of code, but they already have to learn how to parameterize void class methods, without knowing what a class or a method are? There's no way this stuff is going to stick in their head without their understanding these things, because if they don't, it's all just arbitrary randomness.
|
|
|
|
|
Try to recall how you learn English in the first place?
Do we learn the Grammar first before we can speak English?
For example part of speech, present tense, past tense, etc... etc...?
No, we learn it by repeating how others say.
We learn the grammar later.
This is same as learning programming languages.
|
|
|
|