Hardest problem in computer science: centering things
241–250 of 473 posts
Re: Hardest problem in computer science: centering things
#242Earlier quoted context omitted.
Yes, and let’s not forget fallback fonts. So rules for each browser and OS and each font class and each layout (desktop, tablet, mobile). Probably on the order of 100 rules for a single style. Yeah, we’re just being lazy. We need sane font rendering in browsers that treat things like alignment in a way that we’d expect for the 99% case. If I say “center” it should just fucking center.
Fallback fonts are a legacy of the past though, in an era where everybody ships at least hundred of kilobytes of JS and images (when it's not tens of megabytes, but this is another topic…) there's no good reason to specify a font and hope it will be found on the customer's OS: ship the font you're using.
Re: Hardest problem in computer science: centering things
#243Earlier quoted context omitted.
I've heard this described as inherent complexity versus accidental complexity. Inherent complexity (due to difficult real-world constraints) is fine. Accidental complexity, like that caused by overcomplicated tools or architectural decisions, just feels bad.
Why do I enjoy writing shell scripts then?
Re: Hardest problem in computer science: centering things
#244That'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.…
Man... whole generations just straight up either do not realize, or have forgotten that early CSS revolved around creating documents, not apps, and that all of those design paradigms originated from typesetting. In the same way that one would float a figure to the left or right of lines of a paragraph, `float: left;` and `float: right;` allowed you to do the same. Open a textbook and look at lines of a paragraph flow…
I think anyone ever trying to write a paper or book with images in it using tools like LaTeX knows how bad it is to let the tool position images for you. It's always wrong, and one of the first things you learn is how to pin the image in between the text lines/paragraphs you wanted it to be between.
Text-to-diagram tools like PlantUML (and arguably even Graphviz) make this mistake too. The moment you put more than a couple things in your diagram, you discover that auto-layout can't ever make the result readable, and you look for ways to pin parts of the diagram relative to other parts; something these tools don't let you do either.
And then all three classes of tools here - HTML, typesetting, diagramming - violate the principle of least surprise in the nastiest of way: make one little change, add a letter or word somewhere, suddenly the result looks nothing like it was before, as the auto-layouting flips everything around.
Re: Hardest problem in computer science: centering things
#245I 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.
Re: Hardest problem in computer science: centering things
#246Re: Hardest problem in computer science: centering things
#247Re: Hardest problem in computer science: centering things
#248Don'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
/rant
Re: Hardest problem in computer science: centering things
#249Earlier quoted context omitted.
When people say not to use tables they mean for layout of the entire page
> they mean They shouldn't had mean , they should had said that. Because 99% of time we have a bunch of in assortments of representing a tabular data. Dozens of "web" "front-end" "frameworks" doesn't help it in any way, too.
Re: Hardest problem in computer science: centering things
#250Earlier 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…
You reference HyperCard as if it was only a document creation system; it was not. People have been building applications in HyperCard from the start. https://hypercard.org