Do We Need A New Teaching Programming Language

I saw some discussions lately about the need or lack of need for new programming languages. In once case especially for teaching programming. In general I think that new programming languages are a good idea. From time to time it is good to start fresh and incorporate the latest ideas in a language that was designed from the ground up. C# is one example. Java is as well. Although personally I think C# is better having been able to learn from the mistakes made in Java. F# is still another example. But none of these were designed for teaching programming. The last big success in that area was PASCAL.

PASCAL was widely adopted for education and in fact was the first programming language of the APCS exams. It fell out of favor largely because object oriented programming became the standard programming paradigm in education. Before PASCAL we had BASIC which was designed as a language for beginners to use to learn programming. BASIC had its critics but there were sure a lot of people whose first learning about programming came from the BASIC that came with  their personal computer.

Today first programming languages are all over the map. There is Kodu for the very young. Alice and Scratch for middle school (and up) and at the high school level we see Java (largely because of the AP exam), Visual Basic (and other versions of BASIC such as Small Basic), C++ (yes still and seeing a resurgence of sorts), C# (especially with the ability to create games with XNA) and Objective C (for some robotics and iPhone applications). Python seems to be picking up steam of late. And yes, in some areas, Scheme, which is a functional language, is being used. DrScheme is in fact designed for teaching as are Alice, Small Basic, and Scratch. So it is not as if languages designed for teaching don’t exist. But are they the right ones? That’s a question to start a debate.

Speaking of debates, just about any time someone asks about what the first language for teaching should be someone will suggest Assembly language. Now that works for some people. Bill Gates started with Assembly language for example. Worked for him. I’m not so sure it works for everyone or even for more than a few people. Eventually people are better off if they learn it but it is not a great first language.

SO what should a teaching language be like? I would suggest that a simple syntax with limited keywords would be a good start. Should it be an object oriented language that lets users create objects? I’m not so sure we need that right away. Use objects – Yes! Create objects? I’m on the fence. The objects first crowd would howl about that but I am not convinced that we need objects first. See mark Guzdial’s There is no “First” in CS1 What I want in a first teaching language is simplicity and creating classes is all too often not simple enough.

Strong typing or weak? Early or late binding? Does it really matter? Think simple. And always remember that you can’t teach all of programming let alone all of computer science in the first course.

I really like the graphical programming in Alice and Scratch. My biggest issue with them both is that dealing with variables is not easy enough. It’s not hard but it is also not obvious enough. Also input is too limited for my way of thinking. On the other hand Small Basic has much of what I like but has more syntax to mess with people. Syntax aside Small Basic has one other thing going for it that I really like – the graduate button. Small Basic has a simple and smooth transition path to Visual Basic which is a full featured Object Oriented language with professional strength IDE and everything. Alice looks like it will have a path to Java but it is still “coming” and when you get there it is still Java. I’d be happier it if took one to VB or C#. Either way a good teaching language should have a smooth path up the latter to professional tools.

Do we need a new language? Some are saying that Python is it. I’m not so sure.It may already be too complicated. Small Basic, in my opinion, is great in that it allows us to start younger and has a path upwards. Something with the drag and drop style of Scratch and the Windows Forms features of Visual Basic and C# would be really cool. Especially if there were a “graduate button” to a next level language. What do you think?

