Skip to main content

Teaching computer science

After 8 years of teaching business and technology courses, I've learned a few things about teaching computer science.  I've tried a lot of different approaches and there are a few things I've found to be effective and important in the classroom: respect, enthusiasm, practice, evaluation, and regular feedback.  This is no means a prescription for a perfect classroom, but I've found that a lot of this really works for me and the students I've worked with.

Respect

Try to learn the students' names as quickly as you can.  Remembering someone's name is a show of respect.  If a student is going to listen to somebody talk for 3 hours a week for 15 weeks, the least an instructor can do is remember his or her name (besides, saying, "Hey... guy" doesn't really work past the first week or so).  Obviously this may not be practical all the time - lecture halls with hundreds of students make it just a little harder - but it really helps an instructor to connect with the students.

It's also good to try to convince them that you are interested in helping.  The students *should* succeed. They should understand why learning certain things is important.  They should know the practices that good programmers engage in, and why some practices lead to bad programming habits (hint: O(n^7) solutions are usually bad).  They should know how things will work in a job some day.  A good instructor should help them accomplish these things.

Grades should be secondary.  An "A" doesn't mean a student is smart any more than an "F" means a student is dumb - it just means that the "F" student, for some reason, didn't accomplish some required minimum class requirement.  The requirements are there for a reason, for sure, but the major goal should be to ensure that students learn as much as possible - not pass or fail students.  It's not about grades - it's about really learning.

Enthusiasm / Fun

In my mind, effectively teaching computer science is equal parts logic, coding, and sales.  You have to do all three.  When you're teaching undergraduates, it's one thing to present the material effectively - but you have to make them believe in it.  You have to sell it.  You have to make them want to complete the assignments, because there's a reason for it.  You want to make them excited about computer science and software engineering.  If you can do that, the students will work harder because they'll know this their work isn't just going to be going through the motions to meet some mundane criteria.

It also helps to make the class fun.  There are lots of ways to do this - you can create assignments that are interesting and rewarding.  You can make lectures entertaining and more engaging.  You can create interesting grading systems or assignment approaches.  You can incorporate outside material.  Trying different things out and seeing how the students respond is a great way to make the class more enjoyable (and if all else fails, just point to starting salaries for CS graduates).

Practical and Relevant Practice

I think assignments are important - and a lot of them.  Even though you tend to work on large projects in a software engineering job, one or two big projects for the term don't teach students about what it's really like to have a job.  The big difference is that in a typical job, you're expected to work on your project every day; in school, you don't have the same motivation, reward system, or status checks to effectively accomplish this (i.e., nobody is paying you, and nobody is yelling at you).  Some students might work on a large project every day because that's just the way they operate.  Most of them will end up cramming it in closer to the due date or at the last minute.  This doesn't help them learn - it's like cramming for exams.  Much of it is forgotten shortly after the assignment is completed.

I've found it much more effective to give smaller assignments, but more of them.  I think at least one assignment every two weeks is a pretty good frequency (one per week is better, but hard to keep up with).  That's because it keeps the students coding.  You need more than just demonstration of concepts - you need regular practice to really learn how to be a software engineer.  Lots of smaller assignments keep the students regularly engaged.  It's more work to grade, but I think it's important.  It keeps the students' minds consistently thinking about coding.

There are definitely ways to break large projects or assignments up into smaller pieces - in fact, if you think about it for a moment, this is exactly what happens in a job as a software engineer.  By doing this students can accomplish a larger project, but presenting it in smaller pieces will give the students a more manageable way to finish the work.

I'm extremely skeptical of puzzle solving problems.  Google stopped doing these types of questions in interviews for a reason.  I know a lot of instructors love to assign them but I don't know what students really learn from them; I really believe there's more value in knowledge, technique, and writing maintainable code than there is in "clever" solutions to cryptic problems.  Chances are, coding an algorithm to solve a sudoku puzzle isn't going to come up in the day-to-day work in a future job or academic pursuit, but it might trip up some strong developers who aren't good at that sort of thing.

Regular Evaluation

I used to give weekly quizzes in my classes - both as an exercise in repetition (you tend to remember things better if you repeat them after learning) and as regular evaluation.  In the last year I've changed this a bit.

Not long ago Harvard announced that "required" final exams would no longer be required.  Of course the big controversy was no longer having final exams, but I drew a slightly different conclusion from this policy: one big comprehensive exam just wasn't an effective teaching tool.  I've discovered something that is a much more effective teaching tool: a series of comprehensive exams.

As an instructor, this is something that is a huge pain to deal with but I've found it to be extremely effective for students to learn the material.  In a 15 week term 4-5 exams is a pretty good number.  The important thing is that each exam is comprehensive - it changes the student mindset.  No longer can students study for an exam and then forget the material shortly after.  It inspires students not to quickly learn the topics, but to KNOW the topics.  Students don't love it, but I've found it to be effective for knowledge retention.

So much of computer science builds on earlier topics; for example, you need to understand how a linked list works before you can learn binary search trees, and you need to understand queues before you can understand breadth first search algorithms.  By continuing to test students on all the material throughout the term, knowledge retention can be improved.

Regular Feedback

There are two sides to this: student feedback and instructor feedback.  Student feedback is typical - usually suggestions and comments in assignment grades, exam feedback, etc.  Instructor feedback is often less frequent, but is just as important.  It's hard to hear you're not awesome all the time, but it's important.

You can ask students several times during the term how things are going.  The school where I'm currently teaching does end-of-term evaluations, but I don't think that's timely enough to correct your pace or methods.  It's important to regularly get a feeling for how the students are responding to the material and your style.  It's easy to ask the students in your class a few questions in small, informal, anonymous surveys to get their opinions and comments on the course.  Is the course moving too quickly?  Too slowly?  Are you feeling challenged?  One time a student responded that I tell too many jokes - so I tried to make it a bit more serious (unfortunately I'm just not so good at serious, but I really did try).  This can give you great feedback to course-correct (no pun intended) and can really improve student engagement.  Students like it when they feel like you're listening to them (much like professors).

Closing

One big problem I found with my undergraduate education was that too many instructors didn't seem to want to teach, let alone enjoy any aspect of it.  I had some great instructors, sure - I'm really honored to be working alongside many of them now.  The ones that I really remember are the ones that had a passion for teaching.  It wasn't just something they had to do - it was something they enjoyed.

A lot of these other things are easier if you really enjoy teaching.  I love teaching.  I enjoy helping students.  I get a lot of satisfaction out of explaining how things work.  Because of this I try hard to improve my classes every semester.  I think that being passionate about education - truly desiring to do it well - can really make the difference for any instructor.

Comments

Popular posts from this blog

Sheetz Sandwich Standoff: El Gringo vs Twisted Swiss

My wife left me alone for dinner tonight so I decided to check out the latest GetGo offerings... but to my great chagrin, they have no promotional subs. My travels led me to the local Sheetz, where I'd be able to keep eating the best gas station sandwiches around. To keep tradition alive, I picked the two most outrageous "Burgerz" on the menu: El Gringo and Twisted Swiss. The ingredient list is promising: Twisted Swiss is the burger with topped with swiss cheese, cole slaw, pickles, bacon, and whatever "Boom Boom Sauce" is on a pretzel bun.  El Gringo is the burger topped with pepper jack cheese, chili, Doritos, and BBQ sauce on a regular old bun. I unwrapped them both and stood back to admire the majesty before me. They're not pretty, but they do look a lot better out of the wrapper than many fast food burgers I've eaten. Twisted Swiss I expected this sandwich to be an awful mess.  It just seemed like a bunch

The Gobbler from Arby's

Stop.  Stop what you're doing and go to Arby's. Right. Now.  Have them make you a Gobbler .  This is not something you'll regret. Go. Eat this thing. Look at that bacon. Go. Arby's has a new sandwich.  It's called "The Gobbler" and as far as I can tell it's two things: a vehicle for their new deep fried turkey, and an attempt at a Thanksgiving themed sandwich.  It's also a third thing: magically delicious. move over Lucky, there's a new holiday mascot on the block Unwrapping: this actually looks like a sandwich.  It looks appetizing.  It looks like something I want to eat.  It doesn't look like the promo photo above, but it doesn't look like someone was flailing around and accidentally smashed up a sandwich, either. sexy Instagram caption goes here First bite: Wow.  I mean, "WOW."  Holy h*ck this is good.  The turkey has a really bold, meaty flavor.  It tastes a lot like turkey sliced fresh from your

Get Go Sandwich Standoff: "The General" vs "The Rogie Hoagie"

Get Go has been KILLING it lately with crazy sandwiches that are great for advertising on the radio but I've been wondering if they're actually great for eating. The new one I've been hearing about is "The General" which is like Chinese take-out on a sesame sub roll.  I hear ads for it every morning on my commute, and I see a giant billboard for it too.  It's basically chicken tenders with General Tso's sauce and egg rolls on a sesame bun.  I'm guessing they were inspired by Primanti's and decided to try to apply it to a different cuisine (I'm looking forward to The Russian Borscht sub which I'm sure is planned for later this summer). I ventured out to my local GetGo to try one of these out, only to be greeted by "The Rogie Hoagie" on the screen in addition to "The General."  What a great surprise (and additional gastronomic challenge)!  I decided to try them both and report back.  "The General" only comes