This is Hacker Public Radio episode 3,744 for Thursday the 8th of December 2022. Today's show is entitled, Adventure of Code Day 1 to 4. It is hosted by Daniel Person and is about five minutes long. It carries a clean flag. The summary is, talking about my experience of Adventure of Code so far. Hello Hacker, today I'm going to talk about Adventure of Code and to make a short story much longer. I would actually say that I wanted to do this in January this year because last year I did all the advent of Code puzzles and were able to actually solve all of them, which I was really proud of. So my thought was that I should actually do that and talk about all of them and do a bunch of episodes. But then January came, a lot of sickness and a lot of the personal issues so I couldn't really handle recording anything. Now a year has gone and I started with Advent of Code again and as we should do one episode a year, if I don't do it episode soon, then Ken would be really angry. Now I'm just kidding or do I. Well I'm going to talk about this year's Advent of Code and we have done four days so far and day one was really simple. It was calculating the number of calories that each elf were carrying so they have separated the calorie listings by an empty line and then you had to count them together and figure out who had the most calories and then you had to find top three and add those together. So a pretty simple thing but if you are doing it in a totally new language, that could be a great challenge to start with. Day two was a huge rock paper sister challenge also not that hard and I were really focused on actually setting all into different variables and describing everything so I have variables for rock paper and sister for a loss a draw and a win and I'm trying to keep everything as readable as possible and the first thing was just to see how much of score the score would be if we just follow a specific schedule and then we had another competition where we actually were trying to figure out what we should do in order to win draw or lose on each of these different things so it's an interesting challenge not super hard. Then day three is actually hardest so far it were a bunch of lines with text and you just had a bunch of characters and you had to figure out if you split the line into you have to figure out what is the unique things on each line or which things are repeating on both sides of the line if you split them into and then you had to figure out in the second part what things are actually there in all three or three lines and I saw that in a totally new way for me I actually were able to solve it by having lists of numbers and then those lists I put into set so at a set of numbers I got all the unique numbers of the alphabet so all the characters had a specific number in alphabet and I put them into set so I had only unique ones and then there is a function called retain all that's pretty much the intersection between two sets so I could do that on all three lines do the intersection of them and actually get what the things were the things contained in all of the lines so that was a new thing for me and I actually learned something in day three so I was really pleased with that one and last but not least day four we had a bunch of ranges so this were the else could clean the camp and they had different sections or areas that I wanted to clean and we needed to figure out which areas or numbers of areas that actually were overlapping each other and first it puzzle was finding all the ones that are totally overlapping so one else would do everything that the other else should do and then the second part we needed to figure out which overlap at all so not as I thought first that day we should find those that didn't overlap at all so what I implemented was things that had no overlap and then I just subtracted that with all of them and I got what all the ones that overlap in anyway so these are the first four days I really enjoy adventure code so far as I do every year and I create small recordings on YouTube so you can go there and see those if you want I will keep put some links in the talking points for this episode and I hope that you found this interesting and I hope that you are also doing advent of code and if so record an episode and talk about your experience with advent of code if you haven't never done everything to code before and you have any coding experience or for that matter no coding experience pick it up take any of these first puzzles and take a programming language and read up on it you could solve the first four if you have no knowledge if you just put some time into it and to all of you to the next time use open source software you have been listening to hacker public radio as hacker public radio does work today show was contributed by a HBR listening like yourself if you ever thought of recording podcast click on our contribute link to find out how easy it means hosting for HBR has been kindly provided by an onsthost.com internet archive and our synced.net on the satellite stages they show is released on our creative comments attribution for.o international license