Coding is not the new literacy, modeling is: But modeling needs coding

March 20, 2015 at 7:50 am 27 comments

I buy Chris Granger’s argument here, that coding is not nearly as important as modeling systems.  The problem is that models need a representation — we need a language for our models.  The point is modeling, but I don’t think we can have modeling without coding.  As Michael Mateas said, there will always be friction (see post).

We build mental models of everything – from how to tie our shoes to the way macro-economic systems work. With these, we make decisions, predictions, and understand our experiences. If we want computers to be able to compute for us, then we have to accurately extract these models from our heads and record them. Writing Python isn’t the fundamental skill we need to teach people. Modeling systems is.

via Chris Granger – Coding is not the new literacy.

Entry filed under: Uncategorized. Tags: , , .

Google makes 6 CS Capacity Awards to address rising enrollment while improving diversity C is Manly, Python is for “n00bs”: Our perception of programming languages is influenced by our gender expectations

27 Comments Add your own

  • 1. shriramkrishnamurthi  |  March 20, 2015 at 8:02 am

    Sorry, Mark, you’re half-right and half-wrong. And you also failed to explain the many implications of the part you’re right about.

    I too believe that modeling is a critical skill. HtDP is designed to teach even beginners how to model. To model you don’t need code first—you first and foremost need ways of _representing data_. This is one of the perils with our community’s headlong rush to Python.

    Once you have your data represented, then of course you need to represent the dynamics (and there may even be a feedback loop between the two). But it will surely come as a bit of a surprise to the past four hundred years of applied mathematicians that without code, they would be sunk. Differential equations, for instance, are a non-code way of representing dynamics.

    One of the nice things about thinking in terms of model-view-controller [*], for instance, is that it explicates the act of modeling. I wonder how much MVC-style code your students write in your computational media courses. If they do, they can also validate their systems (which, as Granger points out, is also essential). Do your students write tests? Or do they have a single, undifferentiated mass of relatively untestable code? I’d love to see what they do in this regard.

    [*] To readers who say “MVC is too hard for beginners”, that just means you have a bad language or library for writing MVC. Bootstrap teaches MVC to kids as young as 12, without difficulty. Rethink your linguistic support.

    • 2. Mark Guzdial  |  March 20, 2015 at 9:44 am

      What’s your evidence that “you first and foremost need ways of _representing data_.” I know lots of people who do computational modeling (engineers, scientists, architects). Most of them use MATLAB, some use even weaker tools for manipulating data, and some use Python.

      No, we don’t do MVC in MediaComp. Yeah, I know that MVC isn’t too hard for beginners. I published that in 2001 ( (Whipper-snapper 🙂

      • 3. shriramkrishnamurthi  |  March 20, 2015 at 10:52 am

        People who are experienced at modeling can do it in a variety of tools. I know numerous people who use Matlab on a daily basis, not because they think it’s amazing but because it has library support that they need. And why is that? Because _if_ what you are modeling is, for instance, well represented as linear systems, then a matrix is a very good representation, and that’s what Matlab does well, and what the libraries also support. For a trained person, that mapping—from problem to linear system to matrix to Matlab—is so straightforward that they barely need to think about it. This is why we moved our intro to computing for _engineers_ to Matlab: because it’s so natural there’s no point beating about the bush.

        So: people who want to model linear systems gravitate towards tools that represent it well. People who have associative data used to use Perl, and now use Python. But: I also know people who model languages, and for them trees are far better than the alternatives, and they use languages like OCaml or Haskell. And people who model cyberphysical systems, for whom systems that represent differential equations directly are best, and they use languages like Modelica. Likewise there are people who gravitate towards the data structures and modeling facilities of Simulink, Mathematica, etc. The fact that you didn’t immediately think of any of these latter groups is just an artifact of you not talking to a broad enough set of modelers!

        Once you are experienced at modeling, you can not only choose between tools better, you also get facile at mapping your needs to the representations of the tool at hand. Once you are committed to a domain, you are likely to have default representations and good modeling tools for that representation. But if you are trying to teach someone modeling _in general_, there’s no reason to believe a matrix or a hash table is the right representation. Often it’s not. Language shapes thought.

        (And yes, I know about your Squeak work; I even own a copy of your book. Which is why your comment surprises me. But it could be an artifact of what you’re modeling: modeling a GUI is different from modeling the world at large. MVC extends just as well to the latter. In fact, I’ve built systems where you need _two_ models: one for the outside world, and a second for the visual representation, and then linking these two models through their own MVC. Constructing that “model of the world” requires careful thought about data structure, only some of which proves to be a matrix or hash table. I don’t think it can be put better than e. e. cummings did:

        since feeling is first
        who pays any attention
        to the syntax of things

        • 4. Mark Guzdial  |  March 20, 2015 at 2:07 pm

          There is a larger social cost in going broader. Evidence of having a better way to model is a community adopting it.

          • 5. shriramkrishnamurthi  |  March 20, 2015 at 3:11 pm

            Sorry, what? So we should give up on teaching computer science, then. All this breadth…we should just stick to teaching Matlab with matrices, and eschew the “social cost” of solving all those other problems that need solving.

            And there is a pretty broad community that has adopted broader ways to model; they just aren’t around you at Georgia Tech, unfortunately.

            • 6. Mark Guzdial  |  March 20, 2015 at 4:00 pm

              It’s important to develop computer science in the directions you’re exploring just as it’s important to develop better mathematics. You should develop ways to model that you believe are more powerful (e.g., broader) and simpler (e.g., fewer lines of code). That doesn’t mean that it’s better, though. Or more accurately, better enough to justify a change to a community.

              Knowledge is socially constructed and supported. There is a significant cost to going outside of the norm for your community, even if it’s better on some dimension. Do you use a Dvorak keyboard? Most people don’t. It’s measurably better than Qwerty. But the benefit is small compared to the cost of doing something different than the norm.

              I totally believe that there are different kinds of modeling out there, and I’d love to learn about them. Can you point me to a study describing the practices of the broader community you’re describing? The studies that I’ve seen and what I’ve learned from visits to places like NASA Goddard is that Fortran and MATLAB are still the most common modeling languages by most scientists and engineers. It’ll be interesting to see what convinces these modelers to change. It will have to give them a significant benefit in order to justify the cost of changing from their community’s standard practices.

              • 7. gasstationwithoutpumps  |  March 20, 2015 at 9:03 pm

                Although MATLAB is still big, there’s not much new work being done in FORTRAN—just lots of legacy code. A lot of new development is being done in Python with the SciPy and Matplotlib libraries, which have the advantage over MATLAB of being free, so easier to share code with others.

              • 8. shriramkrishnamurthi  |  March 21, 2015 at 10:18 pm

                The working assumption you keep making is using the word “modeling” in a very narrow sense, as in “mathematical modeling”. For that, yes, Matlab is pretty good (though there are lots of competitors, including SciPy, and some gaining traction, like Julia). But that is hardly the only kind of “modeling” in the broad sense. Heck, a lot of Excel use is for modeling (eg, of complex financial instruments)—as Granger says. There are far more Excel users than Matlab users out there. So why are you talking about Matlab? They’ll _never_ convert all those Excel users! They won’t go out of the norm of their community!

                If you want to focus on _mathematical modeling_, say so; then I’d know we’re talking about two different notions entirely. That’s not what Chris Granger was talking about when he said (and you quoted) “how to tie our shoes to the way macro-economic systems work”, unless Matlab has secret applications to shoe-tying that I wasn’t aware of.

                Incidentally, Granger also talks about what it _actually means_ to perform some operation, which goes back to specification, which is a heightened form of testing. It’s what I get to do by emphasizing MVC. Indeed, I have assignments where students write _only_ “what it means to solve”, no solution itself. If you’re that big a fan of Granger’s essay, you should reconsider what you’re doing in your mode-free, testing-free, specification-free classes. (-:

                • 9. shriramkrishnamurthi  |  March 21, 2015 at 10:21 pm

                  Uh, I wrote «snark» … «/snark» around that last sentence, but because I used pointy brackets rather than guillemets, WordPress’s mediocre sanitization process thought I was trying to hack your blog with embedded HTML and just deleted it.

          • 10. KDecker  |  March 20, 2015 at 4:14 pm

            I went back and read your note Mark, and while I see your point, I will say that having actually gone through this (i.e. dared suggest that maybe a few weeks of python, leading to MATLAB, might be friendlier to 1st semester frosh than dumping them directly into MATLAB), that the vitriol from Physics was nothing short of epic. For (one!) example:

            BEGIN QUOTE”…all these simple problems are easy to do in Fortran. Just supplement it with a program that can do graphics like Matlab, and you are all set. I would think that this almost guarantees a good experience in the first semester. Students might actually learn something** I fear that this point is lost on computer science people for reasons of percieved “disciplinary elegance”. …Let’s get back to basics — reading, writing, ‘rithmetic and Fortran!
            ** The first computer course I took was called something like “Solution of differential equations on the digital computer.” It was in 1969, I used Fortan 66; the women who programmed ENIAC used paper, pencil, switches and cables. Do you think they or I suffered from lack of an object oriented framework? Our students would learn more about computers if we reproduced the ENIAC, in my opinion. Fortran is only halfway there.” END QUOTE

            On the other hand, I did get a phone call back then from someone who couldn’t speak openly, but assured me that there actually were physicists here who used Python for their work 🙂

            On the third hand, I was talking with a visitor who does advanced optimization for scientific supercomputing, involving a lot of scary pragma annotations of Fortran/C, and asked if she had ever thought about building a C-like language to support those ideas directly. She said “what’s the point? These people have already written everything they will ever need”…

            • 11. Mark Guzdial  |  March 20, 2015 at 4:23 pm

              I completely believe the vitriol you describe. I’ve heard it, too.

              How do you convince a community to change their practices? The first step isn’t to tell them that they’re wrong, that they’re using ancient languages, or that what they’re doing lacks “elegance.” The first step is understand what they do, why they do it, and what they see as the problems with their approach. Then help them fix their problems.

              There was a great talk by Jeanne Century at the last NSF BPC Community meeting. She talked about what led to sustainable change, versus some change that was imposed externally and disappeared as soon as someone turned their back. To get change to be adopted by a community you have to “collaborate and co-create.” Physicists and engineers are intelligent, well-educated, and successful in their modeling practices. There are reasons why they do what they do. Engage them in creating what comes next, and you have a chance of changing a community. Gerhard Fischer and John Carroll have each written on this.

              There are lots of time in history that a field announces that it’s done or that they have all the inventions they need. They’re always wrong.

              • 12. KDecker  |  March 20, 2015 at 4:45 pm

                Just to be clear, of course we weren’t telling them they were old and inelegant 🙂 But there is also just an issue of brand names— they were unhappy even if we taught the *exact same models and packages as before* (e.g. using NumPy/SciPy/MatPlotlib). Even if the students solved the exact same problems, and learned to build the exact same array/matrix models, it didn’t have the Matlab brand name.

                There was also push from the students to do something NOT in Matlab— they didn’t like the Matlab licensing model, they didn’t like (given what they SEE computers can do) to spend the semester only solving linear equations (or ODEs) and plotting them. Some of the (non-CS) departments actually think strings, structs, and networking are important too 🙂

                (but yes, I agree with your second paragraph. Luckily there are some Python users there too 🙂

              • 13. shriramkrishnamurthi  |  March 21, 2015 at 10:33 pm

                Actually, it’s more subtle than you’re making it out to be, Mark. You’re conflating “physicists and engineers” with “academics who teach physics and engineering”.

                I’m reminded of something I heard/saw about 18 years ago (so some details may be slightly off).

                Goranka Bjedov did a study at Purdue engineering (where she was on the faculty, maybe as an instructor) in the mid-90s. She was surprised that all the academics wanted to teach only Fortran or C, which didn’t square with her industrial experience or what she learned talking to students. So she surveyed alumni engineers on what should be taught, Fortran/C/… or Matlab/Mathematica/…. The alumni all said _they_ used tools like Matlab, but Fortran should be taught because they’d been told that “that’s what everyone else uses”.

                When she took her data to the faculty, she encountered nasty resistance (what is it with vitriolic engineering faculty?). Essentially, she was told, “That may all very well be, but if the students don’t learn Fortran, who will maintain our codebases?”

                She came to give a talk at Rice, to which the engineers were invited. The ones who attended demonstrated that engineering faculty vitriol is not limited to only some states of the union.

                Here, I even found her old talk abstract! Since only a cached copy is available, for posterity:


                Rice University Education Lecture Series
                Goranka Bjedov

                Assistant Professor
                Department of Freshman Engineering
                Purdue University
                Should Engineering Students Be Taught a Programming Language?


                The majority of schools offering engineering degrees expects their students to complete at least one course in programming in a high-level language (such as FORTRAN, Pascal, C, or even C++). In many cases, these courses are offered in the first year curriculum. Such courses have traditionally been justified as teaching logical thinking and problem solving, while providing the students with tools they will use as practicing engineers.
                These goals can be achieved more readily through the use of modern mathematical software tools such as MATLAB, Mathcad, Mathematica or Maple. Such tools are more powerful and easier to master than a traditional programming language, allowing students to solve interesting and challenging problems earlier in the course of their studies. Consequently, there is little reason to teach traditional programming languages to engineering students, and there are many reasons not to.

                Despite these facts, engineering schools persist in teaching high-level programming languages to their students, and are not likely to change this in the immediate future. This talk examines the real reasons for this behavior, and the level of success of the currently implemented solutions.

                Thursday, April 17, 1997 @ 4 p.m. in Duncan Hall 1070
                Reception in Duncan Hall 1049 following the talk

                • 14. gasstationwithoutpumps  |  March 23, 2015 at 5:13 pm

                  I think that many people here are assuming that “engineer=mechanical engineer”, which may have worked as a good approximation in the 19th century, but is definitely an outdated view. The Baskin School of Engineering at UCSC consists primarily of computer scientists and computer engineers, with some game designers, statisticians, electrical engineers, and bioengineers thrown into the mix. Most of our engineers need to learn to program, and need to learn to program well, not just an occasional script. MATLAB does get used, but not as much as R, Python, C, Java, …

  • 15. KDecker  |  March 20, 2015 at 10:42 am

    If you are using MATLAB, you are representing your data as arrays and matrices, using linear algebra and differential equations, just like you’ve been taught by your math prof in engineering calculus classes.

    Two observations: (1) (obvious) this (arrays + matrices) is actually hard for many engineering freshmen, because even if they are on an engineering track in high school, mathematical modeling does not seem to be a big part of the K-12 curriculum. In particular, neither linear algebra nor differential equations tend to be taught to high school students, even in a college-bound track.

    (2) professors of engineering, brought up that everything should be modeled this way, because that is what their profs did, can actively push back on teaching other ways of representing data computationally. When our dept. took over teaching the intro to computing for engineers, the initial requirement was that the first semester freshman needed to know MATLAB, you know, linear algebra and how to use it to solve differential equations. Note that most students had never seen a matrix or knew what a diff eq was….(we eventually got them to realize this was unrealistic…:-). On the other hand they definitely don’t like us to “waste time” on “CS data structures” (or strings), since arrays and matrices are “all that is needed, everything else is handled by the libraries”. “And none of that MVC stuff— too much like Games. Computers are for work, not entertainment. Stick to plotting 2D and 3D data if you MUST have graphics…” [I think I know that GaTech also has a huge MATLAB course, I’m not sure how it fits in with what CS majors take and if students from that course can also take later CS courses without taking the CS intro, or if there is any perception of impedance matching issues…]

    Finally, and I suppose we should somehow measure this (suggestions?), but **anecdotally**, students coming from the engineering intro course (Python and MATLAB) have a much harder time with Java Classes and Interfaces in our 2nd semester Java-based course than the students who come from our HtDP intro course (which, as Sriram points out, is soaked in data representation, slowly building more complex ways to handle richer real-world information). The HtDP students used to struggle much more with FOR loops and terminal I/O, although we’ve changed the material in the last month of that course to try to address that somewhat.

    • 16. shriramkrishnamurthi  |  March 20, 2015 at 10:57 am

      Kathi has reported similar experiences with Python-trained students coming into their second Java course. Of course, the criticism of HtDP is just as valid. This is why the design of Pyret ( includes “for loops” from the outset.

      • 17. KDecker  |  March 20, 2015 at 1:35 pm

        I’ve been keeping an eye on Pyret 🙂 Will there ever be a HTDP2e with Pyret (like Mark’s Media Computation with Python/Java/Alice/…)? Not having a book makes it hard to (for example) go on sabbatical, or teach w/ many instructors 🙂 It’s an issue for the Python/Matlab course which *otherwise* would do at least some of the HTDP material…

        Currently in our HTDP, after accumulators and mutation, we do a lecture introducing (for [i (from 1 10)] ) and (while ), analogizing to the accumulator version in the way you pointed out long ago 🙂 It is interesting that after spending the entire semester saying “note how the function signature (types of data consumed and produced) has a strong effect on the body (template); suddenly I get to say the exact opposite: Note how the signature gives us *nothing* to go on…(compared to, say, the polymorphic signature of a map or filter) No wonder students find these kinds of loops hard!!

        • 18. shriramkrishnamurthi  |  March 20, 2015 at 3:08 pm

          Keith, I expect HtDP 3e will include Pyret (-:. Until then, unfortunately, PAPL is the only book ( It doesn’t have much introductory material yet, but I’m working on that. Unfortunately what it has in spades is more advanced material, but that’s not really useful for an introductory course.

  • 19. knud  |  March 20, 2015 at 11:06 am

    I’m afraid you are both wrong. Engineers do not use MATLAB. Engineering academics use MATLAB.

    • 20. Mark Guzdial  |  March 20, 2015 at 1:48 pm

      Evidence? The studies I’ve seen from IEEE suggest that MATLAB is the most used Engineering programming language.

    • 21. dennisfrailey  |  March 25, 2015 at 1:50 pm

      Engineers certainly do use MATLAB. Right now, in fact, I’m doing part time work at a small company that builds highly specialized, state-of-the-art radar systems. MATLAB is an essential tool for data analysis and algorithm development.

  • 22. Michael S. Kirkpatrick  |  March 20, 2015 at 11:37 am

    I disagree with the OP, though it’s possibly just because of the word choices. I interpret his argument to be based on an overstatement what constitutes literacy. Take this summary quote for instance:

    “To put it simply, the next great advance in human ability comes from being able to externalize the mental models we spend our entire lives creating. That is the new literacy.”

    To bring this back to traditional literacy, it suggests that someone who is unable to construct an essay, novella, or other literary work is illiterate. To me, “literacy” IS about the mechanics and it mostly focuses on lower Bloom’s levels. It is about demonstrating enough knowledge of syntax and semantics to comprehend a written work. That sounds like coding to me, but that may be because I do not equate “coding” with just syntactical structures. In fact, you don’t even need to be typing to have syntax; block-based languages work perfectly fine.

    To me, the emphasis on modeling–especially their creation–raises the complexity to such a high level of abstraction that we are doomed to failure. It seems to be a parallel to defining traditional literacy as the ability to craft professional quality essays, novels, or other documents.

    • 23. Mark Guzdial  |  March 20, 2015 at 1:48 pm

      It’s a great point, Michael. Modeling is closer to novella. I’ve used the analogy that we want to teach the computation for writing a letter to Grandma. But for those disciplines that *do* model, that’s a better description of the target skill than “coding.”

    • 24. dennisfrailey  |  March 25, 2015 at 1:54 pm

      I concur. In fact one thing that really bothers me is how illiterate some in the computer field seem to be. They often don’t use articulate English to communicate, which tends to focus their communication on their peers (where they can get by with commonly accepted jargon and shorthand). Ask them to give a presentation or a speech and some of them sound like they never graduated from high school.

  • 25. delete  |  March 20, 2015 at 12:46 pm

    “Looping over a list of numbers” isn’t leveraging computing in the same way that knowing how to spell isn’t essay writing. But you still need the one to do the other.

    The “either/or” nature of the question is problematic. I imagine few people disagree that literacy is about communication and comprehension, but how can you teach that without teaching syntax and grammar? You need to teach both (and more) to say someone is ‘literate’. Similarly, to be computing literate, you need all of these pieces: how to write a loop in Python, how to model in OO, how the Python syntax is translated into machine instructions, etc.

  • 26. Creative Automata | Modeling is the New Coding  |  March 21, 2015 at 4:46 pm

    […] Chris Granger who suggests that modeling is the new literacy, and Mark Guzdial who observes that modeling requires coding. Let me begin from the beginning–as an after-school programmer in 10th grade with punched […]

  • 27. Paul Fishwick  |  March 21, 2015 at 5:01 pm

    This is related to a blog post I just made on the subject of modeling vs. coding. Not sure whether URLs are permitted in comments, but here goes:

    Comments, critique welcome.


Leave a Reply

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

You are commenting using your 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,045 other followers


Recent Posts

Blog Stats

  • 2,024,884 hits
March 2015

CS Teaching Tips

%d bloggers like this: