What programming language to teach first(blogs.msdn.com)
blogs.msdn.com
What programming language to teach first
http://blogs.msdn.com/alfredth/archive/2010/02/03/what-programming-language-to-teach-first.aspx
21 comments
At the risk of being laughed at, VB is what rekindled my interest in programming. I played quite a bit with BASIC and logo on my Apple IIc as kid, but never really did any serious programming.
Then after high school while working my first job, I happened to pick up a book on VB(4 I think) at the local library that came with a demo version. I was blown away by how quickly and simply I could create complete apps. Over that weekend I wrote an app that solved a real problem at work and that was installed and used by the people working there. After seeing that I could use programming to quickly simplify real world problems I got into programming again. I moved from VB onto other languages and haven't touched VB since then. But if I had been sat down with a C++ compiler instead of VB I probably never would have gotten into programming.
Right, my point. Don't focus on language, focus on problem solving. Show someone how programming can quickly solve an actual problem they are having. First find a problem that appeals to your audience, then pick the language the best solves that problem, and teach them that (even if it is VB). If after that they are interested they'll go on to learn as much as they can, if they're not then there probably isn't much you can do and no programming language can change that
Then after high school while working my first job, I happened to pick up a book on VB(4 I think) at the local library that came with a demo version. I was blown away by how quickly and simply I could create complete apps. Over that weekend I wrote an app that solved a real problem at work and that was installed and used by the people working there. After seeing that I could use programming to quickly simplify real world problems I got into programming again. I moved from VB onto other languages and haven't touched VB since then. But if I had been sat down with a C++ compiler instead of VB I probably never would have gotten into programming.
Right, my point. Don't focus on language, focus on problem solving. Show someone how programming can quickly solve an actual problem they are having. First find a problem that appeals to your audience, then pick the language the best solves that problem, and teach them that (even if it is VB). If after that they are interested they'll go on to learn as much as they can, if they're not then there probably isn't much you can do and no programming language can change that
> For the love of god not VB.
By "Visual Basic" I suspect he means VB.net. Do you have problems with VB.net or with VB 6 and prior versions?
By "Visual Basic" I suspect he means VB.net. Do you have problems with VB.net or with VB 6 and prior versions?
I think without qualification the question is silly. Are you teaching Grad School students? Middle school students? Who?
I taught my younger cousin very basic programming via StarLogo. He still needed help, but he learned.
I just started teaching my girlfriend a bit of ruby via irb. REPL is a great learning tool.
As far as teaching CS majors, I have no idea.
I taught my younger cousin very basic programming via StarLogo. He still needed help, but he learned.
I just started teaching my girlfriend a bit of ruby via irb. REPL is a great learning tool.
As far as teaching CS majors, I have no idea.
If I were teaching high school students I'd probably start with HTML and Javascript.
I think Javascript is a great intro language, you can start really simple (alert("hello!")) and dive deeper into some pretty complex programming without leaving Firefox/Firebug. Plus webapps are very accessible for High School students.
For CS students its really hard. Dynamic languages are nice because it simplifies much of the work you deal with in Java and C. But eventually you'll need to know what static typing is and how to allocate memory. I like starting simply and building on that base as opposed to diving in the deep end.
My college's first programming language was C++. Spent the first few weeks understanding bits and bytes and core programming concepts w/o even writing much code. It seemed overly complex for an intro, but maybe it was poor instruction.
I think Javascript is a great intro language, you can start really simple (alert("hello!")) and dive deeper into some pretty complex programming without leaving Firefox/Firebug. Plus webapps are very accessible for High School students.
For CS students its really hard. Dynamic languages are nice because it simplifies much of the work you deal with in Java and C. But eventually you'll need to know what static typing is and how to allocate memory. I like starting simply and building on that base as opposed to diving in the deep end.
My college's first programming language was C++. Spent the first few weeks understanding bits and bytes and core programming concepts w/o even writing much code. It seemed overly complex for an intro, but maybe it was poor instruction.
Teaching static typing with dynamic languages is possible. just use something like Cython to annotate python code with types.
His answers are pretty biased, Visual Basic (really?), C#, Visual Studio. Not that any of those things are bad (except I personally find VB pretty disgusting), but can they really compare to the simplicity, immediacy, and interactivity of Ruby and irb? Just as one example. Of course, as chasingsparks points out, the question on its own is pretty worthless without context. I think what language to use for CS 101 would be a pretty interesting debate.
"simplicity, immediacy, and interactivity": yes, absolutely. I used to learn with VB code, many years ago. Dragging a button onto the form, double-clicking it, and entering
MsgBox "Hello!"
Command1.Caption = "Hello!!!"
And then clicking Go, and trying it out right there -- that's real programming, it's got the properties you asked for, and it's much more discoverable than a command-line shell.It does boil down to context though. Who are you teaching? Someone who doesn't know computers at all? (Why are they learning to program then? Well, it happens). IMO a very simple command line interface where the only thing that is happening is directly what the student is doing can be helpful. The VB IDE has a ton of stuff going on, it can be intimidating. Just depends on the student.
Most important takeaway, obvious if you think about it: if the teacher is not comfortable (fluent, etc.) with the language, it's not going to go well.
From a learner perspective I can't think of any better first language than NXC-Not eXactly C, a C-like language for the Lego Mindstorms platform.
It is simple, powerfull and has a cool factor several orders of magnitude bigger than any web & desktop based thingie.
It is on Lego Mindstorms! What other programming language allows you to build a robot to chase the cat?
It is simple, powerfull and has a cool factor several orders of magnitude bigger than any web & desktop based thingie.
It is on Lego Mindstorms! What other programming language allows you to build a robot to chase the cat?
Chris Okasaki once conducted some observations of beginning CS students (I'm not sure if it's rigorous enough to be called research). His conclusion was that significant whitespace is a huge determiner of comprehensibility to beginning students.
That would suggest Python as pretty much the only contender for first language.
That would suggest Python as pretty much the only contender for first language.
By that criteria you should consider COBOL as well.
The first language I was taught at school was Pascal, and thinking back, it's probably a decent choice. The school board I was in used only macs, so VB is straight out, and C/C++ is far too complex to teach at a grade 10 level.
Basic is nice, but it lacks the explicit structure that Pascal, C/C++, and other high-level languages enforce.
I'm thinking Pascal is a good choice because it's explicit enough in its constructs to force the programmer to realize what they're doing, but not so fine-grained that you need to start thinking about memory management, pointers, and other more advanced constructs.
The skills are then easily transferable to other similar languages like C/C++, Java, C#, etc.
Basic is nice, but it lacks the explicit structure that Pascal, C/C++, and other high-level languages enforce.
I'm thinking Pascal is a good choice because it's explicit enough in its constructs to force the programmer to realize what they're doing, but not so fine-grained that you need to start thinking about memory management, pointers, and other more advanced constructs.
The skills are then easily transferable to other similar languages like C/C++, Java, C#, etc.
BASIC on an 8-bit computer?
I would go with something interactive that would make seamless switches between writing a program and running it.
Even REPLs like Python's and Ruby's seem overkill.
A dialect of Lisp would also seem appropriate.
I would go with something interactive that would make seamless switches between writing a program and running it.
Even REPLs like Python's and Ruby's seem overkill.
A dialect of Lisp would also seem appropriate.
Well yeah the opinions are biased. Teacher bias is a clear factor in success. That's the point. The second point is exactly that qualification is needed. What age group or goals do you have. hga seems to understand.
I think so; ideally you (the teacher) would know a fair number of languages well so that you could match one of those with the student(s) and goals.
CS: Scheme and SICP or a less intense book.
WWW: Javascript (well, after I brushed up). mikeryan has the right idea here, and it probably would be a great match for a bunch of high school and even younger students.
Prior to Javascript and DHTML VB might have been a good choice for the same reason (I'm assuming the edit-compile-run cycle was fast). VB prior to VB.NET wasn't that ugly.
CS: Scheme and SICP or a less intense book.
WWW: Javascript (well, after I brushed up). mikeryan has the right idea here, and it probably would be a great match for a bunch of high school and even younger students.
Prior to Javascript and DHTML VB might have been a good choice for the same reason (I'm assuming the edit-compile-run cycle was fast). VB prior to VB.NET wasn't that ugly.
Not sure what he means about python not having an educational infrastructure yet? I hear about universities teaching python all the time, sounds like it has a solid infrastructure already.
Perl followed by C
When I started I learned c++. I would say this is a pretty good starting language since its very easy to transfer to c#, java, php, ect because of the similarities. But it also let the professors explain garbage collection, pointers ect. However c++ had so many annoying moments because the compiler messages were so cryptic which are really bad when starting out.
So that makes me believe that c# would be a better choice because of what visual studio can offer. It would allow the students to run through their programs 1 line at a time, see exactly whats going on as well as give much better error messages.