[Applause] Hello friends uh so yeah as as was recently stated by the Sury tones of our host here uh my name is Eric wasel and this is in fact Advent of code behind the scenes uh I really enjoy helping people become better programmers and when I am learning a language or learning a skill I find that I Do It Best in the context of some kind of a problem or scenario that I'm trying to solve and so one of the goals that I set out to solve when I'm doing this is to give people just like small packaged problems with a single answer that you can think about and work on and then and in doing so you learn a skill you learn a think and so I've I've constructed a mechanism by which I do this so uh show of hands who's who's heard of edin of code before here before before they saw it on the schedule I guess uh awesome how many of you have done at least one puzzle how many of you have done all the oh sorry hang on hello wait it stands for what I you sure CPP doesn't stand for Canada Pearl people C++ oh I'm sorry okay thank you uh I'm being told that this is a C++ conference is that true these are the wrong slides hang on sorry there okay much better how many how many people have solved all of the puzzles in one year one one one person two people very nice round of applause that's really hard to do they're really hard some of them are hard I try to make the beginning ones easy and I try to make the later ones hard we'll get into the the variety of of what that means and why thank you to my to my wife who's in the crowd who who set that up for me uh yeah we have C++ in Advent of code 2 uh I'll get into where and how if I remember during that slide but mostly it's impl I'm not sorry so who let this guy in stage anyway whoa don't do that wow okay uh so I used to make large scale web web applications for isps I used to work on auction infrastructure I used to do architecture for a TCG Marketplace uh now I do architecture for that same Auction Company again uh I also run programming challenges you might have heard of them uh uh tools for games when I play video games I engage with them not by playing the video game but by playing it for five minutes and being like you know what this needs more software uh I make fun of some programming languages uh and I make lots of other random things but we're not here to talk about any of that we're here to talk about Advent of code so hold on what what is this Advent of code thing I keep hearing about right uh so we need a back up for a second suppose that you are here wait that's that's to zoomed out sorry hold on let me just here at this little cafe in Salem Massachusetts and all you have is a pen a few napkins a few weeks until Christmas a random memory of Advent calendars and a passion for programming puzzles and helping people to learn to become better programmers right the answer Advent of code the combination of Advent calendars and programming puzzles so what's an advent calendar then uh some people and some like later later on in the year celebrate uh Christmas and similar things right by having this thing called an advent calendar which is a way to count down the days until Christmas occurs and very often they'll the like older ones look like this and it's usually like a a box where every door for a day has like a treat in it or some of them have like a Lego in it or something right which is super cool uh the one that I grew up with has little things that you put up on the tree one per day until the Christmas the day is full uh and it's just the way to count down until Christmas the the Advent calendars and ADV Advent of code look like this or like this or like this or like this or like this or like this uh but what about the puzzles part well if you see each of these lines is numbered and if you click on one of the lines of the Advent calendar a little story comes up and the story is about how the elves were trying to bring the sleigh keys to Santa but they dropped them in the ocean and now you have to go rescue them using a submarine or something right something Fantastical and you are the only person who can save Christmas somehow right uh and you read through the puzzle and it ends up getting into some kind of a programming circumstance where not only are you the only one that can solve Christmas but you have to use software to do it or graph paper we'll get into that uh uh and it gives you a button where you can ask for an input file that contains the details of the circumstance that you have found yourself in and it also asks you to put in the answer it doesn't want your code you can use any language you want you can use pseudo code you can use your brain you can use whatever and you type in the answer and if you do that it will give you part two where I pull the rug out from under you and either add to the puzzle or make a twist and change the requirements in some way to simulate like a real world circumstance you know where you're on a project and the client comes up to you and the client's like but we didn't want this red button to be blue we wanted it to be red and you go oh no I hardcoded blue deep in the source code how will I right you know simulate like having to change a project that you've already been working on and so I'll make some tweaks or I'll make it more complex or I'll do whatever and then you put that in and when you're done you get two stars and then you do more and you get more stars and as you do that the calendar fills out in one way or another until finally you've a finished calendar and also hopefully learned a whole bunch of stuff so it's 2015 and you just built a bunch of programming puzzles where should we Host this thing well let's do some traffic estimation right we're good Engineers we can plan for traffic programming puzzles probably won't be that popular let's be honest right there aren't that many programmers and even if there are the kinds of people who like solving puzzles for fun is some fraction of that it's probably not going to catch on but I do have a few friends that might like it and they have a few friends that might like it maybe 50 people now we are Engineers here so we're going to give ourselves a wide margin 70 should be enough right should be plenty small personal web server I've already got one running throw it on there it'll be fine great okay it's November 30th time to launch the site we announce it we say hey I've been working on this thing for a while you should go click on it it's got 27 retweets that's within our margin we expected 70 we got 27 yeah everything's that's fine that's great uh this is the sign up graph leading up until midnight there's 81 the number of people that were signed up at midnight there's 70 that's our estimate I mean that's still fine right we can handle a little more the web server isn't that taxed it'll be it'll be okay uh and then the puzzle unlocked and then the graph did this uh the technical term for this curve is oh no so 12 hours later the graph looks like this that's my estimate I zoom out a little bit there's our estimate there's 4,000 people so uh let's let's review our estimate here briefly we estimated 70 we actually got 4,000 we're only off by 5,600 per. uh the small server is very sad so you're bad at traffic estimation now what step one turn off the Minecraft server that saved lots of resources uh that still wasn't enough step two don't create a new process to handle every request hang on what why would you do that well turns out there's this thing called the common Gateway interface or CGI which I expect many of you in the C++ Community have also interacted with uh this is very good for prototyping and very bad for getting traffic it turns out that it lets you set up a process that takes some inputs and some outputs normal normal process inputs and normal process outputs in a in a posix environment anyway right and it Maps those things to the inputs and outputs of an HTTP request it's really convenient for building quick things and just slapping them someplace right uh but it does this for every single request that comes in which is explosion do not don't don't do that but it turns out if you just switch to fast CGI which simply skips the step of creating a new process it's fine so an emergency switch to fast CGI saved that event at which point I promptly oh wait [Music] hang there's uh more it continued to grow so hang on where did all these people come from uh well the astute among you might have noticed that these two lines that I've highlighted are recursive and all of a sudden uh you might know so there's a website that used to exist called Twitter where people share things and they did and then the graph kept doing this and it did this for the entire event so if I just fast forward to the end of December 2015 uh there's 52,000 people versus my like 50 or 70 right and just like where did you all come from so shortly after you know switch to AWS where I can pay them for more CPU that's much easier uh now we have 1,400,000 which is an an impossible number to even speak out loud in front of a group of humans 1,400,000 registered users uh of which 930,000 have at least done a puzzle which is the metric that I like to use when I'm measuring like who's a real user and not who accidentally clicked the off button by mistake or something right so it's still I can't how how I don't it doesn't it doesn't register um also it uh I I haven't figured it out yet but something happened in 2020 that made everybody stay home that year which means that instead of having the normal amount of users I had very many more than that and then so on day one the the servers exploded the AWS servers like all the ones that we got uh and it and it turns out that when you let a aache just spawn as many worker threads as you want for the number of requests that are coming in it will no matter if it has memory to do so or not so we fixed that by giving them lots more memory and then we discovered a very much more interesting thing uh so AWS has uh a a capacity that lets you provision load balancers and for the uninitiated a load balancer is a thing that lets you receive all of the requests in one place and then they are automatically shunted back to all of your backend service as necessary right and AWS in particular has a thing called an ALB an application load balancer which will automatically scale for your traffic for your traffic for Your Right which sounds great and if you have a normal traffic pattern where the traffic kind of slowly ramps up over the course of the day and then slowly ramps down over the course of the night and then slow right as a sinusal kind of thing the the albs will automatically keep up and it'll say oh yeah the traffic starting to go up we better we better boot up another instance of whatever right uh if your traffic pattern is instead a straight vertical line right at midnight followed by all of those users leaving again the load balancers go holy butts that was a lot of users we got to go spin up a bunch more servers and by they've done by the time they've done that all the servers of all the users I mean have already left because they've already gotten their puzzle and or gotten a 503 uh yeah so it turns out you can't rely on automaic scaling when you're doing things that they did not expect you to do so if you it turns out also if you ask AWS very nicely they'll just make your load balancers scaled way way up and keep them that way instead of Auto scaling but you actually have to call them an ask their support team is so good they helped so much so that was very fun but that took us like a week to figure out because there were like 85 other things that we wanted to rule out first because why would it be you know this gigantic multi-trillion dollar company's INF that doesn't make sense right so we took us a bit that was fascinating so now we've got this website and it's actually running smoothly why do people do Advent of code uh so like I said originally my goal was to help people become better programmers uh in the interest of doing that it can be sometimes hard to figure out what problem you should work on right I want to go learn you know rust or I want to go learn C++ or whatever do do I just read the documentation do I just like look up standard colon colon string and start reading and now I know C++ right like I don't ingest data that way and I assume most people don't either but it can be hard to know like well what should I tackle then what what's too big right what's too small and I won't learn anything so I like to provide practice problems that let people sink their teeth into something and learn like one or two skills at a time and then build their knowledge group but people also turn out to use it for in interview preparation they use it for trainings at companies they use it as a speed contest which I don't recommend but if you enjoy that sort of thing go nuts uh and to challenge friends uh with even parter version so if you see like on the subreddit people will make like a part three and just make it like if you're not using this wacky algorithm and like the vectorization instructions on x86 you will not like okay cool GL that's awesome right uh so people do it for all kinds of things and and and who are all these people exact that do it they're all over the place they're they're everywhere in the world uh largely us but that's mostly just because of the language I think uh in the US it comes out at midnight eastern time which is where I live which is why it comes out then because that's when I'm awake and can be around to do the puzzles and can make sure the servers are running and also whatever because I'm very much a night owl on the west coast they come out at 9:00 p.m. which is easy for them that's great sorry Europe uh in Europe they wake up at 5: and 6:00 a.m. Which is less good and I'm sorry but somebody's going to wake up early and it's not going to be me so uh which leads to some people doing it in the shower before work or you know posting about how it's either very hard and or somehow stabilizes their sleep schedule which is ALS what okay that's not a benefit that I was going to expect but whatever that's very cool uh people from all different uh skill ranges and domains and levels and whatever 171,000 repositor stories on GitHub that contain the phrase Advent of code somewhere in them which is a lot uh there's C++ on the fourth most reported language on the Advent of code unofficial developer survey so lots of people doing it in C++ uh also that's uh so the little tiny bars are uh year-over-year 2015 to 2024 left to right right so rust is which is kind of cool looks like it's eating eating python for breakfast which is fascinating I didn't realize that until I was prepping for this and all it's you know it's what people want to learn right now so that's what they're picking up it's kind of cool though but yeah C++ holding study number four uh people do it with like programmable fpgas which I think is the coolest thing uh I I saw somebody doing with uh C++ meta programming they they like at like compile time find solutions for the right that's I love it it's so much fun uh you know companies they'll you'll find a wall and they'll post all their Solutions on the wall companies universities they'll do something like this is the student of lumma Union in somewhere in Poland I think I forget now uh you know just post like print out your solution put it up on the wall so everyone can share it do play play together right uh non-programmers people solving it with graph paper because why wouldn't you you can right because all I care about is the answer so if you want to solve it like that that's completely fine uh Excel one guy the the um 2019 with all of the int code puzzles which if you haven't done are very cool somebody did all in of the int code puzzles in Excel not by solving them but by reverse engineering them using Excel and basically built like an excel-based disassembler for these program very it was very very cool uh Google Sheets right uh a literal program manager Grant chart software cool great Minecraft right is great so how okay how do we build puzzles so not just Advent of code puzzles but in general like how do you how do you construct a puzzle and what what should you avoid the first really big trick is ambiguity if I don't if I don't express to you the correct thing it's very difficult for me to help you recover from the ambiguity right if I say something that can be taken multiple ways uh even like a like a foreign language speaker or or just somebody that's kind of skimming and reading it can be very hard to uh get them out of that hole where they're convinced that they've read it correctly when in fact that they didn't uh so confusing sentence structure and multiple interpretations so I talk about to have other people test the puzzle that's largely to make sure that my English good right and not English bad um expectations of outside information so if my audience is going to be beginners as well as you know the crazy incredible people who do wacky things with these things I need to make sure that I don't start off by being like all right Implement a b tree and then right like no like it's everyone's already gone um or even just domain knowledge uh highlighty important details uh one of the things that I like to say is for every sentence there is a user that somehow skipped only that sentence like their brain like shut off for a second or they had like an alarm on their phone for a second right uh extremely common for for somebody to just be like I didn't even realize that this was in here so I try to help with that by providing examples where if you missed some key detail the examples will fail early so that they see that there's something wrong and then yeah having a bunch of beta testers that go through and test it and say like I don't understand this sentence or I understood it but I don't think people will oh I didn't think of it that way right like using more brains than your own in addition Advent of code puzzles in particular have a bunch of very specific constraint rints I have exactly one answer that I'm checking for for every input so there are lots and lots and lots of input files I'll get into what that means in a second but I have a problem statement that is the same for every user but every user gets a different input so it might be like this is a file that's just full of integers give me the sum of all of them or some right something like that but every user is getting a different list of integers and they have they're producing a different solution in that case the solution is the sequence of bytes that represents the base 10 representation of the number that they right and they submit that um any language I'm not going to run the code I I both don't want to spin up a comp a container for every single programming language in a runtime and try like it's a giant headache um but also I I don't want to restrict people to like whatever set of languages I support I want people to be able to learn whatever they want using these circumstances that I proposed uh lots of inputs to make it that everybody focuses on solving only theirs instead of being like a I'm sick of this puzzle I'm just going to look up the answer right there isn't a the answer yours is different from your friends um every puzzle has two parts I talked about that a little bit it is either for the more involved complex puzzles I'll basically break it in half and the first half will just be like did you implement like the outer loop of whatever this algorithm is appropriately and then I'll move on to telling you now what to do with it or sometimes I give you the entire you know puzzle the entire problem in step one and then part two I say ah what if instead you're multiplying them together and everyone goes oh no I have to change one character um and simulate the real world right because in in the real world you're not writing a piece of software and then putting it down and never touching it again right like you it's a continuous Evolution so simulating that a little bit especially for beginners in an environment where failure has no consequences means that I can help people to learn like oh if I have if I had structured my code this way I could have been able to adjust it more easily for what I thought might have been coming and so I'm going to think about that oh this time I super over engineered it because you didn't ask me for any of that stuff now I I overw it right and like help them to understand what it means to have to adjust code um iety Variety in uh uh like like in uh like types of algorithms I guess types of skills types of interest uh mostly to make sure that you're exposed to a bunch of different stuff but that means that I have to figure out ways to express to a beginner without using any CS terms like what I want them to build I want I want you to build a star but I'm not going to tell you that so I'm going to say like well the elves are lost in the woods and they need to get from here to here uh and also something occurs that makes BFS intractable but I don't say that right like figure out a way to like construct a scenario where hopefully you stumble upon the correct approach or ask your friend or learn a thing or whatever or maybe you figure out how to do in BFS or right um and then the tricky one difficulty calibration so a question I get a lot is why was this puzzle way harder than yesterday or why was this puzzle way easier than yesterday why why isn't it just like a linear progression from from easy to hard and the answer is because there is no such thing as like a single number how hard this puzzle is it depends a lot on what your background is and your comfort level in the in the in the language and your comfort level in the algorithms and whether you've you know lots of like lots of personal stuff so it's different from every for everybody and so I try to mitigate that by managing the amount of complexity uh I try to include a simpler version of a puzzle coming later so that you do the early puzzle and then you get to the later puzzle like oh I've already seen this as opposed to if you hadn't gotten that you like run into a brick wall because you've never encountered something like that before right uh whether or not I think people are going to have more or less time like weekends versus weekdays uh variety because if everybody has a different background then doing a whole bunch of like assembly problems all in a row if somebody doesn't like those or isn't good at them or whatever right like just that cause them to burn out um progression both based on versions of harder and easier puzzles but also kind of making them increasingly complex or involved um throwing off the difficulty a little bit deliberately uh I'll sometimes like to put a tricky puzzle early on and people this is very contentious but this is my reasoning early on in the month everybody's like oh yeah a day five puzzle I can do a day five puzzle I've done day five puzzles in the past and they tackle it full force like yes I can do this right and if it's a day 20 puzzle same puzzle right it's a day 20 like oh day 20 that's that's too hard I'm gonna I'm going to drop out I'll do it next year it's fine right but if I put a trickier puzzle earlier on everybody says oh a day P puzzle I can do it and a bunch of them do it and they learn a thing right as opposed to like having it labeled like this is a hard puzzle caution do not attempt right like no Drew try it s your even if you get a little bit in you'll have learned a thing and that's okay so and also you know easier puzzles later on in the months that people don't get completely burned out by a bunch of like deep Theory or something uh and then also C++ programmers will enjoy this interpreted versus compiled languages one of my goals with the puzzles is to make it so that interpreted languages have no disadvantage over compiled language in terms of runtime that can be tricky fortunately bigo goes above squared uh so as a result I can construct a circumstance where if you use a very naive algorithm like a like a linear scan or a or a bigo factorial whatever you know whatever whatever I feel is not the thing I was trying to show the user right the intended the the the intended set of experiences the range of experiences that I want you to have I will try to calibrate the input data so that if you do run that naive algorithm even in a very fast compiled language a handcrafted assembly or whatever I don't care whatever you want it'll still take several months to finish right it's still intractable but if you do it in one of the approaches that I would like to expose you to it'll run fast even if you're in Ruby or python or Pearl uh that can be tricky uh but it means that when I'm beta testing the puzzles and when my beta testers are beta testing the puzzles I will very often for the ones that are runtime sensitive Implement them in Pearl and in C++ and in a couple other things and my beta testers will Implement them in like hll and all kinds of stuff just to see like is this sane maybe sometimes hopefully sometimes it's not it's really hard I get it wrong a lot but I try to I try to make it as as careful as possible so how do you make an advent of code puzzle this is the general process uh I start by getting inspiration from some place so most of the puzzles come from some real world problem that I've actually encountered in my work either my my hobby projects or my job or my whatever or I see a video of somebody doing a cool thing or I see a a mechanic and a video right like somewhere like oh that would be neat if I tweaked these things and made them do this some kind of inspiration and then I go and research to see like is this just like a solved problem where everybody's going to type import iter tools and then they will be done with the puzzle which happens uh or whatever right and then design around pulling out just the part that's interesting but in a way that I can frame it to a beginner in a way that it will make sense and not take 16 hours hopefully sorry I try um and like design out what I want it to look like and then I build three programs I build something that will generate inputs for that puzzle in no in not no particular order right something that will generate input files for that particular puzzle and then a program that will solve part one and a program that will solve part two uh and I do that to have both runtime constraints like I was talking about but also so that I can have a lot of assertions scattered all across all of these things that say if you don't encounter you know moving left up right and down while solving this puzzle throw it out and build a different input right and so in doing so I can generate lots and lots of inputs all of which have a similar set of constraints for the users so that everybody has a relatively Fair experience when I'm you know to to the best of my ability which I feel like we do pretty okay at but sometimes the input generators are just like it's a random number and then the puzzle uses the random number for some interesting thing like it's a seed for a hash function or something like that and sometimes the inputs are super elaborate so depending on what kind of puzzle it is sometimes you start with the solvers and like work backwards to inputs and sometimes you start with generating you know arbitrary inputs and then work forward to solvers then you finally use those three things to generate many inputs and solve them and finally write a story about how the elves dro the Sigh keys in the ocean and put a the coat of paint on it that gives it a narrative that actually ties it together it's like the very last step but you you you might think that these just kind of flow nicely to each they kind of it's kind of like this it's it's noodly and very often I'll have to throw out an idea or I'll be implementing the solver and and suddenly discover that there's a library where you just like hand it this file and it just gives you the like sometimes that's okay sometimes it's not you just very you know we get there we get there eventually uh so here's some example puzzles this one says how many square inches of fabric are within two or more claims so this is a list of claims of fabric there's a giant piece of fabric and everybody's going to have some rectangle where they say at these coordinates with these Dimensions I'm going to cut out this slice of fabric how many square inches of fabric are within two or more there's going to be two people trying to get that same slice of fabric uh and people love to visualize these and it's one of my favorite things about Advent of code is they will take the inputs and they will turn them into a picture that looks like this uh and if you haven't spotted it yet there's the oh the only ID that doesn't overlap there it is yeah just you know I'm sure you all found it already but just for the yeah um here's another one so one of the things that weirdly I kind of enjoy is log parsing and log analysis so one year I produced a puzzle about log parsing and log analysis and of course I use dates that you can't represent with unix's epic time from 1518 because I'm mean uh but it produces the set of logs and it asks you things like find the guards that has the most minutes of sleep it says like this is the guard that's now functioning they wake up they sleep at certain times like do some do some very minor date math and then it says of all the guards which one is frequently asleep the most in the same minute and some people will take that and load it into like data analysis toolkits and make graphs and charts to solve the puzzle which I think is delightful I love it uh and some people will visualize it by having the elf def defend the lab that's the story and then they fall asleep for a bit then they wake up you know just to get a sense for what the data looks like which I think is great uh this is a puzzle that I really enjoy about filling up water on a two- dimensional grids the water falls in from the top and then there's these buckets that fill as it goes and it has rules about how they overflow and where and then it asks like where how much water is there or whatever right and so people will make like full-on animations of the water flowing and filling and doing whatever which not only is just very fun to look at uh it's also good practice for these users to be able to play with and inspect data because that's an important part of being a being an Engineers to be able to understand this this data this problem that you're looking at and share it with others and explain it and it's also an tool for beginners where they'll say I don't understand what Eric is talking about on this puzzle this makes no sense and then they go to the subred and they say uh oh okay got it okay right and I don't have to build so much tooling and and information and diagrams and Designs if the community is able to support one another which also helps give other people practice teaching one another the thing that is the current subject of everybody's mind because it comes out one per day and everyone's working on the same right Etc uh there it is so I'm a pro programmer I like regular Expressions I'm not sorry uh this is a this is a puzzle that gives you that Top Line that Top Line is a regular expression that matches north south east west it matches any string that represents a valid route through a maze and so the thing on the bottom is the maze that that string represents and your job is to figure out I think what is the most distant point from the starting point by reconstructing the maze I forget something like that right uh by not actually running the regular expression but by us like decoding it into a tree it's just it's not much of the syntax right and then figuring out based on that where the branches are and then following them and doing a little bit of recursion and then figuring out uh so somebody animated the like the redx processing into the uh into the maze which I love any of any of the maze ones always produce really cool visuals um this is one that says here are a bunch of points what is the close Clos location to any of the points using the following distance metric and then it says how much of those regions are finite which I love because anytime I include Infinity in a puzzle half of the people just like how do what if if Infinity then no that doesn't work what am I suppos right like that's it's really fun to see how people handle those sorts of circumstances um so people here know about Conway's Game of Life everyone this com life right in general that's a field called cellular cellular automa if you're not familiar go look it up it's so much fun uh this is a cellular automa where there are three states per cell instead of two states per cell and the question is there is open grass which is white uh trees which are green and logging camps which are brown and they're you know the the logging camps will log all the trees nearby and then they'll follow the trees and then they'll be torn down afterward and it ends up making these really cool spiral patterns as they like follow the growth of the forest in the you know in the story whatever um and then the question was like like when when does it start repeating when does the like the spiral patterns that all of these make start repeating and I guaranteed that every input produces a spiral pattern because I knew people were going to do this and they did and there all of a sudden the subreddit was just full of people with like cool spiral patterns of these so we do we do puzzles like that we do puzzles in 3D space this one says there's a bunch of points with a bunch of velocities which ones Collide and where so somebody rendered it in I think this is G plot and a bunch of them go foosh back and forth with each other and then go flying off into the abyss and you have to figure out like when is it safe to decide that all of the points that would have collided are going or have have done so and then figure out which points they were um one of the things that we calibrate for during these is how long it's going to take for the top 100 solvers mostly because that's when the points are there so the people that are there for the speed contest that are doing it for the points uh that's when it matters the most that like the site is completely functional or else you know that the day is invalid because a bunch of people that wanted to compete couldn't and also it's how long I I stay awake to stare at the servers minimums how long it takes for the the leaderboards to fill up right plus you know usually three hours but at the least um and so this is a a report of just like a histogram of how many puzzles have taken how many hour or how many minutes to solve you should not measure yourself against these times though a lot of people like to like how come I'm not on the leaderboard I was I'm so good I'm such a good programmer It's like because these people aren't like doing software engineering they are doing wild shortcuts and do nothing but programming contests for fun all year round that's all they do the code that they're writing is not code that if you gave it to me to go into production I would pass right your code review would fail instantly and also I would question a hiring decision don't hand in code like this uh but the people that do do it very fast uh do it very very very fast usually within you know this the spike here is what is that between five and 10 minutes or just completely Bonkers and then they post all their Solutions and they post videos of themselves doing it it's really fun to watch but like it's not like it's a different thing from writing software uh it's still cool though so we've had some growing pains because we're not 70 users turns out still don't understand why but I'll take it so we've had some Growing Pains uh we've had some learning experence what I mean to say right um so step one how should you prioritize tasks when you're working on something the way that I used to prioritize things is step one a thing happens step two handle the thing step three go to one easy you handle all the tasks there's no problem at all I mean everything is top priority how do you prioritize tasks if you have 1.4 million users from all around the world of all different backgrounds well uh step one thing happens step two handle the thing step three while you were handling the thing several other things happened step four handle those things but more things happen step five never sleep don't do don't actually do this one uh so you actually need to stop to prioritize things it turns out surprise right you actually need to to to say like is this one email that I got from this random user as critical as the entire website being down like no even though I got the email first like I should probably pause that and do this other thing uh actually ask for help this is something that I struggle with i i Mentor a bunch of Engineers and it seems like it's a more widespread problem than just me but like being willing to ask others for help and to admit that you that that you aren't capable of some circumstance especially as an engineer where it's your job to be very very smart right or whatever right like to be able to say like I don't know I'm struggling is so important and it's okay and you're allowed to not know things the whole point of Advent of code is that you don't know a bunch of things and then you do them uh write better documentation uh this mostly is for me to write down like how did the because I only do this once a year right I mean like I work on it all year round like I only run the event once a year it's like how are these web servers set up again like what is this what is this Apache how how you restart a right like having having all that stuff written down so you don't have to keep it in your brain uh an incredibly supportive community that helps itself I don't know how to get this one I have it I don't know how to cause it I do not have recommendations for how you can have this a community like this but having it means that like I said I can just post a puzzle and then instead of all you know 100 300,000 people or however many you're actively working on it that year people asking me for help which is what they used to do now they ask each other for help which is actually scalable and not death uh automate tasks and provide self self-service tools I have been doing this more and more every year and I thank my past year self every year because of it uh to have tools that just like oh I need to you know touch this row in a database like like somebody somebody uh sent sent me a a payment because you can you can send money you don't have to it's free but you can send money and if they do sometimes they send it for the wrong year like oh can you just up this to be 2024 instead of 2023 or whatever like yeah sure that's fine like each one of those takes time or like hey can you please merge these two accounts you can like right so every single of those that I script means I don't have to remember how it works it's way faster for me to do it and it's way less error prone so they are administrative tools literally just for me because then I can encapsulate all of that not think about it which like most of my projects don't get that much traffic so none of this stuff ever has mattered for those like yeah sure at work yeah but at work like there's a ton of people that are like operating the system that of course they need a fancy web UI like mine's just like a command line thing but like it's it turns out to save way more time than even I predicted on I love automating things so uh accessibility turns out when you have lots and lots of users uh even if 1% of the population struggles with something like color blindness right or something like that that's a lot of users all of a sudden so making sure that you have you know accessibility guidelines uh you carefully test your accessibility guidelines you take accessibility feedback very seriously I treat accessibility problems as incidents which I especially like um they are they are prioritized based on the number of users effective just like you would with any incident so if you have a site outage that's affecting 100% of the users as opposed to this thing is unreadable for some like people with color blindness I'll I'll bring the site online first and then I'll write prioritization but uh it is an outage for some users some users cannot use your website test your accessibility it's easy to fix we get denial of service attacks why would you attack a programming puzzle webite I don't know it makes no sense to me I I don't know if people are like Mad and then spin up their botnet army or something but like we get completely annihilated occasionally at random sometimes zero times in the in the in the month which is great sometimes like two or three times uh turns out AWS provides you really good tools to do this they they cost some amount of money but it's still better than having just an outage until they stop hammering the website um but would have never expected that I would need to deal with something like this but we will just all of a sudden get like legitimate DS trffic I don't I don't know here's some frequently asked questions why do the puzzles unlock at midnight UTC minus5 or why don't they unlock at a different time every day so they unlock at UTC minus 5 midnight because that is when I am awake and I am a night owl and that's when I can watch the servers and that's when I can guarantee that every single day for an entire month I will be around and not have family obligations and not have to be doing something for my job right like like a block of time that I have to be 100% sure I can be up for every time why don't they make why don't they unlock it a different time every day so we very often have people saying hey did you know that with 25 puzzles in 24 days you could rotate at an hour every day and it would do a complete Loop and I say like that is true but then I would die and so would all the users please you can't like there sleep like a sleep schedule rotate you can't so it's when I survive and I'm sorry but also like that's how I operate it I have to how long does it take to make 25 puzzles uh I usually start well I collect the inspiration for the puzzles continuously year round and I just have a giant list of puzzle ideas is um to actually construct the puzzles it is at least several months of all of my free time working every single night for like two three four months depending on how involved they are and what I'm doing like when I did incode which is a virtual machine that you build over the course of the month that was the 20 2019 one that I mentioned that took forever because I built an entire compiler tool chain for that one virtual machine that I invented for the purpose of this of this puzzle Suite that took a long time but like it varies designing and building the calendar coming up with the theme and all of that stuff usually starts as early as like April so I take like three months off and then I do this and also my actual job it's it's a lot it's a lot of work can I send you puzzle ideas please don't send me puzzle ideas uh I do not know the intellectual property of the puzzles that I get ideas for so I do not read puzzle ideas if people send me them I get emails all the time they're like I came up with this cool idea I just I delete the email I don't even look at it because I don't want it to be in my brain to begin with because I don't know if you like just ripped that from somebody who's now going to sue me because I use their super clever whatever it's not worth it also I I'm I'm I have plenty of ideas I have a giant list that I'm always adding to I have that that was the thing that I always expected I would run out of first is puzzle ideas and it hasn't been somehow uh so please do not send me puzzle ideas uh how do some people solve the puzzle so quickly or are they cheating uh before llms we got this question all the time with llms we still get it all the time but it also says are they using llms the answer is no surprise surprisingly they're not cheating they're just very very very fast I talked about this a little bit but the people that do competitive speed programming year around are not doing the thing you think of as engineering right but they are solving the problem very quickly and so usually what they will do is they will scroll all the way to the bottom of the puzzle they will look for the line that asks like how many widgets are in the ficor and then they go look up the words widget and fornicator in the puzzle and while they're doing that with one eyeball they are coding up the solution with the other eyeball they did not read the puzzle at any point some of them go back and read the story afterward like cuz right cuz they like they they they screen record themselves doing this so you can see them like watch them doing it at no point do they read the puzzle sometimes they glance at the input file sometimes they don't even do that and they just guess at the kinds of things I'm going to ask because they do these things so frequently that they can kind of guess at where I'm going to get at and they cat up a solution for something that they think is right and very often they got the right answer and they move on like they like it's very different from what anybody ever pictured including myself uh with llms I ask people not to use llms for the purpose of getting on the leaderboard because if I let them use llms to get on the leaderboard the leaderboard would be all you know three second times for the ones that llms can solve and none of that for the ones that they cannot and that's lame and I don't want that so instead I you know please leave the leaderboards for humans if you want to use llms to just solve the puzzles because you're practicing prompt authoring or something like that's fine but I don't think you're going to learn programming doing that that you do you know go go for it uh yeah but it's if you want at some point look up and also the the people who do them quickly write blog posts afterward of like here are these speed techniques that I use and it's just like a different Universe it's so cool though uh look up screen recordings of people doing fast Advent of code solves it's wild it's so cool uh I've also got some fun stories for you as the non-participating mother of a 14-year-old who got up at 450 a.m. I'm both massively impressed that people do this and somewhat baffled that nothing else has this effect I've been reading here the the Advent of code subreddit so I can make sense of the conversation later in the day so this is a parent saying my kid does Advent of code and then is talking about Santa and elves and be trees and I have no idea what's going on so I'm just here reading all the posts you guys post so I can try to figure out some way to decipher what my kid is talking about uh I I love these I love stuff like this I did did not I did not expect to have this kind of reach but like the fact that there are kids that are doing this stuff and learning this this magic like I I get tears um help me get a job I get emails like this quite frequently too but people also Post in Reddit like hey it helped me prep for an interview or because I was able to sharpen my skills on this language I was able to get a job in this field like that that's incredible right like more power to you that's amazing I don't never expected that either right it's very very cool my son and daughter are becoming more interested in programming because of your site oh uh and there's one other one can I go back is there yeah um there uh there was another one where there was a a polarizing we'll say puzzle uh that involved implementing a combat between elves and goblins and it was just a lot of text and a lot of instructions because in order to disambiguate pathing for units on a grid you had to identify not just you know have the elf move toward the Goblin but the elf needs to make sure that it moves in such a way where it's heading to the closest adjacent Square to the goblin to the elf at starting position and also if there's an ambiguous step whether it could go left or up it needs to pick this one in this order because otherwise you end up in a state where an elf is in the way of another one and then then get the wrong answer so there's a lot of disambiguation but I wanted to include something that was kind of akin to like real game design game development and a lot of people like this was too much text and I agree it was too much text but I also had people emailing me being like this project was so much fun because it got me exposed to this stuff or I had people emailing me like my kids saw me programming something that looked like a game and came over and sat with me as I was working on it and I was able to show them what I was building and why I was building it the way I was and teach them programming and now they're into programming like oh that's amazing right how cool so just I don't know we get we get stuff like this all the time it's also used as midterms exams question mark this this one's from 2016 or or 2018 but we there's like every year universities are like hey can we use some of your problems for the this this class I'm running like uh yes oh so high why really uh and final exams because why not so in conclusion engineers in your organization should solve puzzles for fun actually everyone should solve puzzles for fun thank you