Skip to content

Instantly share code, notes, and snippets.

@al-the-x
Created August 30, 2011 00:14
Show Gist options
  • Save al-the-x/1179769 to your computer and use it in GitHub Desktop.
Save al-the-x/1179769 to your computer and use it in GitHub Desktop.
Orlando Coding Dojo -- 8/27/2011

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Find the sum of all the multiples of 3 or 5 below 1000.

Planning

expected input: 10, 1000 expected output: 23, ???

examples: 10: 3, 5, 6, 9 = 23 15: 3, 5, 6, 9, 10, 12 = 45 20: . . . 15, 18 = 78

function multiples_of_three_or_five ( limit ): array

function summation ( list ): integer

class Solution function solve_for ( value ): integer // solution

What we did well...

  • Good problem, finished it!
  • Good Language: Coffee Script > Javascript
  • Liked the refactoring phase at the end
  • Planning helped and was thorough enough
  • Wrote tests first
  • Learned something new

What we want to improve...

  • Announce the language decision earlier
  • Space was too hot and too loud
  • Refactor earlier instead of all at the end
  • Back up to a known good point instead
  • Identify bad refactoring
  • Plan the refactoring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment