Skip to content

sbiickert/AdventOfCode2019

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AdventOfCode2019

Better late than never

Purpose

I am going to try to work through the 2019 Advent of Code (https://adventofcode.com/2019) in Python, using Pythonista (http://omz-software.com/pythonista/) on my iPad Air 4 with Magic Keyboard.

Updated

I have started re-doing 2019 in Swift in Xcode.

Thoughts 3 Days In

This rocks. I've used an iPad daily for more than seven years, but until now I never coded on it. It's something I never knew was missing until it was there. Pythonista is not perfect. So far, my main gripes are:

  • Cursor support does not include iPadOS 14 capabilities. Text selection with the trackpad is bad. But I hope that's coming.
  • No built-in GitHub support. I post my code after every part, and at the moment I am running to my MacBook to use GitHub Desktop.

But other than that, I really can't complain. Debugging works like I expect, running in the console works like a charm. So far, every "import" that I've tried has worked. I know you can't add arbitrary Python libraries with pip or conda, but I'm okay with this for now. I've got autocomplete that works well. Don't tell my wife, but I think I might have found the iPad use case that makes me regret not getting the big iPad Pro.

My thought on using Python: I think I'm going to be using "typing" from here on out. Already I've had a few type issues where I thought a value was an int and it was still a string. I like relying on the computer to help me out with such things.

Thoughts Partway Through

Advent of Code 2019 is a very different beast from 2020. That's not to say that 2020 was easy, but 2019 is kicking my ass. Specifically, there is this "Intcode Computer" that first showed up on day 2 and has made a regular reappearance. The problem is, when you get stumped on a day with the Intcode, the following days that build on it are non-starters. I've had to skip three days now (9, 11 and 13) because I couldn't finish part 2 of day 7. Not cool.

Today's challenge was a lot like the shuttle bus one from 2020, but even knowing that solution, my code still felt brute-force as it chewed its way to the 400+ trillion final answer. I'm sure writing it in Swift or C++ or Rust would have made it 100 times faster, but I stuck with Python.

I'm doing some on the iPad and some on the Mac in Visual Studio Code. They are different, but each has their strengths. If the Pythonista code editor was as good as the VS Code one, it would be 🔥.

Thoughts on Doing This in Xcode

I'd say this is night and day. I've plowed through 8 days very quickly and the IntCode computer isn't giving me fits at all. Having fun!

And now... in Java

AoC is a funny beast. For 25 days, it's an irregular ramp up in challenge toughness. Towards the end, you're in full-on mode, pushing your brain and abilities to the limit. And then... it's over. It's almost impossible to stop. And there are multiple years of AoC stars that I haven't gotten yet.

In 2022, I went back to my first language, Perl. So for giggles, I thought I would go to my second language, Java. I have re-implemented the important parts of my utility libraries already, and now I've started the challenges. Let's see where this goes.

About

Going back to last year's advent

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published