📄 mirandaprize.html
字号:
<head><title>Miranda Prize</title></head><body><h1><img src="logo.gif"> Miranda Prize</h1>One drunken evening at the AtlantaOopsla<a href="http://c2.com/cgi/wiki?edit=AtlantaOopsla">?</a>, EliotMiranda<a href="http://c2.com/cgi/wiki?edit=EliotMiranda">?</a> made the statement that some programs absolutely need comments to be understandable. He bet <a href="KentBeck.html">KentBeck</a> that he could point to a method in <a href="http://c2.com/cgi/wiki?VisualWorks">VisualWorks</a> that had to be commented. At the SecondVancouverOopsla<a href="http://c2.com/cgi/wiki?edit=SecondVancouverOopsla">?</a> Kent sicced <a href="http://c2.com/cgi/wiki?DonRoberts">DonRoberts</a> and <a href="http://c2.com/cgi/wiki?JohnBrant">JohnBrant</a> 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.
<p>The refactoring took nearly an hour. It started with the application of <a href="http://c2.com/cgi/wiki?MethodObject">MethodObject</a>, followed by repeated applications of <a href="http://c2.com/cgi/wiki?ExtractMethod">ExtractMethod</a>. 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.
<p>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:
<p><PRE> computeFixedPoint
[self iterate] whileTrue
<p></PRE>Nearly won is not the same as won. The last thing Don and John, bless their <a href="http://c2.com/cgi/wiki?EternalStudent">EternalStudent</a> 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.
<p>The next step is to give the code to four ExperiencedSmalltalkers<a href="http://c2.com/cgi/wiki?edit=ExperiencedSmalltalkers">?</a>, 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.
<p><em>Anything more ever happen with this?</em><hr><a href="http://c2.com/cgi/wiki?edit=MirandaPrize">EditText</a> of this page (last edited November 21, 2000)<br><a href="http://c2.com/cgi/wiki?FindPage&value=MirandaPrize">FindPage</a> by browsing or searching<p><font color=gray size=-1>This page mirrored in <a href="index.html">ExtremeProgrammingRoadmap</a> as of March 31, 2001</font></body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -