Advent of Code

Many companies run their own internal events leveraging Advent of Code. It gives their developers an opportunity to flex their muscles and is a fun morale booster before the holidays. Participants are encouraged to solve the puzzles and if they do well they can win prizes. Companies usually create their own private leaderboards on Advent of Code and a participant's placement on the leaderboard determines their prize eligibility. There's nothing wrong with a little friendly competition, but at TCGplayer, we do things a little differently.


The TCGplayer Way

Focus less on competition and speed and more on camaraderie and learning.

Make the event accessible to everyone, including folks new to coding.

Don't get in the way of the holiday season.

Reward everyone who puts in the effort. Not just leaderboard toppers.

Advent of Code

Many companies run their own internal events leveraging Advent of Code. It gives their developers an opportunity to flex their muscles and is a fun morale booster before the holidays. Participants are encouraged to solve the puzzles and if they do well they can win prizes. Companies usually create their own private leaderboards on Advent of Code and a participant's placement on the leaderboard determines their prize eligibility. There's nothing wrong with a little friendly competition, but at TCGplayer, we do things a little differently.


The TCGplayer Way

Focus less on competition and speed and more on comradery and learning.

Make the event accessible to everyone, including folks new to coding.

Don't get in the way of the holiday season.

Reward everyone who puts in the effort. Not just leaderboard toppers.

Official Rules

Registration

Only current TCGplayer employees may register and participate in this event. Participants must create a GitHub account if they do not already have one and a public repository for their solutions. We do this to foster collaboration and discourage plagiarism. Participants must create an Advent of Code account if they do not already have one and join the TCGplayer private leaderboard. The leaderboard provides the event organizers with a way to easily see how many stars everyone has earned. Placement on the leaderboard is for bragging rights only. Participants must register for the event using a Google form where we collect their Advent of Code user name, URL to their GitHub repository, whether they think they qualify for the Newbie Bonus, etc.

Schedule

The event starts on Dec 1 when the first puzzle unlocks and ends on the Monday morning after the first full week of Jan. This allows participants to take breaks throughout the event and catch up after the holidays are over without losing their prize potential. Prize selection is open the week following the end of the event, i.e. the second full week of Jan.

Earning Stars

Participants earn stars by solving this year's puzzles, which are redeemable for prizes like tickets at an arcade. This makes the prizes accessible to everyone, not just your company's top coders. A 5-star Newbie Bonus is awarded to any qualifying participant upon earning their first star by solving a puzzle. Qualifying participants are those who don't write code for a living or who do but have committed to crafting all of their solutions using a programming language that they are not familiar with, i.e one they would not be comfortable putting on their resume.

Collaboration

Participants are encouraged to talk to each other about puzzles and share their solutions. Participants must check their own unique solution into GitHub and be prepared to talk about how they work if asked by the event organizers. Plagiarism is defined as copying and pasting another participant's code and perhaps making superficial changes to it. Participants found guilty of plagiarism may be stripped of stars earned using the offending code. Egregious cases may result in disqualification from the event.

Tips for Organizers

Communication

Have a website with all of the information for your event. We use Google Sites, but you can use whatever you like. Create pages for FAQ, rules, the calendar, prizes, etc. Have a Slack channel, email list, etc to communicate with participants.


Budgeting

Talk to your finance people about taxes. At TCGplayer there is a limit to how much free stuff we can give each employee per year without having to worry about taxes. This led us to create a prize structure where no participant could conceivably exceed that limit. Also, the prizes cannot in any way resemble actual money, so no TCGplayer Store Credit or other gift cards.

Establish a rough star-to-dollar equivalency. For us, each star is worth roughly $2. For example, a 10-star prize would be $15-25 in value and a 50-star prize would be $90-120 in value.

Use the stats page from past years of Advent of Code to estimate how many stars each participant might earn on average. Worldwide, participants tend to earn 15 stars on average. Factor in that many of your participants are likely to be professional programmers or receive the Newbie Bonus and bump that average up to 20 just to be safe.

Estimate how many participants you expect to have from your company. Budget Estimate = Average Stars per Participant × Expected Participants × Star-to-Dollar Equivalency. For example, given 20 stars per participant on average, 50 participants, and $2 per star, that means your prize pool will cost the company approximately $2000. Make it clear to your finance department that this is an estimate. The actual amount will depend on participation. Low participation will result in a smaller prize distribution. Higher participation will result in a larger one.

Prize Wall Curation

