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.
Ask HN: Is web programming a series of hacks on hacks?
191–200 of 688 posts
Re: Ask HN: Is web programming a series of hacks on hacks?
#192Earlier quoted context omitted.
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…
IMO react is a big step backwards. Adding an abstraction layer almost never produces a better result, it just makes things more complicated.
Proper abstractions are supposed to compress large bundles of information into a smaller set of [broad] concepts, which then imply all the large sets of details they're abstracting away. High level languages are pretty good abstractions on top of raw assembly code for example, because you don't have to think about what the assembly for your java code is going to look like, it's already implied that it's going to work.
As for react, I'm also not a huge fan, but that's because it's still a relatively leaky abstraction that comes with a lot of the same baggage as plain js+html+css. Especially when compared to a fuller abstraction like Elm[0]. But even that's still lacking a complete abstraction of html/css stuff. And that's not even taking the leaky abstractions on the backend side of the equation into account:
http://haskell-web.blogspot.com/2014/04/towards-deeper-integ...
Re: Ask HN: Is web programming a series of hacks on hacks?
#193The internet as a whole is one giant, hacked together system. There's no doubt that, with a magic reset button, we could build an internet that is vastly more secure, efficient and reliable than the current one. But that's the nature of an emergent, distributed technology like the internet. Once the concept was born we ran with what we had, and once adoption hit a certain point it became impossible to start over agai…
Internet Protocol is being upgraded to IPv6 (any decade now), HTTP/2 is replacing the old HTTP 1.x (thanks SPDY!), TLS has replaced SSL, brotli is stepping up for gzip/deflate. Who knows, maybe QUIC[1] will be next.
Even on the programming side we have new languages entering the fray. Javascript has recently gotten huge upgrades, and WebAssembly has a lot of momentum behind it as well.
So on almost all layers we're able to swap in new protocols or technologies and everything still continues to function. It's actually a very robust system when you think about it.
Still, there are a few sore spots. DNS is in need of a redesign in my opinion. It wouldn't be impossible to replace, but not easy either.
A number of concepts in web design (such as "document flow") probably aren't going away either. But newer technologies (canvas, WebGL? who knows) may eventually replace the traditional DOM model.
Re: Ask HN: Is web programming a series of hacks on hacks?
#194Earlier quoted context omitted.
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.
Thank you! So many people here blaming the tools for bad software when people have been using horrible tools to write good software for decades. I think one major part of why React + Redux are successful is because they sort of force you into a way of thinking that results in a better creative process and ends with better code.
That's the first time I've heard that about React, can you elaborate?
Re: Ask HN: Is web programming a series of hacks on hacks?
#195Earlier 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
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/Tk is the most easiest GUI toolkit ever, too bad the resulting UI does not look professional.
Re: Ask HN: Is web programming a series of hacks on hacks?
#196I think what saddens me with web programming, is constant rewrites of the same old projects, that pretty much do the same thing. As a community we'd be better to focus on a few core APIs like a web shop or a booking app. A church or school could have a common underlying built platform. Where functions of outfits are unified, we could drop in one size fits all solutions. In England (UK) you have about 24 thousand scho…
Why do you need any new APIs for that? Sounds like you just need a shared template.
But yes, good templates go a long way.
Re: Ask HN: Is web programming a series of hacks on hacks?
#197Earlier 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.
https://www.commitstrip.com/en/2016/07/11/a-bad-workman-blam...
Jokes aside, the history of mathematics is a pretty worthwhile subject to study to truly appreciate the importance and implications of tools (or mathematical discoveries in this case). There's a reason why it took humans 2000 years after Euclid first wrote his 'Elements' to discover non-euclidean geometry...
Re: Ask HN: Is web programming a series of hacks on hacks?
#198Yes. 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…
The much higher complexity requires new ways of thinking and methodologies.
BEM for example is one such approach which helps with scaling.
Re: Ask HN: Is web programming a series of hacks on hacks?
#199Now the Y might be webpack/React, tomorrow it might me something else. Whoever says React gives them a consistent way of doing things, they would have said the same thing to Backbone/Angular/ember/bower/grunt/less/sass/precss/postcss/ .............
Ultimately, it is about controlling your mindset and navigating through this onslaught of tools/frameworks in the front end ecosystem.
Re: Ask HN: Is web programming a series of hacks on hacks?
#200It's been ruined by a generation of developers who believe it a good idea to build stateful applications on top of an inherently stateless document-centric infrastructure.
Just look at how many JS frameworks which have a "router" component. So rather than navigating documents you end up faking that we navigate documents. Wonder why things are getting so hard?
Look at how many have difficulties in distinguishing what REST is supposed to be and RPC. Both have a place - but many look for the "one" solution and ends up using something they call REST in a RPC style.