Live data from Hacker News

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

news.ycombinator.com

91–100 of 688 posts

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

#91
I think one reason is because there are two kinds of web development.

Website dev and web app dev.

I don't think they are mutually exclusive, but website dev is about styling and navigating into documents. It's stateless and the variety of content is unlimited. I don't think there is a "problem" here, it works, has good tools for what it has to do.

On the other hand, there is web app dev, and app dev is messy at present. My guess is that is lacks governance, it's not necessarily a bad thing, but it means things are taking time and must prove themselves to gain traction and become standards.

But yeah, doing something like a calendar input, with really perfect behavior, where you can navigate the calendar with the keyboard if focused, that is accessible, works on all device… is insanely hard and not solved by the platform yet, so everybody try something different.

Also, a lot of people that are more authors than programmers are "hacking" "app like" functionalities into their website, and it can get messy very quickly. No pun intended.

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

#92
post #90
post #85

Earlier quoted context omitted.

Ok, this is really weird, why did your link forward me to this NSFW page until i copied the URL manually into the address bar (Again, NOT safe for work): http://imgur.com/32R3qLv Hovering showed the correct jwz url as well. Is that your or JWZ's doing? JWZ's page has even retained the imgur favicon (chrome, mac).

Because JWZ doesn't like HN and thus has decided to childishly redirect all traffic coming from HN to this.

Thought so! Thanks. Guess the web is broken after all.

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

#93
Everything is simple.

There is just a lot of it.

That's pretty much my view of internet and web technologies over time. It all did work, it all continues to work, to address security/performance/convenience we collectively add a few more little simple features/workarounds/quirks.

But ultimately the perception of the hackery of it all really stems from:

1. Quantity. There's a lot of stuff, it all works to some definition of "works" and there is typically more than one way of doing something.

2. Quality. When things are made, they are made for that time. As time goes by we can more clearly see the ambiguity of something, or the incompleteness of a feature, but by then it's too late and it's set in stone, our fix is usually to add something new (see #1).

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

#94
post #14

I don't know what are you referring to as hack on top of hacks? There are tons of big open source and closed source web based project that are easy to follow what's going on and everything is well structured. Look at VSCode code base [1] or if you're a Googler look at Google Photos source code. People look at React and Webpack and all these small little modules that people put together to make something work and thin…

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.

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

#95
Web development is like the scene from Indiana Jones and the Last Crusade. You get to pick your poison and there are a lot of people who will choose poorly. Doesn't matter how good you are, chances are, on occasion, you'll choose poorly as well.

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.

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

#96
post #69

While I hate css, sort of like js and hate html layout, a lot of the problems come from accessibility. In that, it's so accessible anyone can do "web". This means you get non-engineers with no engineering background put into situations where thinking about things from an engineering perspective would really help and might produce actual workable solutions. Like wtf is this: https://www.npmjs.com/package/string.protot…

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 :)

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

#97
I'm not sure what you mean by "a new mental paradigm", the web is a complex system you cannot expect it to be completely reducible to a few simple constructs. You generalize the word backend programming as if it's just one thing. There are hundreds of ways to program a backend system, you can choose from .NET to C/C++ and rarely they are hack-free as you suggest that's not even to mention the platforms they run on like for example BSD, Unix is a series of hacks on top of others, there are often 1000s of different ways to do the same thing.

I simply don't buy your point that "backend" environments are somehow more elegant to work in and easier to reason about than the web.

You still have to decide which backend platform you choose and each has its own series of convoluted hacks associated with it.

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

#98
post #88
post #62

Earlier quoted context omitted.

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…

Web start has to be one of the best web technologies that almost no one ever heard of. It had most of the benefits of the web for LOB apps, and most consumer apps are probably better off not being web based in the first place.

Right, that too. For example, the amount of work that every serious web app puts into implementing some kind of hierarchical system for storing, naming and accessing objects and then allowing users to share them with each other is astonishing. If only there was a way to have the operating system provide some kind of similar abstraction to the users!

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

#99
post #82
post #67

Earlier quoted context omitted.

Microsoft then had a near complete monopoly on anything computers. If you remember how Mozilla had to include all the IE6 mistakes all web programmers assumed were standard? And yes, back then definitely Microsoft was in EEE mode. They would do anything they possibly could do to keep the internet Windows only

They settled in 2001. OS X was released same year, signaling the beginning of the end of that monopoly.

OSX had little market share.

I mean, it still has a relatively small market.

If you can save a week's work and make your site work on 97% of computers, or spend another week to get it to 99%, what would you do?

And in truth, Mozilla/Opera/other HTML browsers had around 10 percent of marketshare even during the heydays of IE6's reign, and yet plenty of websites only worked on IE6.

Would programmers care about those five percent of Mac users?

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

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

No, the security came much later, by then the ship was already abandoned. Also, in many ways, the security of Java Applets was actually better than ActionScript. For example, it could actually contain security contexts within one Applet. In ActionScript, every line of code had access to everything, which is a huge engineering flaw. Exception to this are web workers, but their usability is very low.
Post reply on HN