Skip to content
DevMeme
4083 of 7435
The Labyrinth Architect Solves Everything
DesignPatterns Architecture Post #4453, on Jun 13, 2022 in TG

The Labyrinth Architect Solves Everything

Why is this DesignPatterns Architecture meme funny?

Level 1: Maze for Everything

This is like someone who loves building mazes so much that they want to put cheese in a maze, greetings in a maze, and finally a monster in a maze. The last one actually makes sense, which is why it is funny. In programming, it means your favorite tool might be great, but not every problem needs it.

Level 2: Favorite Tool Syndrome

The key idea is tool fit. Every programming language and architecture pattern has trade-offs. C# is common in business software, backend services, desktop tools, games, and cloud systems. Rust is often attractive for performance-sensitive code, systems programming, safety-critical components, command-line tools, embedded work, and places where memory bugs would be especially expensive.

The meme is funny because the character does not evaluate the situation. Cheese? Labyrinth. Greetings? Labyrinth. Mysterious creature? Also labyrinth, but this time maybe fair. That maps to a developer who wants to introduce Rust into a C# company even when the current problem might be solved more simply inside the existing ecosystem.

This relates to the YAGNIPrinciple, which means "You Aren't Gonna Need It," and the KISSPrinciple, which means "Keep It Simple." Those principles do not say "never use advanced tools." They say complexity should be paid for with a real benefit. A new language can be worth it, but the reason should be stronger than "I want to use it."

Level 3: Labyrinth-Driven Development

The comic keeps escalating the same bad architectural instinct. A servant hears:

Allow me to present you this enormous cheese

and immediately answers:

Sire, I will build a labyrinth to house the cheese!

Then, when told:

My master also sends his regards

he somehow proposes:

Sire! I will build a labyrinth to house the regards!

The visible punchline is that he loves labyrinths so much that every input becomes a labyrinth problem. The post message makes the developer mapping explicit: "Me, looking for an excuse to use rust when everything in the company is C#." In other words, the labyrinth is Rust, the kingdom is an established C# codebase, and the engineer is waiting for any monster-shaped requirement that will justify introducing a new stack.

That is why this is a precise DesignPatterns_Architecture joke rather than just "new tool bad." Rust is a serious language with real strengths: memory safety without a garbage collector, strong compile-time guarantees, excellent performance characteristics, and a type system that can make illegal states harder to represent. There are problems where those strengths matter a lot. But the comic mocks the habit of starting with the preferred tool and then hunting for a problem dramatic enough to fit it.

In a company where "everything is C#," adding Rust is not just choosing syntax. It affects build pipelines, deployment artifacts, debugging, observability, hiring, code review, package management, security scanning, incident response, and the ability of another team to maintain the thing after the original enthusiast moves on. The labyrinth may be beautiful, but now the kitchen staff needs a maze budget, a maze on-call rotation, and a maze migration plan.

The final panels create the best architectural beat. The messenger says:

Sire! The queen has given birth to a monster!

Then the king and servant sit in silence. For once, a labyrinth might actually be appropriate. That is the nuance: OverEngineering is not using powerful tools; it is using them before the problem earns them. When a real monster appears, the previously absurd solution can become reasonable. The hard part of senior engineering is knowing whether you are looking at cheese, regards, or an actual Minotaur-shaped production constraint.

Description

A multi-panel medieval comic shows a king, a servant, a messenger, and a newly revealed monster, with the servant repeatedly proposing labyrinths for wildly inappropriate things. The visible dialogue reads: "Allow me to present you this enormous cheese", "Sire, I will build a labyrinth to house the cheese!", "No! The kitchen will do fine", "My master also sends his regards", "Sire! I will build a labyrinth to house the regards!", "What is it with you and this labyrinth?", "Labyrinths are awesome!", and finally "Sire! The queen has given birth to a monster!" The final silent reaction implies that the servant has finally found the one situation where a labyrinth might be useful. For software engineers, the comic maps cleanly to overzealous architecture: applying the same favorite pattern everywhere until reality accidentally supplies a valid use case.

Comments

