|
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.
|
|
|
|
|
|
I agree with you. Typically, you want to present primitive types, keyword, conditional and looping statements early. At that point everything can be written inside main function.
Afterward, you might present some existing and useful classes like list, string then present function, classes and then OOP.
You cannot learn everything at once and it is perfectly valid to use Console.WriteLine as a black box at that point...
Philippe Mori
|
|
|
|
|
Totally agree with you
|
|
|
|
|
Machine Code for all!!!
Then they'll value whatever language you let them dev with (even COBOL!)
--
The trouble with people, is that they want to hear only what they want to hear.
|
|
|
|
|
I chose multiple but wish I could have ranked them.
1 - javascript
2 - Java
3 - C#
4 - C/C++
unfortunate to see my first love (c/c++) fall to the bottom but even I find fewer reasons to use over others. javascript is fist only because it is something that requires the least setup and gives kids instant gratification.
|
|
|
|
|
I agree with some of the other posters, any specific language is just a tool, and tools change over time. What is critical for a programmer is the ability to take a problem and translate it into working code.
Given that most of the world uses some form of procedural language (operative word "most"), I would opt for one of the "C" variants, or JAVA as a starting point. Once the basics of programming have been instilled, then there needs to be classes on data structures, algorithms, computer hardware elements for those students with a deeper interest.
Using computers is now a requirement for many, many jobs, so having some understanding of what makes them work has to make using them a little easier. However, few of the jobs using computers require programming skills, so forcing high schoolers too deeply into them is not needed. It would be much more useful to teach them basic financial concepts that will aid them no matter what job they end up with.
Dave Legg
|
|
|
|
|
Thus Pascal. It's simply the best language for teaching. You can mutate it into Delphi after a while, then look at the .Net side of it, and then sidestep into C#. Java is a waste of time: C# is what Java should've been.
|
|
|
|
|
Pascal is an option, it's not a language I really have any experience with.
I would not discount Java so quickly though. It has the advantage of being easily obtainable and widely used. The latter makes it easier to obtain assistance which can be critical when starting out.
It is the second most popular languange next to C according to one site http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html[^]
C# is really a Windows based product, so if that is the environment you have, it's fine.
As an intro to programming, most any procedural language would be quite adequate.
I think the thing to remember in all this is we are talking about "new" programmers. The finer points of memory allocation, heap usage, etc. are meaningless when you are talking about simple "hello world", "bubble sort" and such programs. What is important is that they can make something happen quickly and simply and don't get bogged down in details that are not essential to the problem they are trying to solve. Once the basics of programming have been taught, it's time to concentrate on data structures, algorithms, etc. Having them use a different language actually (IMO) helps to separate the logic of the solution from the details of the language.
As with any profession, you have to start with the basics and build up to the current state of the art. In my opinion, being a good programmer has little to do with what languages you know, it's about solving problems to the best of your ability using the tools available.
|
|
|
|
|