
Ask HN: Do you play Chess? - airframeng
if so, do you think chess skills translate into good programming skills?
======
TheCowboy
If you're asking this as a hardcore chess player interested in getting into
programming, then you should just jump in and give it a try. If you are trying
to play chess to increase your "programmer's IQ" then I would recommend
passing.

I think the honest way to think of this is that: Playing chess is a really
good way of figuring out who is good at playing chess.

But, the abilities and aptitudes that often help aid being good at chess can
be valuable assets in becoming a good programmer. Strong sense of logic. Able
to think multiple steps in advance and the consequences. A strong memory can
be useful.

Where it might frustrate a chess player, is that chess lacks an element of
imperfect information. Real world programming isn't a perfect self-contained
world where everything is known. It is impossible to know every aspect of
programming as well as the rules of chess. You'll write bugs, and bugs in
other software will create unpredictable problems. Users will add a random
element into how your software breaks. Malicious attackers will find holes in
what you've written. Things will just break.

~~~
zwischenzug
I've never understood the 'imperfect information' thing when discussing chess.
Chess _as played by people_ is full of hunches, uncertainty, prejudice,
intimidation. Just look at how Kasparov played or Lasker, to see how important
psychology is to chess. Or go down to Washington Square Gardens and play under
the glare of dozens of people tutting at your every move.

It's so much more than an abstract problem.

~~~
EvilPopsicleDog
Yes, but the possible input to a chess game is strictly limited - one player
cannot just change the way a piece moves or introduce a new piece, and thus,
it is not taken into account in any strategy. These sorts things must be taken
into account when programming.

~~~
zwischenzug
This is how a chess player thinks. "Jesus, why did she play that? She must
have seen something I've missed. Shit, if I had more time I'd be able to
figure it out. Damnit, I'll just move my knight back, that way my king'll be
safer. I'm sure there's a better move but I can't find it now, and I think my
ass went to sleep."

Change a few words, and it's pretty much a typical thought process when coding
for me.

------
valarauca1
Yes and No.

Chess is a lot of memorization once you understand the game. End Game/Open
Game have to both be played prefectly at high end, or your opponenet will
literally know how to defeat you.

I find Go translates more to programming since it forces you think about more
abstract concepts like influence, when to/to not act. There aren't as many
hard and fast rules in the meta-game like chess which allow more creativity
and self expression.

\---

The idea a programmer _has_ to play Chess/Go is lot like the idea a programmer
_has_ to study advanced math. Really you are just learning logical problem
solving, and rational ways of analyzing the state of a system.

~~~
jayturley
Agreed. I was into Chess in high school and college, but once I discovered Go,
I never looked back.

------
johnloeber
I used to play chess somewhat seriously, though I focused on the Chess960
variant (I think it's a much more interesting game).

My opinion is that the only real predictor of how good someone is at chess is
how much they have practiced, and conversely, the only thing that playing
chess makes you better at is playing chess.

I've sunk a few hundred hours into playing chess, and the conclusion I arrived
at was that the skills and mode of thinking cultivated by playing chess are
largely non-transferable. Granted, playing chess has given me a few analogies
for thinking about certain real-life situations, but I learned those in my
first few hours of play.

Ultimately, I stopped playing chess. Perhaps this is an unorthodox opinion,
but chess ended up being something I don't want to be extremely good at,
simply because that requires a great deal of time investment, and I view the
time I spent playing chess as largely wasted. I grew bored with the limited
and mechanical nature of the game and quit. Haven't looked back. I think the
reputation of chess as one of the greatest "thinking games" is severely
undeserved. The vast majority of the game is about routine and
mechanical/technical formalisms.

If you wish to practice your thinking or programming skills, there are much
better ways for you to use your time (programming is one).

~~~
moron4hire
I felt the same way about poker. I can see the mechanics of poker a lot easier
than I can see them with chess. But if I'm going to spend the time, effort,
and money to become very proficient at poker, then why don't I spend a similar
amount of time, effort, and money on starting a software company? That
revelation was the beginning of end of me regularly playing games of any kind.

I still occasionally play video games, but I treat it more like watching a
movie on Netflix. I usually only play through once on the medium setting,
whereas in my early 20s I was very much a completionist, even for games I
didn't much care for.

------
neilh23
I play Go a lot, and chess occasionally.

I think it's about mindset not skillset - games like these are about solving
local problems ('tactics') to achieve a greater aim ('strategy'); people who
are attracted to them are generally people who like the sort of problem
solving that comes up in programming, hence the cross-over.

Your question, however was whether or not the _skills_ translate - I don't
think that solving daily chess problems or tsumego will do as much for your
programming than solving programming puzzles (e.g. codewars), but the
discipline of thinking through all possible paths ('reading') definitely
helps.

~~~
ccvannorman
neil, are you on OGS?

~~~
neilh23
Yeah :-)

