For Day 13, I will check out AdventOfTypescript and if the solution is not clear to me on first sight, I will discontinue it. I will then try to focus more on AdventOfCode. Because I don't see the benefit of the types they expect me to write. Yes, there is something to learn, but too far away from an area where I will benefit from. If AdventOfCode gets too heavy for me, I will focus on my side projects and try to gain some progress there. For January, I have something planned. π
Since my last concert related post, I was on many more concerts which I did not blog about. I plan to catch up on this and write about them all. π
The evening started early at 6:30 PM and had a tight schedule. Which was helpful in my condition. Because I had slept less than 4hrs in that night before. π
Testament, my personal main act that evening. They had an awesome energy, and they looked like they were up for it. They had fun and I had it with them. It is fascinating what a powerful voice Chuck Billy has despite his age. He could be my father. π They played for 1hr, and it felt like 20Β min. Aaaand they had a ton of guitar picks.
Anthrax. I'm honest. I know the name of the band. I know that Scott Ian is their rhythm guitarist, and I see him a lot on social media. But I didn't know more about this band. So, I was curious what I will see and here. They started with a long video where famous people talked about them. The video was toooo long, and they had've could play it while they made the change on the stage. But anyway. The first songs came in and the voice of the singer was not what I expected. And then, they started the song βmadhouseβ. Which I knew from Grand Theft Auto: Vice City. Now, I was hooked. π€They played more than an hour. Around 70Β min. It made a lot of fun watching and hearing them. Some Song I will definitely add to my playlist.
Kreator, it was a short one. We watched 2 or 3 songs and then we left. I listened to a record of them from around 2017 (Gods of Violence) and they were better than expected. So planned to stay the whole show. But man, that was not my kind of show and sound. One positive point, their stage setting was the best on this evening. So, after 2β3 songs, my friend and I looked at each other and silently noded and we left.
Bit manipulation. I like this topic. It hit the right spot, not too hard, not too easy. π
Day 11
Day 11 forced me to do some research. First, I didn't know what I should do. Then, I got it but didn't know, how to write the types. It is this kind of solution, I'm not doing really often. In the end, this is why I'm doing it. To get a refresher and/or learn something new. π
Finally, my first β for Day 6. It took me so long because I was out of time and also introduced a bug, while coding everything without running it step by step. This took a lot of time, and starting over was the best Idea.
Currently, I'm looking at Part 2 and have some Ideas, how this could be solved. Such an exciting topic and I need more time. π
Day 7 gave me a bit of a struggle and I went with the easy solution by creating a union and hard-coded the expected array into the type. I'm sure there is a better solution, but I didn't find anything.
Here is my solution. So it is not wrong because it takes the test green. But we know that this will not mean that the solution is correct. :D
Like the days 1-6, they were effortless. I expect that the next days will be harder.
Code
No real progress since Friday. I've looked into Day 5 and skipped it for now. I've started to write code for Day 6, which makes a lot of fun I'm not at the end. The last time I've looked into 2D Tile maps, was +10Β years ago.
I think this is the first time, the YouTube algorithm hits a nerve.
The Wolston Butchers channeling everything I love about Skatepunk or Melodicpunk. It's like all the great bands in this scene had a baby which grew up in perfect conditions.
Sadly, they are quite young and don't have enough output to fulfill my needs. π But I'm all-in for every new release from them.
Because of my current work schedule, I had no time, so no progress here. I have looked into today's challenge, but still need to do Day 4. Over the day I had some ideas which I like to test and play with. It's doable. Reminds me a bit of 2D tile maps. Which is a long time since I did anything with it. Maybe I was 14β16 years old. In my RPG-Maker days. Because of family stuff on the weekend, I don't see me completing the Day 4 challenge before next week. I completely underestimated how hard these challenges are, for me. π
First time, where I will not get it done on time. So far, I've committed my current state and pushed it to my gitea instance. Let's see if I can get it done tomorrow. I think my solution is simple enough, but I lack experience in this area. In the last hour, I was just try and error'ing my way through the code.
It really annoys me that I didn't make it. As an excuse, my workday was quite heavy, and I need to recharge first.
This was a nice and fast one. I always enjoy playing with Regexp. Only Part 2 gave me a struggle, because of my thought process. I tend to do things much more complicated than they should be. :D
Here is a little example:
export function getDoMulCalls(input: string): any {
const startRe = /^(.*?)don\'t\(\)/g;
const middleRe = /do\(\)(.*?)don\'t\(\)/g;
const endRe = /do\(\)(.*?)$/g;
const startDos = Array.from(input.matchAll(startRe), match => match[1]);
const middleDos = Array.from(input.matchAll(middleRe), match => match[1]);
const endDos = Array.from(input.matchAll(endRe), match => match[1]).filter(endDo => !endDo.includes("don't()"));
return [...startDos, ...middleDos, ...endDos].map(getMulCalls).flat();
}
This will not give you the solution to Part 2. I thought this was simple and clever at the same time. But I needed to start fresh and remove the cleverness from the code. Bonus, I've learned something new with JavaScript and Regexp. :)
Part 2 gave me a real struggle. I just got it by luck and think that my original solution is still right, provided all the information there was on the page. Out of desperation, I have thrown my solution for Part 2 overboard and decided to try a different approach. It makes sense. But if you compare it with the information on that page, it makes less to no sense. Until this point, I've had a lot of fun and hopefully the challenge tomorrow is not easier, but the information on the page tells everything you need to know.