Skip to content
DevMeme
6180 of 7590
Languages Post #6778 · source on Telegram

The Developer Brain on Regex: Over-engineering Social Interactions

Description

A four-panel comic strip meme from 'THE JENKINS COMIC' that satirizes a developer's mind being completely consumed by regular expressions. In the first panel, a character in a blue shirt introduces himself, saying, "Hi! My name is Jason". In the second panel, the character he's speaking to, wearing a yellow shirt, replies, "Ah! Nice to meet you, /J[a-o]{4}/", which is a regex pattern that matches the name 'Jason'. The third panel provides a look inside the yellow-shirted character's head, where a hand is inserting a 'Jason' label into a brain depicted as a chaotic scribble labeled 'Regex', illustrating that all input is processed through this filter. In the final panel, the regex-brained character continues the conversation with another complex regex, "/(?<smalltalk>(?:\w{2,12}\s){3,10})/", leaving the original character looking on with a confused and concerned expression. The meme humorously captures the tendency for developers to apply technical, pattern-matching logic to everyday situations where it's hilariously inappropriate, showing how a powerful tool like regex can warp one's perception of the world

Comments

21
Anonymous ★ Top Pick His brain isn't just running regex, it's compiling it on the fly. The conversational latency must be terrible, and I bet there's zero caching for common greetings
  1. Anonymous ★ Top Pick

    His brain isn't just running regex, it's compiling it on the fly. The conversational latency must be terrible, and I bet there's zero caching for common greetings

  2. Anonymous

    Catastrophic backtracking isn’t just for your log parser - try explaining eye contact to the engine in your head running with the /social|casual/ flags disabled

  3. Anonymous

    After 20 years in tech, you know you've made it when your brain automatically parses 'Jason' as a data format and responds with a regex that would make even Perl developers weep

  4. Anonymous

    This perfectly captures the moment when a senior engineer realizes their new teammate treats every conversation like a parsing problem. The progression from '/J[a-o]{4}/' to a named capture group with nested quantifiers is the social equivalent of refactoring 'Hello World' into a microservices architecture. We've all met this developer - the one who can't just say 'nice weather' without mentally constructing a state machine to validate meteorological small talk. The real tragedy? That second regex would actually match 'Jason' zero times, which is somehow the most accurate part of this entire interaction

  5. Anonymous

    Treating introductions as untrusted input is great - until ‘Jasón’ shows up and your social parser fails Unicode support and the postmortem blames the character class

  6. Anonymous

    When small talk requires possessive quantifiers and your brain NPEs on catastrophic backtracking

  7. Anonymous

    Only a senior would name the smalltalk group and still greet “Jason” with /J[a-o]{4}/ - a production DFA that rejects the handshake via an off-by-one character class and zero i18n

  8. @drbogar 1y

    I don't know what is wrong with me, but I actually like Regex.

  9. @drbogar 1y

    Btw... What's an easy to understand "clean" alternative to Regex? What do you use for validation and parsing?

    1. @metametamoon 1y

      For example, one might use regex dsl. It provides cleaner syntax, although more verbose. The catch is, sometimes shorter is better for readability, but definitely not always, so there are probably no ideal solution

    2. @metametamoon 1y

      Parser-combinators are sometimes good, but their clarity depends significantly on the language you implement them in

    3. Sure Not 1y

      regex101.com is good for visual learning

  10. @ner0xt 1y

    [a-o] doesnt include "s" so it would parse Jaon?) (likely not parse at all)

    1. @SamsonovAnton 1y

      Why do you make assumptions regarding symbol ranges, if you don't know the encoding being used? 🤓

      1. @ner0xt 1y

        how is that gonna change a thing?🤓

        1. @SamsonovAnton 1y

          If the encoding is not ASCII-based, for example, the letter order is asdfghjkqzwxecrvtbynumiop then the range [a-o] will include "s". (And, yes, encodings may not follow alphabet order.)

          1. Sure Not 1y

            If you want real explanation: Forced Holoperidol injection makes it hard to think.

  11. Sure Not 1y

    I wish there was PCRE3

  12. Sure Not 1y

    Or PCRE++ 🤣

  13. Sure Not 1y

    You wont believe where this pattern ended up connecting xd

  14. Sure Not 1y

    Answer to this is in http protocol. Not cringe french history, btw.

Use J and K for navigation