What techniques are used in solving code golf problems?
Posted
by
Lord Torgamus
on Programmers
See other posts from Programmers
or by Lord Torgamus
Published on 2010-09-02T05:57:38Z
Indexed on
2010/12/27
13:00 UTC
Read the original article
Hit count: 358
"Regular" golf vs. code golf:
Both are competitions. Both have a well-defined set of rules, which I'll leave out for simplicity. Both have well-defined goals; in short, "use fewer hits/characters than your competitors."
To win matches, athletic golfers rely on
- equipment
- Some situations call for a sand wedge; others, a 9-iron.
- techniques
- The drive works better when your feet are about shoulder width apart and your arms are relaxed.
- and strategies
- Sure, you could take that direct shortcut to the hole... but do you really want to risk the water hazard or sand bunker when those trees are in the way and the wind is so strong? It might be better to go around the long way.
What do code golfers have that's analagous to athletic golfers' equipment, techniques and strategies?
Sample answer to get this started: use the right club! Choose GolfScript instead of C#.
© Programmers or respective owner