Captain Abstraction vs. Sergeant Spaghetticode: The Script

Script for Capt. Abstraction/Sgt. Spaghetticode Encounter at the end of the 6.001 symbolic differentiation lecture.

[Lecturer has previously put up symbolic differentiator code that uses lots of data abstraction.]

Lecturer: [A few sentences on the virtues of abstraction.] In short, the benefits of abstraction are undeniable.

Sgt. Spaghetticode: [From the back of the room] I deny that, Mr. Lecturer! [Runs down stairs of lecture hall waving overhead sheet] Hold everything! Stop the lecture! Hold on here!

Lecturer: Oh no! I was afraid this might happen. It's Sgt. Spaghetticode!

Sgt: [Puts up alternative symbolic differentiator] Check out this version of the symbolic differentiator! It's shorter, more concrete, and doesn't need all the muss and fuss of extra procedures. What do you say to that, Mr. Lecturer, sir?

Lecturer: [nonplussed] Well, I'm not sure. I've already presented a cogent argument. What could I possibly say to change your mind? I guess I feel a little bit helpless in this situation ...

Capt. Abstraction [disguised as a mild-mannered student in the lecture hall, stands up from seat] I'll help you Mr. Lecturer!

Lecturer: But how can you help me? You're just a mild-mannered student!

Capt: I may look like "just" a student, but in dire situations like this I change from my mild-mannered appearance [put on mask] into none other than [take off shirt/coat to reveal superhero outfit] Captain Abstraction!

[Wait for class response to die down.]

[To Sgt.] Well, well --- if it isn't my old arch-nemesis Sgt. Spaghetticode trying to subvert the pure minds of these innocent 6.001 students. But wielding my trusty Abstraction Barrier [lift shield-like barrier; Sgt. shrinks back in fear.] I can readily protect them from you and the vile concrete programming style that you stand for. Away, you evil one, away! [Sgt. runs screaming up the stairs.]

[To students] There's a lesson here, class. You should never succumb to the temptations of Sgt. Spaghetticode! Always be sure write your code in an abstract style that [point to shield] shields the client of a data structure from the implementer. I'll be watching you. And if you should ever write something gross like this [points to Sgt.'s code], I'll be sure to flag your with this mark of public dishonor [put "abstraction violation" transparency on top.]

[To lecturer and students] My job here is now done. If any of you ever require my assistance again, don't hesitate to call for [shouts as leaving room] Captain Abstraction!