25 points

a year ago

How HackerStash got 481 points with this one simple trick...

HackerStash update by Avatar Lewis Monteith

... by being an idiot!

The model for challenges has an instance method for getting the score (i.e. how many points that challenge is worth when completed).

It looked a little something like this:

def score(self):
    return self.count * get_score_for_key(self.key)

Nice and simple, when multiply the number of times they did it by the score multiplier! Nope!

You only get points once you've completed the whole challenge, so it doesn't need to be multiplied by the count 🤦‍♂️.

So instead of getting 35 points for completing the award_points_to_ten_projects challenge, we instead got 350!