Live data from Hacker News

Ask HN: Is web programming a series of hacks on hacks?

news.ycombinator.com

461–470 of 688 posts

Re: Ask HN: Is web programming a series of hacks on hacks?

#461

Technical: * Multiple browsers that respond to the same code slightly differently. * Multiple platforms that all need to be supported. * Countless different screen sizes to consider. * Standards that aren't supported across browsers and platforms (and different versions of each in use) * Hundreds of undifferentiated web frameworks that all claim to do the same basic task better than each other. * Thousands of ways to…

No, it just takes experience and a healthy amount of curiosity. I can handle these types of challenges.

I would say a healthy amount of skepticism about using the latest new shiny tech. Maybe that comes with experience.

Re: Ask HN: Is web programming a series of hacks on hacks?

#462
post #331

My theory is that everything is a mess, once you get close enough to notice. Every profession that appears as if its practitioners know what they're doing really is a shocking hodge-podge of temporary solutions, strung together by proverbial duct tape. From doctors to flight engineers to anything else that you thought was running like a smooth machine. Programming is no different.

Agreed. I was a civil engineer (specializing in water resources) before I became a full-time software developer. The science of hydrology/hydraulics is largely a messy pile of educated guesses, statistical relationships based on embarrassingly small datasets, and highly generalized models.

The more of engineering I see in general, the more surprised and impressed I am that anything works at all.

Re: Ask HN: Is web programming a series of hacks on hacks?

#464
post #379

Earlier quoted context omitted.

React is, in my opinion, a big step forward in reclaiming the front end as a mature UI environment. I have also found that CSS becomes a lot more tolerable with CSS Modules, in combination with React, which allows you to write CSS that targets one component and only that component. By eschewing cascading, you can finally write modular, reusable CSS that avoids side effects and still allows fine-tuning (overriding) by…

From a javascript point of view, React is great, but I wholeheartedly disagree on the CSS modules. What React did here breaks the whole purpose of CSS, even if it is messy, not to mention that now designers need to have help from programmers to do their job. IMHO, it is much better to user Sass to make CSS sane, and just do whatever makes life easier on the frontend. I feel something light like Backbone.Native with a…

I'm not very impressed with "the whole purpose of CSS". CSS made a ton of design mistakes which we're still living with today.

A big design mistake was the global cascading/inheritance system. It's a huge pain to write CSS that doesn't leak into nooks and crannies where it shouldn't. CSS is supposed to be modular, but you can't just import someone's stylesheet (e.g. for embedding something in your page, like a video player) and trust that it won't override everything around you, intentionally or accidentally.

More than that, CSS was designed for "styling documents" — the idea being that you could display the same document with different stylesheets, sort of like themes, and so the stylesheet obviously had to be separate from the document. But almost nobody who uses CSS these days do it to "style" anything, let alone "documents". One particularly egregious issue coming from this design is the attempt to separate layout from content, when in truth layout is content, and for pretty much any application today, the style is also content. We're well beyond the point where an HTML document can be "semantic".

Shadow DOM may be the way forward in the future, but CSS Modules is a nice stopgap solution, at least, and you can use them with React + PostCSS (+ SASS) + Webpack in a nicely seamless way, without requiring any browser support.

Re: Ask HN: Is web programming a series of hacks on hacks?

#465

Earlier quoted context omitted.

And no doubt this layering will continue... "Look how I easily render this document decription into react primitives".

Yes, we write web browsers in JS, simply because our browsers let us write nested browsers in JS. I'm only waiting for an OS written in JS so we can use its editor to write an OS in JS.

Gary Bernhardt mentions an OS written in JS in his video: https://www.destroyallsoftware.com/talks/the-birth-and-death...

Re: Ask HN: Is web programming a series of hacks on hacks?

#466
post #24

