Specs for the Hangman Exercise

I’m on Hangman and the “handle response” method is never adequately described. I had to go to the solution to understand what the method was supposed to do. It would be good to either make the spec(s) related to that method more verbose or describe it more extensively in the assignment. In general (with a lot of the later exercises in the Alpha Course) there’s a little too much guessing what plan of attack the author of the specs had in mind, since the specs are sometimes brittle and nitpicky. It forces you to spend more time looking at the spec files closely, which is good, but sometimes it detaches solving the exercise from actually solving the problem posed by it in abstract—I end up spending time trying to figure out what the spec writer envisioned based on hints left in the specs, instead of just solving the problem and debugging the code.

Also, a question that occurred to me while I was working through this: my takeaway from the various Rspec exercises in the Alpha Course was that we were supposed to be learning how to interpret specs and use them as directions while coding solutions to problems. Are we also expected to know how to write our own specs from scratch by the time we start the main course? The Alpha Course doesn’t ever actually go through the syntax of Rspec, so I assumed not, but I want to make sure.

1 Like

Thanks for the feedback! I agree that we can make some of these specs a bit more explicit about what they’re looking for. The specs for handle_response are a good example of this.

That said, the point of these exercises is very much to not only have you solve the problem, but solve it in a particular way. You will often have to work within this sort of constraint, both in class and in the professional world. This may be because you’re building a feature within an existing platform, or because you’re in an interview and the interviewer wants to see a particular implementation, or because a separate team wrote specs for your product, etc. It can be frustrating at first, but you’ll grow used to working like this. We will, however, take your feedback and work on improving the language of the specs.

Your last note is spot on. The goal is to be able to interpret specs. You’ll learn how to write RSpec tests during the main course; you’re not expected to do that now.

Hope this helps! And thanks again for the feedback!

2 Likes

Awesome. Thanks for the reply. And that last point is a relief!

P.S. You should add something like your reply to the curriculum! This part in particular was eye-opening:

You will often have to work within this sort of constraint, both in class and in the professional world. This may be because you’re building a feature within an existing platform, or because you’re in an interview and the interviewer wants to see a particular implementation, or because a separate team wrote specs for your product, etc. It can be frustrating at first, but you’ll grow used to working like this.

1 Like