Code golf

I recently discovered code golf. Code golf is basically a competition to write a program that solves a given problem in the minimum number of characters (or memory) possible. In general, a problem is presented and then the golfers propose their solutions with character counts. I think that the formal competitions are limited to particular languages, but the code golf on the Stack Exchange usually has solutions in many different languages.

I haven't golfed myself, but reading the golfing of others always gives me a good larf. I particularly enjoy the C/C++ golfers.  As an example, this post on the Stack Exchange has an C++ implementation of Dijkstra's Algorithm for pathfinding in 799 characters.


Popular Posts