Skip to content

Show Me The Code

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.

There’s no class dedicated to showing students good code and having them write some.  Each one has some ulterior motive.  Our CS1 class isn’t about learning Python.  It’s about using computers to manipulate media, or robots.  Our CS2 class isn’t about learning Java.  It’s about writing code in an Object-Oriented style.  Each successive class, a new concept: data structures, algorithms, hardware, systems, operating systems, networking.

But we have only one class that even makes an attempt at teaching coding practices: CS3300.  And even in it, the focus is much less on reading good code, and more about hacking something together to pass a project demo.

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.  And what do Georgia Tech CS graduates do with their undergraduate degrees?  Go to industry (and code) or go to academia (and code).

I know adding yet another mandatory course is unpopular, and if everyone with a passion made their pet project a degree requirement, we’d get out with a B.S. in seven years instead of four and a half.

So let’s either make a suggested course where building coding skills is the primary focus, or integrate the software engineering discipline throughout the curriculum.

The thought of professors actually show production code in class seems like glimpsing a foreign land.  The only code I see on the projector is pseudocode or from a toy project.

Another potential solution is to have a class specifically dedicated to reading good code.  With so many excellent open source projects freely available, I’m frankly a bit surprised I didn’t see them more often in lectures.  This isn’t 1987 and gcc isn’t the only freely available compiler in town anymore.

Let’s take a guided tour through some of the more famous open source projects: gcc, Linux, Apache, MySQL, Python, Firefox, Audacity, GIMP, VLC, 7-Zip, Blender, memcached, node.js, socket.io, and many many more.

What design decisions did they make?  What common patterns do we find?  How easy are they to extend?  What’s their build process like?  What existed before they did?

I believe many students would find this course exciting, engaging, and incredibly useful for the types of jobs and graduate degrees I see my friends going into.

I teach my school’s CS2 class, Intro to Object Oriented Programming using Java.  This is my seventh semester, as a TA, and I’ve seen a lot of bad homework.  What might help students craft better code is seeing what it actually looks like.

So this is my question: Why is no one showing me the code?

4 Comments

  1. Jay Summet wrote:

    Andrew, you state that ” Our CS1 class isn’t about learning Python. It’s about using computers to manipulate media, or robots.”

    As the instructor for CS 1301-Introduction to Computing (with Python & Robots) I disagree. 1301 is designed specifically to teach you the basics of imperative programming (variables, assignment, expressions, function calls / parameters / return values, conditionals, iteration / looping / recursion, etc…) We happen to use the context of Robots (in 1301) or Media (in 1315) to give students something interesting to do with their programs, but the focus is very much on programming fundamentals. Now, in 1301, students are not yet ready to view samples of full sized applications, but I do attempt to demonstrate several large pieces of code in class lectures that try to illustrate how to solve problems correctly and take into account error conditions, bad input, etc.

    Friday, April 15, 2011 at 08:24 | Permalink
  2. 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.

    Monday, April 18, 2011 at 11:01 | Permalink
  3. Xamuel wrote:

    I second this motion.

    The way I learned C is as follows. I was a big MUD player in the late nineties, and eventually I downloaded the codebase for the MUD family I liked, and started playing with it. At first, when I wanted a feature, I would simply search through the (large) existing codebase and find something similar, and modify it as needed. As time went on, I become more and more independent until eventually my skill reached that of the original coders…

    Monday, April 18, 2011 at 18:04 | Permalink
  4. Joshua Anderson wrote:

    I am going to have to side with Andrew on this one. Perhaps the reason I believe the above is that I came from a Math background, but in Math there is an equal emphasis on beauty and truth. In my experience the only real emphasis in the computing curriculum was in working code, which is important, but a great Computer Scientist should be able to do more than write code that works. In math I have certainly lost points for not having graceful answers. I have never even been threatened with such a loss of points in the College of Computing. There is little doubt that writing professional-looking code is a skill that cannot be learned in four years, but it should certainly be taught

    Tuesday, June 7, 2011 at 08:36 | Permalink

2 Trackbacks/Pingbacks

  1. Show Me The Code « Computing Education Blog on Monday, April 18, 2011 at 09:32

    [...] via Andrew Ash › Show Me The Code. [...]

  2. Fourth Linkfest on Saturday, April 23, 2011 at 12:24

    [...] Andrew Ash: Show Me The Code [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*
*