Live data from Hacker News

Hardest problem in computer science: centering things

tonsky.me

211–220 of 473 posts

Re: Hardest problem in computer science: centering things

#211

Earlier quoted context omitted.

But that is the fundamental problem behind all of web nowadays: It was initially designed for documents ; there are precursors for this entire HTML stuff (hypercards and similar things). Funnily enough, there existed tech even back then that was much much better at dealing with actual applications and their requirements. Unfortunately, many stupid idiots decided to use the "web" for that instead and mangle something…

They weren't really idiots, though, that's quite harsh. People wanted to be able to share software but there were so many barriers to entry at the distribution/installation/update phases that they used the solution that didn't require any of that. It was a hack but it worked better to serve the needs of the users.

Come on, there are so many native cross-platform solutions which are easy to go and much less bloated than web engine, e.g. Qt/GTK+/wxWidgets/Xamarin/etc.

Re: Hardest problem in computer science: centering things

#212

It's just as hard in the real world: https://ftw.usatoday.com/lists/nc-state-texas-ncaa-portland-...

I think centering in general is a difficult thing. I wanted to mount an AC indoor unit over a window. Now, do I mount it center to the wall or center to the window which slightlty offset the center of my wall? I made the call to center it based on my wall. Now, 2 out of the 5 people that have came to my room asked me about why my AC unit is off-center. For them center is relative to the window and discussing AC unit…

I would have picked the window too. It's much more prominent anchor.

Re: Hardest problem in computer science: centering things

#213
post #126
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’m not entirely sure I agree with you on this. It’s hard for me to say because I really like the imperfections in things I build, for the most part. Like I’ll full spartle a wall (not entirely sure if this is the correct English description) and I’ll intentionally leave the finish less than “perfect” because I think it adds a little soul to it that will make me happy down the years. Then you have things like floorin…

AFAIK you should always leave space between floor and walls. As the material may grow/shrink with temperature etc. Very noticable in Sweden.

Re: Hardest problem in computer science: centering things

#214

Earlier quoted context omitted.

I mean, semantics are also good! Yes, CSS grids are a lot like tables in some ways, but not having to add 25% more DOM elements to fake a table layout (display: table/table-row/table-cell; that's 3 divs for one row!) is also a thing to be celebrated. Plus, in practice, grid is a lot more powerful than doing a few common layouts. Grid took so long precisely because they were trying to think a little further ahead rath…

Nah, semantics are worthless. The whole semantic web idea never took off for good reasons, HTML5 semantic tags don't have any meaningful semantics and you can't even reliably remove boilerplate from HTML without ML pipelines (a basic use case you'd expect any "semantic" document format to nail easily). Then the invention of LLMs killed it twice over. HTML is a graphics rendering language in denial about its true natu…

I suggest you spend some time with a screen reader or have a look at the accessibility tab of you browser to get a feel of the worth of semantic web.

It's true you won't ever have a perfect semantic representation of a page (and I have no idea how blind people manage those infinite scroller), but in my mind having or instead of still helps a lot on that aspect.

Re: Hardest problem in computer science: centering things

#215
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 thought the tiles on my bathroom floor were perfectly flat and even on the ground, until I switched off the light and used that damn laser on the Dyson vacuum cleaner. What greeted me was an uneven landscape of tiles that the naked eye just didn't see.

Same, except with panel floor in our bedroom. Moved the bedframe and some cabinets around, suddenly the bed is really wobbly. Couldn't see why until I took my laser level and started sweeping the floor with the "red X" at a low angle, like it was sci-fi scanner.

That laser level actually revealed plenty of places around the apartment I dare not look at anymore, lest I get annoyed at the contractors... and the original builders of the block.

Re: Hardest problem in computer science: centering things

#216

Earlier quoted context omitted.

It is a weird myth that CSS somehow discourages tables. CSS have supported styling html tables and ‘display:table’ (allowing a table-like layout without html-tables) for 25 years. Float and clear was grandfathered into CSS since they were added to HTML by Netscape. They are fine for their intended purpose: placing images in a text and have the text flow around. Other positioning systems you mention does not solve the…

I absolutely remember a ton of pieces about how we all needed to stop using tables (and 1x1 transparent gifs, too) for page layout because CSS was The Right Way

There is always a lot of confusion about this because “tables” can mean different things - it is both a set of structual elements in HTML and a layout model in CSS.

CSS is “the right way” to control styling and layout, but that does not mean you can’t use tables.

In the early days of the web people used the BLOCKQUOTE element to create margins since this was the only way. When CSS arrived, it became “the right way” to create margins - but that does not mean you can’t use blockquotes! You just need to distinguish beteen the semantics of a quote and the layou effect of margins.

But I’m sure someone understod this to mean that quoting things were bad.

Re: Hardest problem in computer science: centering things

#217

That bright yellow background imprinted my eyes for 5 minutes, there's other way to leave an impression than fucking up with my senses, like writing a clear concise article instead of a never ending list of examples interrupted with distracting fake mouse move. An horrible web experience through and through.

> with distracting fake mouse move.

These are multiplayer cursors. You're seeing other people using the website

Re: Hardest problem in computer science: centering things

#218

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

Several years ago I spent around 2 weeks on fixing antialiased font rendering in a game engine. Had to look close at the text in other apps to compare. Took me months to unsee it

Re: Hardest problem in computer science: centering things

#219

But is it really worth fixing these things? What do you achieve by spending time and money to fix these details, other than making users slightly less annoyed by your design? Maybe these details are not fixed because they don’t really matter that much. Have you ever stopped using an app because a button or icon was slightly misaligned?

> Have you ever stopped using an app because a button or icon was slightly misaligned?

Maybe, maybe not, maybe it made me not use the app in the first place.

It is one of these little things that make the app look unprofessional. I have been a bit uncomfortable using banking apps with misaligned icons. It the designers can get away with misaligned icons, what can the core developers get away with? If a company is sloppy with their design, maybe they are sloppy with their security too.

People can easily see these visual details, they can't see the back-end but for the lack of information, they will assume it is made with the same care, that is, not much. And maybe they are right.

Re: Hardest problem in computer science: centering things

#220
post #164

Earlier quoted context omitted.

> which I will argue should be called I think you're missing the joke of the name!

I don't think it's a joke. The possessive plural is a disaster in American English

Well, it is "a baker's dozen", right? Not "all the bakers' dozens". Since the phrase incorporates a reference to a single individual, as a representative concept for all bakers.

So "the grocer's apostrophe" makes sense as a phrase referring to a typical individual grocer with a typical atypical apostrophe, standing in as a representative for all grocers and all their darned grocers' apostrophes.

Post reply on HN