16

New developers(5-6 years experience) these days are so pathetic. They dont have any sense of code review. All they want is to put their opinion out without giving any thought.

I had a PR for review today which contains mock specification to match a regular expression and return the corresponding response

The regular expression I put was

104000(02|06|20|48)

Now, this guy comes and puts a comment that we could "simplify" as 104000\d{2}

I replied, the ending digits are not contiguous. The specific pair of digits have to match for these mocks.

Then this guy replied, then we could simplify as 104(0{4}(2|6)l0{3}(20|48)).

I said, I cannot understand how that is simplification. Why do we need such a complex regex to match something very straight forward.

And the guy replied, we should be writing proper regexes, otherwise we could just specify everything explicitly.

I was like WTF man. You try deciphering this next week without taking at least a minute to know which values are matched.

Anyhow, another senior person approved my PR, and I merged it.

Comments
  • 2
    Was he a "Cripto-engineer"? Dying! haha.
  • 0
    I understand that because I wrote a library to build regexes. But I wrote a library to build regexes because regexes.
  • 0
    I don't think it was any better before

    I do think since the advent of code reviews being more... common. it's like some people wanna put a stick up on top of a hill with their flag on it and shout at everybody though

    if it works it works

    if I can break it, it doesn't work

    red team, blue team code and testing wehn again
  • 1
    A big benefit of code reviews are that the reviewers learn from it. I hope he does.
  • 3
    I used to be like that too.

    When you finally learn to juggle the technology it's hell of a fun to do so with every nail you see
  • 2
    Looks like that guy wanted to show off his regex skills.
    And typically those kinds of people don’t care about readability. The more complex and unreadable the regex is, the better, because it looks so cool! And that’s why we are 1337 haxx0rs, right?
  • 2
    @Lensflare You're wrong.

    It's 13{2}7 h[4a]x{2,3}0r[sz]?
  • 6
    To be fair, I can see how someone might encounter regex and come away with the mistaken impression that you're supposed to make them as ugly and confusing as possible.

    At least, I hope that's a mistaken impression.

    It is, right?
  • 3
    > Resolve discussion
    > Merge
  • 3
    Reminds me of people "simplifying" a ton of if-else statements into one ternary... Ew
  • 2
    "otherwise we could just specify everything explicitly."

    BRO WAS SO CLOSE TO GETTING IT
  • 0
    @Ranchonyx I'd do this

    I don't wanna read

    go fast fast faster pls

    my eyeballs only have so much throughput

    I understand no one else cares about this tho so I wouldn't force it in a code review
Add Comment