Show Me The Code

April 18, 2011 at 10:32 am 20 comments

One of our graduating seniors shared the below blog post with me, and I shared it with all the faculty who teach the lower division courses in Georgia Tech’s College of Computing.  Andrew makes the strong statement in his blog post: “Students shouldn’t be able to graduate with a Computer Science degree from Georgia Tech without being able to read and write production quality code.”

My sense is that most of the faculty who have responded agree with Andrew.  Our students should know how to read significant code (e.g., walking through the whole Linux kernel in OS course).  One of our professors talked about the value of watching his own code be rewritten by a professional, expert programmer — it was stunning how much better the code got.  We could teach more about reading production code at the University, but I’m not sure that we could teach enough about writing production code at the University.  As Bjarne Stroustrup pointed out, faculty don’t build much these days.  Programming well has much in common with craft and art, and it’s not something that the University does well.

If the University could not teach reading and writing production code well, where should students learn it?  One answer is, “On the job.”  Craft is often taught as an apprenticeship.  I worry that the computing industry has given up on its professional development responsibilities.  We talk about people being lifelong learners.  Is that entirely an individual responsibility?  When I was at Bell Labs and Bellcore, there were dozens of classes that I could (and did!) take. Where has that gone?  Is everyone a contractor these days, or does industry have a responsibility to develop its human resources?

My research interest is more in the computing that everyone needs, and in that sense, I agree with Andrew, but without the word “production.”  I fear that we focus too much on having students write code, and not enough time reading code examples.  Worked examples are a powerful approach to learning that we simply make too little use of in computer science. We emphasize so much that computer science is about “problem-solving” that we only make students solve problems, as opposed to reading solutions and learning to learn from reading.  I’m preparing my CE21 proposal now, and spending a lot of time learning what educational psychologists know about how to write examples that students learn transferable knowledge from — research that we pretty much ignore in computing education.

Literacy is about being able to write and read.

As I come closer and closer to graduation, I’m looking back at the Georgia Tech Computer Science program, the things it did well and not so well.

One piece I feel is missing in the curriculum is having students read good, high quality code.  We’re asked to code alone and code in groups, code in labs and code in dorms, code on paper and code in IDEs.

It seems like the administration and professors think this skill just magically appears with practice.  I disagree, and I think we can do better.

via Andrew Ash › Show Me The Code.

Entry filed under: Uncategorized. Tags: , , , , , .

New Draft K-12 Model CS Curriculum Available for Comment How other countries develop their teachers

20 Comments Add your own

  • 1. Alan Kay  |  April 18, 2011 at 10:53 am

    I think if you are graduating in “railroad engineering” then both the first and second levels of this suggestion make sense. (Being good at reading code, and being able to read Linux code.)

    If you are graduating in “advanced transportation”, then the first level applies (reading code), but not the second (there’s not much about railroading that applies to flight — and forcing too many “railroad ideas” can hurt the contexts needed to think about better transportation.

    (One form of the second level here could be the requirement to be able to read metacode fluently instead of (say) large C programs.)

    I think there should be a real distinction between software engineering and computer science — with the partial overlap being dominated by how new computer science ideas can inform better engineering practices.



  • 2. Alfred Thompson  |  April 18, 2011 at 10:58 am

    I’m not sure anyone reads enough code these days but clearly we have seldom required students to read enough. Operating system code in an OS course is great and I’m glad that happens but we could do more. I wish we had units in early courses in doing a code review. And then actually doing code reviews. I know some will call that “software engineeering” which is a bad word in some (though not all ) CS departments. But rally it is about how to look at code, to learn from it, to make it better, to understand the thought process that goes into writing code. It’s something a researcher should know how to do as much as a production programmer.

  • 3. Greg Wilson  |  April 18, 2011 at 10:59 am

    I disagree:

    1) I would expect a newly-minted BSc in Chemistry to be proficient with laboratory equipment and practices relevant to their discipline.

    2) “…how new computer science ideas can inform better engineering practices” presumes a one-way flow of knowledge that has never been true in the other sciences, and isn’t true in our field either. Simon Peyton-Jones’ essay “On the Importance of Being the Right Size” is good reading on this point…

    • 4. Alan Kay  |  April 18, 2011 at 12:15 pm

      1) I agree, but for a 4 year degree I wouldn’t extend this expectation to include the lab practices of the 18th century. However, for chemical engineering where one might have to wind up working in a plant where the management has chosen not to improve things, this might be a good idea.

      2) It’s not a one way flow of knowledge from science to engineering that I’m talking about, but unless you have found very very different books of the history of engineering than those I’ve read, I think you are mistaken about just how much science has improved engineering over the last 200 years (almost reinvented it).

      This is quite comparable in Computing over the last 60 years, especially the first 30. In the last 30 years, I think CS has been wrongly dominated by (so far weak) software engineering to the extent that what I would call “real computer science” is hard to find both in university and in industry.

      Another way of looking at this is that (say) learning Linux in some detail is to learn something that is large enough and tricky enough to dominate one’s mental environment, and yet from the standpoint of both the present and especially the future, this is very very far from a fruitful knowledge that has anything to do with a better designed future. So I think it’s a double negative whammy.



  • 5. Bonnie MacKellar  |  April 18, 2011 at 11:06 am

    Absolutely students should graduate with the ability to read large codebases. That is most likely the first thing a typical student will have to do in his or her first job. And no, companies should not have to teach people how to do this. This is basic literacy for software engineers.
    I am very disturbed by the trend for computer scientists to pull away from software engineering. All it will accomplish will be to further increase the view that many employers have that the computer science degree is irrelevant. Is that what we want? And if we separate degree programs into computer science and software engineering, where do you think the vast bulk of students will end up? I think that would be a sad day.

    • 6. Mark Guzdial  |  April 18, 2011 at 11:25 am

      I do think that we should teach how to read code, and I think we could. Do you think that we can teach how to write code bases well? Do Universities have that kind of expertise anymore?

      • 7. Alfred Thompson  |  April 18, 2011 at 11:37 am

        Mark, Taylor University has a program as part of their Software Engineering program called Software Studio that I think has some good promise.

        Software Studio: Provides four semesters of increasingly responsible experience on continuing long-term real world projects – many of which are in support of missions agencies

        I think this is an interesting model and they did present a paper on this as the most recent SIGCSE. Full disclosrue I am on their department industry advisory board.

    • 8. Alan Kay  |  April 18, 2011 at 12:21 pm

      Hi Bonnie

      I don’t think computer scientists should pull away from software engineering — to the contrary, we need to be inventing the next qualitative improvements of it. That is one of the main things we should be doing.

      I don’t think real computer science is being done very well in most universities. And partly for one of the complaints that Mark articulated. I think you have to understand, design, invent, and really implement to be doing valid computer science — and this in general does not seem to be what is going on.



      • 9. Bonnie MacKellar  |  April 18, 2011 at 2:08 pm

        I would like to see computer scientists improving the field of software engineering, but it isn’t going to happen if computer scientists disengage from software engineering. There are two good reasons: 1. we can’t improve practice if we have no idea how it is actually done 2. even if we have a bright idea, no one in industry will believe us if they think computer science is irrelevant as a discipline. And sadly, that is largely true. It has improved some in the last few years because of Google’s influence – Google clearly sees computer science as relevant – but it is still the case, at least in the NY area, that experience trumps the CS degree at most companies.

        As an example, my husband works in a financial company, one that is very dependent on advanced financial algorithms. My husband is a CS PhD, and his expertise is in the development of high performance algorithms. However, he spends the majority of his time on software engineering issues, because those things are important and necessary. And that is fine with him – he understands that quality assurance and refactoring and build management are just as important as the algorithms. His company is just as likely to hire ex-physicists as computer scientists. As long as they have the experience, understand the financial part, and know the software engineering part, they are equivalent in the minds of the hiring managers. That is what computer science hasn’t managed to do as a discipline – convince hiring managers, even in places that require advanced computing methods – that computer science is any more relevant than physics.

        • 10. Alan Kay  |  April 18, 2011 at 2:30 pm

          Hi Bonnie

          I agree with your 1) and 2).

          And as I said, I think part of both of these are that computer science itself, in the original sense of what Perlis and others meant by it, has quite degenerated almost to the point of vanishing.

          This is a similar complaint to the one I made about retaining the phrase “object oriented” but changing the meaning. It looks like something is still there but it has vanished.



        • 11. gasstationwithoutpumps  |  April 19, 2011 at 1:38 am

          Since when have physicists known or cared about software engineering? My experience is that physicists are far less likely than computer scientists to follow any sort of good engineering practice.

  • 12. Robert Cooper  |  April 18, 2011 at 12:02 pm

    I tend to waffle on this just a little bit. Getting really good as a coder isn’t something I think you can even do in a 4 year program. That is something that really comes after years of professional work, though some work with production code would be good.

    This is a lot of the motivation behind the Google Summer of Code projects: to get college students’ hands dirty with actual production code. Perhaps institutionalizing it as a carry-over class through your academic career — one “course” of just contributing to a production open source project per year — would help a lot.

    • 13. Bonnie MacKellar  |  April 18, 2011 at 2:11 pm

      I am a big fan of open source development, and am heavily involved in it (we have a HFOSS project this summer, in fact, that I am supervising). However, open source development is quite different from corporate development, so I don’t think we can just rely on having students doing open source experiences. It is a good way to get them reading code though.

      • 14. Robert Cooper  |  April 18, 2011 at 5:16 pm

        It is becoming less different than corporate development all the time though — as more companies are adopting the methodologies of the FOSS world.

        Like I said, though, I am not even sure you can’t produce a top-notch coder from an education program. However, working with FOSS projects will certainly get someone into reading code, as well as working with source/change/build management issues and tools.

  • 15. Bonnie MacKellar  |  April 18, 2011 at 5:27 pm

    The use of the term “coder”, even qualified with “topnotch”, shows the extent of the problem. We aren’t aiming to produce “coders”. I would like to think that we are producing topnotch software engineers (as well as researchers, algorithm developers, etc). Many, possibly most, of the work that needs to be done to get a product into production or out to a customer has little to do with coding. In fact, that tends to be one of the issues with FOSS projects – they are often all about coding and little else gets done. That is why so many of the projects have indecipherable documentation and build processes that don’t work.
    I have to be careful here because I don’t want to sound negative about FOSS. I am a big believer, and I think it is a great experience for students. I just think they need other experiences too.

    • 16. Robert Cooper  |  April 18, 2011 at 9:06 pm

      Yes, producing software engineers is important, but a software engineer who isn’t at least a competent coder is like a mechanical engineer who is a poor draftsman– of not a lot of use in the real world. In my middle age, I certain have come to appreciated the eduation in SE and CS people get in university environments, but only when they can write code too. Nothing in the world is worse than someone who can’t write legible, idiomatic code for destroying productivity on a team. I work with a number of people now who have vocational ed and experience in situ, a biologist programming autodidact and people from CS programs. I would certainly preferr the whole team was well educated — it does make a big difference, but the teammate I would call the biggest liability is also the best educated. He simply can’t write clean and coherent code reliably.

      I am also curious what you are thinking about when dissing FOSS build scripts? I honestly can’t recall the last time i got open code that could be built with “mvn install” or “configure; make; make install”.

      • 17. Erik Engbrecht  |  April 19, 2011 at 12:01 am

        FOSS tends to assume a certain build environment and system configuration. Making maven work beyond a strict corporate proxy is a pain at best. The configure; make, make install dance assumes permissions to the system that the average software engineer quite likely does not have. Never mind what happens when you need to build something on a machine that is not connected to the internet when the build process assumes a readily available connection…

        So personal work at home from my Mac (key: Unix like OS) with an unrestricted internet connection is usually pretty painless. Building something at work from a Windows XP desktop behind a authenticating proxy or a server that is intentionally disconnected from the internet is more of a pain.

        And remember a pain for one person may seem like an insurmountable obstacle for the next.

        Ultimately the build process represents the configurations that the core contributers use to build. Large projects usually have sufficient diversity such that the process will work most anywhere.

        Or about code itself. Once I wrote some code that relied on graph algorithms. It turned a directed graph into a tree according to some heuristics. A developer on my team was having trouble understanding it. I pointed the developer to articles related to the algorithm. The developer responded that that was math, not programming. The cleanliness of the code was irrelevant if the person working with it lacked the proper background.

        My point is that the quality of build scripts is subjective and dependent on the build environment. What defines clean, coherent code is subjective and dependent on background.

  • 18. The importance of being “gritty” « kansas reflections  |  April 24, 2011 at 10:30 am

    […] Show Me The Code ( […]

  • 19. Ken Long  |  April 24, 2011 at 10:36 am

    i face this exact challenge at a military college for the US Army when it comes to educating officers on how to write logistics support plans that incorporate a lot of science and art together. The Army has been doing stability operations for so long that we are losing experience in how to support major conventional operations, which is a lot more challenging than the current mission sets the officers have been experiencing for the last 5 years.
    This essay inspires me to go after the problem from the angle of having experts rewrite student-generated solutions in their presence, and then graduating to an exercise where a group of students works on improving a first iteration solution. Thanks for the effort!
    Ken Long, US Army,

  • […] Show Me The Code ( […]


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,052 other followers


Recent Posts

Blog Stats

  • 2,031,467 hits
April 2011

CS Teaching Tips

%d bloggers like this: