TITLE: Learning to Program is a Loser's Game
AUTHOR: Eugene Wallingford
DATE: March 10, 2015 4:45 PM
After a long break from playing chess, I recently
played a few games
at the local club. Playing a couple of games twice in the last
two weeks has reminded me that I am very rusty. I've only made
two horrible blunders in four games, but I have made many small
mistakes, the kind of errors that accumulate over time and make
a position hard to defend, even untenable. Having played better
in years past, these inaccuracies are irksome.
Still, I managed to win all four games. As I've watched games
at the club, I've noticed that most games are won by the player
who makes the second-to-last blunder. Most of the players are
novices, and they trade mistakes: one player leaves his queen
en prise; later, his opponent launches an underprepared
attack that loses a rook; then the first player trades pieces
and leaves himself with a terrible pawn structure -- and so on,
the players trading weak or bad moves until the position is lost
for one of them.
My secret thus far has been one part luck, one part simple
strategy: winning by not losing.
This experience reminded me of a paper called
The Loser's Game,
which in 1975 suggested that it was no longer possible for a
fund manager to beat market averages over time because most of
the information needed to do well was available to everyone. To
outperform the market average, a fund manager has to profit from
mistakes made by other managers, sufficiently often and by a
sufficient margin to sustain a long-term advantage. Charles
Ellis, the author, contrasts this with the bull markets of the
1960s. Then, managers made profits based on the specific winning
investments they made; in the future, though, the best a manager
could hope for was not to make the mistakes that other investors
would profit from. Fund management had transformed from being a
Winner's Game to a Loser's Game.
Ellis drew his inspiration from another world, too. Simon Ramo
had pointed out the differences between a Winner's Game and a
Loser's Game in
Extraordinary Tennis for the Ordinary Tennis Player.
Professional tennis players, Ramo said, win based on the positive
actions they take: unreturnable shots down the baseline, passing
shots out of the reach of a player at the net, service aces,
and so on. We duffers try to emulate our heroes and fail...
We hit our deep shots just beyond the baseline, our passing
shots just wide of the sideline, and our killer serves into
the net. It turns out that mediocre players win based on the
errors they don't make. They keep the ball in play,
and eventually their opponents make a mistake and lose the
Ramo saw that tennis pros are playing a Winner's Game, and
average players are playing a Loser's Game. These are
fundamentally different games, which reward different mindsets
and different strategies. Ellis saw the same thing in the
investing world, but as part of a structural shift: what had
once been a Winner's Game was now a Loser's Game, to the
consternation of fund managers whose mindset is finding the
stocks that will earn them big returns. The safer play now,
Ellis says, is to minimize mistakes. (This is good news for us
This is the same phenomenon I've been seeing at the chess club
recently. The novices there are still playing a Loser's Game,
where the greatest reward comes to those who make the fewest
and smallest mistakes. That's not very exciting, especially
for someone who fancies herself to be Adolf Anderssen or Mikhail
Tal in search of an
The best way to win is to stay alive, making moves that are as
sound as possible, and wait for the swashbuckler across the
board from you to lose the game.
What does this have to do with learning to program? I think
that, in many respects, learning to program is a Loser's Game.
Even a seemingly beginner-friendly programming language such
as Python has an exacting syntax compared to what beginners
are used to. The semantics seem foreign, even opaque. It is
easy to make a small mistake that chokes the compiler, which
then spews an error message that overwhelms the new programmer.
The student struggles to fix the error, only to find another
error waiting somewhere else in the code. Or he introduces a
new error while eliminating the old one, which makes even
debugging seem scary. Over time, this can dishearten even the
What is the best way to succeed? As in all Loser's Games, the
key is to make fewer mistakes: follow examples closely, pay
careful attention to syntactic details, and otherwise not stray
too far from what you are reading about and using in class.
Another path to success is to make the mistakes smaller and
less intimidating: take small steps, test the code frequently,
and grow solutions rather than write them all at once. It is
no accident that the latter sounds like XP and other agile
methods; they help to guard us from the Loser's Game and enable
us to make better moves.
Just as playing the Loser's Game in tennis or investing calls
for a different mindset, so, too does learning to program.
Some beginners seem to grok programming quickly and move on to
designing and coding brilliantly, but most of us have to settle
in for a period of discipline and growth. It may not be
exciting to follow examples closely when we want to forge ahead
quickly to big ideas, but the alternative is to take big shots
and let the compiler win all the battles.
Unlike tennis and Ellis's view of stock investing, programming
offers us hope: Nearly all of us can make the transition from
the Loser's Game to the Winner's Game. We are not destined to
forever play it safe. With practice and time, we can develop
the discipline and skills necessary to making bold, winning
moves. We just have to be patient and put time and energy into
the process of becoming less mistake-prone. By adopting the
mindset needed to succeed in a Loser's Game, we can eventually
play the Winner's Game.
I'm not too sure about the phrases "Loser's Game" and "Winner's
Game", but I think that this analogy can help novice programmers.
I'm thinking of ways that I can use it to help my students
survive until they can succeed.