Live data from Hacker News

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

news.ycombinator.com

141–150 of 688 posts

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

#141
There are billions of dollars made annually that depend on the web being a complicated clusterfuck of spaghetti. It's all about tracking and targeted advertising that wouldn't be possible if a random website couldn't indirectly load a script that indirectly loads a script that loads an image that indirectly drops cookies from a thousand different domains based on a hundred things just sniffed from your browser and the current marketing efforts of thousands of companies bidding for impressions or clicks or whatever.

My pet theory is that commercial politicking is at the heart of everything wrong with the web. Apple, Google, Microsoft, and Mozilla basically sabotaging initiative after initiative for decades trying to fuck each other over in the short term and long term. Like why didn't xhtml catch on, why did IE never support xpath, where did flash go, what happened to silverlight, there are hundreds of "how did we get here?" stories. And I imagine for every minor decision that had far reaching repercussions on web development there was a highly strategic debate at each respective company with high level executives weighing in on technical subjects they had no business weighing in on with shit like "if we support this simple protocol we risk losing our control over this other simple protocol". Basically a bunch of cut throat executives playing statecraft with their browsers.

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

#142

I think it's worth noting that back-end web development is an usually pleasant place. In most other types of programming, many technical decisions are made by the platform and working with tons of legacy cruft is the norm, not the exception. For example, where else can you so freely choose the programming language? Linux Driver? Use C. Mobile App? Java or Swift/Objective-C for Android or iPhone, respectively. GUI App…

Remember MS-DOS also succeeded because of its "strengths" in some very special, narrow sense. In the more ordinary sense, it succeeded in spite of its weakness, but Windows has slowly recovered from that and is now a good system.

The modern web is somewhat the the reverse: it is worse than its progenitor. HTML, HTTP and what would eventually be called ReST were all good ideas and succeeded because (a) they were a good way to put hyperlinked multimedia on the internet and (b) hyperlinked multimedia turned out to be the thing that masses of users wanted.

The subsequent effort to retrofit that and turn it into a zero-install software delivery platform is where all the insane hackery comes from; and the hacks that succeeded didn't have to be good. They are just what worked at the time with some combination of IE, Netscape and Flash.

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

#143

Sometimes I ask myself the question by doing this thought experiment. If we encountered a more advanced sentient species that writes code, would they say "Yeah, we went through that html/css/js phase of development, and in fact all sentient species do so. We got some good mileage out of it, and it was a total hack for a generation (we refer to that time as the lost generation), but it evolved into our current 'System…

That's too easy. We all know that in the ideal world, platform-independent code would travel through the pipes instead of HTML/JS. That code "plug" into an existing architecture in the client side to provide some service or functionality transparently to the user. Why don't we have that? mostly because of security concerns. That's why we can't have nice things.

Javascript is platform-independent code. If you mean something closer to assembly/machine code, then that's exactly what asm.js/WebAssembly is.

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

#145
post #105
post #70

Yes, the web is a very messy place. Maybe a kind of wild west of programming practices? But it's also a place where you can do a lot of things that no one has thought before. There are not many rules and a wide diversity of approaches. The web platform never had many of those approaches (e.g. complex web applications) in mind when it was created. It works somehow, anyhow. It's chaotic, yes, but also flexible and full…

I totally agree you except I do think that the web can mess up the server-side stuff as well. At the core things can be really simple, but then you need to set up SSL, some kind of database and potentially integrate a bunch of different services for things like sending emails, analytics, etc... At that point it is pretty easy to and up with a giant mess. These types of dependencies are not totally necessary but they…

Ok, you're right, and I wasn't completely sure myself when writing this sentence. There are cases (integration of web services, the overall architecture) when some difficulties from the web architecture swap over to the backend.

But wouldn't you have a similar problem if you try to integrate something other than web services, too?

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

#146
post #37

It is scary how most commenters here are missing the point. No, not all programming sucks. Yes, web programming sucks more than other things. No, it doesn't have to be like this. Yes, even web programming was better 10 years ago. No, I don't know how to fix it. Neither do I know exactly where we took the wrong turn. One of my theories is this: had Sun not sued Microsoft over their extensions in JVM, MS would have kep…

I'm sorry but I beg to differ, web programming 10 years ago was a nightmare. It's much better today. It's not web programming that sucks, it's programming with others. I bet most people won't complain much if they got choose what tools they wanted and worked alone. When working with others, different ideas and opinion clash heavily. Programmers are not best known for their awesome communication and the lack of it lea…

> laravel but not not enough php

I haven't used those much, just glanced over a system written in them. But that sounds bizarre: I thought the whole point of PHP was to be bland and mainstream. If you know how to program at all, then what is there to learn about it?

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

