Why we should explore more than one programming language across the curriculum

April 8, 2019 at 7:00 am 21 comments

Ben duBoulay and I wrote the history chapter for the new Cambridge University Press Handbook of Computing Education Research (mentioned here).  A common theme has been the search for the “best language” to learn programming.  We see that from the 1960’s on up.

One of the criteria for “best language” is one that could be used across the curriculum, in different classes and for different problems.  I was reminded of that when we recently ran a participatory design session with social science teachers.  We heard the message that they want the same language to use in history, English, mathematics, and science. The closest we ever got was Logo.

But now, I’m not sure that that’s the right goal, for two reasons:

  1. We have no evidence currently that language-specific programming knowledge will transfer, nor how to achieve it.  If you use one language to learn algebra (e.g., Bootstrap Algebra), do students use or even reference the language when they get to (say) science class?  Maybe we could design a language with algebra-specific representations and biology-specific representations and history-specific representations and so on, but it might make the language unnecessarily complex and abstract to make it cover a range of domain constructs.  My bet is that the fundamental computational ideas do transfer.  If you learn that the order of language elements matters and the specificity of those language elements matter (two early learning goals as described in the learning trajectories work), I’ll bet that you’ll use those later. Those aren’t about the programming language. Those are about programming and the nature of programs.
  2. School is so much more diverse and heterogeneous than adult life. I’ll bet that most of you reading took physics and biology at some point in our lives.  I don’t know about you, but I rarely use F=ma or the difference between mitosis and meiosis in daily life.  On a daily basis, we tend to solve problems within a small range of domains. But our students do take science and math and history and English all in the same day.  In adult life, there are different programming languages for different kinds of problems and different domains (as Philip Guo has been talking about in his talks recently). Why shouldn’t that be true for K-12, too?

The key is to make the languages simple enough that there’s little overhead in learning them. As one of the teachers in our study put it, “one step up from Excel.” Scratch fits that goal in terms of usability, but I don’t think it’s a one-size-fits-all solution to computing across the curriculum.  It doesn’t meet the needs of all tasks and domains in the school curriculum. Rather, we should explore some multi-lingual solutions, with some task-specific programming languages, and think hard about creating transfer between them.

The single language solution makes sense if the language is hard to learn. You don’t want to pay that effort more than once. But if the language fits the domain and task, learning time can be minimal — and if well-designed, the part that you have to learn transfers to other languages.


Entry filed under: Uncategorized. Tags: , , .

Opportunities to explore research questions with Code.org: Guest post from Baker Franke European Best Practices in Education Award: Focus on Inclusive Education

21 Comments Add your own

  • 1. Tom Morley  |  April 8, 2019 at 7:45 am

    “make the languages simple enough that there’s little overhead in learning them”. But if they are really simple, how can they be really powerful across the curriculum? Mathematica has really really simple syntax, but complicated subtle semantics. Students often report to me that they don’t understand the syntax, but in fact they do. function_name[arg1, …., argn] — that’s about all… some infix like + some postfix like /. … but talking to the students, they don’t really understand the semantics and evaluation subtleties of any algebraic manipulation system. (Subtle bound variable issues explored classically by Church in his lambda calculus. These issues, I believe, will transfer across languages, say from LISP to Mathematica). So any real algebra language is either going to be extremely limited or quite subtle.

    If a language is built be “easy” for many domains, it must have an enormous built in library accessed by a huge vocabulary of functions/proceedures/what have you.

    • 2. Mark Guzdial  |  April 8, 2019 at 7:46 am

      I’m not proposing one language across the curriculum. Different languages in different parts of the curriculum, each simple and designed for the domain.

      • 3. Tom Morley  |  April 8, 2019 at 8:44 am

        It will happen this way, because there is no effective way (except for money, which costs a lot) to get departments to talk to each other.

  • 4. Austin Cory Bart (@AustinCorgiBart)  |  April 8, 2019 at 8:07 am

    Is this for K-12? Or do you think it holds true for undergrad?

    • 5. Mark Guzdial  |  April 8, 2019 at 8:27 am

      Isn’t it already true in undergrad? I find that engineers, economists, mathematicians, and computer scientists tend to use different programming languages (e.g., MATLAB, R, Mathematica/Maple, and C++/Java/Python).

      • 6. gasstationwithoutpumps  |  April 8, 2019 at 12:51 pm

        Students tend to use whatever language their professor requires—whether it is the student’s first choice or not. Professors may pick a language for its utility in the field, but more often they go with whatever language they are most comfortable with, whether it is appropriate for the task or not.

  • 7. alfredtwo  |  April 8, 2019 at 9:50 am

    I recently started looking at what high schools in my area were offering for computer science. I was surprised by the number of courses but even more so by the number of different programming languages were being used within schools. Java for APCS A of course but APCS P in the same schools use different languages. And different again for game development or mobile applications development. Schools are choosing and using task-specific languages already.

    • 8. Mark Guzdial  |  April 8, 2019 at 8:54 pm

      Side note: Barb has been updating her AP CS A and AP CSP stats based on audit data. In some states (e.g., Georgia and Massachusetts), AP CS A outnumbers AP CSP. In other states, it’s the reverse — Alabama has four times as many CSP classes as CS A classes.

  • 9. alanone1  |  April 8, 2019 at 10:08 am

    I think there might be too many goals of different types here.

    From the standpoint of “learning to program”, it’s always been a good idea to learn (say) three different kinds of languages to both get a picture of different styles of programming and languages, and also to prevent as much as possible “imprinting” on a single style.

    At some point — pretty darn soon — “programming” is really about “design”, and this is quite a different ball game (that is being lost by most learners).

    From the standpoint of “easy to learn”, a simple imperative style that mimics (and even uses) the kinds of changes, edits, and conventions one learns in standard user interfaces, is very natural and quick. The bug is that this doesn’t scale at all well either in size or in design.

    From the standpoint of “use in a field” — like physics or biology or engineering or music or sociology — none of most good results from the above might be good here.

    It’s worth looking at the uneasy and difficult relationships between “the maths” and “the sciences” in high school and university learning. There are many different branches of mathematics, some of them fit to various sciences in various ways, and it requires a lot of work to get actually fluent in any of the maths if you are a science major; this is especially proportional to the distance of your field from physics.

    I think we can get something else here from “real math learning”, and this is that “maths” does have deep kernel ideas and heuristics that are extremely similar from branch to branch — there is a lot of transfer of the deep stuff within maths themselves.

    Similarly, in computing, much of the transfer when it occurs is at the dynamic systems level: complex systems that work (and change) well have much in common with each other. This suggests — and it has been suggested many times over the years — that programming of any kind should be taught as systems design, and the language(s) that are taught should be good language in which to make systems (this leaves out most of the current ones).

    The second idea that is still a good one — but does require some design and a more advance approach — is to think about making extensions from a common small kernel. The extensions have to include those of form, not just of meaning. A really important key is that the kernel has to be understandable enough so it can be a very good definitional language for the extensions as well. Needless to say, this is not the ad hoc “virtually un-designed” way that things have transpired over the decades, but it would still be a much better approach than what is generally the case today.

    • 10. Mark Guzdial  |  April 8, 2019 at 9:08 pm

      Hi Alan,

      I am absolutely mixing too many goals here. I’ve written a series of blog posts on this theme as I’ve been exploring these ideas and trying to tease out these different goals. We just gathered our first empirical data in this space (an enlightening participatory design session last month) and are now working with collaborators who are researchers in Mathematics, Statistics, and Social Studies Education. And I’m heads-down on my first NSF proposals to fund this new effort.

      As always, I appreciate your insights. Right now, I don’t have a “learning to program” goal. Rather, I want to think about laying a foundation for later learning to program in a serious way.

      Do you remember the Big Trak? I remember Seymour Papert talking about the device at a Logo conference in the early 1980’s. He was intrigued by the device, and was wondering how working with that device might lead to some early learning of programming concepts before meeting Logo. I’m after a similar goal, thinking about the learning trajectories work to inform what those early learnings might be. I want students to really program, but I want them to have to give up the task-specific language for a more powerful language as they get anywhere near design. I recognize the challenge of “imprinting” and “Cargo Cult.” I think that’s one of the reasons for these languages not to be Turing-complete. Like the Big Trak, I want the language to work for the one small task, but to be impossible to use beyond that task. In some sense, I want task/domain-specific Big Traks, where the student is doing something useful and using programming to gain new understanding about the domain.

      A research question that I’m wondering about: Is learning a set of task-specific programming languages (especially if they’re with different notations and even different paradigms) a good starting point for later learning one or more languages that lend themselves to a design focus?

      • 11. Michael Ball  |  April 9, 2019 at 2:51 am

        I agree with a lot of what Alan has to say — and the post in general. To me the question is this: Does learning more languages create a barrier to learning that topic? Does the effort spent on learning new tools provide any additional benefit to students?

        To me, I think I’d want a series of domain-specific microworlds that operate under a bunch of consistent principles and work in broadly similar ways.

        I guess, these are also presuming that say “learning Python for English” then “learning Python for History” is easier/less effort than “learning Python for English” and next “learning Lisp for History”. It seems to be this would depend at lot on the tools at hand…

        We know syntax can be a barrier, so I think it’s all about trade-offs. If you can linearize learning a language between multiple subjects and years, and thus make the assumption your students already know some of your chosen tool, you get the advantage of having more teaching time to go deeper on the specifics. But there are additional barriers and any new tool takes some effort to learn (whether it’s a website or a language). To the extent possible, it makes sense for students not to relearn how to do something ancillary to the task at hand. (e.g. this is a reason why schools try to standardize LMS’s, though we in CS throw that out the window.)

        In general, I believe you should always use the best tool for the job as a starting point. I think it makes sense to assume there’s no one right language. In practice, though, I think you’d need to consider your own students. Learning programming is definitely a challenge, especially as we widen the net to people who don’t like programming (yet ;)).

        It doesn’t seem unreasonable to me to image a high school student who is using Prolog in a communications course to talk about logical reasoning, while using Python in a history course to better understand some primary source material, all on the same day. You could then try to understand whether the amount and variation in tools is more confusing to them than, say, if they had used Python in both contexts (albeit with a less nice API).

        Of course, if it’s up to me — I’m designing a bunch of exercises in Snap! or GP. I think there’s a lot that can be done by building tools that build on shared knowledge. Students learn the UI, being to understand evaluation, but each task would come with it’s own series of (nearly) entirely unique blocks. Maybe the general purpose functions always appear, but I think you could be DSLs that are easy to learn, operate independently, but are also learnable in a similar way.

        As a related tangent, some of this is informed by my experience with using Ruby as a language for web development. Ruby has some great futures that make it fantastic for building DSLs. So, Rails (the framework), Cucumber (integration tests for web apps), Puppet (configuration tools) are all Ruby, but ready vastly differently but each serves their purpose. This can definitely make “Ruby the language” harder to learn, but I think that’s probably OK. The trade-off in this case seems worth it to me.

        • 12. Mark Guzdial  |  April 9, 2019 at 8:45 am

          Micro worlds are a great starting point for this, but they’re bound by the interface of the base language (e.g., syntax and often a REPL). I’m looking at whole new languages which are much easier to learn. For example, check out Vega-Lite. I saw social studies teachers modifying Vega-Lite programs in less than 10 minutes — purposefully (e.g., reading the documentation and making choices). Teachers told us it was easier than Excel because they “changed a word” to get a new visualization. The teachers loved the user interface. I can’t make Python or Ruby that easy.

          • 13. alanone1  |  April 9, 2019 at 12:31 pm

            Hi Mark

            The downside to your general idea is exemplified by how “HyperStudio” killed off HyperCard. HS provided button features for many of the simple little scripts in HyperCard. Teachers loved this because it had a much smaller learning curve — but the learning curve went nowhere — and at the end the students could do a few things, but were not led into programming.

            HyperCard was really interesting for many reasons: one of them was that many simple things were simple, and were still part of the larger picture of programming and what could be done in HyperCard.

            Moral: beware of teachers loving something! They are an enormous part of the problem rather than being routes to reasonable solutions.

            • 14. Mark Guzdial  |  April 10, 2019 at 7:56 am

              I don’t want to build a push button interface. I aim to build things that lead into programming.

              I’m less concerned about teachers. I’m working with some great teachers whose input I value.

              • 15. alanone1  |  April 10, 2019 at 9:27 am

                Then I suggest that you use a language and interface that can provide features as “pop the hood” components (aka “blocks”).

                If the first stages of this are done really carefully and well™ then it can act as a perfect mini-language and system that will allow simple programs to do interesting things.

                The key part of the design is to organize things such that the “blocks for beginners” — and how these programs are organized — can be made from just slightly more elemental blocks whose names and functions “seem quite reasonable”.

                The second key is to design the system and interface for the beginners with a set of features that allow it to expand to more elaborate uses. (The “Vancouver” version of Etoys had a few of these that worked well.)

                The current systems that allow a block to be defined in this way have not thought through well enough what needs to be done for beginners. They are mainly set up to add on to something already with a bunch of features.

                But there’s no question that this can readily be done by those who are willing and happy to do a new system. For example, the GP creators — John Maloney, Jens Monig — plus one or two designers who are tuned this particular need plus a few more implementers could really do this. I think it would be good.

      • 16. alanone1  |  April 9, 2019 at 6:21 am

        These are deep waters, Watson!

        IIRC, much of Big Trak was done by Danny Hillis for Mattel, so it came directly from the Seymour world — it was very much in the spirit of Radia Perlman’s “Button Box” for 4 year olds (which was also a mini-language that embodied some ideas but was not complete).

        I think the most important issue here goes beyond computing to the purposes of education, and especially the trade-offs between using and understanding tools. Trade schools specialize in helping people learn how to use tools. Understanding tools really counts if education is also (and especially) supposed to be about “understanding the world you are in” and “understanding the ideas about ideas” — in other words, education has large epistemological components that are supposed to be made visible, whereas most “usage” is about getting skillful. They mix when the skill is supposed to be “thinking” rather than “coping”.

        I wonder if the US can ever get to “understanding” as a general goal? — if we take de Toqueville’s assessment of Americans ca 1840, this has never been the case in general.

        In a more fruitful environment, I would definitely first aim at “deep systems fluency” for the general population. This would raise all educational boats, including — in a very large way — how the general public approaches and understands and makes computational systems.

  • 17. Raul Miller  |  April 8, 2019 at 11:55 am

    I am not going to go into how I find academic knowledge useful.

    But I can describe for you an example of why “one size fits all” fails in computing contexts:

    Languages typically fit a single level of abstraction in computing contexts. (This has to do with the mechanics of popularity — there are exceptions, like Forth which span the entire range of abstractions, from vlsi implementation details, to machine language, to systems programming, to applications programming. But the resulting denseness is unappealing to most programmers.)

    So, you have one set of languages used by people who focus on machine structure and low level compiler details. You have another set of languages for compiler and operating system implementation. You have another set of languages preferred by people who implement high resolution (first or third person) real time games. You have another set of languages by people doing commercial transaction work (shopping carts get one set of languages, banking transactions gets another, wall street analytics gets some others and user interface code tends to be a different set of languages than those used to keep accounting records). Newsrooms get another set of languages (often tracking what’s currently popular in University settings or other training settings, to keep their employment costs down, because many years they’re not profitable.) Etc… etc.

    Anyways, I imagine you’ll get one computing language to rule them after you deal with the pressures which gets you different jargon in each specialized field.

    (That said, when I went to college, we had a professor who was supporting a “one language for every classroom” implementation. So we had APL being used in language classes, in music, in biology, and of course in all the math and other science classes. My first encounter with it was another student showing me the code he’d thrown together for building role playing character sheets… So, I guess despite everything I wrote above, I have reason to believe a “one language for everything” approach can work. But I still also believe that popularity mechanics work the other direction…)

    That said… most code that’s written isn’t specifically about computing issues. It’s about dealing with hardware / communications issues and the associated standards and practices. And that varies based on whose hardware you’re working with, among other things.

  • 18. Alan Fekete  |  April 9, 2019 at 10:32 am

    I think Mark’s discussion identifies several benefits from task-targeted programming languages, but it neglects the downsides from that approach. One aspect that seems important to me, is that a shared language would mean that there were more students and teachers available to help someone who was in difficulty. No matter how easy any language is, there will be students (and teachers) who struggle and need extra help with it. If the school adopts a shared language, someone who is struggling will be more likely to find support (eg students who already learned the language in another class) compared to a structure where each field uses its own language.

    • 19. Mark Guzdial  |  April 9, 2019 at 10:54 am

      You’re absolutely right. I’m still designing, so I’m focusing on reducing downsides, but it’s true that if there was a computationally literate culture in the school, it would be easier to learn a single programming language that you could get help on.

      I’m now wondering if it’s possible to get there. I worked for 12 years on promoting computing education in Georgia (from 2006-2012 as “Georgia Computes!” and 2012-2018 in ECEP). Today, 47% of high schools in Georgia offer a course in computer science, and cumulatively, less than 1% of Georgia high school students ever take a CS course. There is essentially no development of computational literacy in Georgia schools. The data from other US states, UK, and Scotland is similar.

      I’m exploring another path. The path you describe has enormous benefits, but I’m wondering if it’s possible. It’s at least worthwhile exploring other options.

      • 20. Tom Morley  |  April 9, 2019 at 12:17 pm

        A long term commitment of the calculator companies to K-12 has resulted in calculator being omnipresent in high school mathematics (with many of the critics retreating to home schooling). Is there a way for hardware/software companies to duplicate this for computing? Is there any reason they would want to?

  • […] Alan was telling me in the comments to an earlier blog post about task-specific programming and again in the blog post on multiple languages in schools is that it should also lead to generativity. If I teach you a programming language that solves your […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Trackback this post  |  Subscribe to the comments via RSS Feed

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 9,052 other followers


Recent Posts

Blog Stats

  • 2,031,010 hits
April 2019

CS Teaching Tips

%d bloggers like this: