Wednesday, December 12th, 2007 07:18 am

There are educators (and students) who Get It, and then there are those who don't.  The following story, from Robert J. Hansen, centers around a professor at Cornell who did, indeed, Get It.

(Yes, there are several Robert J. Hansens.  This post refers to this one.  Who also turns out to be [livejournal.com profile] cipherpunk.  Small world FTW!)

When I was an undergraduate, I'd already been working as a freelance C++ and Pascal programmer for a couple of years before I walked into my CSC140 course.  The instructor, Leon Tabak, gave us the entire block's¹ programming assignments on the first day of class.  I ignored Professor Tabak, skipped out on class after our first quiz, and by the end of the day had the entire block's assignments done.  It was a long day, mind you, but I had them all done.

The next day we got our quizzes back.  I picked up a 6/10.  The guy sitting next to me picked up a 9/10.  It was absurd!  My answers were better than his, more correct!  Cheese Boy himself agreed!  So we talked to Professor Tabak after class and I asked what was up with my grade.

"Oh," he told me.  "It's simple.  You already know how to program, Rob.  I graded you more harshly because you know better."

I was apopleptic with rage.  When our first programming assignment came back, I got a D while Cheese Boy got a C+, and his program didn't even compile.  I got red-penned on everything from variable names that weren't descriptive to poorly organized source text to passing variables on the stack when the data structures would be faster as references... all things that were far, far beyond the scope of CSC140.

Every time we got a program back and I discovered I'd been red-penned into oblivion, I'd rewrite all the remaining programs for the block to address Professor Tabak's critiques.  But there was always more red-penning.  And my grade was always slipping.  By the end of the block I was fighting to hold onto a D, despite the fact I was writing better code than most of the seniors.

The end of the block came.  Grades were posted.  This is in December 1994, before the web became so commonplace, back when professors printed out grades by Social Security Number and tacked them to their office door.  I walked up expecting to see a D-, which was the grade I'd earned so far.  I was furious.  Spitting mad.  I had a complaint letter to the dean and I was going to get my grade and then walk down and deliver the letter and ...

... what the hell?  I got an A+?

I knocked on the office door.  Professor Tabak opened it, invited me in.  We talked for a while.  I asked him what was up with my grade... I hadn't received anything higher than a C+ the entire block.

"A grade is meant to represent how well a student has learned the material.  The rest of the class was learning how to program, and they were graded according to how well they learned.  You were learning how to program well.  You were graded according to how well you learned.  What's the problem?"

I walked out of that class utterly shell-shocked.  I couldn't believe that the CS department actually allowed him to grade like that.  I was angry.  I was furious.  I was outraged.

But.  I got an A+.  I decided I could get over my outrage.

My next course with Professor Tabak, I asked him to not even put grades on my work, just red-pen it.  He'd red-pen it, I'd talk to him about the red-penning, I'd fix the problems and make it a point never to make the same mistake twice.  I never got less than an A- from him, and I got a genuinely first-class undergraduate CS education in the bargain.

I left Cornell a firm believer in the power of red pens.  I always keep a red pen on my desk, for historical and symbolic reasons.  It's not there to criticize others.  It's there to remind me that excellence is achieved only by withering criticism — and that excellence is worth it.

[1]  I attended Cornell College, which is a block institution.  We take one course at a time for several hours a day, five days a week, for a month.  This gives us considerably more classroom time than most students receive on a typical semester plan.

Robert J. Hansen

This reminds me strongly of Dr. "Skip" Keefer at Eastern Washington University.  He cultivated a reputation as an absolute bastard to take a class from, and did not suffer fools gladly.  The common word among CS students said Dr. Keefer didn't give out 4.0 grades, period.  An unconfirmed rumor said that he'd given one out to a brilliant Asian student three years before.  He used to say that VAX macro-assembler was the first programming language to contain not only an instruction, but an entire instruction family, named after him.  (The root form of the instruction family in question was Subtract One and Branch.  Deriving the acronym is left as an exercise for the reader.)

It wasn't that he set out to be an asshole, though.  It was merely that you had to earn his respect.  But he was visibly glad when you did, because that was what he was about:  Pushing you to earn his respect.  Because he wanted you to deserve it.

I first realized that this was his creed during the second (I think) quarter of the compiler design series, using awk lex and yacc to write code.  He gave us an assignment to create a CLI algebraic (infix notation) calculator using only awk lex and yacc.  OK, not a difficult assignment.  I went over to the Unix lab, sat down at a Sun, and about an hour later, turned in my completed assignment.  The next day, he gave us a new assignment, to modify our calculator from algebraic to reverse Polish (aka postfix) notation.

I looked at him, thought about my code, shrugged, went over to the lab, changed one line of code that was there solely to put the output in algebraic order, and turned the assignment back in at his office.  He was in his office at the time, so I asked, "Are we supposed to notice that if the grammar definition is fully unambiguous, then the internal order of execution is already RPN?"

He smiled, with a leprechaunish gleam in his eye, and replied, "Let's just say I was hoping that you would."

My final quarter at EWU, I took two courses from Dr. Keefer, completing the operating systems and compiler design sequences.  I got 4.0s in both.

DOH!

Update:

[livejournal.com profile] maradydd's comment that awk was overkill for the problem suddenly made about a three-hundred watt lamp light up in my head.  The lamp illuminates a large colorful backlit sign, arranged to face me. The sign reads, in foot-high letters, "No, you imbecile, it wasn't awk and yacc, it was lex and yacc.  What were you THINKING?"

And I have no answer at all.  Because I utterly cannot imagine what could have caused my memory to offer up awk in place of lex, or what could have caused me not to realize "Wait a minute, that can't be right."

Hence the corrections above....

