Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save philsof/3c87294cef46e1cc4e11 to your computer and use it in GitHub Desktop.
Save philsof/3c87294cef46e1cc4e11 to your computer and use it in GitHub Desktop.
Code review pair-jdun10,plonsker branch for pig-latin-challenge

Good work on this. Here are my notes on your code:

  • Nice use of rotate! This method takes care of two needs simultaneously, which is cool.
  • A quick note: There is no need for the 1 argument to be passed to rotate!, since it is passed by default. (See the docs on rotate! here). You can safely remove that argument.
  • Also heads up: if you were to run convert_word_to_pig_latin on a word that does not contain a vowel (like "why") your code would enter an infinite loop. (Your until loop would keep running forever.) How could you refactor your code to fix this bug?
  • Watch your indentation. Especially here, because it becomes difficult to read your code.

Good work!

-Phil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment