Live data from Hacker News

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

news.ycombinator.com

281–290 of 688 posts

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

#281

Yes (simple answer). but really, its less "hacks on hacks" and more "unneeded abstractions on unneeded abstractions". The inefficiency of modern web-stacks continues to absolutely astound me. When people tout the 'efficiency' of language A against the equivalent C as being "less than 2x"... jeez... that means you're throwing away double the power that you need to. That means you've got double the number of air-condit…

...and half the people.

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

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

The web lets you reach a large audience in a way nothing else can. You have to get over yourself about the tools not being elegant, and make sure the thing you're using the flawed tools for is worth the aggravation.

[deleted]

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

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

I think you mean write-only.

It doesn't help that the inclination to minify and bundle CSS and JS makes them somewhat impervious to organization. Sourcemaps are supposed to help with that, or so I've heard... they are another of those things that I've not seen work reliably.

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

#284

Earlier quoted context omitted.

I was building GUIs in pure Win32, with my own C++ wrapper classes for Win32 and later with OWL and MFC. I'd say building Win32 GUIs in C++ was easier than current Web stack. Same with Java AWT and Swing libraries. Objective C / Cocoa is more complex - never really managed to learn it beyond basic stuff, maybe with Swift it's easier. Elm is close to those desktop GUI frameworks, but functional instead of OO. But Tcl/…

But none of your examples are as cross system portable and "native/normal feel" as writing an app that only works in chrome/chromium. For the decades leading up to this stage cross system GUIs with a few simple library dependencies have been an unachieved "easy" task. Web remains as frustrating as ever because now we need it to work on all non portable browsers even on platforms that supports better ones. Then we wan…

Why is native/normal feel the end-all-be-all of UI systems? I've never quite understood why this is so desirable. Or why the answer seems to be using a shoddy UI system stuffed in a browser frame.

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

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

CSS is not impossible to manage if you keep things modular and avoid specificity issue (basically, use something like BEM and pretend the "C" in "CSS" doesn't exist). re: HTML: layout and positioning is the domain of CSS, not HTML. HTML's purpose is to provide semantic structure to the content and non-semantic styling hooks (divs and classes) for CSS. It's true that layout has sucked for a long time (more accurately,…

We use BEM and Sass at work and our CSS is still an unwieldy mess.

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

#287
true, unless you look at incredible new ways of UI design like React and its Clojurescript counterpart, Om and others. FRP and similar concepts has so dramatically changed how I think about software design that I now use it for most of my native C++ projects as well, or at least, I get as close to it as I can.

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

#288
post #69

Earlier quoted context omitted.

I don't understand the problem with those modules. Just because you can do something one way, doesn't mean you shouldn't add an easier and better to understand way. The intention of `string.endsWith('Blah')` is easier to understand then `string.indexOf('Blah') === string.length - 4`. Java String has both `indexOf` and `startsWith`, do you think that is also problematic?

It's added complexity because it's not std lib. Importing an entire module just to accomplish something you could easily do with 1 line of code. I'm not arguing that javascript shouldn't have `startsWith`, just saying there's a large overhead associated for a relatively minor performance increase. Thus going back to the debate about proper engineering. Just my 2 cents, feel free to ignore :)

But it's not "An entire module", it could be as simple as one line.

I know people like to go on about how every module increases complexity by some massive amount, and how you are relying on X number of other developers and systems that can break now, but the NPM/javascript way is the unix philosophy taken to the extreme. Lots of small modules, extremely easy to use and install, that all do one thing and do it well.

There is no overhead to using a small module. It takes seconds to install, in some cases adds literally bytes to the output, and can take care of a lot of hidden complexity like defaulting to using the stdlib version if it exists, and being fully tested (because let's be honest, you aren't going to write 15 tests for a string-ends-with function).

Also, it's not as simple as 1 line of code. Look at the String.prototype.endsWith library. Look at the edge cases it supports, look at the way it does the search to be efficient. your one-liner might seem to work on the surface, but when you use it in a .apply it might blow up, when you try to get it to run on IE8 for some reason nothing works, when you go to run it on a million strings, the whole system bogs down.

There are benefits to using modules where someone has spent the time and effort finding and fixing those edge cases.

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

#289

Earlier quoted context omitted.

I was building GUIs in pure Win32, with my own C++ wrapper classes for Win32 and later with OWL and MFC. I'd say building Win32 GUIs in C++ was easier than current Web stack. Same with Java AWT and Swing libraries. Objective C / Cocoa is more complex - never really managed to learn it beyond basic stuff, maybe with Swift it's easier. Elm is close to those desktop GUI frameworks, but functional instead of OO. But Tcl/…

Qt is easy with Qt Designer and looks professional.

I wouldn't call Qt Designer "easy" in any sense of the word, but possibly that is because I have found how good that sort of tool can be, and it is called Interface Builder (Xcode), which isn't perfect, but should be what Designer strives for.

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

#290
post #62
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…

Java had another big problem. It couldn't interact with DOM properly. I mean, it could. But it was terribly hackish and anyways involved Javascript. So you had one of two options: 1. Write an HTML webpage or 2. Write an empty webpage with a large Java applet in the center, which would be function as a "virtual terminal". Both are ugly. That's why Sun created Java Web Start (IIRC), for complicated Java applications wh…

Java could have been made to have good DOM bindings, I don't remember anyone asking for them.
Post reply on HN