------
rectang
I play online. There are worse vices.

I hack the game by playing crappy openings to get people off-book. If I could
play nothing but Chess960[1], I'd be happier. Chess is buggy.

[1]
[https://en.wikipedia.org/wiki/Chess960](https://en.wikipedia.org/wiki/Chess960)
"... The random setup renders the prospect of obtaining an advantage through
the memorization of opening lines impracticable, compelling players to rely on
their talent and creativity."

------
moron4hire
I like the idea of playing chess a lot more than the reality of it. I usually
go through a period with games where I don't understand them, find them
bewildering, spend a short time on my own to learn the rules, then I'm good to
go and can quite enjoy the game. Even with watching pro sports, if I at least
know the rules, I can follow the progression of play and know when good plays
happen. With chess, I've tried to read about it and learn how to play more
than just the basics of moving pieces and still, I still don't "see" the game.

I guess it's the memorization needed for the opening and end games. I memorize
by exercise. The things I can rattle of the top of my head are usually facts
and figures and formulas I've had to use frequently. With chess, it seems to
require a significant amount of pre-memorization, the broader, the better. I
have always resisted such memorization tasks, even as a little kid. I prefer
understanding core principles and reasoning my way to the details on the fly.

Most people who know my work think of me as an excellent programmer, so if
chess has an impact on programmer skill, it's at the very least not required.

------
kohanz
Translatable skills? No.

Improved brain function? Yes, I believe so.

It has been shown in various studies that learning and excelling at chess
changes the way that your brain is wired in a way that improves your
analytical thinking and problem solving abilities [0].

Kids who learn chess at an early age, do better at math, for example.
Personally, I played competitive chess at a young age (achieved Master level
at age 17, which is good but not spectacular, before quitting to focus on
engineering studies) and I do believe that my above-average analytical
thinking skills to this day can partially be credited to the changes in my
brain from those years in my youth spent studying and playing chess for hours.

[0] [http://mic.com/articles/119332/how-chess-players-brains-
are-...](http://mic.com/articles/119332/how-chess-players-brains-are-
different-from-everybody-else-s)

------
platz
No.

[https://medium.com/message/why-chess-will-destroy-your-
mind-...](https://medium.com/message/why-chess-will-destroy-your-
mind-78ad1034521f)

Nice piece about "chess sickness" and Duchamp (and he created less art and
became more consumed with Chess) that echoes this post:
[http://thepointmag.com/2014/examined-life/exiles-
game](http://thepointmag.com/2014/examined-life/exiles-game) “Much of an
exile’s life is taken up with compensating for disorienting loss by creating a
new world to rule,” wrote Edward Said. “It is not surprising that so many
exiles seem to be novelists [and] chess players.”

Additionally, I don't see the connection to programming.

------
javanix
I'd consider myself a good programmer but an absolutely terrible chess player,
so no, I don't think they really have much bearing.

~~~
amag
I second that. I never had much interest in learning to play chess well. In my
case I guess it's about when programming I work towards a specific outcome I
find interesting for some reason. Winning/losing isn't an interesting outcome
for me.

~~~
javanix
I cannot for the life of me make it through a game of chess without making
some catastrophic blunder.

If programming was that unforgiving I'd have to buy a new system every time I
wrote a function.

------
pawn
I play chess. Bet that's a shocker when you look at my user name...

I don't think that chess skills transfer to programming skills - I wouldn't
recommend someone play chess as a way to get better at programming or vice
versa.

Do I think being good at one indicates possible proficiency at the other?
Maybe, but probably not. They can be approached the same way, at least below
the grand master level - you can see each one as a series of small tactical
problems to be solved.

However, some of the best programmers I've known weren't good at chess and the
best chess player I've personally known was a mediocre programmer. So,
anecdotal evidence is that the two don't correlate.

~~~
zwischenzug
See also my name :)

------
onion2k
Yes, but it doesn't help me code better. How it _does_ help is using chess as
a problem space. Chess is such a beautiful game to write code for because it's
tightly constrained and strategically flexible. For example, one of my side
projects is a chess game where each player is actually a team of players
who're all playing the same game - everyone on Team White enters a move, and
the most commonly entered move is the one that actually gets played, then Team
Black do the same, and so on. There is so much you can do to mix coding and
chess.

------
emerongi
I do play.

No, I don't think chess skills translate into anything - the only "real" skill
I've learned is how to practice efficiently. It's a fun game and I play it for
what it is.

------
dsr_
Directly? No.

Indirectly? Yes. Learning to think through the steps of an operation in terms
of available and unavailable options is probably highly correlated to thinking
about code flow. The major difference between a competent programmer and a
non-programmer is that the programmer is used to specifying what is going on
in a restrictive, typo-sensitive written language.

Would I advocate learning chess as a specific method to learn programming
skills? No, not particularly.

------
kele
Why would you think that chess skills should translate into good programming
skills?

~~~
joaorj
I don't think he thought it through very well.. But if being generous because
in chess you have to memorize lots of openings and if you want to know lots of
languages there's a bit of memorization aswell.

------
olympus
To answer your question, some of the higher level skills may translate, but it
isn't like a direct mapping of skills (i.e., a person who is good at TIG
welding will almost definitely be good at soldering with little effort - it's
all about heat management and metal flow).

