Intro
This is a programming challenge to @yosoyignicion a Spanish programmer.
Dev.to keeps deleting my comments where I outline the puzzle.
So, I'll post the comment as an article.
If you want to have a good laugh at how bad things are behind the scenes, check out this PR.
The puzzle
There's a really simple funny little puzzle.
This puzzle is about implementing that puzzle.
Think of it like a Puzzle Inception.
Yup.
This is a puzzle...
... to sass you ...
into fixing/refactoring/rewriting an implementation of a literal puzzle game code.
So the story goes...
Once upon a time, there lived a puzzle on Github.
This puzzle was really fun, and was written in Java with SOLID, KISS and YAGNI and all kinds of big notions in mind.
The README of the puzzle explained how there's a:
- Black square, what the player can move either North/East/South/West,
- Black U-shape, which can be moved by the Black square
- Red U-shape, which can be moved by the Black square
- Blue U-shape, which can be moved by the Black square
These U-shapes also interact with eachother, can block eachother, drag eachother.
They can also block the Black square from entering a tile!
All of that information is in the README. This was just a TLDR.
So everything was going fine in the little kingdom...
Until one day...
The French arrived at the border with an ultimatum:
Erm...
Black, Red, Blue U-shapes are hardcoded.
You'll never be able to support arbitrary U-shapes.
I mean... even a configurable in-memory list can't work.
The entire thing is hardcoded.
Now we do not even care if it is Java.
It could be C++ for all we care.
We do not even care about the GUI or the graph search part.
Simply the business logic is so hardcoded that there's no way on Earth to...
... to support arbitrary amount of U-shapes.
You were brave...
But it is time to go home, for you.
We'll let you walk away brave Spaniards, to show you how merciful France is.
Leave this problem, and you can go back to your families, safe and sound.
Can you help me @yosoyignicion ?
I'm not good at Spanish.
Did the Spanish give up and go home?
Or did they take up arms against cyclomatic complexity?
Boring technical summary: Visit repo. Read README. Implement business logic in whatever language you like. Catch is: you have to support arbitrary U-shapes. Each one's open side can face North/East/South/West, and can have a size which is a natural number.
So, the question is, Spanish Jon Snow:
Would you do it, please pretty please?

Top comments (7)
This was a fun read. I like how you wrapped a classic software design problem inside a puzzle narrative instead of presenting it as another abstract "refactor this code" exercise.
The real challenge isn't the language or the algorithms—it's recognizing when an implementation is modeling specific instances instead of the underlying rules. Supporting an arbitrary number of U-shapes forces a shift from hardcoded behavior to a more general domain model, which is exactly the kind of design problem that separates maintainable software from software that only solves today's requirements.
Looking forward to seeing how people approach it.
Yeah yeah. That is exactly my job! 😊
It is a hard job. I've been doing this for 2 years now to no avail, but... this is my job, so what can I do, right? 😁
Imagine the following, please:
Let's say each U-shape is represented by a Yakuza member, each having one katana.
Now - just for the sake of argument - let's suppose there's a single person called Khali Sollis with an original Hattori Hanzō sword.
Finally, let's say one does a YT search on the phrase Kill Bill: Volume 1 "The Bride vs The Crazy 88 fight scene" 4K HDR", and jumps to around the 248th second...
Aaand scene!
So that I would be considering as cool.
If this imaginary person Khali Sollis would attempt this exercise...
It would first think of this challenge as some sort of... boring OOP, DSA or leetcode memorization exercise...
At that point... I'd recommend our hero... to do another video search...
This time the phrase would be simply:
Heineken Italy. Case Study - Champions League Match vs Classical Concert (Real Madrid, AC Milan)
TL;DR You have been challenged too, dear Jon.
Some comments may only be visible to logged-in visitors. Sign in to view all comments.