Live data from Hacker News

Hardest problem in computer science: centering things

tonsky.me

111–120 of 473 posts

Re: Hardest problem in computer science: centering things

#111
This article makes it clear to me just how different perception is in different people. How much or how little this errors scream at you in your mind. If everyone was as sensitive as the author (I am close), then way less errors would be left there, since so many people would get annoyed by them.

Re: Hardest problem in computer science: centering things

#112

First time probably ever that I've had to disable Javascript because of the creepy and distracting mouse thing. It really feels like you're invading other people's privacy, and if it doesn't, having things randomly move across your field of vision makes it difficult to read.

I had to open up devtools to be sure, but yeah, there's a websocket that constantly streams your cursor position up to the server and constantly streams everyone else's cursor positions down to you for rendering. As someone who compulsively scrolls, selects and fidgets while reading, it actually made me quite self conscious to realize that other people would be distracted by my all-over-the-place mouse movements.

It is amazing. Evil genius vibes.

Re: Hardest problem in computer science: centering things

#113

Who ever said that aligning things, especially text, on a page was easy? Just look at what Donald Knuth had to invent to solve this problem!

Correct. The article does a bit of a bait-and-switch by showing that centering a rectangle within another rectangle is mathematically trivial, and then going on to complain about misaligned stuff that is mainly "irregular shaped text (which can change based on translation, etc) within box with curved corners".

Re: Hardest problem in computer science: centering things

#114
post #98

Earlier quoted context omitted.

The same happens when you: - Install flooring - Install trim in your own home - Build / install cabinets You will now see: - Odd flooring patterns and uneven floors - Know what it looks like when trim isn't coped - Uneven gaps between doors

I’ve noticed these things all my life. Even as a young child I would point such things out and others would have trouble seeing it. Once I was diagnosed with autism, this tendency of mine made a lot more sense. I’m curious if other people detect interrupted or irregular patterns so readily. It’s like there’s a part of my brain just looking for anomalies and I can’t turn it off.

I have this with spelling. Even a fractional glance at a poster/billboard/sign, without focusing my eyes on it, and certainly without reading a single word ... any misspelled word triggers a flag in my brain sort of "pinging" me with the precise location of the misspelled word.

Re: Hardest problem in computer science: centering things

#115

Don't read this article, if you are not in web dev. Once you start seeing it, you can't stop seeing it, and it will drive you crazy forever. It is the same for noticing misalignment, recognizing color oversaturation, high quality speakers/headphones, etc. (It is a good article!)

Or keming (bad kerning).

Re: Hardest problem in computer science: centering things

#116
post #4

Is the author here? Can you give us a toggle so we can turn off the moving cursors? It's a little distracting. Reader mode isn't working so well, so I deleted the element in developer tools in the mean time.

I thought it was hilarious and delightful, it made me smile and feel at home. But I certainly understand why others would hate it and not be able to focus on the content.

Re: Hardest problem in computer science: centering things

#119

If there’s anything I learned from studying design and typography, it’s that there’s no singular correct rule you can use to align things. Use precise measurements for your margins? Someone will say that perceptually it’s not symmetrical, and rightfully point out that perceived symmetry is the only one that matters . Adjust visually for your hanging punctuation, ascenders and descenders? Someone will draw a bunch of…

Jup. Somw people like to think centering things is taking the bounding box of the visible pixel and centering the center of the bounding box. But some letters have more pixels in one half or the other, so that would leave you with more whitespace one one or the other side. That means despite being metrically centered it still doesn't look optically centered.

I guess one could devise algorithms for that, but I haven't seen one that does a better job than my brain and my eyes.

Post reply on HN