Wednesday, December 12th, 2007 01:09 pm (UTC)
Great story - it brought back a flood of memories both as a student and later as a HS science teacher and an instructor at WSG. In the past, I have used similar methods to push my best students harder and farther than they thought possible. Years later, I received thanks from many of them for my efforts.

Wednesday, December 12th, 2007 01:33 pm (UTC)
And to think that my big issue of this term was dealing with students who submitted code that wasn't their own. -sigh-

On the other hand, I do get some really talented students who are able to think and do far more than is "required".
Wednesday, December 12th, 2007 01:42 pm (UTC)

It was csc140 as opposed to cs101. It was over a decade ago, though, so I think I’ll forgive myself that small error. :)

Wednesday, December 12th, 2007 02:19 pm (UTC)
Oops, I forgot to make that correction. (Fixed now.)
Wednesday, December 12th, 2007 02:23 pm (UTC)

[laughs] There’s still an instance of cs101, and references to cs140 instead of csc140. Never mind, though—as long as there’s a comment listing the correct course listing, I’m happy. :)

Wednesday, December 12th, 2007 02:38 pm (UTC)
Heh. That's what I get for trying to fix it in too much of a hurry. I plead recovering-from-teh-sick.

Properly fixed now.....
Wednesday, December 12th, 2007 02:31 pm (UTC)
As long as the teacher/trainer isn't a personal asshole, only an asshole about learning/training, that's the kind of person I prefer to learn from.
Wednesday, December 12th, 2007 05:21 pm (UTC)
my CSC dean was unfortunately the asshole type. he used his red pen to make sure you programmed HIS way. there was no other way. even if you proved it. he did not give out As and tried to not give out Bs. i forced a B+/A- combo at least.

the CSC data structures 3 course teacher DID make you learn the material, but it was designed such that you had to be GOOD to make the grade. esp on the midterm and finals. 400 questions for example, thoughtfully planned so you couldn't actually finish it and graded such that yes, a curve was in place, but only to B, you had to do better than the curve to get your A, and well... out of the entire freshman class of CSC students, by the time they got to data structures, 1/2 had been weeded out... DS was supposedly for late 2nd and 3rd year iirc... by the 3rd year, attrition was high... the good student knew who they were... and it was a small band of good students, those semesters i took data structures from THAT MAN, that decided we'd be the cream of the crop. we blew away the programming problems and we aced the tests - all 400 questions and the bonuses - early and walked out. yar. the teacher asked "anythign wrong?" -- "no, we're done, see ya". yay. supposedly he has a chart of the mere handful in 3 decades to get As in his class - fair and square. we're on it.

inspiring is one thing. keeping them down is another.

#
Wednesday, December 12th, 2007 02:52 pm (UTC)
I wish my CS professors had been that good.
Wednesday, December 12th, 2007 04:33 pm (UTC)
excellence is achieved only by withering criticism

Sorry, but that's complete and utter bullshit. Excellence can certainly be achieved that way, but it's far from the only way.

And, IMHO, it's not nearly the best way to inspire excellence in your students.
Wednesday, December 12th, 2007 07:58 pm (UTC)
Exactly.

That style of teaching style made me allergic to programming. Which is, apparently, a damn shame, as I had more than one TA tell me I was a reasonably talented programmer.
Saturday, December 15th, 2007 03:20 pm (UTC)
Y'know, the only thing about either of these stories that I find even the slightest bit objectionable is the notion of writing a parser in awk and yacc. I mean, I guess the point is that awk is really, really good at handling regular expressions, but in this instance it violates Rob and Meredith's Rule of Minimal Computation Strength: avoid using languages that allow you to express more than you absolutely need to. Lexers are typically written in flex because it's a rare lexer that needs to do more than recognise regular expressions, whereas awk is closer to Perl in terms of "can it perform general computation tasks without forcing the programmer to jump through terrible, terrible hoops?"

(There are, of course, exceptions to this. [livejournal.com profile] enochsmiles once worked for a company where, I shit you not, a substantial portion of the product's codebase was written in lex. And then the guy who'd written it up and quit. Bad Things ensued.)

One of these days I really need to come up with a metric for "expressibility" -- the aforementioned not-forcing-the-programmer-to-jump-through-hoops idea. XSLT, sed and Sendmail rules are all Turing-complete, but they are not particularly expressible; certainly no one wants to use them as general-purpose languages. (Well, except me where XSLT is concerned, but I am warped like that.)
Saturday, December 15th, 2007 04:39 pm (UTC)
Y'know, the only thing about either of these stories that I find even the slightest bit objectionable is the notion of writing a parser in awk and yacc. I mean, I guess the point is that awk is really, really good at handling regular expressions, but in this instance it violates Rob and Meredith's Rule of Minimal Computation Strength: avoid using languages that allow you to express more than you absolutely need to. Lexers are typically written in flex because it's a rare lexer that needs to do more than recognise regular expressions, whereas awk is closer to Perl in terms of "can it perform general computation tasks without forcing the programmer to jump through terrible, terrible hoops?"
Well, really, the point wasn't to learn to write a parser. OK, granted, that was part of the point. But really, the point was to learn to use the tools, learn to use them well, and learn to put the right data into them in the first place.

But now that you mention it, I find myself mentally kicking myself because, with that nudge, I realize that I've misstated the story ... it wasn't awk and yacc, it was lex and yacc.

I'm completely unable to come up with a rational explanation for why my memory would have substituted awk for lex, or for why my brain didn't immediately say "Hey, that doesn't make sense."
Monday, December 17th, 2007 03:56 pm (UTC)
Lex makes vastly more sense, since it's what people typically use for this in the first place. Awk would certainly work, though; lexers exist to do regexp matching, and awk does a fine job of that, better than many commonly available tools. Lex/flex just happen to be written to work hand-in-hand with yacc/bison, is all. :)