The only thing better than Chamomile Tea is Chamomile Tea and Code Golf. Code Golf is a Stack Exchange community for programming puzzle enthusiasts and code golfers.
Coder sporting his lucky golf outfit. Not a real viking.
If you’ve ever met me in-person, you know I love talking development in general and code in particular. What’s interesting about Code Golf is the ability to learn from a global assortment of your peers in a condensed and rather fun period of time.
Let’s look at a few code snippets from an example Code Golf: Reinvent the For loop.
Reinventing the For Loop
The for loop is a fundamental iteration construct in many programming languages:
This Code Golf’s author challenges developers to:
Execute a basic for loop without using any repetition structures (for, foreach, while, do, etc).
This version was inspired by Entry #1.
Code Golf is pretty interesting. Hopefully, it gives you a good opportunity to sit back, relax and learn from our peers.
Happy Coding and Enjoy!