About elixirgolf

Elixir golf is all about using Elixir to solve programming puzzles in as few characters as possible. The term code golf was popularised in the 1990s when Perl was used to write a program to do RSA encryption. Since then many different languages have adopted the *Golf challenges. e.g. Perl Golf, Ruby Golf, etc.

The term “code golf” is derived, from the way conventional golf is scored, i.e. the person with the lowest score wins.

Rules

  1. Only Elixir language can be used, however this also includes the Elixir Erlang syntax e.g. :binary.copy.
  2. No requiring third party libraries
  3. Whitespace is counted
  4. Metaprogramming is allowed
  5. No hard-coding return values

Advantages

  1. It improves your understanding of the language, and how to “think” in it.
  2. Cudos for ingenious solutions.
  3. Makes you appreciate writing and reading succinct code.
  4. Opens your mind to different programming techniques.
  5. It encourages lateral thinking.
  6. It’s fun!

Disadvantages

  1. The code becomes difficult to read and understand
  2. It is very difficult to maintain code written in this style.

Resources