NEW: A programming challenge for Prime subscribers

HI All!

We’re testing out a new idea for improving your Ruby skills: a programming challenge just for Prime subscribers.

Take a look here:

This is a great way to practice your chops and also to get some feedback on code you’ve written. I listed the difficulty level as intermediate, but I’d love to see you all take a crack at it.

Questions? Post them here and I’ll update the README.



This looks perfect!

There is also a contest for t-shirt, so what is the deadline for submitting our solutions?



Good question!

Deadline for being considered for a t-shirt is 9/24/13.

Really cool!

Awesome. Will be doing this.

How crazy do you want to get counting ALL? should we figure out who is on stage at the time and add a line to their count? add one to everyone in the play? ignore those lines?

Very good question! Those lines are tricky…

@benorenstein should we consider such lines?

<LINE>So all.</LINE>

I wouldn’t worry too much about those lines. The point of the exercise is to practice TDD and your coding chops, not so much to get the exact right answer.

Just make a sensible decision about how to handle them and press forward.

Awesome idea - thanks! Hope you do more of these…jon

Thanks! Given how good the response has been (lots of forks, lots of people leaving good comments on each others’ code), we’re planning to do more.

1 Like

Who is the winner? Who is the winner? Who is the winner? :smiley:

The winner is @kmcgladdery!

Here’s his submission:

You can see my comments on his pull for why I chose his implementation. But to summarize:

  • nice division of responsibilities among classes
  • good division of responsibiliets within classes (lots of small methods)
  • good method names
  • good use of duck-typed injected dependencies (see xml_provider)

Kevin – would you like your shirt?

Also, to clarify: this exercise is still open to anyone that would like to complete it. You just won’t be in the running for a t-shirt (unless you email me and ask very, very nicely).

Congratulation to winner! Really nice solution!

@benorenstein I am looking forward to next challenge. This was a great exercise for me. Before it I had no idea how to tests standalone scripts with RSpec, how to download files, parse XML… So thanks!

Glad you liked it! New exercises are definitely planned.

Yes, please. =)

And thank you very much. This was an excellent learning experience.

Congrats @kmcgladdery :slight_smile:

Really enjoying reading studying all the solutions submitted and the good discussions in the pull requests. Hope I can actively participate in the next challenge

Want to watch thoughtbot’s CTO solve this problem (with me providing color commentary)?

Check out this post: