How only one path fails to help everyone succeed at learning how to code

June 10, 2011 at 10:42 am 13 comments

Project Euler sounds great!  The author of the now oft-forwarded Atlantic piece is making a mistake by extrapolating from himself to everyone.

The article (linked below) tells the story of how author James Somers finally learned to program by discovering Project Euler, an effort to teach programming by leading students through a sequence of carefully constructed programming problems.  Somers “finally” learned to program after first failing at reading one of the enormous tomes on how to program and then after failing to learn through AP CS.

I don’t doubt that Somers really did learn a lot from Project Euler, and I believe that thousands have and will in the future.  The “inductive chain” theory described below seems plausible.  Project Euler is a terrific idea!  I also believe, though, that some people do learn (at least, get started) from those massive tomes, and others do learn through the more engineering-oriented approach that Somers dislikes in AP CS.  Some may even learn from playing with digital media.

I personally don’t find Project Euler’s problems attractive.  Somers gives this example of a Project Euler problem that inspired him:

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Find the sum of all the multiples of 3 or 5 below 1000.

I completely believe that Somers was inspired by this.  I do not have an “itch” to solve this one.  I don’t find mathematical puzzles that fun.  I like to make things, so when I was getting started learning to program, I was motivated to play around and explore by building things.  My first sizable just-for-fun program played tic-tac-toe, and most of my just-for-fun projects were interpreters and compilers.  Today, I like to make interesting pictures and sounds with Media Computation.  My experience doesn’t mean that Somers is wrong about Project Euler working for him.  He’s wrong in believing it can work for everybody.

We need multiple paths.  Math works to motivate some.  Engineering for others.  Media for still others.  I agree that getting the playful learning that Somers wants is about engagement and motivation.  Math doesn’t engage and motivate everyone.

Project Euler, named for the Swiss mathematician Leonhard Euler, is popular more than 150,000 users have submitted 2,630,835 solutions precisely because Colin Hughes — and later, a team of eight or nine hand-picked helpers — crafted problems that lots of people get the itch to solve. And its an effective teacher because those problems are arranged like the programs in the ORIC-1s manual, in what Hughes calls an “inductive chain”:The problems range in difficulty and for many the experience is inductive chain learning. That is, by solving one problem it will expose you to a new concept that allows you to undertake a previously inaccessible problem. So the determined participant will slowly but surely work his/her way through every problem.

via How I Failed, Failed, and Finally Succeeded at Learning How to Code – Technology – The Atlantic.

Entry filed under: Uncategorized. Tags: , , .

Telle Whitney on why we need more women in IT Programming is so important that I need it in 3 days

13 Comments Add your own

  • 1. Garth  |  June 10, 2011 at 10:57 am

    I made the mistake of giving a Project Euler problem to my high school beginning programming class as a project. I though it was challenging and fun. They thought I was an idiot to do something like that for fun. Then I remembered, I am a Math geek, they were not. Back to the project drawing board.

  • 2. Rob St. Amant  |  June 10, 2011 at 4:19 pm

    No offense to math geeks, but I look at the first problem and think, “That’s supposed to be fun?” And then I check out Project Euler and discover that there are 341 more just like it! 🙂

    There’s something else in the article that caught my eye:

    The AP curriculum ought to be a model for how to teach people to program.

    I wish he’d said “include” rather than “be”, because he reinforces the common impression that computer science is just about programming.

  • 3. Steve Tate  |  June 12, 2011 at 7:18 pm

    And so here we have a real problem in Computer Science – not that we’re teaching it wrong, like Somers says, but that we can’t agree about what’s important or motivating in computer science. I look at Project Euler and think “that’s phenomenally cool, with really interesting problems.” And then I look at the comments here, and see that (obviously) not everyone feels the same way. But this is PRECISELY why I got into computer science – because I love solving mathematical puzzles, and that’s a lot of what I feel computer science really is. Data structures and algorithms are puzzles. Figuring out a precise language to describe solutions to puzzles is a puzzle in and of itself.

    There are lots of people like me in Computer Science. Then there are the engineering-oriented folks who want to talk about design and building systems, and think everything should be focused on that goal (the ABET folks seem to take this to extremes, so much so that the science side of CS has been almost completely eliminated from ABET criteria in favor of building systems and creating professional software engineers). That doesn’t really interest me – sure, it’s kind of cool that people can build technical guizmos and systems, but that’s not what I want to spend time on, and it’s not what I consider “real” computer science.

    In my more open-minded days I think that the diversity in CS can be a unique strength – are there other fields that span such a broad divide? It’s almost an interdisciplinary discipline within a single discipline. It would be like taking Physicists (pure and applied science) and combining with Electrical Engineers (building systems based on those principles) and putting them together in one field. There is the potential for great strength there, but also a fundamental difference in approach that (in my less open-minded days) seems to cause a lot of tension. And if we can’t agree on how computing concepts can be introduced to the very beginning students, can we ever pull together enough to make this work?

    • 4. Erik Engbrecht  |  June 12, 2011 at 8:25 pm

      What’s interesting is I read your first paragraph and thought “Of course! You’re an engineer!” Then in you’re second paragraph you said you find Project Euler interesting because you’re not an engineer. I think anyone with an appreciation for computational elegance can appreciate Project Euler. Admittedly appreciation of computation elegance is probably an acquired taste for most people. I would think that any real software engineer would have acquired the taste. But I’ve been known to think things that others find highly unreasonable.

      This reminds me of things Alan has said. I think a software engineer who wants to build systems but has no appreciation for computational elegance is like an architect who only wants to pile larger and larger pieces of rock together, has no desire to discover the arch, and would probably reject it as useless until it became “mainstream.” Or a musician that wants to perform songs but has no desire to practice his scales and etudes (to be fair, that would have been me back when I played). It’s someone who wants the airs of a professional without the effort of acquiring the substance.

    • 5. BKM  |  June 13, 2011 at 1:08 pm

      Count me in on the engineering-oriented side. If I had been faced with Project Euler as an undergrad, there is no way I would have majored in computer science. I hated math puzzles and I still hate them. I started out in the sciences, but realized that studying things that already exist was very boring for me. I majored in computer science because I saw it as a field in which I could design and build things that had never existed before.

      As for appreciating “computational elegance”, I see it more as understanding when to use effective tools. Civil engineers need to to understand physics, and materials, and things like that, to do their jobs. Likewise, software engineers – and that is what the majority of CS grads become – need to understand data structures and algorithms, and where to use the various tools. And that is a real problem on the industrial side. Because so many people who do not have CS degrees are working in positions where they are designing and building software, we end up with really bad implementations. A software engineer doesn’t need to appreciate the elegance of a nice sort algorithm; he or she just needs to know that it is there and available in the toolbox.

  • 6. Steve Tate  |  June 14, 2011 at 12:04 pm

    Let me add a pointer to another blog, because a recent post is very related to this topic. This is a pointer to Matt Welsh’s blog (now at Google, but former Harvard faculty member). Matt’s posting and Michael Mitzenmacher’s follow-up in comments (Michael is also Harvard CS faculty) show the differences in views of CS that we’re talking about here – is it about building cool stuff, or is it about understanding fundamental truths?

    Incidentally, my answer is “both”, even through I’m personally interested primarily in the latter. This comment of Michael’s really gets to the heart of it: “This is the course that is supposed to open students’ eyes to the fact that computer science is not just about hacking up a new app, but includes deeply fundamental questions about the nature of computation.”

    My personal story: I was always very talented at the “building stuff” side of CS, but was a little bored by it when I started college. I can recall the precise moment when I decided that CS was something that I could spend a lifetime on: it was when I first saw a complete proof of correctness for Kruskal’s algorithm in a data structures course. That was when I realized that there was more to computing than programs that shuffled data around in obvious ways – there are problems that we would like to solve, and solutions that we come up with are not even obviously correct. In cases like these, you require some serious reasoning to understand why some solutions do what we want them to, while other solutions don’t. That’s what hooked me.

    • 7. Mark Guzdial  |  June 14, 2011 at 2:03 pm

      In your comment, Steve, and in the comments on Matt’s blog, we diminish the craftsmanship of programming by calling it “building cool stuff.” Computer science has always had art and science aspects, and the programming tends to fall on the art side of it — and that’s valuable for its own sake. Donald Knuth captured this false dichotomy well in his 1974 Turing Award Lecture: Computer Programming as Art. Of course, there is great value in understanding fundamental truths. There is also great value in creating art.

      • 8. Steve Tate  |  June 14, 2011 at 10:36 pm

        I don’t in any way want to diminish the value of building things, and I hope I was clear in my comments that I was talking about MY interests. It’s a very different thing to say something doesn’t interest me (which is what I’m saying) than to say it isn’t worthy of interest – after all, I’m not interested in medicine, but I’m sure glad that there are MDs out there who DO find medicine interesting.

        There is value in trying to decide what computer science really is or should be though – is it helpful to throw everything that is related to computing into one field called computer science? And if we do that, is it really a science or is it broader than that? I’ll refer to the classic quote of Fred Brooks that “Engineers learn to build; Scientists build to learn.” If what you’re REALLY interested in is building things (systems) then aren’t you really talking about engineering? Is that really computer *science* then? Could you teach CS from a pure liberal arts perspective, without the engineering aspects, and still have it be Computer Science?

        For me, I’m happy to participate in what is really a much more radical experiment than most people give it credit for – creating a field (computer science) that has components that are science and components that are engineering (and OK, art too). I’m really not aware of any other academic discipline that does this (at least not without a broader name, like for example “Materials Science and Engineering”).

        • 9. Mark Guzdial  |  June 15, 2011 at 9:44 am

          I do see that you are speaking about your interests, Steve. I think you can teach CS as liberal arts, but emphasizing programming. I’m working on a book on how we’ve been trying to do that here at Georgia Tech.

      • 10. BKM  |  June 15, 2011 at 8:26 am

        Computer science is not art and science. It is engineering and science. And most of our graduates are going to work in positions that are far more engineering than science, so we do them an injustice if we don’t give them the tools.
        The whole “programming-as-art” thing makes me crazy, because that is the attitude that leads companies, who would never hire non-engineers to design circuits, to think they can get away with high school geeks in their programming positions. I have had to work with the messes created by these people. In one job, I had to work with a very large database, which contained claim information for a very large hospital system, which had been designed by someone who didn’t have the faintest inkling of relational database theory. By the time I started working with it, it had turned into a nightmare, with queries taking hours to run, and worse yet, severe inconsistencies cropping up everywhere (the person who had designed it had never heard of things like “foreign key constraints”). You have no idea how many badly designed and written systems lurk out there because the people doing the building don’t have the basic computer science toolbox.
        . I would like to see our field professionalized in the way that other engineering fields are professionalized, so that graduates have the proper scientific and theoretical grounding to do their jobs effectively. I want companies to see the value in the degree, much as they already do with electrical and civil engineering.

        • 11. Mark Guzdial  |  June 15, 2011 at 9:42 am

          I don’t disagree that there are messes out there, and software engineers clearly need a good CS toolbox. But that’s orthogonal to computing-as-art. Donald Knuth says computer programming is art, and TeX has held up amazingly well over time. Richard Gabriel argues that we ought to teach programming with the discipline and rigor of arts education, in order to get better programmers. Thinking about programming as art and craftsmanship excuses no one for shoddy work.

        • 12. Steve Tate  |  June 16, 2011 at 8:32 am

          OK, one last comment on this… To say that there’s a big component of art in programming is accurate – or at least a component of art in GOOD programming. No one suggests that it is entirely art, or that you can be skilled in the art of programming without understanding the science. Knuth talks about “good taste and style in programming,” but clearly you have to have a solid technical foundation which you use to express “good taste and style.”

          Any creative activity, including Computer Science, has a component of art. There are clearly aspects of style and elegance in code – you refer to “messes created by these people” and “badly designed” systems in your comment. That’s precisely the point – those people clearly don’t have the background to create code that has the elegance of a good solution. Whether they are competent at other arts is not important – clearly they were incompetent at the art of programming. If you need further evidence of inelegant, messy, and unartistic code, I have plenty of student examples I could show you! 🙂

          Computer science is really not unique in this regard though. There is art in mathematics (I refer you to “Proofs from the Book”) There is art in writing. There is art in engineering. There is art in science. I’m personally hopeless when it comes to “fine arts” (paintings, sculptures, etc.), but have a very highly refined sense of art/style/aesthetics when it comes to code.

  • […] stuff (like infinite Hilbert spaces & ring theory) we got at uni. In that sense I sympathize with this blogger and always felt more like an engineer than a scientist, particularly fascinated by things that […]


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 )

Google photo

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


Recent Posts

Blog Stats

  • 1,876,333 hits
June 2011

CS Teaching Tips

%d bloggers like this: