Ask HN: Is web programming a series of hacks on hacks?
822 pointsLately I've been doing some web development on a fairly long-lived and large code-base, but I'm finding it MUCH harder to wrap my head around than application development ever was. I think my difficulty is that the whole environment feels so... HACKISH... everything is a horrible hack on top of a horrible hack. (yes, I'm familiar with the history, been using the Internet since before the web) I'm not even talking about the fact that everything has to be stateless, in fact I develop desktop apps as stateless even driven UIs as well, but just the fact that it really feels like there's no consistent way to do anything, there are 1000 different frameworks, all with their own way of doing the most basic tasks, and my experience is that they all ... well... suck.
Am I missing something? Is it me resisting change? Is web programming really that bad? Is it really just that I need a new mental paradigm?
Can you recommend any good resources to help me orient my mind to this new way of thinking?
Comments (661) 164 threads
Earlier commentsLooking at how to do something on the web there is a different way to do it in React, Ember, Angular, jQuery UI, Bootstrap, ExtJS, and about 50 more slightly lesser known frameworks. They don't interoperate well at all. Yes it all boils down to HTML / JavaScript in the end so there is always an integration point but try writing a component that integrates well in even 2-3 of frameworks.
Honestly if more people taught solid coding structures and the DOM API (which, yes it's awkward but with the features HTML 5 brought in plus well structured code it's not that bad) you could have a smaller, handful ways of doing something properly and you could even share components far easier.
Granted frameworks are not the only problem. But, in my opinion, they've severely splintered the way the web is developed.
I think it's exciting. It keeps me motivated to learn new things, and really think about the code I'm writing.
We do. The web was supposed to be a content-delivery mechanism not an application-delivery mechanism. The problem is that it was shoehorned into an application-delivery mechanism, and the lines between content and user interface were blurred so much that it delivers neither particularly well any longer.
This quote from Alan Kay sums up my (and OP's) feelings about the web stack:
> The Internet was done so well that most people think of it as a natural resource like the Pacific Ocean, rather than something that was man-made. When was the last time a technology with a scale like that was so error-free? The Web, in comparison, is a joke. The Web was done by amateurs.
I'm not saying the web is great or anything, but it's a little funny to me that people on a site for "hackers" are afraid to get their hands a little dirty. Yes, the web was shorted sight (what technology isn't?) but to me the fact that we're able to use it as an application-delivery system is something to awe at not complain about.
There's no point trying to read and understand every library and framework that comes out. HN has half a dozen interesting ones I skim over each week because what you need to know is what's out there, what's been done, so when you come across a problem you don't have the tools for, you can come back and choose the tool that best fulfills the requirements you have at that moment.
And those requirements will change from project to project. There's no cure-it-all. Expect to switch frameworks or libraries very often. You probably wont have time to learn all the intricacies of a framework before something else is more suitable for your needs.
It's not impossible or required to write bad code and have bad design, but it's easy to shoot yourself in the foot when you don't know what you're doing. You will see lot of bad design and poor code though, there are a lot of coders who are starting out with web development because it's an easy place to start with.
Sometimes you need just a spoon and sometimes you need a fleet of excavators and the hard part is knowing when to use what.
All comments shown.
Couldn't load more comments. Check your connection and try again.