68
Anonymous ★ Top Pick Every platform team has met the engineer who sees a cheese and immediately opens an RFC for service discovery.
  1. Anonymous ★ Top Pick

    Every platform team has met the engineer who sees a cheese and immediately opens an RFC for service discovery.

  2. @karim_mahyari 4y

    What is (or was) special with C# that got it so popular? How is it different from Java?

    1. @RiedleroD 4y

      mostly just lots of smaller improvements in language design ig. well and because Microsoft pushed it for quite some time

    2. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

      Its a mix of 3 languages if I remember correctly

    3. @SamsonovAnton 4y

      Java had one dramatic disadvantage: it was not invented by Microsoft. C# got this deficiency fixed.

      1. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

        Lol

      2. @feedable 4y

        ah, yes, nih

      3. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

        I stopped using Java as soon as I realized you don’t have decimal and that you have to import BigDecimal and it has no operators because operator overloading isnt suppirted

        1. @SamsonovAnton 4y

          Well, I don't remember about Decimal, but .Net did not have BigInteger until version 4.0, and still does not have BigUInteger.

          1. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

            What is biguinteger

            1. @SamsonovAnton 4y

              Like BigInteger, but without that ugly sign and signed-only semantics not needed for unsigned applications. BigInteger is more about regular, abstract math. Real-world apps, like cryptography, need BigUInteger instead, with pre-computations and other high performance stuff.

              1. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

                Noice thx

        2. @RiedleroD 4y

          meanwhile python: not even sure which values are Decimals and which are regular bigints/floats

          1. @SamsonovAnton 4y

            Meanwhile JavaScript: not even sure which values are numbers and which are strings.

          2. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

            Lol js be like: 0.1 + 0.2 == 0.3 true Also JS: 0.1 + 0.2 0.3000000…00004

            1. @RiedleroD 4y

              same in python, but it rounds the last few digits to not seem weird

              1. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

                Looool thats even more evil when debugging

                1. @RiedleroD 4y

                  not really… it only does that when printing directly ig and float comparison has some weird rules too (you shouldn't be doing that anyway)

            2. @feedable 4y

              that's not js's fault

              1. @feedable 4y

                it is like that in every language

              2. @RiedleroD 4y

                yes, that's what I said. read a bit upwards

                1. @feedable 4y

                  it's not unique to python too

                  1. @RiedleroD 4y

                    ye, but I said it's due to how float works - in general

                  2. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

                    null == 0 is false null > 0 is false null < 0 is false null >= 0 is true

                    1. @RiedleroD 4y

                      in python, null doesn't even exist. haha! but None does. 💀

                      1. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

                        Looool

          3. @SamsonovAnton 4y

            Meanwhile Bash: not even sure which values are not strings (unless they are indexed arrays or associative arrays).

            1. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

              Meanwhile asm: not even sure of what is value and what is instruction

              1. @SamsonovAnton 4y

                Not on every architecture. Some distinguish program space and data space, some have separate stacks for code and data.

                1. @RiedleroD 4y

                  these architechtures famously suck for emulating because JITs have to work around that (at least on M1 macs afaik)

                  1. @RiedleroD 4y

                    depends if program space is read-only ig

                2. @feedable 4y

                  why should you have a stack for code

                  1. @SamsonovAnton 4y

                    To be resistant to "arbitrary code execution by stack overflow" at least.

                    1. @feedable 4y

                      ooh, you mean shadow stacks

                3. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

                  Well yeah but it isnt that seperated either

                  1. @SamsonovAnton 4y

                    The address space is shared in this case, the stacks are not.

                    1. @feedable 4y

                      not necessarily

                    2. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

                      You still could end up at a spot where an old code was but its not there anymore

                      1. @SamsonovAnton 4y

                        That would trigger an exception even on x86, I think. However, to be sure one cannot call an arbitrary address, or access arbitrary data by manually constructed pointer (byte-grained), or to use uninitialized data (word-grained), there are hardware-enforced protection technologies.

                        1. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

                          Lol no

                        2. @feedable 4y

                          nx-bit is required

                          1. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

                            But you can’t declare that for evey single byte right?

                            1. @feedable 4y

                              you declare it for a page

                              1. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

                                Yeah thats the problem

                                1. @feedable 4y

                                  how is it a problem?

                                  1. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

                                    Read above

                                    1. @feedable 4y

                                      just map your code as executable, and your heap and stack as non-executable

                            2. @SamsonovAnton 4y

                              If you mix code and data within a page, you are screwed anyway.

                              1. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

                                Well instructions are followed by parameters

                                1. @feedable 4y

                                  these are embedded within an instruction, and you really really should not overwrite them. it's not like you can do that, anyway

                                  1. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

                                    Umm what about JIT?

                                    1. @feedable 4y

                                      you map that code as rwx, and then remap it as r-x

                                      1. @feedable 4y

                                        you can actually not remap it, if you trust your jit to produce valid code

                                2. @SamsonovAnton 4y

                                  If you worry about passing control inside a variable-length instruction, then use an architecture with fixed-length instruction or EPIC / VLIW. 😁

                                  1. @feedable 4y

                                    epic does not have a fixed length

                                    1. @SamsonovAnton 4y

                                      But you cannot successfully jump into an instruction word, I suppose.

                                      1. @feedable 4y

                                        you can always do that regardless of the arch, if you have the permission to do so

                                        1. @SamsonovAnton 4y

                                          The instruction decoder will throw "An illegal instruction" exception upon seeing an arbitrary garbage, unless you are [un]lucky enough to hit a purely valid pattern.

                                          1. @feedable 4y

                                            that will occur only after the jump, the only thing that prevents you from doing the jump itself is mmu

                                            1. @feedable 4y

                                              and if you don't have that, nothing will prevent you from doing anything

    4. @saniel42 4y

      - Has less stupid restrictions - Has "structs" and more memory control in general - Looks better - Has operator overloading

      1. Deleted Account 4y

        -Pawn of Microsoft

        1. @saniel42 4y

          I hope this supposed to be a joke

          1. Deleted Account 4y

            Yes, it is

    5. @Turok1234 4y

      It's just satisfying to write tbh, also in small cities and any other country than USA you have two career options: .Net and JS. Choose wisely as they say

  3. @SamsonovAnton 4y

    In fact, BigInteger is internally implemented as BigUInteger + sign logic. (Well, in fact it is more complex than that, but the basic idea is similar.) Unfortunately, with opaque implementation, it is not possible to not use the things you don't need, nor to add advanced functions (operators), nor extract the values that system implementation computes but discards, returning only one of them. So rolling out your own math library (or using third-party one) instead of System.Numerics is the only way to overcome the basic design.

  4. dev_meme 4y

    I will still this and Clear Watermark from it

  5. dev_meme 4y

    Nobody See me

Use J and K for navigation