Live data from Hacker News

Hardest problem in computer science: centering things

tonsky.me

401–410 of 473 posts

Re: Hardest problem in computer science: centering things

#402
post #72

That's because CSS layout was designed by people who thought "float" and "clear" were a good idea, tables were bad, and, when in doubt, make it Turing-complete and dump the problem on someone else. 2D and 3D tools get this right. CAD programs, game engines, and animation programs are all far better at positioning things. They have far better layout engines and constraint systems. This is really a constraint problem.…

Funnily enough, Unity's latest UI approach is to just use web tech, with their 'UML' XML dialect plus CSS-like styling via the yoga embeddable C++ flexbox renderer.

Also, Fusion 360 is now known as just Fusion (it's cleaner that way?)

Re: Hardest problem in computer science: centering things

#404

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

reminds me of something that happened to me when I was a younger.

I was in school, sitting in study hall with a friend.

He leaned over and said "Doesn't the buzzing of those lights bother you?"

and then I noticed the whining sound of the room's overhead lights and I couldn't unhear it from that point on.

bleh.

Re: Hardest problem in computer science: centering things

#405

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

I accidentally did something similar to a college friend when I pointed out the 15khz hum that televisions made. He had not noticed that before and then couldn't stop hearing it.

Re: Hardest problem in computer science: centering things

#406
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

+1000

I just patched a whole bunch of drywall cutouts after having some electrical work done. Now I when I look at a new construction house, I can tell which builders use go cheap on drywall, esp. when there's too much texture.

Re: Hardest problem in computer science: centering things

#407
post #72

That's because CSS layout was designed by people who thought "float" and "clear" were a good idea, tables were bad, and, when in doubt, make it Turing-complete and dump the problem on someone else. 2D and 3D tools get this right. CAD programs, game engines, and animation programs are all far better at positioning things. They have far better layout engines and constraint systems. This is really a constraint problem.…

They probably thought we would ditch HTML/CSS for something better but then PHP came around and fixed many of HTML's shortcomings and then AJAX came around and we kept sinking DEEP into this fundamentally broken ecosystem and now it's just too late to leave. Although, honestly, how hard would it be for Chrome to support some new language called Super Text Markup Language that is designed for modern use with support f…

> Although, honestly, how hard would it be for Chrome to support some new language called Super Text Markup Language that is designed for modern use with support for templating, portals, actual semantic layouts that don't rely on position on the code, etc.? Perhaps it's time.

"Google Web". Like what Google did to USENET. First they connected to USENET. Then they called it "Google Groups". Gradually, free USENET declined, and now, there is only Google Groups.

It would be so much more convenient. No more need for hosting providers, domain services, and most of AWS. Just host on Google Web.

Re: Hardest problem in computer science: centering things

#408

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

Bangladesh's flag is a green field with a red filled circle, but the red filled circle is off-center and once you've seen that you can't unsee it.

(The original design had it centered in the flag; some committee later decided it should be centered in the "flag plus flagpole".)

Re: Hardest problem in computer science: centering things

#409
post #348

Earlier quoted context omitted.

display:table was never really evangelized for tabular layout. They were pretty much ignored and the literature and documentation missed the point. Tabular layout is really just another word for grid layouts. Grid layouts took forever to arrive. Tables were the only reliable way lay things out in a grid for a very long time and yet were discouraged regardless. There were people who knew about display:table and used i…

Sorry are you saying ‘display:table’ was not viable for grid-like layouts because someone might confuse it with the html tag? That is like saying Go is not a viable programming language because someone might confuse it with GOTO and consider it harmful.

I'm saying that CSS has always had really confusing messaging around what is considered good practice and what is considered bad. If CSS had actually had the equivalent of Go's stdlib and documentation with well established good practices that were pragmatic we would be having a very different conversation right now.

Re: Hardest problem in computer science: centering things

#410

Earlier quoted context omitted.

Former frontend developer here -- I did fight with these misalignments (typically those things that don't align were lots of nested containers, fighting with each other in different ways, so the solution was to clean them up and use one simple alignment). But I stopped noticing these things, maybe because mobile UIs are a lot worse -- not in visual design, but in that they always do weird things and live their own li…

Well, if you have full control on the frontend, then it's your responsibility to make these right.

That cleanup was done in a small company, where it took just 1-2 hours. I was in full control because I out-argued others for my CSS styles cleanup, that they didn't like. In my current place, I bet this will take couple of days if you really try hard and care and nobody is against. I think, in big organizations, either there are somebody against this, or people stop caring that much to push these changes.
Post reply on HN