Skip to content

Latest commit

 

History

History
11 lines (7 loc) · 886 Bytes

README.md

File metadata and controls

11 lines (7 loc) · 886 Bytes

Ruby Code Golf Night

According to Wikipedia, "Code golf is a type of recreational computer programming competition in which participants strive to achieve the shortest possible source code that implements a certain algorithm". "Shortest possible source code" will be the least number of characters, as determined by ruby -e 'p File.read(ARGV[0]).split(//).size' file.rb (same as wc -c file.rb).

Tonight we'll be doing four short code golf challenges in Ruby, aiming for about 15-20 minutes of coding per challenge, and 10-15 minutes of review and discussion. Seeing other people's code golf submissions is a often good way to learn some lesser known Ruby features.

Some rules:

  1. No spawning external programs.
  2. No use of libraries not included in the default install of Ruby.
  3. No looking up answers to specific problems on the internet (general internet research is OK)