Ask HN: Is web programming a series of hacks on hacks?
581–590 of 688 posts
Re: Ask HN: Is web programming a series of hacks on hacks?
#582Earlier quoted context omitted.
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?
#583Re: Ask HN: Is web programming a series of hacks on hacks?
#584Earlier quoted context omitted.
The web was conceived for hypertext and doesn't do a bad job of it. The actual problem is that people took something that was always intended for displaying (illustrated but mainly text) documents that happened to have clickable words that would display other documents, and tried to make it do desktop-style applications too. We've been hammering square pegs into round holes ever since. And the infuriating thing is we…
That's exactly what I was going to say. It was never meant for all of this in the first place. We've spent millions of man-hours trying to turn a squirrel into a dinosaur. Worse yet, it's becoming more and more difficult to simply read the freaking web as a series of documents , which was the entire purpose in the first place. There's TOS, pages that don't work without JS, and so on. I fully expect publishers to try…
And worst of all - we succeeded.
Re: Ask HN: Is web programming a series of hacks on hacks?
#585Earlier 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) .…
I remember being warned about engineers that get used to using frameworks too often. Their ability to work outside of it eventually suffers. We might need less abstraction, and let the engineers work that out.
Re: Ask HN: Is web programming a series of hacks on hacks?
#586Honestly, pretty much everything is hacks on hacks. As a kernel hacker, hardware is hacks, firmware is hacks, kernel is hacks, it's turtles all the way down. The fact that anything works at all is a miracle. Some systems are better than others, but everything has some duct tape somewhere. Designs and algorithms are abstract, the implementation is never as nice. We as engineers have to make the best of what we have, a…
Re: Ask HN: Is web programming a series of hacks on hacks?
#587Yes. 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) .…
If you're going to call HTML a programming language than when you talk about server-side work you must include XML as a programming language (I see markup far different, more simplistic than a programming language). CSS is simply properties applied to the same markup but I digress; I could see the argument argued either way.
Regardless, you can minimize what you're saying down to just HTML, CSS and a server-side language. You can make good applications without a single line of JavaScript and depending on your purpose you may not need persistent storage in the backend. In fact you can write an entire web application with just HTML, CSS and JS if you want and have no backend (beyond a CDN unless you want to be super pedantic and call that a "backend" but I think that would exceptionally overstate what it does).
> And then come the (leaky) abstractions on top of them:
God, you don't need any of these. JS isn't that bad anymore. It's actually kinda nice in some ways. Same with CSS it's rather easy and there are far lighter projects than bootstrap if you want to do minimal stuff, quickly (but there isn't any reason you can't look at tutorials if you're new and get a CSS layout working pretty quickly sans framework).
For server side this depends on your language. Node has a great built in http capability that many seem to ignore (it's quite easy to write your own web server using it; in fact it doesn't take much more code than plugging into express or hapi). Alternatively other languages have even better, built-in ways of handling server-side logic.
> ...and often...
Ugh, SQL is so easy I don't understand why people even bother with these. Every single time I've been involved in a team that used these abstractions it worked great initially and then steered us off a cliff in the end.
Just don't. RDMS is easy.
Re: Ask HN: Is web programming a series of hacks on hacks?
#588Earlier quoted context omitted.
I think your use of "minimum" is wrong here. If you're using React running on Node and Webpack as your task-runner you just need Javascript and that's it. Node allows you to run isomorphic JavaScript that runs on both your server side and client side (to ensure you don't end up with the Angular-style skeleton pages coming from the server), You can pick a nice ORM (like sequelize) to abstract away SQL, and Webpack all…
> Node allows you to run isomorphic JavaScript that runs on both your server side and client side But then you're writing JavaScript on the server side, and I think I'd rather shove live weasels down my trousers than write one line more of JavaScript than I absolutely must.
Re: Ask HN: Is web programming a series of hacks on hacks?
#589Yes. 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) .…
That comes at a cost, namely when someone has a special requirement, then that person has to dig very deep into your framework.
It's almost the same like Java GWT or Vaddin. If you stick to the recommended way, everything is just fine, but don't ever try to solve some exceptional problem because then you are in a world of pain where it's just smarter to embrace JS and CSS.
The problem is, abstracting things away doesn't make them disappear, because WEB DEVELOPMENT IS BROKEN BY DESIGN.
I never used your app nor do I know how it behaves, this is just general speaking about the scenario when people try to 'abstract' things away, I hope you understand that I'm not speaking about your app but the idea of hiding things.
The sames goes for all those frameworks who tried to hide HTTP ( I'm looking at you asp.net and some older Java frameworks ), this lead to a pile of shit, newer frameworks accept the fact that we use HTTP and we got less problems by doing that.
Since you mentioned ORM's, it's called the Vietnam of computer science[0], everyone tries to hide SQL, if you are doing some basic CRUD applications everything is fine but if you need more sophisticated queries you are already fighting the ORM which is supposed to help you and not making you developer life miserable, we don't need another DSL for databases, SQL is already the best language to make queries.
I guess, what I'm trying to point out here is that I use those simple tools because I know my way around, I know how to debug it which wouldn't be possible with some abstraction.
[0] https://blog.codinghorror.com/object-relational-mapping-is-t...
Re: Ask HN: Is web programming a series of hacks on hacks?
#590Earlier quoted context omitted.
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.
I know a great coder who refuses to start personal projects because he can't find UI libraries which are: 1. Cross-platform across mac-win-linux-android-ios 2. Built for a compiled language such as pascal or C++ 3. Built to use native controls 4. Integrated to registered libraries through an interface like activex 5. Accompanied by a UI builder with design-time and runtime states and component builders. 6. Easily int…