Live data from Hacker News

Don't Roll Your Own

susam.net

81–90 of 128 posts

Re: Don't Roll Your Own

#81
post #70

For most users, link navigation for single page apps is far better than making round trips to servers which the 'traditional' browser would do.

That depends entirely on how much needs to be downloaded for each round trip.

A lean website can work just fine on complete trash connections like GPRS or Comcast without incremental loading. Web developers are not incentivized to make lean websites.

SPAs add unnecessary complexity -> increasing page weight -> making finer grained incremental loading more important -> requiring even more code. It's a self-induced problem.

As a corollary, McMaster Carr is often used as an example of a website that didn't fall into the SPA trap, and customers greatly benefit from that [1]. The front page weighs about 14 MB with all of the images, but the loading experience is great even with network throttling simulating a poor connection. There is a good reason the site has this reputation.

Overengineering is the true root of all evil. Web developers cannot learn that fast enough.

[1]: https://hn.algolia.com/?q=mcmaster+carr

Re: Don't Roll Your Own

#82
> "there is a well-known maxim: Don't roll your own crypto."

Fun fact, this was written shortly after one of the biggest linux vulnerabilities which was caused by a kernel crypto library, presumably to avoid userspaces rewriting their own crypto.

Re: Don't Roll Your Own

#83
post #71

Earlier quoted context omitted.

> WHY javascript code is even allowed to see all these actions of the user? scrolling: used by games, maps, image viewers link navigation: used for client-side routing (youtube/twitch, any website with a chat window) text selection and copy/paste: word processors, spreadsheet editors, forum software, etc. I'm not sure if your question was sincere or if you were trying to say that the web should not support these use…

Yes, you get to the heart of the problem - we turned what started of as a document viewer into a general purpose application platform. Features paramount in a document viewer (broadly, "respect the user's local document viewing preferences") aren't desirable in a general purpose application platform. A large number of companies/web developers don't think of themselves as offering the user a document to view on their…

Management wants you to want to have an experience.

Re: Don't Roll Your Own

#84

Earlier quoted context omitted.

Applications like Google Docs would be impossible without each of the four things you listed being available. We had Google Docs that didn’t roll-your-own for each of the items in that list and it was called Writely and it was absolute dogshit (but super cool for its time) because those limitations were too extreme. And by extension it wouldn’t make sense to have Chromebooks as a category of hardware, because web sof…

> Applications like Google Docs would be impossible without each of the four things you listed being available. I was already in favor of banning it. You don't have to keep trying to convince me. Okay, snark off. But as someone who dislikes the proliferation of "web apps", I'd be perfectly happy to see Google Docs and others die off if it meant we moved back to real, locally run applications.

To the walled garden app stores? On most platforms web is the only uncensored way to deliver apps.

Re: Don't Roll Your Own

#85

Earlier quoted context omitted.

> WHY javascript code is even allowed to see all these actions of the user? scrolling: used by games, maps, image viewers link navigation: used for client-side routing (youtube/twitch, any website with a chat window) text selection and copy/paste: word processors, spreadsheet editors, forum software, etc. I'm not sure if your question was sincere or if you were trying to say that the web should not support these use…

> scrolling: used by games, maps, image viewers Out of curiosity, does anyone like the way Google Maps hijacks scrolling? I use a trackpad. When I scroll, I'd want it to pan around on the map, not zoom in and out (which always feels awful as a scroll action and never stops where I want it to). Click-drag to pan doesn't feel nice. It doesn't really matter anymore, since 99% of maps use is on mobile now, but this was a…

If you mean you prefer pinch/spread for zoom-out/in, I prefer the status quo with trackpad 2-finger scroll for zooming.

Pinching/spreading with index and middle finger feels unergonomic. Using my thumb on the trackpad would also feel unnatural, as would putting my 2 index fingers on the trackpad.

2 finger scroll is something you can "fling" such that the zooming motion continues even as your fingers have been lifted off the trackpad. Trying to "fling" a spread-out motion with your index and middle finger is an awkward motion, and of course in a pinching motion, your fingers would just crash into each other, so you'd have to lift before they crash. Pretty awkward.

On the phone, I often prefer tap then drag up/down (i.e. touch, lift, touch, slide) to zoom in/out with a single finger. It allows me to "fling" the zooming motion so it continues after I've lifted my finger. It makes a phone's interface behave like a trackpad's scrolling-zoom.

Re: Don't Roll Your Own

#86

I find that most datepickers are better than the browser's default. It's a shame that they can't be styled more

I agree. The date range selector used in Google Flights is a near flawless control. The implementation can be done, it’s just hard.

From your perspective. Ask people using non-gregorian calendars.

Re: Don't Roll Your Own

#87
post #71

Earlier quoted context omitted.

Yes, you get to the heart of the problem - we turned what started of as a document viewer into a general purpose application platform. Features paramount in a document viewer (broadly, "respect the user's local document viewing preferences") aren't desirable in a general purpose application platform. A large number of companies/web developers don't think of themselves as offering the user a document to view on their…

Management wants you to want to have an experience.

nobody asked management.

Re: Don't Roll Your Own

#88
post #49
post #30

Earlier quoted context omitted.

Because the web browser was burdened with the role of application host, and not just presentation of static content. There's no going backwards.

this is why the web stack feels like a car held together with duct tape these days. we collectively took the wrong fork in the road and doubled, tripled, and quadrupled down. computing in general is glorious when i feel like im working near computing and then i get to web app stuff and im like.. i dunno. sad. i get why we ended up where we did with web stacks but seriously what a nightmare

It's not a nightmare. It's the most popular gui/document/app platform for a reason. It's complex because it has to cater to many types of usecases. Name one platform that's better. I think people have tried and some might have even succeeded in limited slice of what web can do.

I have strong suspicion that it's exactly because of the “document” history why web is so approachable to creators, why there is “view source” and ultimately why you can hop from simple html blog, to CRUD app, to advanced CAD software.

Re: Don't Roll Your Own

#89

Earlier quoted context omitted.

I agree. The date range selector used in Google Flights is a near flawless control. The implementation can be done, it’s just hard.

From your perspective. Ask people using non-gregorian calendars.

The colonial powers have been saying that forever. You should simply use gregorian calendars. Then your date pocking starts to work.

Re: Don't Roll Your Own

#90

Earlier quoted context omitted.

> WHY javascript code is even allowed to see all these actions of the user? scrolling: used by games, maps, image viewers link navigation: used for client-side routing (youtube/twitch, any website with a chat window) text selection and copy/paste: word processors, spreadsheet editors, forum software, etc. I'm not sure if your question was sincere or if you were trying to say that the web should not support these use…

On the extreme end, a web app can do all of its own rendering in a canvas with WebGL/WebGPU. Some apps do exactly this: Figma, Google Maps, Google Docs. Just to name a few. (edit: Earlier I claimed PDFjs uses canvas, but it does not. I was confusing it with Google Docs [1].) It's a thing you can do. But it is very bad for extensions and extension developers for the same reasons that Java applets, Flash, and Shockwave…

I’m glad the era of Flash games existed. I’m glad it’s now possible to do all the same stuff in standard JS.
Post reply on HN