Git Product home page Git Product logo

adventofcode2022's Introduction

Joseph Ottinger's Advent of Code 2022

Notes

If you have not done the Advent of Code exercises, BEWARE OF READING MY NOTES! There are going to be some minor spoilers, I guarantee it. You're better off doing the exercises and then reading the notes.

Fun one, to get started. Still working out code organization.

Done! This one was funny, because it actually played on one of the things that upsets me most about coding: changing requirements and coding based on assumptions. In real life, I'd have not bothered with part 1, because it relied on me inferring requirements that, well, ended up being drastically wrong, and that definitely affected the shape of the solution, especially considering that I needed both results.

In retrospect, I got it "right" but I'm really unhappy with the process of accomplishing that. I should have added a transformation step to migrate the two input specifications into a common form, and evaluated that - it would have simplified everything. The incomplete specs and the time factor (as I'm in a race with other coders) worked against that.

I anticipated the data structures better this time, sort of - I'm still being awfully stingy with types, mostly because these are all one-shot solutions.

I ended up implementing a control-break - yeah, COBOL for the win, in Kotlin, right? - but that's the fastest solution I could think of to write. I want to figure out how to collect groups of elements by index in Kotlin; that would have made the solution much cleaner.

Probably the easiest one so far, but I think part of that is because I'm getting the hang of how the puzzles are constructed. Part 1 and Part 2 were really similar, and could have been parameterized with an activator function, but eh, copy and paste was faster.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.