Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
The Ruby version doesn't follow the Ruby conventions. Accessors shouldn't be named get and set
This comment is hidden because it contains spoiler information about the solution
Thanks, that array hack is a bit cleaner that mine.
The Array/Hash accessor
[key]
is very specific to those data structures. If I would read that code in a year, I'd have a hard time seeing at a glance what myUsers
or yourPosition
is for. It just seemed to force a particular implementation and restricting freedom in solutions a little.Doesn't really belong in the OOP category
This one shouldn't be in the OOP category at all
The forced in hash access for
position[n]
is really annoying, why not make it a methodposition(n)
. I basically had to add wrap Array in a class that sutracts 1 from the index.And why test against the live site, a frozen copy of the leaderboard would work just as well.
I found the specs not very helpful when writing my code. BDD should guide me ideally, not confuse me.
A lot of the logic is also quite arbitrary and hard to follow.