My take on this is that backend developers have always been at odds with frontend developers in terms of being given larger salaries than frontend while not having to keep up with new UI technologies and simultaneously downplaying the skills of the front end programmers. So now, when you have to learn about the web platform since you just cannot ignore it anymore, you are feeling pretty overwhelmed, and can't help yo…
The OP was opining that the web stack is hacks built on top of hacks, not that web developers are poorly skilled. They use what's available to them.
Ask HN: Is web programming a series of hacks on hacks?
151–160 of 688 posts
Re: Ask HN: Is web programming a series of hacks on hacks?
#152Earlier quoted context omitted.
String.prototype.endsWith is native [0], it was added as part of ES2015. If you're supporting older platforms, you need to polyfill it. [0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
How well supported is ES6 across browsers? Chrome for sure. Not sure about FF or IE.
Re: Ask HN: Is web programming a series of hacks on hacks?
#153It 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…
Most non-trivial systems require several contributors. 'Professional' means among other things being able to work with others.
"When working with others, different ideas and opinion clash heavily."
Sounds like herding cats. Any complex system should have a technical lead/architect who actually has the authority to say which technologies will be used. It does not mean he shouldn't discuss this with others - but the fact that there is one authority in the end simplifies things.
Re: Ask HN: Is web programming a series of hacks on hacks?
#154All 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 d…
The browser speaks the HTTP protocol to a webserver, and receives primarily HTML. The HTML is styled with CSS and can execute Javascript. Javascript running in a web page uses the DOM (Document Object Model) to interact with the page's HTML.
Javascript bundlers (Browserify, Webpack, etc) let you modularize your code across multiple files and bundle it up into a single output file for browsers to download. Javascript minifiers exist to strip out everything from a Javascript source file that's not strictly necessary to execute it (comments, whitespace, original variable names, etc) in order to make it smaller for download. Various compile-to-javascript systems exist: Babel to let you use upcoming Javascript features, Flow and Typescript to let you use annotations for static typing, emscripten to let you C/C++ on the web, etc.
Like any other popular programming language, there's a healthy ecosystem of libraries for Javascript. There are a lot for algorithms and data structures like any other language, and you also have plenty specifically for adding abstractions to using the DOM. The DOM is definitely usable on its own, but many applications benefit from using abstractions from libraries to interact with the DOM. This isn't very different from the popularity of GUI libraries (Qt, GTK, MFC, wxWidgets, etc) in desktop applications over the raw OS windowing APIs. jQuery provides a fluent API for manipulating sets of elements directly. React provides a system for making modular user interfaces taking some inspiration from functional programming and de-emphasizes manipulating elements.
All of the parts mentioned above were introduced to solve a specific problem. If you understand the problem they were built to solve, then their designs are often intuitive. If you don't currently understand the problem they were built to solve, then (for anything after the 2nd paragraph) you probably haven't hit that problem and often don't need to use them.
Re: Ask HN: Is web programming a series of hacks on hacks?
#155Earlier 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…
Complicated to create UIs? Win32 was complicated. MFC was complicated. GTK is hard HTML and CSS aren't as complex as those. Not even close
Re: Ask HN: Is web programming a series of hacks on hacks?
#156I 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…
You argument boils down to transpiler availability.
Re: Ask HN: Is web programming a series of hacks on hacks?
#157Re: Ask HN: Is web programming a series of hacks on hacks?
#158Earlier quoted context omitted.
Complicated to create UIs? Win32 was complicated. MFC was complicated. GTK is hard HTML and CSS aren't as complex as those. Not even close
You can create controls in WIN32 or MFC that would simply be impossible in HTML for a reasonable level of performance
Re: Ask HN: Is web programming a series of hacks on hacks?
#159Yes. 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…
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…
Re: Ask HN: Is web programming a series of hacks on hacks?
#160Earlier quoted context omitted.
I think the question then becomes: How do I make my code more like VSCode and less like, well, everything else? I'm not sure the answer is as simple as "use typescript".
Using a meta-language like Typescript (if it's appropriate), and writing a sensible number of tests, employing a consistent code style, documenting what you write, and spending time to actually design your software properly is the answer. You can write good software in any language and on any platform. Good code is more about your processes than your choice of tools.