Skip to content

Instantly share code, notes, and snippets.

@jdliss
Created June 25, 2016 03:26
Show Gist options
  • Save jdliss/244fe3478a37a2834421b0bc96cc08c8 to your computer and use it in GitHub Desktop.
Save jdliss/244fe3478a37a2834421b0bc96cc08c8 to your computer and use it in GitHub Desktop.

leap code

  • responder 1 - They took the one line approach that I did, but their use of semi-colons and parentheses is weird.
  • responder 2 - This person took a longer and debatedly clearer approach by writing out a seperate function to calculate if a year is divisible by a number. Debatable if that's any better than just using modulo. They also used an if/else and explicit boolean returns instead of just returning the result of the comparison.
  • responder 3 - This person used the one line method with squished whitespace.
  • responder 4 - Another fan of conditional statements. They printed their answers though, not sure if that passes the exercise. They also left a bunch of comments and their own testing in.
  • responder 5 - This guy used if (x) return (y) approach. Looks very clear and is only minimally longer than the one line statement.

hamming code

  • responder 1 - This person took almost the same approach as me. Except they used an if else statement that included the error, which they didn't need to do because throwing errors will stop the execution
  • responder 2 - This guy used charAt(number) to find the character instead of the bracket notation. They also reversed the if statement from the guy before and the else threw the error instead of that being the first thing checked.
  • responder 3 - This person has some weird indentation and whitespace issues going on. But otherwise is pretty much the way I did it.
  • responder 4 - This coding genius split up their stuff into different functions and used them like a pro.
  • responder 5 - This human being used a class instead to it's solution. also used map and compared a value to an index in the second string

RNA Transcription code

  • responder 1 - This programming wizard used regex to replace the original string. clearly dealing with someone with an uncanny intellect
  • responder 2 - This exercismer used a bunch of if/else if/else statements instead of a hash or regex. it's much more clear about what's happening but is a little more repetitive in my eyes.
  • responder 3 - This javascript slayer is using ES6 (i think). not sure what's happening with that reduce.. where do prev and current come from?
  • responder 4 - This rubyist used split and map and then join to swap the letters.
  • responder 5 - This edge case checker did it exactly they way I did, except they unnecessarily checked if the input length was 1, but they didn't need to do that with the way they implemented their solution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment