Advent of Code, day 23: The network is reliable

We’re almost there, just two more days to go. Yesterday’s puzzle was a difficult one. In fact, it is my first one I didn’t finish on the day I started it. Even worse, I have yet to get my second star. I guess my modular arithmetic needs some brushing up… So I was glad to see an easier puzzle today. And it was another IntCode one, the 11th time this year already.

After having repaired our ship, we now have to rebuild the network from scratch. There are 50 computers that are all running the IntCode program. They send each other packets using the output and input instructions. That sounds familiar, right? We’ve already connected 5 amps together. But the twist here is that any computer can send to any other computer, and more importantly, the in- and outputs are non-blocking. So how does my IntCode implementation hold up?

Read more →

Advent of Code Day 20: a little bit of (re)vision

Coder’s log, AoC-stardate 2019.40. With help of the tractor beam we have managed to escape the security perimeter of the planet called Neptune. We have landed on Sol IX, nearby a donut-shaped structure. It appears to have a maze-like interior that we need to cross….

Except that I am terribly behind on collecting stars for the previous days, not to mention that our financial controller just mailed: “enter your expenses regarding 2019 as soon as possible . Time for… more procrastination, and a small look back and forth.

Read more →

Package management with Nix

As software engineers we use package managers on a daily basis. We use them to install dependencies we need to run and build software we write. Probably every software engineer can relate to the frustration that will eventually arise from using these package managers. Sometimes packages that seem to work on your colleagues machine just fine, are broken on yours. Even though package managers have improved substantially over time, issues like these still arise. Maybe there is some fundamental design flaw in the way we approach package management. There is a package manager that tries to do things different and it is called Nix. Let’s take a look at what Nix is and how you can use it on your machine today.

Read more →

Advent of Code day 16: Curses!

I knew it had to come someday: those puzzles where you run around on a character-based grid. Day 15 was one of those. I’m definitely not one of those people who just pull maze traversal algorithms out of thin air, and to learn them I read an overview of the algorithm and then try to implement is. And then start with the headache of why things aren’t working, or your robot just walks up and down along 2 coordinates, etc. etc.

Read more →

Advent of Code, day 12: Shooting for the moon

I won’t lie. I’m usually not the most competitive person out there. But when December nears, I’m getting a bit restless. And when I run into fellow players from previous year, the conversation quickly turns to the coming season of Advent of Code. “Will you be joining again this year?”, “Have you started preparing yet?”, “Which language will you use?” or “Going for the top position again this year?” are just some of the questions asked.

Read more →

Advent of Code, day 11: to be or not to be…

Though I’m not a fanatic participant in Advent of Code I still like to join in on the fun and challenge myself to solve the puzzles posted every day. I’m one of those players that plays whenever there is time, instead of the top players that set their alarm clocks to be at the ready when the assignment gets published.

When I opened up the assignment for this morning I was pleasantly surprised to see yet another one involving our beloved IntCode computer 😉 (As Jochem already predicted in his blog)
Today’s challenge involves moving a paint robot around using an IntCode program. There was just another twist. Now the IntCode’s program needed to output to a grid from which it read via the input operation. Fortunately for day 7 part 2 I already had to create a helper function that used a generator as input instead of a fixed set of values so I could easily reuse that again.

Read more →

Advent of Code Day 9: How I started enjoying solving programming puzzles

About 2 years ago I ran into Advent of Code for the first time. I got introduced by a friend who was a full-time web developer. As an information security advisor and pentester I didn’t write a lot of code. Here and there I had to modify a script to work properly, but that was about it. I managed to forget about it for a couple of days and started a few days late. But I did get excited when he showed me some challenges from the previous year.

As I mostly used Python for scripting I didn’t feel very proficient in it and thought it would be a good idea to learn more about it in a playful manner. After solving the first challenge, I still recall the feeling, it really was a fun way to learn about it. The storyline gave it something extra to.

I was very happy to learn after joining Xebia that Adent of Code was a thing! Quite a lot of people participated in it and they even had a competition going on internally last year. This got me looking forward to this years event. The days to the first of December were counting down and people where starting to get hyped in the office and sharing their goals with eachother.

Day 1 appeared and it was a Sunday. This year I just wanted to have fun in any way possible with like-minded people! Going back, I’m not a software developer and ran into some challenges tackling challenges. Also, after 2 days I was scraping time to try solving the puzzle, but I did read through all challenges first thing in the morning. This way I had some time to think about how I was going to approach the challenge. What is very enjoyable and motivating was arriving at work and a handful of people already having solved the puzzle of the day!

This speaks very much for the level of enthusiasm the puzzles are being solved at. The moment arrived I can work on my version of a solution. Decided to using Python for this year, got me writing code again. Solving the first day got my happy-bugs going even more.

As the days go by I’m reading more and more stories on how people solve the challenges in various ways of which some are even mind-boggling. This made me realize that participating in this annual event is more than just about writing code. It’s about having fun and writing code together, but in your own way. It’s about learning new things and sharing knowledge and enjoyment with the community.

We’re not even halfway the event and I’m already looking forward how Santa will get saved this year. Hope we will make it in time to save Christmas as we had to fly across the universe! Solving the puzzles result in an awesome animation which you can be proud of. Because Advent of Code is running a marathon with others, and not a sprint by yourself!

ResizeObserver – a new powerful tool for Responsive Web

The word “responsive” is something we don’t mention that often these days in web development, it’s a standard already. There is a vast and ever-growing variety of screens. We want to be able to support all the possible sizes and still keep a good user experience. And CSS media-queries are a great solution to this challenge. But how about responsive components? Modern web development is about components and we need a way to make them responsive as well. Today I want to talk about ResizeObserver API, a new powerful tool for Responsive Web, which in contrast to media-queries, allows detecting a size change of a particular element rather than a whole viewport.

Read more →