took me long enough but I pushed through. It's not the best code but…#20
took me long enough but I pushed through. It's not the best code but…#20pottery123 wants to merge 1 commit intoAda-C5:masterfrom
Conversation
… on my side it's workig. Lots learned in this lesson hope there are more like it. Never give up
| ``` | ||
|
|
||
| **think**: Why does 03/13 come out as _sad_ when it should be _happy_? How could we fix this? | ||
| the yay! and great! have exclamation points which the includ? method does not read. |
|
You need to focus on proper indentation of your code. Here's a style guide: https://github.com/styleguide/ruby or posibly use this tool: http://www.cleancss.com/ruby-beautify/ Poor indentation will make debugging and coding extremely difficult for others to read/understand and will also probably hinder the speed at which you debug/code yourself (even if you don't believe that to be true :P ) |
| elsif days[1].include? "|" | ||
| neutral += 1 | ||
| else days[1].include? ")" | ||
| happy += 1 |
There was a problem hiding this comment.
Ooooh! This is interesting. I hadn't thought to do it that way. It definitely looks like it works, but I think it would have made for more readable code if you said days[1] == ":-(" etc.
The body's of the if's need to be indented here.
|
I also think you need to work on using more meaningful variable names and comments. There are a number of places where I had to think hard about what was going on where I think better variables names or a small comment would have made the code much easier to digest. Not just for me, but for you too if you were ever to go back and look at this code at a later date. |
|
Thanks for the comments I will go over all of this with my tutor on Tuesday. Also with the analyze mood method I changed the text array and I got the same results each time. Am I doing something wrong? To: Ada-C5/mood-analysis mood-analysis@noreply.github.com You need to focus on proper indentation of your code. Here's a style guide: https://github.com/styleguide/ruby or posibly use this tool: http://www.cleancss.com/ruby-beautify/Poor indentation will make debugging and coding extremely difficult for others to read/understand and will also probably hinder the speed at which you debug/code yourself (even if you don't believe that to be true :P )— |
|
I don't totally understand how |
… on my side it's workig. Lots learned in this lesson hope there are more like it. Never give up