#147

I think it's worth noting that back-end web development is an usually pleasant place. In most other types of programming, many technical decisions are made by the platform and working with tons of legacy cruft is the norm, not the exception. For example, where else can you so freely choose the programming language? Linux Driver? Use C. Mobile App? Java or Swift/Objective-C for Android or iPhone, respectively. GUI App…

This is exactly why I've always been puzzled by the urge to move more and more logic to the frontend. In backend development you have a choice of many mature languages, tools and frameworks which are fairly sane. I'll take that environment as the foundation of a web application any day and apply the mania of client-side javascript to it selectively in cases where we need to minimize server roundtrips.

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

#148
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…

This post makes me sad. Javascript, CSS and HTML can all be used powerfully, performantly and in a managed way where anyone can come on board and contribute. Facebook, Google and Microsoft all use the web stack to run huge companies. To broadly paint this web stack that so many people poured countless hours into making, as 'impossible' to use is doing it a great disservice. But hey man, that's just like your opinion.

Javascript, CSS and HTML can all be used powerfully, performantly and in a managed way where anyone can come on board and contribute.

I disagree. Compared with other languages and technologies used for similar purposes, none of JS, CSS or HTML is particularly powerful or efficient, nor do any of them provide particularly good tools for helping new developers get up to speed or co-ordinating large teams working on the same project. I initially wrote a huge set of specific examples to support these claims, but on reflection I'm not sure criticising JS/CSS/HTML in excruciating detail would really advance the discussion here. Suffice it to say that best-in-class programming languages, document preparation software like TeX or high-end DTP applications, and representations like PostScript and PDF, have all been doing everything JS/CSS/HTML can do and much more for a long time.

Facebook, Google and Microsoft all use the web stack to run huge companies.

That's not the whole story, though, is it? For example, both Facebook and Google became successful primarily for the hard problems they've solved on the back end, particularly in terms of scalability. Facebook's main web site is nothing special in general UI terms, and their web-based tools for advertisers are awful. The search engine that took Google into the big leagues was famously extremely simple on the front-end, and while today they also have applications like Google Mail and Docs/Apps/whatever it is called this week in their portfolio, again the front-ends for those are still relatively simple in general UI terms and would probably be unremarkable in any other context.

To broadly paint this web stack that so many people poured countless hours into making, as 'impossible' to use is doing it a great disservice.

I don't see anyone saying it's impossible to use. However, it's probably fair to say that the state of the art in front-end web development is between one and two decades behind the general programming community, and that many relatively inexperienced people working in the web field are slowly but surely learning the same lessons (and repeating the same mistakes, and repeating them again) as the rest of the programming world did before. One of the biggest problems, IMHO, is that quite a few of those people now work for influential businesses like Google and Facebook, which means quite a few even less experienced developers assume they know what they're doing. And that's how you get framework fatigue, left-pad, "living standards", sites and apps written more than a year or two ago no longer working in modern browsers, and other such madness.

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

#149

Earlier quoted context omitted.

Languages don't scale. Systems scale. Without said, Javascript has never really been the language for programming in the large. But make no mistake about it, it's slowly getting there as is evident by huge applications, not just web but even desktop that are being built with it. It's not impossible to refactor. The issue from what I've seen is that people think it as if it's a class based language instead of the prot…

> The issue from what I've seen is that people think it as if it's a class based language instead of the prototypical language that is. This always gets trotted out as the issue. "It's not JavaScript that's bad for building large applications, it's just everyone is using it wrong." Prototype inheritance is even more brittle and hard to follow than class-based inheritance which is why developers, for their own sanity,…

We put people on the moon without benefit of "scalable" languages, we built entire operating systems in C which is notorious for quickly becoming unreadable, and we've somehow built an entire world of content using HTML and CSS.

JavaScript is just a language, and while improvements to it are being made constantly, the biggest obstacle is not the language, nor the way browser makers support it, but the absurdly slow pace of some organizations to update their browsers to something sane.

Pick a language, any language, and then restrict yourself to features only ten years old. That's what JavaScript is like in some cases, but the good news is ten years ago some pretty good things were happening.

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

#150
post #58

Earlier quoted context omitted.

What's sad is the zillions of hours wasted by engineers on an inherently flawed stack. What's sad is how ridiculously complicated it is to create and manage relatively simple UIs. What's sad is an entire generations of programmers growing up and thinking this is normal. Programming is supposed to be about creating platforms for each other so we can continue solving higher (and higher) level problems. This web crap ha…

Yes. Exactly what you said. It bothers me when people think solving broken Javascript problems is a valuable way to spend our civilizations scarce skilled manpower.

Angry Birds and Candy Crush are clearly superior uses of time.
Post reply on HN