Live data from Hacker News

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

news.ycombinator.com

11–20 of 688 posts

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

#11
Web programming has never been wholly controlled by a platform owner. I think that's the main difference from any traditional environment that might come to mind; Unix has its traditions, so do Windows and Mac. This is even the case for mobile. In the years when IE was the only browser anyone used, one could also hope to come to grips with its buggy CSS implementation, but that is past too, and in the meantime the backend was still churning from Java and the classic LAMP stack towards Rails and Python.

This is the end result of uncoordinated, path dependent "bazaar" dynamics where the core technologies are open, yet keep accumulating cruft, and are subject to regular proxy wars between large entities. The solutions today are better in that they are easier along certain axes - you can make a cookie-cutter landing page out of the box with Bootstrap, or add some interactive data viz by employing D3. For any random one-off there is an npm package that depends on 50 other packages. They mostly aren't there to help you architect your own thing in a self-consistent way, though - that's too much of a "vitamin" and not enough of a "bandaid" to be marketable.

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

#12
I think it feels hacky because it is, and it's natural. And by natural I mean this is how spontaneous complex systems evolve. Internet is a result of half of a century of millions of people's contributions for different and often opposing goals and priorities. For other examples of hackiness take a look at other complex natural processes, like multicellular living creatures and ecosystem in general.

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

#13

There is some stuff that actually makes logical sense, like CSS Specificity, but yes a lot of it is hacky. I mean, negative margins? Clear? Thirty different lines of browser-specific rendering tweaks? WebKit is great, but any attempt to reform the competing browser shitshow reminds me of that xkcd comic about competing standards: https://xkcd.com/927/ (former web developer -- get out while you have your sanity)

Speaking of CSS Specificity, even here things are getting complicated. CSS standard states that there are six origin specificity levels [0]. Certain browser engine removed two of them just two years ago [1].

[0] https://www.w3.org/TR/CSS22/cascade.html#cascading-order (amusingly, they omitted the last and strongest "user agent !important" from the list). [1] https://bugs.chromium.org/p/chromium/issues/detail?id=347016

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

#14
I don't know what are you referring to as hack on top of hacks? There are tons of big open source and closed source web based project that are easy to follow what's going on and everything is well structured. Look at VSCode code base [1] or if you're a Googler look at Google Photos source code.

People look at React and Webpack and all these small little modules that people put together to make something work and think that's all the web is.

Although, I think React, webpack, Redux and all these little hacks are amazing for exploring what's possible in web.

[1] https://github.com/Microsoft/vscode/

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

#16
I think the problem boils down to how the different browser vendors has treated web developers throughout the years, not giving them a consistent environment across the different browsers, not recognizing certain bugs so they've lived on and become un-fixable due to backwards compatibility.

Microsoft with their IE has been the biggest culprit in this, luckily they've taken Edge in the right direction and has really stepped up their game these last two years, but now Safari is at a crossroads and may just end up like the old IE if they take the wrong path. If only the large browser vendors could really, really get together and give us web developers a consistent environment without bullshit. Take Apple Safari for example, keeping Service Worker "under consideration" because the features it brings rivals native mobile apps which they make a lot of money from while all other "large" browser vendors has already started implementing the feature, some even ship it already.

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

#18
post #3

I think it got particularly crazy around the creation of npm/node: https://www.commitstrip.com/en/2016/05/10/a-moment-of-nostal... . This was an enabler for complexity to spiral out of control.

I give it to you: npm is a Gran Bazaar mostly selling crap....but Node is brilliant.

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

#19
All these dozens of disparate ad-hoc web technologies and defacto standards are built like a tower of babel on quicksand. No one truly understands all of it. Without View Source and a healthy dose of copying/stealing no one could get any of it to function. Yet in spite of all of this - this web thing somehow works. The only takeaway is to not bother trying to grok all of it. It would only lead to madness and missed deadlines. Just try to avoid frameworks that emphasize purity of design over pragmatism and instead use a workflow that gets you to the finish line.

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

#20

Web programming has never been wholly controlled by a platform owner. I think that's the main difference from any traditional environment that might come to mind; Unix has its traditions, so do Windows and Mac. This is even the case for mobile. In the years when IE was the only browser anyone used, one could also hope to come to grips with its buggy CSS implementation, but that is past too, and in the meantime the ba…

I'm not sure if the bazaar really applies. In the bazaar you have a range of options and can pick and choose what suits you, but on the web we are seemingly stuck on a few base tools (html js, css) that have so much momentum that the will never go away. You don't get a restriction like that on the server or desktop side.
Post reply on HN