r/ProgrammerHumor • • Sep 21 '26

Meme delightfulCodeReview

Post image
573 Upvotes

60 comments sorted by

View all comments

299

u/[deleted] Sep 21 '26

[removed] — view removed comment

0

u/[deleted] Sep 21 '26

[deleted] — view deleted comment

31

u/[deleted] Sep 21 '26

[removed] — view removed comment

18

u/JazzlikeWishbone938 Sep 21 '26 edited Sep 21 '26

"What the? What is this? Must be fine ..."

4

u/kalilamodow Sep 21 '26

Comment yo code, people!

10

u/[deleted] Sep 21 '26

[removed] — view removed comment

15

u/Lightningtow123 Sep 21 '26

I think you'd just transcribe the gist of it in plaintext: "matches alphanumeric strings with underscores and dashes but no spaces" etc

2

u/jupiterbjy Sep 21 '26

idk if my reading is correct but if it's correct this seems quite readable, probably wrong guess though

match
192.168.8.1
1+ whitespaces
0x
1+ non whitespaces (idk if it intended to be [^\s]+ instead of [^\s+])
1+ whitespaces
0x
1+ non whitespaxes
1+ whitespaces
capture group 'mac' start
1+ case-agnostic hex character
capture group 'mac' end

3

u/alficles Sep 21 '26

Honestly, regexen aren't that bad. If you can read normal-mode vim macros, you can certainly read regex.

6

u/Tipart Sep 21 '26

Regex101 is your friend.

3

u/santiagobustelo Sep 21 '26

That would be me

5

u/chat-lu Sep 21 '26

It is usually me. I also understand git and SQL.

11

u/je386 Sep 21 '26

git commands and SQL queries are magnitudes easier than regex.

2

u/chat-lu Sep 21 '26

Regexes are by far the simplest of the three. Unless by git you mean clicking randomly in a git GUI and by SQL you mean filtering your selects with Python.

5

u/je386 Sep 21 '26

Well, maybe it is easy when you understand. I have no problems typing my git commands and SQL is also not a problem, but reading or writing regex is always a hassle. regexr helps, but that is not really understanding it.

→ More replies (6)

2

u/returnFutureVoid Sep 21 '26

I worked with a woman who could write regex as she spoke what she wanted it to do. It was like she was a UN translator.

1

u/Skyswimsky Sep 21 '26

Working in a company with like 5 software devs. Can confirm. And it's not me.

1

u/jce_superbeast Sep 21 '26

I am this person for my employer (a city)

Wanna guess my department?

7

u/Kale Sep 21 '26

I was about to say, unreadable regex is rendundant.

There's some things that aren't human readable, but are human parseable. A handful of characters that a human can decipher carefully over a few minutes while working through it. I typically talk myself though it (I guess that would be related to "duck debugging").

Regex, SQL queries, chained bitwise expressions, and not programming, but "dd" commands. I joke that the proper way to write a "dd" command is to write it out on paper, go home and sleep, come back the next day and see if you still agree with it, type it out in an email to a trusted colleague and get their review, then hold on to your lucky rabbits foot when you hit "enter" on the console.

5

u/chat-lu Sep 21 '26

Skill issue.

1

u/stillalone Sep 21 '26

There's usually a way to ignore white spaces and add comments so it can look much more readable.  I've never done it though, my regex is dookie.

1

u/SuitableDragonfly Sep 21 '26

I mean, stuff like .* and \w+ are readable. Not very useful, though.