Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sockets - Bita #36

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Sockets - Bita #36

wants to merge 2 commits into from

Conversation

Bitaman
Copy link

@Bitaman Bitaman commented Feb 8, 2019

Portmanteau Generator

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
What went well in your code style, such as indentation, spacing, variable names, readability, etc.? What was lacking? I think indentation and spacing , I tried to choose good variable names too but given the very short time I had to go over my code they might not be the best.
How did creating the is_vowel? method affect your project? I think it makes it shorter. without the method the program would be much longer.
What was your strategy for getting the correct set of letters from the first word into the portmanteau? finding the last vowel and the index of it inside the word and then slicing my word from 0 to the index (excluding the index)
What was your strategy for validating against inputs under 2 characters? making a loop which checks the length of the word and prompt user for another one if the length is under 2.
In the next project, what would you change about your process? What would you keep doing? I will give myself more time for pseudo coding and I will actually write the pseudo code to the end before starting to write the program.

@droberts-sea
Copy link

Portmanteau Generator

What We're Looking For

Feature Feedback
Readable code with consistent indentation yes
Practices using variables appropriately yes
Practices using conditionals appropriately yes
Practices iteration appropriately yes
Practices using custom methods appropriately yes
Program validates against input under 2 characters yes
Takes in two inputs and creates a portmanteau yes

Great job overall! I've left a few comments inline where things could be cleaned up, but in general I am quite happy with this submission. Keep up the hard work!

def is_vowel?(letter)
if letter == "a" || letter == "e" || letter == "u" || letter == "o" || letter == "i"
return true
else

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you shorten this up using .include??

end
if i == 0 && k == 0
word_a = first_word
else

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what k is for in this code. I think you could take it out and get the same effect.

puts "please enter the second word:"
second_word = gets.chomp
until second_word.length >= 2
puts "please enter a word with more than one charactor:"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have almost exactly the same code to get an input word from the user repeated here. Could you DRY this up with another method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants