Mind you, I haven’t done it professionally myself, so hat’s off to you. And ASM for a date function definitely sounds like “fun” that I would avoid nowadays. (Though, as I write that, I remember I have an ongoing project loosely based on Ben Eater’s 8-bit breadboard computer, so… I may end up getting back into ASM after all.)
And I do apologize if the “just to display something” was misleading. I didn’t mean, say, text - I’m not that old-school - just pixel-pushing. DOS / CP/M graphics was just a neverending treadmill of trying to optimize the display loop, and it left its marks.
In any event, didn’t mean to make it sound more than it was, and I definitely don’t mean to sidetrack the thread.
For anybody that’s a professional developer I can imagine this being a potential stumbling block. I have such a hard time just throwing hacky shit at a solution because I have the baked-in mindset of thinking about edge cases, readability, good error handling, etc. It slows me down, makes my code much more verbose than other solutions, and more robust unnecessarily.
I feel kind of dumb when I look at other solutions where it’s like “here’s like 5 lambdas solving the problem in like two lines” and I have like 30 lines doing the same thing. I mean intuitively I know it’s doing the exact same thing under the hood but… let’s just say impostor syndrome is a hell of a drug.
Running way behind and haven’t had much time to spend on these.
Finally got through Day 7. It really kicked my ass. Part 1 eventually finally clicked for me but I just had a real block with it. Part 2 was simpler in many ways and I stumbled across the right algorithm to solve it but I’m not sure how I got right the answer which is kind of irritating. I even drew it out on paper using the test set and it still wasn’t adding up like I expected so clearly I was missing something. But I got the right answers, sooo ¯\_(ツ)_/¯.
I’m not formally CS trained and algorithms are a weakness of mine. I’ve managed to be successful in my career in spite of this but sometimes it causes mental blocks like this. I’m hoping I can learn a little while pushing myself outside of my comfort zone.
Day 8 by comparison was much easier (thus far). I quickly coded up a virtual machine to handle the interpreter (hedging that I’ll need it in the future) and got the answer. I had to pause before beginning part 2 so I haven’t really dug into that.
I’m taking next week off so maybe I’ll try to charge through more of the backlog unless I get lazy and decide to just play video games. We’ll see.
Finished Day 8 without too many troubles. Spent more time dicking with my virtual machine code just because.
Day 9 part 1 was straightforward enough but I’m having a problem with part 2. I can get a valid result using the sample set but annoyingly when I use the puzzle set I get a match but the value is too high. I hate it when this happens.
I’ll need to investigate more when I next have some time.
ETA I’m dumb. I was misunderstanding “contiguous” to mean “sequential” like in the sample code. I was way overcomplicating things by only looking for parts that were in order. Oops. I had an epiphany when mulling it over while doing some chores.
FML. I wasted so much time on Day 9 Part 2 because I was getting confused by the requirements.
The description was talking about min+max=62, and in the sample set the next number after the contiguous set in question was … 62. I was overthinking the solution to the next number in the set after min/max adding up to the previous min/max. I totally missed the part about the input needing to be the invalid value from the previous solution. I wasted entirely too much time with my sample set passing but getting various invalid values for the puzzle set. After all that effort I was able to solve it in just a few lines of code.