Miranda Prize

One drunken evening at the AtlantaOopsla?, EliotMiranda made the statement that some programs absolutely need comments to be understandable. He bet KentBeck that he could point to a method in VisualWorks that had to be commented. At the SecondVancouverOopsla? Kent sicced DonRoberts and JohnBrant on the problem. They gathered quite a crowd. The method in question computed the fixed point (transitive closure, working set) of a set of methods. It was long, complicated, and had many temporary variables.

The refactoring took nearly an hour. It started with the application of MethodObject, followed by repeated applications of ExtractMethod. The process uncovered no duplicated code and only one unnecessary variable- rare in this sort of circumstance and a tribute to the skill of the sponsor.

An hour later the prize was all but won. The control flow had been tamed. The initialization had been sequestered in its own method. The main control flow looked like this:

 computeFixedPoint
   [self iterate] whileTrue

Nearly won is not the same as won. The last thing Don and John, bless their EternalStudent hearts, wanted to do was write a class comment. Kent blinked. They wrote their comment. Eliot noticed, but tipped his hand by gloating. Kent managed to stop the wayward students from accepting the comment. Disaster averted.

The next step is to give the code to four ExperiencedSmalltalkers?, two getting each version. They will be asked to write a one paragraph summary of the purpose and effect of the code. The paragraphs adjudged by our distinguished international panel to best reflect the real purpose of the code will determine the winner.

Anything more ever happen with this? This page was last edited in November 2000 - is someone going PleaseComment? Dunno, but please leave it. It's still worth keeping


EditText of this page (last edited January 13, 2003) or FindPage with title or text search