mileszs / rules.mkd secret
Last active

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Indy.rb Bio Code Golf Rules and Other Info

View rules.mkd

Indy.rb's Bio Code Golf

(2013-8-14)

Tonight we are code-golfing, with a bioinformatics slant. What is code golf?

Code golf is a type of recreational computer programming competition in which participants strive to achieve the shortest possible code that implements a certain algorithm.

Sound intimidating? It's not. The ultimate goal is to write answers to the problems with the fewest characters you can. A good way to get there is to write an answer that works, and then make it shorter.

Rules and Other Information

  1. Split into groups. Please aim for an even mix of advanced, intermediate, and beginner. (Experts, please invite a couple beginners to join you.)
  2. Your code must pass the test included with the problem.
  3. You may only use Ruby (1.9.3+, please) and the Ruby Standard Library in the actual problem code. No other gems! (You may use a debugger such as 'pry' as necessary.)
  4. Each problem's method should be named after its number, e.g. problem_1(), problem_2(), etc.).
  5. Method definition lines wil be removed before calculating the total character count.
  6. To enter, put your code in a Gist, Pastie, or whatever your favorite code pasting tool might be. Then email the link to miles@getfretless.com with the subject line of the form Problem N (e.g. a subject of "Problem 1" for problem 1).
  7. Once we've finished one round, we will move right along to the next round. I will announce the results at the end of all the rounds.
  8. The winning team will be the team with the overall lowest score across all rounds.
  9. Each round will be 15 minutes, but I reserve the right to extend rounds as I see fit.
  10. Most importantly, you should pick a creative team name. Send it to me in your first email (Problem 1)!

By popular demand, here's an example:

Return an array of all even integers from 1 to 10

Reference Implementation:

(1..10).select(&:even?)

Winner:

[2,4,6,8,10]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.