Have a wide variety of prizes covering many different interests. Make sure there is something for everyone. This requires you to know your company culture a little bit, but don't just pander to the majority. Include some prizes that might attract certain interest groups within the company. At TCGplayer, we make sure to cover as many of our employee's passions as possible. Magic, Pokemon, D&D, Star Wars, Anime, Harry Potter, Legos, video games, comic books, snacks, and more!

Have prizes at many different star values. We offer prizes that cost 1, 2, 3, 4, 5, 10, 20, 25, 30, 35, 40, 45, and 50 stars. There are 5 or so choices at each tier in the 1-5 star range. Think of these like stocking stuffers. They are prizes that participants can spend their leftover stars on and are also accessible to participants that only solve a couple of puzzles. Then there are 10 or so choices at each tier in the 10-30 star range. This is where most of your participants will land. Finally, there are 5 or so choices at each tier in the 35-50 range. These are higher-end gifts for your participants who really crush it!

Office Hours

Schedule blocks of time where participants can come and get help with puzzles. This is important for newbies who might have trouble wrapping their heads around what a particular puzzle is asking them to do. Also, have some canned hints ready for each puzzle for people who get stuck (see the Providing Helpful Hints section below). Recruit experienced members of the company to help you with this so you don't have to run every Office Hours yourself.

Providing Helpful Hints

Consult /r/adventofcode. Either direct your participants there to get help or go there yourself to discover good hints to give them.

As puzzles are unlocked, start thinking of hints you could give someone who is struggling. You don't want to tell them how to solve it but remember that you may have participants at various skill and experience levels. Use hint-giving as a teachable moment. The participant might not have been exposed to a key concept that they'll need to solve the puzzle. Below is a list of hints I have given in the past.

"This puzzle is all about Dijkstra's algorithm. Here's how it works. Now try to apply it to the puzzle."

"Think back to linear algebra in high school. y = mx + b, right?"

"Maybe try using a stack instead of a list. What's a stack? OK, let's do a crash course in data structures."

"Are you familiar with bitwise logic operators? No? OK, well here's how they work. Could this be useful for this puzzle?"

"This puzzle becomes a lot simpler if you use recursion. Do you know what that is? No? OK, let's walk through an example."

Another way of giving hints is to create a custom puzzle input (and the corresponding correct output) that highlights a defect in the participant's solution or an edge case they hadn't considered. Let them figure out why their solution doesn't output the correct answer for the new test case. It gives them direction without explicitly pointing out the defect. It is up to them to debug their solution.

The goal here isn't to gatekeep. If a participant has never taken a formal computer science course and doesn't know what a stack, queue, or dictionary are, don't just shrug and banish them to the lower tiers of the prize pool. Teach them! Then reward their willingness and ability to learn with stars and therefore prizes. Their becoming better programmers and problem solvers is a boon for the company.

Providing Helpful Hints

Consult /r/adventofcode. Either direct your participants there to get help or go there yourself to discover good hints to give them.

As puzzles are unlocked, start thinking of hints you could give someone who is struggling. You don't want to tell them how to solve it but remember that you may have participants at various skill and experience levels. Use hint-giving as a teachable moment. The participant might not have been exposed to a key concept that they'll need to solve the puzzle. Below is a list of hints I have given in the past.

"This puzzle is all about Dijkstra's algorithm. Here's how it works. Now try to apply it to the puzzle."

"Think back to linear algebra in high school. y = mx + b, right?"

"Maybe try using a stack instead of a list. What's a stack? OK, let's do a crash course in data structures."

"Are you familiar with bitwise logic operators? No? OK, well here's how they work. Could this be useful for this puzzle?"

"This puzzle becomes a lot simpler if you use recursion. Do you know what that is? No? OK, let's walk through an example."

Another way of giving hints is to create a custom puzzle input (and the corresponding correct output) that highlights a defect in the participant's solution or an edge case they hadn't considered. Let them figure out why their solution doesn't output the correct answer for the new test case. It gives them direction without explicitly pointing out the defect. It is up to them to debug their solution.

The goal here isn't to gatekeep. If a participant has never taken a formal computer science course and doesn't know what a stack, queue, or dictionary are, don't just shrug and banish them to the lower tiers of the prize pool. Teach them! Then reward their willingness and ability to learn with stars and therefore prizes. Their becoming better programmers and problem solvers is a boon for the company.

icon

TCGplayer Core Value #1

Motivate Your Peers