Skip to content

Week 5 Challenge 4 Review #1

@celeen

Description

@celeen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions