Get Ready for Advent of Code 2021

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Here is the according blog post for those who prefer text over video. Cool idea to give out some swag to pariticipants.

https://blog.jetbrains.com/kotlin/2021/11/advent-of-code-2021-in-kotlin/

๐Ÿ‘๏ธŽ︎ 2 ๐Ÿ‘ค๏ธŽ︎ u/hbunk ๐Ÿ“…๏ธŽ︎ Dec 01 2021 ๐Ÿ—ซ︎ replies
Captions
it's that time of the year supermarkets are stocking cookies the smell of glue mine fills the air but most importantly the advent of code is right around the corner on the 1st of december the first of 25 coding puzzles will be unlocked with one new coding challenge coming out each day whether you're a beginner programmer or a seasoned professional i really don't think there's a better and cozier way to give your problem-solving skills a workout add-on of code.com brings you some fun seasonal challenges at jetbrains we're especially proud to be supporting advent of code this year as one of the top sponsors we're all really excited about this year's challenge and i personally can't wait to start discussing with my colleagues and the community about the solutions everyone will come up with we would love for you to join us in all this fun so today we're gonna do a couple of things i'm gonna share with you a number of basic tips that are sure to help you kick off this year's aoc i'll introduce you to our ready-made template that helps you get a github project up and running and i'll show you how you can enter for a chance to get some cut and swag these holidays alright like subscribe let's go [Music] so at the point of me making this video the challenges for 2021 are still shrouded in mystery if you want to get a taste of what the challenges could look like you can always visit the previous years on adventofcode.com where 150 challenges await you from the previous years we've also solved a few of the ones from 2020 right here on this channel so if you're interested in full walkthroughs check out those videos looking back at solutions for the previous problems there's really one main common theme and that is that the challenges are very diverse and there really isn't a one-size-fits-all type tip that i can give you but there's a couple of themes that are worth looking into each challenge for advent of code gets its input as a text file even though the content of that text file is very different from challenge to challenge but you'll certainly find yourself spending some time you know just needing and mangling that text until you arrive at the representation you want to work with to solve the challenges at hand reading text files is of course easy enough in kotlin via the file or path apis you can just use read text to read the whole input file or read lines to get individual lines directly as lines of strings between processing steps i often find myself sanitizing the input so for example using the trim function to remove any extra spaces that might be in my input string just to make sure splitting or converting the input strings for example to numbers is also usually done easily with a short combination of a few functions from the standard library it really does depend on the task at hand but chances are you'll find a useful function in the standard library to get the job done in just one or two lines of calling code one all-rounder tool that you might find yourself using when working with more complicated but still structured inputs is regular expressions i know the word regex may sometimes strike fear into your bones but they're honestly a mighty beast and you can use these low stakes challenges as a great way to maybe get a little bit more comfortable with them creating regular expressions from strings is actually pretty fast in column with the two regex functions i prefer pairing it with the triple quoted strings that allow me to not worry about escaping any control sequences unnecessarily the tougher part of that story is of course crafting the actual regular expression thankfully there are many tools out there like regexer.com or rubula.com that allow you to interactively craft your regular expressions and provide you with cheat sheets and explanations of what's going on if i could only give you one hint about regular expressions it would be to make use of the structured extension function which allows you to pull multiple capture groups out of a single find invocation without much ceremony in this example i'm pulling the three numbers into individual variables however often you don't even need to go as far as diving into regular expressions carton has powerful machinery for wrangling strings in its standard library so whether you want to get a substring before a delimiter a substring after a delimiter a string without a prefix or a suffix a string without surrounding characters you get the idea there's functions for a ton of different kind of functionality in that regard you can just browse your ides autocomplete to see all the neat things you may want to try out once you've kneaded and squished your input into a form you're happy with comes the core part of problem solving this is very individual both between the different problems and the people solving the problems so apart from repeating what my teachers have told me since fifth grade and saying read the problem description carefully you'll have to figure out that part for yourself of course it couldn't hurt refreshing on some of the tools that kotlin gives you for problem solving especially the different types of collections lists sets and maps are probably useful to think about and understand their possible roles in your problem you can find out more about all of those both on our youtube channel as well as in the documentation and guides on kotling.org when you're done with your first solution for aoc why not share it with the community from intellij idea you can open the vcs menu and select the share project on github option to quickly get your code pushed to your github account you may have to log in but after that things are as easy as giving your project a name and then hitting the share button shortly after that you'll see your link to the project this year we're giving you an extra good reason to share your code on github because we're raffling off some kotlin care packages to sweeten the holiday season to enter that giveaway make sure you go to your github repository click the little gear icon in the top right corner and add aoc 2021 in kotlin separated by dashes under the topics when we select who to send some holiday cheers to that's how we'll find the repositories and to be clear you don't have to solve all the challenges or be really fast in solving the challenges participating and tinkering with some of the puzzles is more than enough just make sure you have some form of contact in your github profile if you're not a fan of starting from a blank slate my colleague jacob has also created an awesome github repository template to give you a bit of structure for your tasks and even give you some scaffolding if you want to use junit to run automated unit tests and so on the readme file for that template honestly explains everything you need to know much better than i could right now so i'll let that speak for itself just one word of advice it's a template not just any old repository so that means instead of forking the repo use the use this template button which sets up a project that is customized for you but again more on that on the actual template page link in the description to warm up your project solving muscles you can of course check out our playlists surrounding last year's advent of code we've solved a number of problems there so hopefully that'll give you some inspiration on how you may approach this year's problems for aoc 2021 we're also going to solve the first few challenges in the form of videos to help you get off the ground you probably don't want to miss those so make sure you subscribe to the channel and also hit the notification bell to make sure you get those videos delivered straight to your inbox as soon as they go live with that all that's left to do is wait the first challenge is going to unlock soon and i know i'll probably procrastinate on some other tasks to make sure i have some time to get that challenge done i'm telling you it's the most wonderful time of the year before i sign off i want to give you one more tiny piece of advice don't stress see aoc as an opportunity to really just have fun to learn things and not to feel pressured after all kotlin is meant to be fun right do your thing and hopefully have an enjoyable time doing it enjoy the holiday season drink a nice cup of tea or a hot chocolate for me and maybe eat some tasty cookies but most importantly take care i'll see you soon [Music]
Info
Channel: Kotlin by JetBrains
Views: 9,975
Rating: undefined out of 5
Keywords: Kotlin, Development, Kotlin Development, From Java to Kotlin, Kotlin Tutorial, Learn Kotlin, Study Kotlin, Kotlin vs Java, Kotlin Multiplatform Mobile, Android Development, Frontend Development, Backend development, Server Development, Multiplatform Development, Programming, Kotlin Symbol Processing, Kotlin Android, Android Developement, Kotlin When, Kotlin for Loop, Kotlin Version, Kotlin map, Kotlin data class, Coroutines, Advent of Code, Advent of Code 2021
Id: 6-XSehwRgSY
Channel Id: undefined
Length: 7min 44sec (464 seconds)
Published: Mon Nov 29 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.