perlmeditation
eyepopslikeamosquito
<P>
<blockquote>
<P>
To top the program, someone else might try to do the same thing with
fewer instructions--a worthy endeavor, since there was so little room
in the small "memory" of the computers of those days that not many
instructions could fit into them. John McCarthy had once noticed how
his graduate students who loitered around the 704 would work over
their computer programs to get the most out of the fewest instructions,
and get the program compressed so that fewer cards would need to be
fed to the machine. Shaving off an instruction or two was almost an
obsession with them. McCarthy compared these students to ski bums.
They got the same kind of primal thrill from "maximizing code" as
fanatic skiers got from swooshing frantically down a hill. So the
practice of taking a computer program and trying to cut off instructions
without affecting the outcome came to be called "program bumming",
and you would often hear people mumbling things like "Maybe I can
bum a few instructions out and get the octal correction card loader
down to three cards instead of four".
</P>
<P align="right">
<small>
-- John McCarthy notices golf being played by his grad students in machine language in 1959 (from [id://454335|Hackers, Heroes of the Computer Revolution])
</small>
</P>
<P>
The competent programmer is fully aware of the strictly limited size of his own skull;
therefore he approaches the programming task in full humility, and among other things
he avoids clever tricks like the plague. In the case of a well-known conversational
programming language I have been told from various sides that as soon as a programming
community is equipped with a terminal for it, a specific phenomenon occurs that even
has a well-established name: it is called "the one-liners". It takes one of two different
forms: one programmer places a one-line program on the desk of another and either he
proudly tells what it does and adds the question, "Can you code this in less symbols?"---as if
this were of any conceptual relevance!---or he just says, "Guess what it does!".
From this observation we must conclude that this language as a tool is an open invitation
for clever tricks; and while exactly this may be the explanation for some of its appeal,
viz., to those who like to show how clever they are, I am sorry, but I must regard this
as one of the most damning things that can be said about a programming language.
</P>
<P align="right">
<small>
-- Edsger Dijkstra notices golf being played in APL in 1972 (from <a href="https://www.cs.utexas.edu/~EWD/transcriptions/EWD03xx/EWD340.html">The Humble Programmer</a>)
</small>
</P>
</blockquote>
</P>
<P>
As the above quotes indicate, code golf has been played informally for many years
and in many different languages -- long before Perl, Ruby, Python or PHP were even dreamt of.
</P>
<P>
As far as I'm aware, however, the modern form of the game, defined by:
<ul>
<li> All entries must pass a strict test program before being accepted
<li> Solutions are kept secret and not shared among the players
<li> A leaderboard is continuously updated during play
</ul>
has been with us only since the Christmas of 2001, courtesy of
<a href="https://www.mail-archive.com/fwp@perl.org/msg00574.html">The Santa Claus Golf Apocalypse</a>.
(Update: you can see the original test program from 2001, along with all of Eugene's winning solutions (which all still work unchanged today!) at [id://11101513]).
</P>
<readmore>
<P>
I had the privilege of refereeing this historic contest, which was brilliantly
won by Eugene van der Pijll.
Eugene invented the classic <CODE>$\</CODE> golfing trick to win this competition.
This trick is nowadays so well known that I'd speculate that <I>every</I> golfer in
the top twenty of the Roman to Decimal game employed it.
</P>
<P>
Eugene further demonstrated the danger of golfic complacency, for everyone
else in the field had assumed that you "obviously" couldn't
improve on:
<CODE>
print reverse<>
</CODE>
Only Eugene unearthed the truly sick:
<CODE>
-p $\=$_.$\}{
</CODE>
to win by two strokes.
</P>
<P><B>How codegolf Compares to Traditional Perl Golf</B></P>
<P>
Eight years on, the game played at the codegolf web site is clearly recognizable
to this Perl Golf oldbie. Indeed, it felt very similar to the original Santa game.
The only significant differences I noticed were:
<ul>
<li> The human referee has been replaced by a robot, to allow the game to proceed automatically, without human intervention, 24 x 7.
<li> There is (so far) no time limit. The original Perl Golf tournaments had a time limit of one week.
</ul>
We'll analyse in the following sections how these two changes have affected the game of golf.
</P>
<P><B>Outsmarting the Robot Referee</B></P>
<P>
<blockquote>
<P>
<I>
Milk holes in the tests as much as you want
</I>
</P>
<P align="right">
<small>
-- codegolf founder carldr (Carl Drinkwater) <a href="http://codegolf.com/boards/conversation/view/98">answers a question</a> on the codegolf forums
</small>
</P>
</blockquote>
</P>
<P>
I can see now that a Robot Referee is essential if the golf tournament organiser
wants to have a life. That said, I intensely dislike this aspect of the
modern game. Let me give some examples from the Roman to Decimal game to
show why.
</P>
<P>
I might add that the robot ref proved less of a problem in this game
than many others because the Roman to Decimal test program, written by golf master flagitious,
was a very good one, most unlikely to be subverted. Still, subvert it I did.
</P>
<P>
My first subversion came with the following 59 stroke Ruby "solution":
<CODE>
n=1;$.+=n.*1+n<=>n=2627%C/8%8*10**(3&C^C%3)while C=getc;p$.
</CODE>
Because I'd already written an exhaustive test program, I knew that,
of the 3999 possible inputs, this "solution" failed <I>only</I>
on <CODE>I</CODE>, <CODE>II</CODE>, <CODE>III</CODE>, <CODE>IV</CODE>, and <CODE>IX</CODE>.
And since these weren't part of the fixed set of test cases, and were most unlikely to crop
up in the randomly generated eight, I was highly confident that this "solution" would be
accepted. So now I faced an ethical dilemma: to submit or not to submit?
I was on 60 at the time, with Python golfing god Mark Byers and "bearstearns" (a team
from the failed investment bank?) taunting me on 59.
It wasn't even close: the site's founder had clarified the "milk holes in the tests" rule
and Mark Byers had the gall to smash me by six strokes, snatching the Ruby
lead from my clenched fists, which were now shaking in fury in his general direction.
I just had to take my revenge on Mr Byers. Submit. "Your solution passed all tests". Yay.
There was no punching the air with my fist this time though.
It just didn't feel right.
</P>
<P>
That was only a minor cheat, and, luckily, after later finding an improved
magic formula, my final 53 stroke solution was correct on all 3999 inputs.
</P>
<P>
The really outrageous cheat was yet to come. And it came in Perl.
</P>
<P>
While porting my Python/Ruby-improved magic formulae back to Perl, I found this
alternative, and legitimate, 58 stroker:
<CODE>
$\+=$z-2*$z%($z=10**(19&654115/ord)%1645)for<>=~/./g;print
</CODE>
Having exhausted all normal numbers, and desperate to go lower, I started trying
numbers in scientific notation, <CODE>123E4</CODE> for example.
Note, by the way, that this scientific notation works
fine in this game for Perl and PHP, but not Python and Ruby, the latter two
languages interpreting numbers in this format as floating point, not the required integers.
My search program for this desperate chore was hacked together in Python because
I found that Python handles very large integers transparently, plus I
didn't need the speed of C and couldn't be bothered messing with Perl's BigInt module.
The Python searcher found a hit all right yet I was dismayed when the corresponding 57 stroker, namely:
<CODE>
$\+=$z-2*$z%($z=10**(7&5045e8/ord)%2857)for<>=~/./g;print
</CODE>
failed my test program. What's going on? After some debugging, I realised the 32-bit perl
I was using was mangling the <CODE>5045e8</CODE>. When I tried it on a 64-bit perl,
I was pleasantly surprised to discover that all tests passed.
So I ran a simple test on the codegolf site and determined they were running a 64-bit perl.
Submit. "Your solution passed all tests".
In the old Perl golf days, I'm pretty sure this 64-bit only solution would
have been disqualified. Doesn't matter. I'm leading and happy once again.
</P>
<P>
Now we come to the outrageous cheat. I was racking my brains trying to find a shorter
way of encoding these very large numbers that were popping up in the magic formulae when
it occurred to me that Perl's two stroke <CODE>$^T</CODE> "current time" variable
is indeed a very large number. And I can make it be whatever I want so long as I
wait long enough and submit my solution so that the test program on
the codegolf server runs when <CODE>$^T</CODE> has just the right value.
I quickly calculated that a 53 stroke Perl "solution":
<CODE>
$\+=$z-2*$z%($z=10**(7&$^T/ord)%1999)for<>=~/./g;print
</CODE>
should "work" some time in 2011, but, not wanting to wait that long,
I further noticed that the following 55 stroker:
<CODE>
$\+=$z-2*$z%($z=10**(7&$^T/7/ord)%1999)for<>=~/./g;print
</CODE>
would be available that very night! And not available again for some months.
Spooky. Not only that, but the division by seven made the "submission window"
a relaxed several minutes, rather than a frantic several seconds for the original 53 stroker.
Synchronize watches now ... 1, 2, 3, submit! <I>(Update: [id://853502|Much later], I found a non-cheating 53-stroke solution).</I>
</P>
<P>
<blockquote>
<P>
<I>
A win by an unsound combination, however showy, fills me with artistic horror
</I>
</P>
<P align="right">
<small>
-- <a href="http://www.brainyquote.com/quotes/authors/w/wilhelm_steinitz.html">Wilhelm Steinitz</a>, first World Chess Champion (1886-1894)
</small>
</P>
</blockquote>
</P>
<P>
Well, that was fun, but is it golf? I don't think so.
I felt dirty. This is what makes codegolf such a cruel game. Someone passes you on
the leaderboard and you have no way of knowing if they've beaten you legitimately
or cheated. And, because the games never close, you'll never know.
This is unspeakably cruel, in my view.
</P>
<P>
<B>Update:</B> In [id://1026354|compressing 99 bottles of beer], dmd found a rare cheat assuming a specific value for the pid <C>$$</C>. Though this can work in 99 bottles of beer because the test program is run once only, it is unlikely to work for other games where the test program is run multiple times, presumably with different pids for each run.
</P>
<P><B>No Time Limit</B></P>
<P>
This definitely worked in my favour. In all the Perl one week golf games,
I had never finished higher than fifth.
Had Roman to Decimal been a one week game, I probably would have finished
fifth or so with my 64 stroke Perl solution.
</P>
<P>
Just as chess has five minute "blitz" tournaments, 25 minute "rapid" tournaments,
five hour traditional tournaments, and correspondence tournaments played over
months or years, I feel there is certainly room for different time limits in code golf also.
I've got no problem with trying out many different time limits.
What I object to is <I>no</I> time limit.
As indicated in the previous section, I feel it's just too cruel.
</P>
<P>
Not only that, but if the game never closes, you miss out on what was always
a highlight for me: the traditional post mortem analysis, usually written by
the winner.
</P>
<P><B>Which is the Most Enjoyable Golfing Language?</B></P>
<P>
I found all of them enjoyable and feel it would be unfair to single any one out.
Overall, Perl and PHP "felt" similar. So did Ruby and Python. I suspect this is
mainly because Perl and PHP are much freer and easier in allowing strings to be used in
arithmetic operations without explicit conversion. For example, you couldn't just write
<CODE>md5(SomeString)%1858</CODE>, as I did in my PHP solution, in Python: you'd
instead need the longer <CODE>int(md5("SomeString"))%1858</CODE>. Ditto for Ruby.
Actually, thinking about it further, Python would give a run time error, because,
unlike Ruby, its string to int conversion requires the string to consist only of digits.
Overall, Python definitely felt the strictest of the four languages.
And variables, of course, typically start with <CODE>$</CODE> in Perl and PHP, making
them twice as long, and therefore much less attractive, than they are in Ruby and Python.
Finally, strings often don't require quoting in Perl and PHP, while they always do in
Ruby and Python.
</P>
<P>
For me, the biggest Python annoyance was being unable to use assignment as part
of larger expressions. Oh, and the lack of a short <CODE>?:</CODE> operator.
And the lack of built-in regex.
And the need, unlike Perl and PHP, to initialize variables before use. For Ruby, it was being unable to use a boolean in arithmetic expressions,
very common in golf. For example, Python is perfectly happy with
<CODE>n-2*p*(p<n)</CODE>, while Ruby chokes with
"false can't be coerced into Fixnum (TypeError)".
For PHP, its lack of basic operators was a chronic pest. For example, PHP alone among the four
languages, lacks both an exponentiation <CODE>**</CODE> operator and a
string multiply operator (<CODE>x</CODE> in Perl, <CODE>*</CODE> in Ruby and Python), very handy in golf.
I also missed concise regex and arrays when golfing in PHP.
When golfing in Perl, I missed Python's powerful and concise string slice operator;
though Perl's <C>substr</C> function provides similar functionality, it's usually too long for golf.
I was also infuriated, especially in this game, by Perl's need for parens
when using the <CODE>ord</CODE> function. For example, this magic formula
<CODE>7&5045e8/ord</CODE> cannot be equivalently expressed as <CODE>5045e8/ord%8</CODE>
due to perl parsing quirks; instead you must write it as <CODE>5045e8/ord()%8</CODE>,
costing two precious strokes.
Which is why only power of two modulo operators were competitive in this particular formula.
</P>
<P><B>How Important is Language Knowledge in Golf?</B></P>
<P>
Based on my codegolf experiences, not very.
I got my only perfect score, three victories from three games, in PHP, the language I know least well.
Curiously, it's also a language I dislike.
On the other hand, I think Perl, Python and Ruby are all wonderful languages.
As you might expect, I found golfing in Perl the easiest of the four and
consistently finished in the Perl top five in the five games in which I took part --
though I was drunk under the table by 0xF and shinh in the 99 Bottles of Beer game
(update: though I later sobered up, see [id://903641]).
Overall, despite this game, I performed least well in Ruby, failing utterly
to make any impression on those damned beer bottles
(update: though I later sobered up in Ruby also with [id://907967] my best ever Ruby golf performance).
In summary, I don't think general language knowledge matters much.
Knowing the golfing tricks for each language matters, of course, but you can pick
those up for each language easily enough by googling and from the codegolf forums.
</P>
<P>
The main reason for my PHP result in this game is simply the relative lack of strong PHP golfers.
There is really only one very strong PHP golfer, namely ToastyX, and he didn't
play in the Roman to Decimal game. In contrast, the other three languages all have a large
group of strong golfers: Python has "golfing god" Mark Byers, along
with many other strong and enthusiastic golfers, such as Norwegian friends,
hallvabo and tryeng;
Ruby also has a "golfing god", flagitious, author of the
<a href="http://www.golfscript.com/golfscript/">golfscript</a> language and one time codegolf leader
across <I>all</I> languages, even though he usually only submits Ruby code;
Perl has ySas, kounoike, 0xF and many others including occasional golfers from
the golden era of Perl golf,
tybalt89 (aka Rick Klement), [mtve] and [Jasper] -- oh, and <I>not</I> including `/anick ;-).
Incidentally, many of the top golfers nowadays seem to hail from Japan.
</P>
<P>
More important than language knowledge is deeply understanding the
problem and its algorithms, plus, of course, personal qualities, such as
competitiveness, deviousness, and tenacity.
</P>
<P><B>Who is the Best Golfer You've Ever Seen?</B></P>
<P>
Without question, Ton Hospel. The complete golfer. Without a weakness. (Update 2020: incredibly [id://1009126|primo] is now better!!!).
On one occasion, four expert golfers composed a problem, golfed it for a month,
and concluded that the limit was around 120 strokes.
Within hours of the game starting, Ton had embarrassed them by golfing it down to around 100!
On [id://649814|another occasion], Mark Byers shortest Sudoku Solver was agonizingly whittled by five different golfers: 187, 186, 181, 179, and finally 178 strokes. These golfers were no doubt quite proud of their combined effort ... until Ton came along and reduced it to 121 strokes at his first attempt.
</P>
<P>
Like good tennis players (e.g. Australia in the 1960s), good golfers often come in groups;
competing with each other sharpens their skills. That was certainly true in 2002-2003,
and I would back a golfing dream team from that era of Ton Hospel,
Eugene van der Pijll, Mtv Europe, and Rick Klement against all comers,
from any era.
</P>
<P>
The best Ruby golfer I have seen is flagitious;
the best Python golfer, Mark Byers (Jan 2013 update: now hallvabo); and
the best PHP golfer, ToastyX (Jan 2013 update: now [primo]).
The current top-rated all languages golfer at codegolf is shinh, who also runs a golf website <a href="http://golf.shinh.org/">golf.shinh.org</a>.
</P>
<P><B>Which Language Produced the Shortest codegolf Code?</B></P>
<P>
Perl. Closely followed by Ruby. Then a big gap to Python, closely followed by PHP.
Of the 27 codegolf games, Perl produced the shortest solution 18 times, Ruby 9.
PHP produced the longest solution 16 times, Python 11. Perl and Ruby produced
the shortest two solutions in every game save two: the classic 99 Bottles of Beer,
in which PHP (172 strokes) edged Ruby (173 strokes) by a single stroke for second
place behind Perl on 165 strokes; and the 1000 Digits of Pi game, where Perl was
left far behind (I didn't play that one, so don't know why).
</P>
<P>
Here are the shortest entries, by language, in all 27 codegolf games, as at early May 2009.
<table border="1">
<tr><th>Lowest Scores</th><th>Perl</th><th>Ruby</th><th>Python</th><th>PHP</th></tr>
<tr><td>99 Bottles of Beer</td><td>165*</td><td>173</td><td>183</td><td>172</td></tr>
<tr><td>Numeric Diamonds</td><td>93*</td><td>102</td><td>118</td><td>151</td></tr>
<tr><td>Home on the Range</td><td>50*</td><td>67</td><td>101</td><td>91</td></tr>
<tr><td>Crossword</td><td>181*</td><td>209</td><td>359</td><td>648</td></tr>
<tr><td>Calendar</td><td>284</td><td>232*</td><td>385</td><td>447</td></tr>
<tr><td>Brainf***</td><td>106*</td><td>107</td><td>195</td><td>151</td></tr>
<tr><td>Pascal's Triangle</td><td>39*</td><td>43</td><td>63</td><td>61</td></tr>
<tr><td>SHA-256 Hashing</td><td>396</td><td>338*</td><td>537</td><td>738</td></tr>
<tr><td>Total Triangles</td><td>59*</td><td>63</td><td>99</td><td>85</td></tr>
<tr><td>Prime Factors</td><td>76*</td><td>82</td><td>100</td><td>95</td></tr>
<tr><td>Vigenere Cipher</td><td>45*</td><td>49</td><td>73</td><td>88</td></tr>
<tr><td>1000 Digits of Pi</td><td>102</td><td>54*</td><td>62</td><td>112</td></tr>
<tr><td>Oblongular Number Spirals</td><td>114</td><td>112*</td><td>139</td><td>184</td></tr>
<tr><td>Paint by Numbers</td><td>197*</td><td>205</td><td>294</td><td>403</td></tr>
<tr><td>Switchboard</td><td>56*</td><td>68</td><td>114</td><td>101</td></tr>
<tr><td>Conway's Game of Life</td><td>151*</td><td>186</td><td>269</td><td>306</td></tr>
<tr><td>Dancing Queens</td><td>65*</td><td>75</td><td>100</td><td>96</td></tr>
<tr><td>Seven Segment Displays</td><td>111</td><td>107*</td><td>131</td><td>137</td></tr>
<tr><td>Reverse</td><td>52</td><td>51*</td><td>76</td><td>90</td></tr>
<tr><td>Polynomial Division</td><td>152</td><td>138*</td><td>176</td><td>349</td></tr>
<tr><td>The Joy of Ascii Art</td><td>50*</td><td>68</td><td>121</td><td>91</td></tr>
<tr><td>Roman to Decimal</td><td>55</td><td>53*</td><td>72</td><td>70</td></tr>
<tr><td>Musical Score</td><td>78*</td><td>102</td><td>115</td><td>134</td></tr>
<tr><td>Tower of Hanoi</td><td>110</td><td>104*</td><td>142</td><td>163</td></tr>
<tr><td>Grid Computing</td><td>43*</td><td>63</td><td>73</td><td>67</td></tr>
<tr><td>Choose</td><td>35*</td><td>36</td><td>39</td><td>62</td></tr>
<tr><td>Saving Time</td><td>101*</td><td>112</td><td>127</td><td>132</td></tr>
</table>
</P>
<P><B>Which is the Most Popular Golfing Language?</B></P>
<P>
<blockquote>
<I>
Perl Golf? You must be after the other P language.
You see, Perl golf died around five years ago.
The Perl community moved on, matured, and today much prefers clean, elegant code
to cryptic golfic line noise.
Reformed Perl golfers nowadays [id://500556|enthusiastically endorse Perl Best Practices].
If you want TMTOWTDI and cryptic golfic line noise, I suggest you try Python.
It has a thriving golf community.
</I>
</blockquote>
</P>
<P>
Ahem. To prove my point about the recent rise in popularity of Python golf, notice that, in the past two years,
<a href="http://codegolf.com/">codegolf</a> has hosted three golf games.
Here are the total number of golfers in these games by language:
</P>
<P>
<table border="1">
<tr><th>Language</th><th>Number of Players</th></tr>
<tr><td>Python</td><td>333</td></tr>
<tr><td>Perl</td><td>285</td></tr>
<tr><td>Ruby</td><td>248</td></tr>
<tr><td>PHP</td><td>186</td></tr>
</table>
</P>
<P>
<B>Update:</B> As noted in [id://903641], the growth in number of golfers competing in the popular 99 Bottles of Beer challenge over the past two years further supports the claim that Python is now the most popular golfing language:
</P>
<P>
<table border="1">
<tr><th>Language</th><th>Bottles of Beer growth, May 2009-May 2011</th></tr>
<tr><td>Python</td><td>156</td></tr>
<tr><td>Perl</td><td>68</td></tr>
<tr><td>Ruby</td><td>59</td></tr>
<tr><td>PHP</td><td>57</td></tr>
</table>
</P>
<P>
And here are the number of entries, by language, in all 27 codegolf games, as at early May 2009.
<table border="1">
<tr><th>Number of Entries</th><th>Perl</th><th>Ruby</th><th>Python</th><th>PHP</th></tr>
<tr><td>99 Bottles of Beer</td><td>205</td><td>279*</td><td>267</td><td>207</td></tr>
<tr><td>Numeric Diamonds</td><td>46</td><td>76*</td><td>64</td><td>31</td></tr>
<tr><td>Home on the Range</td><td>117*</td><td>107</td><td>105</td><td>60</td></tr>
<tr><td>Crossword</td><td>10</td><td>27*</td><td>16</td><td>9</td></tr>
<tr><td>Calendar</td><td>7</td><td>32*</td><td>16</td><td>16</td></tr>
<tr><td>Brainf***</td><td>37</td><td>38*</td><td>35</td><td>25</td></tr>
<tr><td>Pascal's Triangle</td><td>99</td><td>108*</td><td>106</td><td>61</td></tr>
<tr><td>SHA-256 Hashing</td><td>9</td><td>26*</td><td>13</td><td>6</td></tr>
<tr><td>Total Triangles</td><td>37</td><td>58*</td><td>38</td><td>17</td></tr>
<tr><td>Prime Factors</td><td>69</td><td>70*</td><td>53</td><td>27</td></tr>
<tr><td>Vigenere Cipher</td><td>51</td><td>75*</td><td>56</td><td>30</td></tr>
<tr><td>1000 Digits of Pi</td><td>33</td><td>85*</td><td>53</td><td>37</td></tr>
<tr><td>Oblongular Number Spirals</td><td>25</td><td>60*</td><td>36</td><td>17</td></tr>
<tr><td>Paint by Numbers</td><td>7</td><td>16*</td><td>7</td><td>5</td></tr>
<tr><td>Switchboard</td><td>43</td><td>53*</td><td>43</td><td>20</td></tr>
<tr><td>Conway's Game of Life</td><td>11</td><td>28*</td><td>24</td><td>8</td></tr>
<tr><td>Dancing Queens</td><td>22</td><td>24*</td><td>21</td><td>17</td></tr>
<tr><td>Seven Segment Displays</td><td>43</td><td>49</td><td>54*</td><td>22</td></tr>
<tr><td>Reverse</td><td>46</td><td>73*</td><td>52</td><td>24</td></tr>
<tr><td>Polynomial Division</td><td>8</td><td>17*</td><td>14</td><td>5</td></tr>
<tr><td>The Joy of Ascii Art</td><td>78*</td><td>71</td><td>66</td><td>50</td></tr>
<tr><td>Roman to Decimal</td><td>69</td><td>86</td><td>87*</td><td>62</td></tr>
<tr><td>Musical Score</td><td>25</td><td>32*</td><td>31</td><td>17</td></tr>
<tr><td>Tower of Hanoi</td><td>18</td><td>21*</td><td>20</td><td>5</td></tr>
<tr><td>Grid Computing</td><td>103</td><td>93</td><td>112*</td><td>73</td></tr>
<tr><td>Choose</td><td>102</td><td>98</td><td>155*</td><td>55</td></tr>
<tr><td>Saving Time</td><td>80</td><td>57</td><td>106*</td><td>58</td></tr>
</table>
</P>
<P><B>Golfer Burn Out</B></P>
<P>
We've learnt from history that too many golf events cannot be sustained:
the 2002 TPR season lasted just one year; terje's golf site lasted only
two seasons; and codegolf had 24 challenges in the first year, yet just three
more in the following two years.
Too many games burn golfers out.
</P>
<P>
Accordingly, I suggest a schedule of between one and four serious
golf games per year -- all opened in January and all closed in December.
That way, you can chip away during the year when you have time.
Any more than four serious games per year is not sustainable IMHO.
</P>
<P>
Golf would be more attractive if a tournament sponsor could be found,
with decent prizes for the top place getters, as [id://594299|Fonality] did.
And I think <a href="http://golf.shinh.org/">shinh</a> is on the right track
with over 50 languages on offer; more languages may broaden the appeal and
make the post mortem more interesting -- though perhaps impossibly difficult
to write, covering four languages here being hard enough :-).
</P>
<P>
I won't be involved though because I'm burnt out.
Just as I took a four year break from golf in 2003, it's time for me to
take another extended break.
</P>
<P>
I hope you enjoyed my long journey through this game.
I'll continue this series in a year or so with a
[id://811919|Saving Time post mortem].
See you then.
</P>
<P><B>References</B></P>
<P>
<ul>
<li> [id://759963]
<li> [id://761053]
<li> [id://762180]
<li> [id://811919]
<li> [id://814900]
<li> [id://903641]
<li> [id://437032]
<li> [id://594299]
<li> <a href="http://www.dagolden.com/index.php/163/stop-with-the-perl-golf-already/">dagolden blog discussing whether golf is harmful</a>
<li> <a href="http://john.freml.in/codegolf-cheating">John Fremlin codegolf cheating using System V IPC message queues</a>
<li> <a href="http://codegolf.com/">Golf competitions in Perl, Ruby, Python or PHP</a>
<li> <a href="http://phpgolf.org/">phpgolf.org</a>
<li> <a href="http://golf.shinh.org/">golf.shinh.org</a>
<li> <a href="http://vimgolf.com/">vimgolf.com</a>
<li> <a href="http://codegolf.stackexchange.com/">stackexchange codegolf and programming puzzles question and answer</a>
<li> <a href="http://codegolf.stackexchange.com/questions/197/freely-available-books-for-code-golfing/">codegolf books</a> (see especially hallvabo answer which mentions Japanese "Short Coding" book by Ozy)
<li> <a href="http://www.spoj.pl/">Sphere online judge (SPOJ) programming competitions</a>
<li> <a href="http://shiva.norgrind.net/~tom/cgolf/">Golf competitions in C (beta)</a>
<li> <a href="http://keleshev.com/dissecting-a-code-golf-challenge">Python Grid Computing: Dissecting a code golf challenge</a> by Vladimir Keleshev
</ul>
</P>
<P><B>References Added Later</B></P>
<P>
<ul>
<li> [id://11101513] (2019 - contains Santa Claus Golf Apocalypse code from 2001, which still works today)
<li> [id://438876] (2005)
<li> [id://995190]
<li> [id://1083046]
</ul>
</P>
</readmore>