Live data from Hacker News

Hardest problem in computer science: centering things

tonsky.me

251–260 of 473 posts

Re: Hardest problem in computer science: centering things

#251
> (also don’t ask why justify-content became justify-items)

It didn't. `justify-content` works with grid too, and will bunch all the grid cells into the center. `justify-items` is if you want the contents of each grid cell to be centered.

Also, `place-content` or `place-items` for grid does both the horizontal & vertical at the same time.

I admit that CSS isn't always obvious how it works, but it seems like the author didn't care to check

Re: Hardest problem in computer science: centering things

#252

I agree partially, but I also noticed on some projects that not everything looks better when absolutely centered. Sometimes something is centered but looks weird. You nudge it a bit off center and looks perfect.

That's mentioned briefly in the optical compensation bit - visual center is what looks like the center, mathematical center is just the middle of the bounding box. Triangles are the obvious example, but even more annoying is logos where you have the ® or ™ at the end, which have very little weight but are included in centering math on badly cropped logos.

Re: Hardest problem in computer science: centering things

#253

what the heck is up with all those mouse cursors on this page - is it showing what everyone is looking at? why would I care?!? The hardest problem in this article is actually reading it because somebody's cursor is sitting in the way. Or is this just a bug in FF on this site?!?

April fool prank, probably.

No, it's always there, pointlessly distracting. See e.g. 6 months ago: https://news.ycombinator.com/item?id=37735801#37737256

Re: Hardest problem in computer science: centering things

#254
post #193

Earlier quoted context omitted.

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 grammar. When I read modern websites, articles, papers, emails from HR, etc. with their sloppy English and comma-splices everywhere, it annoys me way too much and it's a real challenge to push on through and keep reading. It feels like walking through a maze, with an uneven floor and bad lighting, full of dead-ends, compared to walking down a pleasant, well-lit corridor.

This is spot-on. HR is bad, but at least writing is not their main job, so I'm willing to cut them some slack.

My main concern is the writing I see coming out of the Public Relations and Communications departments. Writing is not exactly tangential to those fields.

It wasn't always this way. What has happened?

Re: Hardest problem in computer science: centering things

#255
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 haven't built/done any of these and yet notice misalignments and it drives me nuts. Hundreds of thousands of dollars (equivalent in INR) spent to on buildings and they don't bother to align bricks; it's as if there's no value in aesthetics, visual beauty, symmetry etc., /rant

Which I find very interesting. I’ve seen that there are constructors in India that are very much capable of recognizing and correctly implementing the alignments, but you pay so so much more than the average constructors- and then you are often in a conundrum where you have to choose between paying market rate and getting equivalent precision, or to pay 5x market rate to get a very good standard.

Re: Hardest problem in computer science: centering things

#256
post #98

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!)

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

[deleted]

Re: Hardest problem in computer science: centering things

#257

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!)

As usual, there's an XKCD about this: https://xkcd.com/1015/.

Re: Hardest problem in computer science: centering things

#258
post #230
post #170

Earlier quoted context omitted.

I dunno. I found out that people who do care about how things look like, tend not to care about how they work and whether they are practical. And the other way round too. The slightly misaligned button is not "basic shit". It is useless shit. And this works on company level too. The groups that spend a lot of time caring about visuals tend not to give a damm about much else.

I can see the difference between practical design and bad design. A misaligned button is usually the latter. Those who just want the thing to work without much regard for the looks of it will tend to use whatever default their UI package comes with, with minimal styling, if at all. It is often not bad in terms of correctness. Defaults may not look great, but they are usually well designed and consistent. If you have…

I did not mean it as in difference between "practical design and bad design". I do agree there is usually tension between the two.

Simply, people who care about function wont notice misaligned button. And people who are notice misaligned button usually prioritize visual stuff over everything. That extends to managers and whole companies.

Pretty much no UI package will have everything aligned out of the box, it is not even possible. When you use them out of the box without tweaking, you either get misaligned things.

Re: Hardest problem in computer science: centering things

#259
Maybe I'm just an awful person but one of my little pleasures in life is deliberately leaving things slightly misaligned or mismatched in colors whenever I can. I don't care about it myself so it's fun watching people caring too much around me.

It also helps spotting the bikeshedders.

Re: Hardest problem in computer science: centering things

#260

The dark mode on that site... funniest thing I've seen all week

Ha! Very cute.

The live-streaming pointers is genius too. At first I assumed it was random, then I thought to check in the dev tools for a websocket... I love it!

Post reply on HN