Memorizing openings could mean that you will have an easier time learning
standard libraries and syntax.

Realizing that some pieces can move certain ways that others cannot could make
it easier to learn object-oriented programming.

Thinking several steps ahead and avoiding endgame stalemates could help you
with loop-writing (or at least avoiding infinite loops).

But a lot of this is dependent on a particular language. I don't see chess
being a lot of help with a functional language like Haskell. But an imperative
language like C or an object oriented language like Java, sure. A good chess
player will still have to study and learn like the rest of the world, but I'd
put their chances of becoming a competent programmer above the middle of the
general population.

------
stephengillie
I stopped playing chess years ago. It's an interesting game but newer games
are more interesting. It's essentially an ancient form of the "Tactics" game
type.

Other games, like Robo Rally, translate to computer programming much more
directly. Create a set of instructions to do what you want, sure. Then watch
as chaos from others causes those instructions to do something totally
unexpected. Then you have to figure out how to recover from it.

Or the Collectible Card Game model created by Magic: The Gathering. Each
player takes turns having their instructions loaded and processed. And each
player puts instructions on the stack, which are processed in order and can be
interrupted.

------
jordigh
I do, but I don't think chess translates into programming.

I recently found lichess.org, which I heartily endorse because it's free
software:

[https://github.com/ornicar/lila](https://github.com/ornicar/lila)

------
anthony_romeo
I do enjoy chess:
[http://www.chess.com/members/view/play2draw](http://www.chess.com/members/view/play2draw)

There really isn't much overlap between chess and programming. Programming is
closer to an artisan craft than a sport.

I mean, sure, you can probably find a few strands which connect the two
somehow, but really you could probably draw other weak connections to things
like swimming or football or weight lifting, or for that matter even other
unrelated subjects like painting or singing.

------
deutronium
Yup, I love playing chess, I play most weeks against a friend.

I guess chess involves visualising moves and developing tactics to force
checkmate.

I'm not sure how much cross-over there is with programming skills though.

I once tried to write a simple chess bot, which was enjoyable, despite not
getting very far, learning how to represent the board as a sequence of bits
etc.

------
amenghra
In general no. Learning/playing chess however requires being able to focus on
a specific problem for long periods of time (2-4 hours), which is a good skill
to have. I remember spending entire mornings studying the game as a kid.

I'm unsure if chess gave me the skill or if having be ability to focus made me
enjoy the game.

------
Yenrabbit
I occasionally play, and I'd like to play more. I don't think it specifically
helps programming, but it does get me to concentrate on one thing only for an
extended period of time (or lose!). Plus, you never know when you'll need to
beat someone at chess to prove that you're the alpha nerd :P

------
S4M
I used to play chess competitively (rating 1900+ fide), and play on internet
sometimes. I think playing chess will not help to improve someone's
programming skills (except if he specializes in building chess engines), but
chess tends to attract the same kind of persons who go into programming.

------
noir_lord
Yes and No.

I'm a fairly terrible player, I played for a local team when I was younger and
had the time (bottom series, sub).

I'm certainly a better programmer than a chess player.

That said I follow the game, love to play and the surrounding community of
players so there is that aspect to it.

------
threatofrain
I suspect that the factors which would bias some people toward chess might
also predict better programming ability, so I doubt a chess intervention would
be useful, at least no more useful than some other activity like basketball or
drawing.

Math might be different.

------
calebm
I enjoy chess (though I haven't played much recently). I definitely see
similar skills in both cases (lining up multiple steps to achieve my desired
goal). But it's hard to tell whether or not playing chess makes me a better
programmer.

------
joehilton
I play chess regularly, and while I don't think chess skills translate into
programming skills, I do think there is a moderately high incidence of good
chess players being good programmers. However, I believe this to be because
you've got thorough minds that "see" lots of possibilities, and those minds
are good at both chess and programming.

From my experience in coding as well as hiring coders, I've actually found
that the best programmers are those that can make deductive arguments quickly.
Most argumentative people argue inductively with anecdotes, references to
studies, analogies, etc. But when you find someone who argues deductively by
slipping in premises for tacit or explicit agreement and then lowering the
boom with an axiomatic conclusion, this person usually creates good code for
me.

For computers, chess games are deductive problems where all (or almost all)
possible moves (arguments) are examined to choose the best one, which is only
made possible by binary brains. For humans, chess is extremely inductive -
analogies, patterns, general underlying strategies albeit with changing
particulars, etc. The best human chess players deductively analyze multiple
possibilities of these inductive patterns (read Bobby Fischer - who I have not
played, Tal Shaked - who I have played, and others on the amazing way they do
this). So while the skill is not transferable, there are some similar
aptitudes in good programmers and good chess players.

I know there's a holy grail out there of the ultimate programming skills
assessment test, and I don't have it. But what I do is this: I give two
programming problems (no language or syntax required at all, just the problem
basically in comments). They have to solve it in a robust way (and every now
and then someone comes up with a brilliant solution I haven't seen yet,
although most people suggest the same stuff over and over again), and then
they have to defend why the solution is good while I time them.

Most people can learn to think (and argue) deductively, but very, very few
that I have found do this instinctively (and can thereby do it 10x faster than
the average person). When I find someone who can even do it 2x faster than the
average bear, I hire that person. It's just so rare.

I know that's not a perfect test, but as someone who both plays chess and also
is constantly looking for a good indicators for programming skills, this is
what I do. I've had pretty decent success this way. So who knows, according to
my methods, maybe the best lawyers and philosphers are actually the best
programmers.

------
Kenji
Only when I implement the n-queens problem in Haskell ;)

That being said, I would probably be around 1000 elo (that is, absolutely
terrible) but I am a halfway decent programmer so I think there's barely any
correlation, if any at all.

------
kushti
I've 1841 Elo in Blitz on Lichess, would be happy to play with dear HNers
there: [http://en.lichess.org/@/kushti](http://en.lichess.org/@/kushti)

------
dwc
I do play, though not as much in the past year or so.

I think there's intersection between chess and programming skill sets, but not
significantly more or less than anything else using logic and attention to
detail.

------
a3n
Maybe indirectly, in that you probably get better at Hard Activity A if you
get out of it often and focus on Hard Activity B. Sort of like dreaming to
sort out your brain for the next day.

------
sebg
from the first google result for "chess programming skills", this article
([http://sam-koblenski.blogspot.com/2013/12/what-can-chess-tea...](http://sam-
koblenski.blogspot.com/2013/12/what-can-chess-teach-us-about.html)) gives a
few thoughts on why chess skills can translate into good programming skills.

------
mark_l_watson
I play Chess and Go. I also write programs to play.

------
franzpeterstein
I'am programmer, no time for games.

------
Apreche
No, I play Android: Netrunner.

------
napolux
What about poker, then?

------
eli_gottlieb
No, not really.

