December 1

Advent of Code 2024

It's that time of year again. That's right it's Christmas time and that means...Advent of Code!

Why am I doing Advent of Code this year?

  1. I'm trying to learn Python better. This is the perfect excuse.
  2. My employer, BJSS, is a sponsor again this year.

Language + Tech Stack

In previous years, I've done AoC with .NET/C#, but this year I will be using Python. While an IDE is not needed for Python, I've decided to use JetBrains PyCharm. Check it out if you haven't seen it. I'm still learning the shortcuts, which reminds me to print out the shortcuts. I like using unit testing to help verify that my code works and for that I'll be using pytest. I've been using NCrunch as my .NET continuous test runner but I'll have to use something else for Python; pytest-watch.

Source Control

Git/GitHub is my source control of choice. I added a CI/CD pipeline to validate the code once it's been pushed to the master branch.

Workflow

  1. Setup the code for the puzzle of the day (i.e. add the boilerplate code, but try to keep the amount down)
  2. Read the prompt for part 1.
  3. Start writing code to get the example working for part 1.
  4. Once the code is running with the example, run it against the actual input.
  5. Submit the actual output value.
  6. If the answer is incorrect, rework the code and go to step 4.
  7. If the answer is correct, update the expected value for the part 1 test so that it's green.
  8. Read the prompt for part 2.
  9. Start writing code to the example working for part 2.
  10. Once the code is running with the example, run it against the actual input.
  11. Submit the actual output value.
  12. If the answer is incorrect, rework the code and go to step 10.
  13. If the answer is correct, update the expected value for the part 2 test so that it's green.
  14. Commit the puzzle as is to Git.
  15. Refactor the code til it looks presentable to the public and/or resolve any perf issues.
  16. Commit the refactored code to Git.
  17. Done.

Where can I see your progress?

You can see my progress on my GitHub repo.


Copyright 2023. All rights reserved.

Posted December 1, 2024 by codegorilla in category ".NET", "Advent of Code", "BJSS", "C#", "Python

Leave a Reply

Your email address will not be published. Required fields are marked *