Comments (11)

  1. Sandy Klausner says:

    Frankly, we need to move beyond programming languages.  None of the dozens of popular languages have done much to raise developer productivity, increase security, increase reuse and provide agility across billions of networked devices.  The software industry is too grounded in its past based on incremental improvements.  Really, not that much difference from C to Java to Python.  Graphical programming holds out promise, but Alice and Scratch has just touched the potential of moving into the visual realm for general systems expression and representation. Yes, any leap frog probably means retiring the current programmer population and empowering domain experts to develop their own software applications and apps.

  2. Rob Miles says:

    I tell my students that there are four things you need to be able to tell a computer to do:

    Process data (assignment)

    Make decisions (if)

    Loop (do – while, for)

    Use indexed storage (arrays)

    If you can do these four things you can write every program that has ever existed. Sure, the code won't be pretty, but it will solve the problem. In my course we focus on algorithms at the start because this is where we actually create behaviours that solve problems.

    Once you can make algorithms everything (and I mean everything) else in Computer Science is about using this raw problem solving ability in the most useful way. This spreads out into things like modelling to get the spec, objects to organise and structure the solution and testing to make sure it works. Higher levels of abstraction are great, but I think you still need that algorithmic focus to get going. If you can't do that bit everything else is built on sand because you don't understand what the computer really does.  Empowering domain experts sounds great, but I don't think we will get to that level in my professional lifetime.

    Starting with assembler looks quite sensible at this point, because it really brings into focus what computers actually do and how stupid they really are. I teach in C# because I want the students to be able to achieve things they perceive as useful quite early on in the learning process, which would be hard to do in assembler. If I had more time I would look at doing something assember based.

    I don't really think we need a new programming language (although inventing them is fun I suppose). I've got a kind of downer on "teaching" languages really as I don't think that languages like C# or VB are that hard to teach as long as you root the work in a strong problem solving context.

    I'd much rather put the precious teaching time that we have into giving skills that will be properly useful, rather than using any kind of intermediate language that doesn't really go anywhere. As a tool for engaging people with programming I think things like Alice and Kodu are great, but I like to think that when the students get to our level they should be taught with professional level tools. In a school setting I suppose I might think differently perhaps.

  3. Garth says:

    Rob has it right even if he does say it with a funny accent.  Would having another language improve our ability to teach programming?  Right now I think CS/Programming at the elementary and high school level is in such disastrous condition that another language would not improve anything.  By disastrous I am referring to low high school CS enrolments (which obviously trickles up to the university level), low qualified teacher numbers, non-existent teacher education programs, lack of interest by elementary and high school administrations to introduce a CS requirement and so on for a long list of problems.  Introducing another language implies that there are teachers out there with the time to learn another language, write a curriculum based around that language and figure a way of getting kids into the classroom to learn a new language.  Unless a whole new programming paradigm is introduced we seem to have all the language needs covered. I claim a good VB teacher can teach programming concepts as well as a good Python teacher.  The language can make things easier at times but I think the quality and experience of the teacher is the most important factor.  

    All right, so maybe Rob’s accent is not so funny but I am watching his Win 7 Phone Jump Start series of videos at the moment and he really does need to work on his jokes.

  4. Sandy Klausner says:

    I AM speaking of a whole new programming paradigm and only relate it to graphical programming languages to provide a grounding.  Rob, you assumed that moving into the 'graphical' realm means losing touch with bit and pointer direct manipulation.  I am speaking of an executable design language that spans from machine code up to transactional memory for effectively dealing with the complexity of parallel programming in emerging manycore processors.  Sorry, but none of the extensions on programming languages performed by researchers over the last four years have slain this complexity beast. The right level of automation would provide a tremendous teaching medium to overcome the acute shortage of properly trained developers who can collaborate in an ever increasing systems world.

  5. gasstationwithoutpumps says:

    I've taught a little programming to kids (in after school and summer

    classes), not as part of a regular curriculum. I've blogged before about my current choices for teaching to complete novices:…/computer-languages-for-kids

    I think Scratch is an excellent first programming language, especially

    now that BYOB exists as the next step up.

    After that I would switch to Python, if the kids were interested in

    processing text or numeric data.  I'd choose NQC or Robot C or some

    other C variant if the kids were interested in programming robots.  Most of the computer-scientist-favored languages are terrible for real-time programming using microcontrollers, which is why computer engineers usually favor starting with C and (sometimes) assembly language.

    Python provides a nice intro to polymorphism and object typing, though I find debugging Python a bit difficult sometimes, as the scope of names is often a bit weird (the same line of code may refer to a global variable on the first time through a loop and a local variable on the second time through).  The lack of simple compile-time checks available in other languages means that testing needs to be much more extensive.

    Java would be a distant third, only for meeting AP test requirements.

    Scheme is interesting for CS majors, but I think it is a poor teaching

    language. I remain convinced that iteration and assignment are more fundamental operations than recursion and function calling (though the semantics are not nearly as elegant mathematically). My son's first official programming course used Dr. Scheme, and it was good for him, but it was his 4th or 5th programming language (maybe more, depending how you count minor variants).

  6. Owen Mathews says:

    I disagree with Rob and gasstationwithoutpumps about exclusion of an abstraction mechanism. Without the concept of code reuse and variable scope, it's really difficult to develop algorithms that go beyond the basics. Part of learning computer science is gaining an understanding of generalization and partition of a problem. A fundamental part of designing a solution to a problem is breaking the problem down into sub-problems to solve. Without some sort of way to create layers of abstraction, your ability to solve complex (or you might even say interesting) problems is severely limited. I personally want my students to understand these concepts as soon as possible, right alongside iteration, decision, indexed storage and variable assignment/arithmetic. (This is one reason why I consider Scratch an excellent teaching tool in most respects, but do not think it can address the full spectrum of fundamental programming skills unless you use BYOB.)

    Look at it another way. The four operations that Rob listed coincide pretty neatly with basic functions of a microprocessor (and hence assembly language). Data processing is basically arithmetic and register operations. Decisions and looping are handled by branching and logic instructions. Indexed storage is done with the load/store unit. However, there is another concept built into all CPUs: subroutines and the stack. It’s there for a reason–because it’s just as fundamental as all the other operations.

    Of course, if we really wanted to get down to basics, we really ought to be programming a Universal Turing Machine. We don’t, outside of some specialized and limited contexts, because while everything computable can be reduced to a Turing Machine, it’s not an easy model to work in. Everything beyond that is abstraction, but obviously helpful. To some degree it’s arbitrary where we draw our own line that denotes essentials, but since some very smart people drew a clear line decades ago, in hardware, that seems like a sensible place to agree on.

  7. technogeist says:

    I agree with sandy klausner, the past 50 years have not solved much in in the way of productivity or maintainability issues.

    We need to increase the abstraction to another level, and target language X which is then compiled to either bytecode/p-code or CPU X.

    ie. a database-driven meta-language that doesn't attempt to appease programmers of any particular language, esp. C++,  which has done more harm than god for creating maintenance and portability problems.

    Donald Knuth would probably be the right person to ask.

  8. technogeist says:

    sorry about the typo :O

    should have read:

    esp. C++, which has done more harm than good…

  9. Chris Boss says:

    Basic is IMO probably the best learning programming language there is. It has stood the test of time and even though many have tried to eliminate it, considering it obsolete, it just keeps going on, albeit in different flavors.

    I think programming should be taught using a console (text based) compiler, such as Powerbasics Console compiler. Its too easy today to drag and drop visually and to think one is a programmer, so sadly many so called programmers don't know how to write decent code or to debug their code. Programming is closely linked to mathematics, so one should learn how to solve a variety of non-visual tasks first which requires a good understanding of code logic, calculations, data storage, etc.

    Machine language should be taught at its basic levels as well, so students can appreciate the relationship between machine code and higher level compiled code. Just understanding things like bits and bytes helps.

    Coding is becoming a lost art, since programming tools have become very high level. Students should learn to be able to write large amounts of code quicky as if it was second nature, rather than simply drag and drop stuff and think they are a programmer.

    I am not crazy about OOP either, even though is has its place. Procedural style coding is much easier to learn IMO and requires less abstract concepts. Machine language is not object based, it is procedural based, so learning procedural based coding helps one appreciate better what the CPU is actually doing. This is why Basic (non-OOP based) is such a good learning language. Commands like SUB, FUNCTION, GOTO, GOSUB, IF THEN, DO LOOP are so close to how machine language actually works, that it provides a better appreciation for how a computer really works. How silly it was for so called "better" programming languages to try to eliminate such simple things like GOTO and GOSUB. If its good enough for machine language, its good enough for a high level language.

    Newer versions of Basic, like PowerBasic for Windows, provide many of the more powerful constructs which are useful to learn later. Things like pointers are very powerful.

    Now before anyone gets on their horse and says that Basic is obsolete and old fashioned and that I don't know much about programming, I should tell you that my business produces a commercial GUI engine for Windows (for use with Powerbasic compiler) which I sell to programmers and it was written in Basic (actually Powerbasic). In essence, I write software tools for programmers. My job is to solve programmers problems and to make programming faster and more productive. My software is currently in its 5th generation (in development) and using Basic I can write a library which can handle things like drag and drop visual design. ownerdraw customization of controls, 2D Sprite engine, Threading and subclassing, Graphics engine, etc. My latest project has been the addition of a real OpenGL based 3D scene control in my GUI engine. So I have a valid reason to take issue with the idea that Basic is obsolete.

    Microsofts freeware Small basic is a good idea, but once again in the effort to make programming easier to learn, I think it may actually discourage students from learning how to write real code. I have read articles over the years which say that supposely the average programmer writes on a few lines of code per hour (can't remember that exact amount) and it surprises me. I learned programming (started with basic) in such a way that I "think" in code, so on a good day I can write 50 or 100 lines of code an hour. Of course at times I have do a lot of research which means no coding at all, but when I sit down to a coding session, the code just flows. Thats the way students should learn how to program. They should learn to "think" in code so the code just flows.

  10. James Thornton says:

    We do need a new language for teaching the next generation

    of programmers about concurrency, and Google's Go would be an

    excellent choice.

    With more and more computers having multiple cores, the emerging

    programming challenge is going to be how to make use of those

    cores.  Unfortunately the mainstream languages used today weren't

    designed with multicore in mind so it's hard to write programs that

    can take advantage of multiple cores.

    The aspect of a language that enables you to do use multiple cores

    is called the "concurrency model." A language that makes it easy to

    write programs to efficiently use all the cores in a system is said to

    have a good concurrency model.

    Scala and Clojure are new languages with good concurrency models.

    Erlang is another. But, I don't see these languages becoming

    mainstream — Erlang's syntax is too different and it isn't really a

    general-purpose language, Clojure is a Lisp, and many think Scala

    is too complicated.

    However, Google's new programming language called "Go" has

    been designed for concurrency, it has familiar syntax (similar to C

    and Java), and it is simple enough for most to be comfortable using.

    You can read more about Go at .

  11. Garth says:

    I just love these language threads.  Lots of truly qualified expert programmers (no sarcasm intended) contribute good ideas.  But they never seem to see it from the “teacher in the trenches” side – who is going to teach the teachers these great new languages?    Universities are not too interested in teaching programming in teacher education programs.  Industry (usually Microsoft) can only do so much and is usually very limited in number of courses they are willing to offer.   After all, teacher education is not a real money maker in the short run and is only a gamble for the long run.   I am sure many out there have taught themselves a new language.  How long did it take to become proficient to the point you could explain it to someone else? Is the effort required by the teacher to reach the level of proficiency to teach a new language really justified?  As a wild, unproven guess I think teachers teach the language they do not because it is the “best” language, but because it is the language they know and feel the most comfortable with.  Languages teachers have the time to learn on their own have to have a very flat learning curve, i.e. Scratch, Kodu, Small Basic; and even they have levels of difficulty that require large amounts of time.  The typical teacher teaching 6 or 7 classes simply does not have time to become proficient at all the levels of complexity.  Learning the language is usually only the first step.  The teacher usually has to author their own lesson plans, dream up projects, and integrate the new language into a school curriculum, all of which can crimp into snowboarding or mountain biking time.  In my very humble opinion the “best” programming teaching language is

    1.  one the teacher is comfortable with,

    2.  one that has resources available to make the teachers life a little easier,

    3.  has other teachers using it and communicating about it (teaching in a vacuum royally sucks)

    4.  and did not take a couple of years in industry to learn.


Skip to main content