Yes. I feel like we're in the dark ages right now. JavaScript - Dynamically typed, does not scale what so ever. Code written in it becomes 'read only' very quickly. Impossible to refactor. CSS - Also becomes impossible to manage. Who knows if the class you wrote is or isn't being used in HTML or JavaScript somewhere. Same problem, read-only, it only gets bigger and more unmanageable. HTML - At the heart of it, the fo…

If anything, this understates the problem. A modal web application today takes an absolute minimum of five programming languages and three frameworks: * HTML * CSS * JS * A server-side language (eg Python) * SQL And then come the (leaky) abstractions on top of them: * A framework to make JS bearable (eg Angular) * A framework to make server-side bearable (eg Django) * A framework to make CSS bearable (eg Bootstrap) .…

Good post which jogged a memory for me, HN discussed this very thing 7.5 years ago:

five languages in 7 lines of code -- how now to do web development : https://news.ycombinator.com/item?id=492321

Re: Ask HN: Is web programming a series of hacks on hacks?

#467
Was it ever anything different?

From the very beginning† -- you know, back to the tag, HTTP 1.0 -- it was always a series of shrewd tradeoffs (a.k.a. "hacks") in favor of what can be put in front of people now instead of what might take another 5-8 years of IETF meetings and mailing lists debates to hash out.

† Referring to "the web" as such; not "the internet", for which the initial design choices, while still hackish in their own way, were arrived at in ways decidedly less brutish and expedient.

Re: Ask HN: Is web programming a series of hacks on hacks?

#468

Earlier quoted context omitted.

If anything, this understates the problem. A modal web application today takes an absolute minimum of five programming languages and three frameworks: * HTML * CSS * JS * A server-side language (eg Python) * SQL And then come the (leaky) abstractions on top of them: * A framework to make JS bearable (eg Angular) * A framework to make server-side bearable (eg Django) * A framework to make CSS bearable (eg Bootstrap) .…

Good post which jogged a memory for me, HN discussed this very thing 7.5 years ago: five languages in 7 lines of code -- how now to do web development : https://news.ycombinator.com/item?id=492321

That doc is broken.

Re: Ask HN: Is web programming a series of hacks on hacks?

#469

I feel the same thing to be honest. As a mostly Backend Java guy I just have a hard time to get my head wrapped around the whole Frontend/SPA thing and the multitude of frameworks, styles, tools and so on; just don't help at all. It feels like everyone is reinventing the wheel constantly. Right now I try to write a simple react SPA and I use more libraries as if I would have done it in a tomcat webapp with static htm…

I'm coming from a similar position as you (trying to merge a hodgepodge of Swing, AWT, JSP, and Rails GUIs into a coherent, modular frontend) and running in to the same problems. I built one application with Angular 1, which had good documentation but seemed to be overcomplicated and had too much "magic" going on under the hood for my liking. I'm now trying React; the main React documentation is great but the documentation for supporting libraries is horrible. I have also encountered the problem of every example doing things differently, highly-opinionated tutorials, and (as I mentioned elsewhere) everything seems to be a slightly different alphabet soup of supporting packages. It has been hell for someone who normally tries to find the "best" way to do things.

Re: Ask HN: Is web programming a series of hacks on hacks?

#470
post #435
post #417

Earlier quoted context omitted.

That's kinda the problem, though: Unix really is worse than VMS or Lisp Machines, when measured on certain axes (and I love Unix!); rather than fix it, or replace it with something even better (e.g. Plan 9), the computing industry has instead decided that POSIX is the end-all, be-all of OS evolution, and collectively ignored all the ways that life could be better. It's very difficult, as I get older, not to survey th…

This is what makes me focus more on Windows, macOS and the mobile OSes. Because these systems moved beyond what plain POSIX means. Even on Apple and Google's OSes, their UNIX underpinnings are not that relevant, because most of the user space libraries and APIs don't have anything to do with UNIX.

Windows has its own legacy baggage and I wonder about the proposition that the mobile OSes' Unix underpinnings aren't relevant. Depends on what you're doing, I'd think.
Post reply on HN