Skip to main content

My Department is Slashdotted

Posted by cayhorstmann on June 15, 2009 at 9:12 PM PDT

I teach computer science at San Jose State University. My department just
ended up on href="">Slashdot.
One of my colleagues, Dr. Beeson—who, to his great credit, makes
beginning students write lots of little homework programs until they get
them right
—got into a tussle with href="">Kyle
Brady, an eager student who insisted on href="">publishing
his answers on the internet. I don't want to get into the personalities
here. Beeson can be irascible and a bit overbearing, and the student's claim
that he is doing this to increase his chances for employment rings a bit
hollow. When is the last time you hired someone because of their href="">TicTacToe
program? Even if I did, I'd be wary about candidates who write

(foundEmpty == false)
instead of if (!foundEmpty)...

Sure, instructors
should vary their problems from one semester to the next, but there are only so
many ways in which you can vary the basics. Consider TicTacToe. There are maybe
ten ways of changing it. Of course, there is no intrinsic merit to TicTacToe.
It's just a vehicle to test nested loops over a 2D array. We like it because
doesn't require a long backstory—students are familiar with it. But let's
ditch TicTacToe if all variations are on Google. What else is there? Magic
squares. Row and column totals. Counting zeroes. Making shapes with ASCII art:
squares, diamonds, spirals. Floodfill. Escaping from a maze. The game of life.
But all of these are on the internet too.

So, what does it mean for teaching and learning programming when the
solution to every beginner problem is available on the internet?

I am all for more code reading by students. Too many students just write
code, and if googling an answer makes them read more code, that's great.

When I learn new stuff, I set myself little tasks to solve. I don't just
google for the answer since that would defeat the purpose of learning. Are our
students like that? Kyle Brady probably is. But I have met a few who just want
to get a good grade, get their degree, and start making money. Others are
willing to do the right thing but lack the self-discipline. Quite a few work a
job or two to put themselves through college, and limited time and financial
necessity makes them go to Google when they shouldn't.

That brings me to the issue of “certification”. When you hire
someone, you want to see that college transcript because you expect some
correlation with ability. So, we as instructors need to give grades, and to
give grades, we give homeworks and exams. All of whose solutions are available
on Google. So, how can we certify that students know what they are supposed

#1. Shut off the internet. Herd everyone in a room with lead walls and make
them do their work there. Or (gasp) go back to paper and pencil. Personally, I
hate doing that. I give bring-your-laptop, open-book, open-notes exams because
I want my students to build up skills that they can use later.

Strategy #2. Starve them for time. That's what href="">TopCoder and href="">betterprogrammer do. Sure, you
could google for hints, but then you would not be able to finish in time. My
students will argue that I use that approach as well, and they do not like

Strategy #3. Interview each student personally and ask questions about the
code. Unfortunately, this is incredibly time-consuming and impractical on a
large scale. (After all, if this was easy, we wouldn't have the href="">SCPJ.)

Strategy #4. Forget about coding and evaluate students on their ability to
be creative, express themselves, resolve conflicts in a non-confrontational
way, etc. etc. These are all wonderful traits, of course. But I am reminded of
a faculty summit at, of all places, Google, where eager professors from
reputable institutions shared the latest thinking in computer science
education. At the closing session, one of the Google managers said that this
was all good and well, as long as the graduates can code.

So, as
you read those Slashdot comments, have some pity for the poor CS instructors.
Not for having to come up with a neverending stream of practice
problems—that's part of the job. But for having to teach students to be
ever more disciplined. In the past, we could rely on a reward system for
homework assignments. Do a good job, get an A. Thanks to Google, it has become
too expensive to give a fair reward for the kind of routine practice homeworks
that one really needs to build up skills. Now we must train students to do
their homework without resorting to Google, show them nicely what happens when
they don't, and then tighten the screws by the end of the semester, all without
demotivating those students whom we want to attract to the major. This is not
an easy task.

What you don't hear in Slashdot is that Dr. Beeson is actually doing a good
job. He built a system where students can submit their problems until they get
the right answer, and for a lot of students that is pretty motivational in
itself. Obviously motivational enough to get Kyle Brady to come up with answers
that he is proud to share with the world.


nice to see that you guys can confront your teacher like that, and really have a healthy discussion, in my institute, do something like this and get ready for something real bad, you won't know what expect , as for the discussion I must say that certainly Kyle doesn't have the understanding of what this post is all about, I am also a student, and in his defense I tried as hard as I can think of but there is not certainly a thing I can figure out, as for Mr. Hortsmann I certainly respect him because he is the author who taught me really how to use Java and introduced to the Javadoc so I may be biased, but I find nothing in the article that can go against him or Kyle although Kyle comment is something he should not do, not taking sides , he should at-least have some respect for teacher, there is nothing he do that should made you feel agitated, I agree with dwschulze that university system should be over-hauled but that is another point.

Professor Horstmann's post and the comments bring to mind what I've heard about the phrase "computer science": There is little or no science in computer science. Computer science courses are all about programming. And going by what's written here, it is about becoming a fast coder. Strategy #3, while it is time consuming, would be the most educational for the students. But instead of just trying to certify them, why not use that interaction to tutor them? I hear hints of being more like a high tech trade school than a fundamental education. The best educational experience I had was the final course I took in my PhD program in physics. It was an advanced graduate course in plasma physics. There were only 5 students in the course, and according to the universities guidelines it should have been canceled for low enrollment. But the department head was teaching it and he kept it open regardless. (It made up for some of the graduate courses I took that had over 40 students enrolled.) It was almost like having a private tutorial. During lecture he would stop and ask specific questions of us, sometimes drilling down pretty deep. It revealed, and fixed, some long-standing deficiencies in our earlier education. It could get intense and at times embarrassing to admit that we really didn't know certain things as well as we should - as near PhDs. The final exam was a one hour oral exam. One-on-one with the professor. It wasn't intimidating. It was somewhat cordial, but there was no hiding anything in that situation. He knew exactly how much I knew after that, and more importantly how well I could think. It is ironic that the universities guidelines didn't really allow for that kind of teaching. The university should be encouraging that kind of teaching instead of forbidding it. It isn't economically possible for all or even most courses to be taught like that. But everyone's degree program should include at least one course that is essentially a one-on-one tutorial situation. (Independent study has far too little interaction with the professor to qualify.) I hope SJSU does something like that for their undergrads, instead of just the trade-school approach that I'm hearing about here.

Good points, Alex. At my institution, we've used both of your strategies successfully in the past. However, we've recently switched to an assessment regime in which all summative assessment takes place under examination conditions, at the end of the year. The many programs that students write throughout the year are assessed formatively and have no direct impact on the final grade obtained - although failing to make a reasonable attempt at them will obviously compromise learning and affect the final grade indirectly. This strategy is akin to Cay's "starve them of time" approach. The complexity of the problems we can set in the final exam is limited by the exam duration (3 or 4 hours, typically), but we compensate for that partly through our choice of programming language (Python) and partly also by basing the exam questions on a module of code that is made available to students a couple of weeks before the exam. They can read & understand the code and figure out how it is used as part of their revision.

I will readily agree that the problem of "everything is available on the web" is very real (referring to code for introductory programming assignments), and will only get worse with time. But our chances of reverting this trend are about the same as our chances of taming the forthcoming waves, armed with a couple of buckets. I have been teaching introductory programming courses for some time now, and I have found that there's only two complementary strategies that work: * Change the assignments every single time you give them out, and make sure that each time you add that extra little something that makes them different to their "generic" incarnations (with abundantly available solutions). This at least ensures that even if people start with something they got off the net, they will still need to understand the code and modify it to accommodate the different requirements you set. I personally even provide students with an "official" reference implementation for every assignment after the submission deadline - so that they can compare it with what they did, and hopefully learn from this comparison also. Yes, this is not an easy task; yes, it requires considerable amounts of work every single semester; and, yes, it requires that one has to go off the trodden path for new ideas. Yet, this *is* part of what we are paid for, isn't it? * Use one of the several (and good) code plagiarism solutions available, and make sure you feed them not only with the students' submissions, but also with the most prevalent related solutions from the web. I can tell from experience that this even brings up those cases where people "got their inspiration" from the same source, whatever that might have been. I can also attest to the fact that knowledge among the student population that such measures are in place and effective, is an immensely strong demotivating factor for plagiarism. Admittedly, the above are not a basis for a long-term solution. This is a problem that is by no means related only to introductory programming courses - and, therefore, can't be solved at this level. Humanity as a whole may soon have to redefine what constitutes "knowledge" and how it is acquired, in the presence of rich reference material for practically any question one might think of, and available anywhere and at any time. And, for my person, I doubt the solution is to wall off students, physically or through the sheer power of regulations and punishment, from either accessing, or contributing to this sea of knowledge. My 2c, Alex

Sorry Kyle, but I think you need to take a deep breath, then go back and read Cay's post a bit more carefully. He's saying that he *doesn't* think you just Google for code, but that many other students do! He certainly isn't slandering you, calling you a cheater, etc.

I'm Kyle, FYI. In my defense: 1) You picked a problem that was given with a handful of others as a start-of-semester "pass these or be dropped from the class" test. The goal was not to have good or beautiful code, but to get them working as fast as possible. Maybe next time you shouldn't pick an example that you know to be both trivial and non-representative. 2) These all had contexts with them, and you would have known this had Beeson not demanded I pull down all related docs. They're being reworked and reposted soon. 3) This was my first semester using Java. And any employer that's going to be worried about == false vs. ! should find something better to do with their time than pick apart code semantics. 4) I'm sure the department (and some administration higherups) would love to know about you slandering me, calling me a cheater, by implying I just search for all my code. Maybe I should archive this page and pass it on... 5) Never once did I say that Beeson was a bad professor. In fact, I even commented a few times on different sites and to different people that I found his class to be as enjoyable as one could be about data structures and algorithms. I think he's a nice guy, when he's not being pissed at me, and I really liked his class - the homework submission system is a perfect way to mix code viability with "learn to debug properly". His class was also hard as crap, and when I completed the assignments I felt accomplished (except for the one that I couldn't figure out to get working fully and took a B because it didn't expand to a huge data set). You're right in that this was part of the motivation in posting the code... if I busted my ass on it, why should I not put it on display to prove that I did? In all of the articles, posts, discussions, etc. I did not attack Beeson, or criticize him as a person - only his now infamous request and reactions to my code. I find it interesting that you, a fellow SJSU CS Professor, saw fit to criticize me as a person, a programmer, and a student. Not exactly setting the bar high, are we? --Kyle

Dr. Horstmann, Saw you on DZone!!! You likely do not remember me, but I took CS 160 with you two years ago at SJSU. I absolutely did not like your class and passionately hated JSF during our class, but now, after two years of working as a junior software engineer, I realize that your class was one of the most helpful classes in my career. Thank for forcing us to learn practical programming. Thank you for THE most useful class at CS SJSU. Your practical introduction to SVN (and forcing us to check-in stuff during exams) saved my life during the job interview. Thank you so much.

Thanks for precisely articulating what I've been trying to express about this story. Hélène

I think the teacher might be right actually in spirit. I was in the same position while a student. I would constantly store the lab assignments and other homeworks on my university-hosted website. This wasn't confronted by any teacher actually, but what happened is that on one particular course the homeworks were really the same every year. So, a lot of the students in the following generations just found out somehow about my website and submitted the exact same code. I mean, really, I think 5 years after that I still had new students that knew my name just because they had to visit my personal website to download the homework assignments for that particular course. It was interesting and depressing at the same time since I was almost an accessory to their cheating, which hadn't been my intention. Anyhow, I assume this also made the teacher's work easier since the stolen code was just mine mostly and some student's didn't even bother to remove the copyright header of the files where my name/email was clearly written.

Cay, Thanks for the link - that's an interesting read. I think with beginners, the use of equality operators with booleans helps them to reason the condition of an if statement because it reads better to them (e.g., they can talk themselves through it - if "b equals false" then do this..). Some programmers never grow out of the habit and I've never been unduly worried by it as long as the logic is correct. Perhaps I've been too easy with my code reviews.. After thinking about it, I guess your worry is not so much with the boolean type but with understanding that the condition itself evaluates to a boolean.

That's Bool...ean!

@waldorfstatler I would like to emphasize your last point: "understanding that the condition itself evaluates to a boolean." I work with many developers and seeing code such as (foundEmpty == false) is an indicator that the developer, to me, lacks an understanding of the boolean type. Also, the programming level is very entry-level. I'm sure that when I took my CS 46A class at SJSU, I wrote code that explicitly checks the value of a boolean. But over time and experience, I see it not used at all except by developers who don't understand the concept of booleans. Granted, it is very readable, but also adding unnecessary code. Shouldn't we move toward writing code that is very concise and implicit? I've also seen code written in such a way: Boolean foundEmpty = Boolean.FALSE; if ( (foundEmpty).equals(false) ) { ...} if ( (foundEmpty).equals(true) ) { ... } What happened to using the "else" clause? It's very readable, maybe too readable to a point that it bothers me so much that I have to re-write it: if(foundEmpty) {...} else {...} Why make my life or any programmer's life reading this code harder than it needs to be? Simple logic and understanding in how to use if..else and booleans is sufficient for me. Of course, one can argue... (foundEmpty)? {...} : {...}; Well, now it becomes more cryptic, less code, and yet again, I may have a hard time reading. I rather pick the latter two, than see the former. At least the latter two tells me the developer has a basic understanding on how to use if...else and booleans. More of a stylistic debate at this point rather than a knowledge debate. My 2 cents. -Bernard (former student to Professor Horstmann...I wonder if I can call him Cay now)

@waldorfstatler: When I see "b == false", "b == true", "b != false" or "b != true" (and I have seen them all), I have the nagging suspicion that the programmer may not have a good grasp the Boolean type. Check out

I was interested to see this line: "I'd be wary about candidates who write if (foundEmpty == false) instead of if (!foundEmpty)" Both are correct and it's arguable that the first one is more readable. Surely that's a question of programming style than ability.

2007 SJSU BS CS Alum here, I recently was told a programming proverb to the effect of, "Good programmers right great code, great programmers re-use already written code" or something to that effect. Google is not an obstacle to teaching programming, it only signifies a change in the paradigm. As the only major public university in Silicon Valley what hope of relevancy and legacy can we have if you faculty are too lazy or otherwise unwilling to embrace this change and blaze a new trail for the world to follow? Apparently (before I was born) the calculator was to signify the fall of academic math, yet math still gets taught today, how many people still use slide rules? Embrace the future, innovate, please.