What Programming Language to Teach First?

Computer Science Teacher
Computer Science Teacher - Thoughts and Information from Alfred Thompson

What Programming Language to Teach First?

  • Comments 10

Have you ever been asked a question that you have been asked time and again but suddenly decided you have a different answer for? One of the questions I hear a lot is what programming language should be taught first and this question was asked of a panel I say on last week. Except for me it was an impressive panel. Don Slater of Carnegie Mellon and the Alice Project, Michael Kolling, University of Kent and creator of Greenfoot for teaching Java, and David Klappholz from Stevens Institute of Technology who got his PhD while I was still picking a major in college. So of course I asked to answer first because that was the only way I had a chance of adding value. Plus I had suddenly realized that I had a new answer – one that I had not tried out in public before. And I wanted to give it a go.

Normally of course I would have launched into a great explanation of why Visual Basic was the best and language wars would likely have erupted. But that just did not feel right. So I answered that it depended on a number of things such as the goals of  the course, the type of student but most importantly it depended on what language the teacher was most comfortable with and had the most passion for. The first programming course is hugely important. It is during this course that many students will either be turned on to computer science or turned away from it. This is the first impression and it needs to be a good one. If the teacher knows the language, is comfortable with the language, can have fun with the language and really enjoys the language the students will have a better experience. Everyone wins

I remember teaching Java for the first time. It was not a good experience for me (I was not ready for it) and I am sure it was not a good experience for many of the students. I did then a disservice. In hind sight I should not have agreed to teach the course. But I did and I tried my best but it was not ideal. Teachers easily, and without thinking about it, transfer their feelings about material to their students. Recent reports say this is true of math for example. (Study finds female teachers' fear of math can be catching) I doubt the same is any less true for computer science education. This is why we need well trained and confident computer science teachers in our schools.

There are other considerations BTW. Michael Kolling pointed out that supporting tools are very important. Greenfoot and/or Alice for Java for example. I personally think the Visual Studio IDE makes learning Visual Basic and C# much easier than they would be using a command line and text editor. Plus the drag and drop editing of graphical user interfaces make creating real looking Windows program easy and fun. There are also curriculum materials available for some of the better tools. The Greenfoot site has some for that tool. Alice.org has some for Alice. The Scratch web site has many resources as well. The Microsoft Faculty Connection has curriculum resources for VB and C#. And there is the newly revamped beginning developer learning center. Python which is a language that has a lot of proponents  (I like that it is dynamic) but not as much in the way of a support environment for teaching. Yet.

I know that a lot of curriculum is slaved to the AP CS curriculum these days but I really strongly believe that APCS is too much for a first course. Students need a gate way course that will introduce them to programming in a fun, exciting, dynamic and enthusiastic way. For that course it is best if the teacher uses a language and a platform that they love. Communicate the love not fear, the enthusiasm not the necessity of a specific language, and share passion not pain.



  • I've teached programming for some years. Back than I had the greatest success by starting with LOGO and then moving to Python. Starting with C++ or Java fared much worse.

    Cheers

    Stephan

    http://codemonkeyism.com

  • This lines up with something I had asked a cardiologist friend of mine a few years. ...I considered proctology to be incredibly unappealing line of work and assumed a lot of other people would too. S I asked my cardiologist friend how does anybody ever 'end' up in that line of work? He said that during med school one is exposed to a lot of different types of medical practices and that a lot of students are influenced by how interesting and how much fun the people in a given practice are. So, if a med student spends some time with an interesting and fun proctology group, they may find proctology more interesting as a result!

  • After having taught programming since ’83 it is fairly obvious to me that the language used is not that important.  I think the problem solving process and converting ideas into some kind of logical code is the most important part of a programming class.  For VB, C#, and C++ Visual Studio is the choke point for me.  The more I work with VS the less impressed I am with its viability as an introduction to programming instructional IDE for high school.  For a teacher who has to learn VS on the job and no formal training with the VS IDE it just has some idiosyncrasies that make it difficult to use in a high school lab.  Teaching an actual programming language syntax is not a major problem, there are lots of books out there trying to do that in 40 different languages.  With VS the overhead of VS management gets to be the issue, not the language.  It would be nice if Microsoft would come up with a “Visual Studio for Teachers” course.   A course to teach the teachers that do not have the time to learn all the idiosyncrasies of VS by trial and error would be a great help.  I have been using VS for about 8 years and there are just so many things I cannot do or have problems with because I do not have the time for the trial and error research.  Little details like the difference between Save and Save All, what the References are all about, how to save to a network drive in a school setting (that trust thing is killing me) and so on.  All those classroom/IDE management issues that are not in the programming language text.  I presently teach my Programming I with Small Basic because there is no IDE overhead.  The other Programming I teacher dives directly into VB.  My kids program, his kids build forms and struggle with program management.  In Programming II (a VB class) his kids are way ahead as far as VS management and making buttons on a form do something.  My kids can write a program that, with a little tweaking, will work in several languages.  We still discuss what is more important.  I would love to have the kids familiar with a commercially used IDE like VS but when I use it I simply do not get as much programming done.

  • I think we are thinking to much about the solution without thinking about the problem.

    I suggest to ask first: what would be the best motivation to learn programming? How can we show kids that programming is cool?

    I think one good answer would be "something they can relate to and enjoy". Therefore I'd suggest a language they can use to do "cool" stuff or that somehow relates to their world.

    The most obvious example would be Lua for World of Warcraft players.

    An even better example would be NXC-Not eXactly C, a C-like language for the Lego Mindstorms kit. It is simple, powerfull and with a "cool" factor several orders of magnitude than any desktop & web based thing.

  • This is a very interesting question i have thought allot about how early you can start to teach kids programing and in what language, I think that this is fundamentally important as we move into a world controlled by computers and is made up off object that can be programed.

  • Diego has it right.  I used RobotC, another simple language based on C for the Lego Robots, with great success.  If the language was free I would use it exclusively.  Writing a program and actually seeing the robot execute it was a huge attractor for the "average" students.

  • Personally I think everyone should start with a visual programming language like MaxMSP, so as to understand the flow of data, objects and functions, then start using Processing, so as to have a visual (sexy) output of the things they are programming and then everything else.

  • I got into programming through the web. The place where all programming meets, HTML. Learning HTML first lets you learn the idea of good conventions, structure, and you can see the results instantly. It also helps students with little familiarity with computers, the web and other tech-oriented things be familiar with those things.

    As for my first real language, well, BASIC, but I think Visual Basic.net was my first true language was a good introduction, but never a place to stay.

  • I agree that HTML is the place to begin.  I am teaching High School CS for the first time, and HTML is great for my students.  We spend a week or two on it, and then branch into JavaScript for fundamental programming concepts(Math class, String class, loops, arrays, forms) and CSS for formatting.  Now (January) we are doing MySQL, and soon we will do PhP and a little more JavaScript.  Students use the web in real life all of the time, they can use what they are learning to communicate or get a job, and they are getting a great broad base that will be a fabulous foundation if they decide to study computer science in college.  They will also be prepared if they want to take AP/Java from me next year.  HTML and JavaScript and CSS are all cross platform languages.  They are fairly stable(CSS is evolving the fastest, but not ridiculously fast).  I actually think that there is great value in learning a text-editor based language(as opposed to something like Alice or Gamemaker or Scratch) and learning how to compose syntax and work with semicolons and parentheses and curly braces.  I find it a little bit painful to teach round 1, but rewarding in the long run.  

  • Interesting to read everyone's comments.

    Though I am a systems developer by profession, I have been quite involved in the past teaching programming at the 3rd - 6th grade level, as well as teaching TBI (traumatic  brain injury) patients as a means of vocational retraining. I found Basic a good starter program.

    However, my passion lies in systems programming and I feel that some basic computer architecture and fundamentals is really important to diffuse the smoke and mirrors.

    Unless someone explains the link between the source and the executable, I don't think its very exciting. It's when you realize that you can manipulate the hardware with the software that sparks are created.  

    I mean Hello World just doesn't cut it - I love the idea of the Lego C Language.

Page 1 of 1 (10 items)