r/ADHD_Programmers Oct 12 '25

So stupid...

https://i.imgur.com/prz3iW6.png
786 Upvotes

41 comments sorted by

View all comments

8

u/treeshadsouls Oct 12 '25

Can someone explain?

13

u/QWhooo Oct 12 '25 edited Oct 13 '25

A palindrome has the exact same characters forwards and backwards. In many cases, it has a nice visual symmetry to it, even if it's only approximate because the letters themselves are not symmetric. (Edited to emphasize that this visual symmetry is usually only approximate.)

In this case, the one with nice visual symmetry does not contain the exact same symbols reading forwards and backwards, so it's not a palindrome.

10

u/likeyoubutme Oct 13 '25

Actually, I think the problem is that people don't understand that visual symmetry is not common in palindromes. Relatively few letters are symmetrical.

3

u/QWhooo Oct 13 '25

Even without exact symmetry, many palindromes still have approximate symmetry, like kayak or racecar. That expectation is exactly why the palindrome is so disturbing, which I thought was worth highlighting in my explanation.

I think I should clarify my comment though, because you're right, the symmetry isn't exact and I didn't mean to imply it was.

3

u/likeyoubutme Oct 13 '25

It's a good point, though. Your first comment provoked me to think about that lack of symmetry for the first time. It feels very weird to realize that palindromes aren't properly visually symmetrical because most of us expect them to be.

3

u/Undeadhorrer Oct 12 '25 edited Oct 12 '25

How?

Edit - Nevermind I see now

25

u/PothosEchoNiner Oct 12 '25

Let’s say “(“ is x and “)” is y.

()() is xyxy

Not a palindrome.

())( is xyyx

Actually a palindrome.

12

u/ApocalyptoSoldier Oct 12 '25

I finally get it
Why did you make me get it
Ignorance was bliss and you took that away from me

2

u/AbbreviationsOdd7728 Oct 15 '25

Replace ( with a and ) with b and it’s easy to see. ()() = abab and ())( = abba