You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your code is super succinct, and I love that. I would say that maybe the final commit is too succinct, though. It took me just a little bit longer to understand what was going on here without any driver tests.
Also, just two other small things. If you wanted to, you could be more specific about what exactly the source variable represents. Yeah, it's a source, but is it a board_array? Is it a boggle_board? Variable names is often a matter of preference; in simple exercises like this one, I often find it helpful to me to name my variables after the pieces of data they represent (array, hash, number, etc...) but I know our review guidelines specify that variables should be more specific to their context in the program than that.
The reason I ask is because, I started wondering, as I was looking at your code, in the #row method, why you have #to_a after getting the row. Isn't that row already an array?
But that's it. This seemed like a suspiciously simple exercise to me, and what you came up with looks really DRY and ultimately, easy enough to understand.
The text was updated successfully, but these errors were encountered:
Hey Josh,
Your code is super succinct, and I love that. I would say that maybe the final commit is too succinct, though. It took me just a little bit longer to understand what was going on here without any driver tests.
Also, just two other small things. If you wanted to, you could be more specific about what exactly the source variable represents. Yeah, it's a source, but is it a board_array? Is it a boggle_board? Variable names is often a matter of preference; in simple exercises like this one, I often find it helpful to me to name my variables after the pieces of data they represent (array, hash, number, etc...) but I know our review guidelines specify that variables should be more specific to their context in the program than that.
The reason I ask is because, I started wondering, as I was looking at your code, in the #row method, why you have #to_a after getting the row. Isn't that row already an array?
But that's it. This seemed like a suspiciously simple exercise to me, and what you came up with looks really DRY and ultimately, easy enough to understand.
The text was updated successfully, but these errors were encountered: