13 ms·
A lot of this resonates. I'm not in Antartica, I'm in Beijing, but still struggle with the internet. Being behind the great firewall means using creative approa
by padolsey 2y ago
A lot of this resonates. I'm not in Antartica, I'm in Beijing, but still struggle with the internet. Being behind the great firewall means using creative approaches. VPNs only sometimes work, and each leaves a signature that the firewall's hueristics and ML can eventually catch onto. Even state-mandated ones are 'gently' limited at times of political sensitivity. It all ends up meaning that, even if I get a connection, it's not stable, and it's so painful to sink precious packets into pointless web-app-react-crap roundtrips.
I feel like some devs need to time-travel back to 2005 or something and develop for that era in order to learn how to build things nimbly. In deficit of time travel, if people could just learn to open web tools and use its throttling tool: turn it to 3g, and see if their webapp is resilient. Please!
- arvinsim 2y agoDevs only build for the requirements they are given. You want performance? Then include it in the requirements and give it the necessary time budget in a project.
- sieabahlpark 2y ago[dead]
- j45 2y agoThe amount of complexity to generate HTML/JS is a little staggering sometimes for the majority of simple use cases. Using Facebook level architectures for actually pretty basic needs can be like hitting an ant-sized problem with a sledgehammer and wondering why the sledgehammer is so heavy and awkward to swing for little things.
- watusername 2y ago> It all ends up meaning that, even if I get a connection, it's not stable I feel you, but the experience can actually be very good if you invest a bit of time looking at Shadowsocks/V2Ray and building your own infra.
- tonetegeatinst 2y agoIs tor not viable?
- auggierose 2y agoOr maybe, just get rid of the firewall. I am all for nimble tech, but enabling the Chinese government is not very high on my to-do list.
- padolsey 2y agoWhether you like it or not, over 15% of the world's population lives in China.
- auggierose 2y agoI guess they should fix their government, then.
- padolsey 2y agoWhat an incredibly naive and dismissive thing to say.
- jiggawatts 2y agoIt isn't naive, and isn't dismissive. The problem is the CCP. The only fix is for the people to rise up against them. This doesn't even have to be violent. Most of the former Soviet Block governments fell without any bloodshed. What's the alternative? Wait for Xi to "make his mark on history" in the same way that Putin is doing in Ukraine because it's "naive and dismissive" to even talk about unseating him?
- sitkack 2y ago> Most of the former Soviet Block governments fell without any bloodshed. That was Gorbachev. Most leaders of any country would roll tanks.
- jhonkola 2y agoGorbachev sent the tanks rolling in Lithuania (https://en.wikipedia.org/wiki/January_Events https://en.wikipedia.org/wiki/January_Events).
- kylehotchkiss 2y agoI hear you on frontend-only react. But hopefully the newer React Server Components are helping? They just send HTML over the wire (right?)
- padolsey 2y agoYes, server-rendering definitely helps, though I have suspicions about its compiled outputs still being very heavy. There's also a lot of CSS frameworks that have an inline-first paradigm meaning there's no saving for the browser in downloading a single stylesheet. But I'm not sure about that.
- chrisldgk 2y agoYes, though server side rendering is everything but a new thing in the react world. NextJS, Remix, Astro and many other frameworks and approaches exist (and have done so for at least five years) to make sure pages are small and efficient to load.
- crote 2y agoThe problem isn't in what is being sent over the wire - it's in the request lifecycle. When it comes to static HTML, the browser will just slowly grind along, showing the user what it is doing. It'll incrementally render the response as it comes in. Can't download CSS or images? No big deal, you can still read text. Timeouts? Not a thing. Even if your Javascript framework is rendering HTML chunks on the server, it's still essentially hijacking the entire request. You'll have some button in your app, which fires off a request when clicked. But it's now up to the individual developer to properly implement things like progress bars/spinners, timouts, retries, and all the rest the browser normally handles for you. They never get this right. Often you're stuck with an app which will give absolutely zero feedback on user action, only updating the UI when the response has been received. Request failed? Sorry, gotta F5 that app because you're now stuck in an invalid state!
- MatthiasPortzel 2y agoYep. I’m a JS dev who gets offended when people complain about JS-sites being slower because there’s zero technical reason why interactions should be slower. I honestly suspect a large part of it is that people don’t expect clicking a button to take 300ms and so they feel like the website must be poorly programmed. Whereas if they click a link and it takes 300ms to load a new version of the page they have no ill-will towards the developer because they’re used to 300ms page loads. Both interactions take 300ms but one uses the browser’s native loading UI and the other uses the webpage’s custom loading UI, making the webpage feel slow. This isn’t to exonerate SPAs, but I don’t think it helps to talk about it as a “JavaScript” problem because it’s really a user experience problem.
- geek_at 2y agoSounds like what would benefit you is a HTMX approach to the web.
- tleb_ 2y agoWhat about plain HTML & CSS for all the websites where this approach is sufficient? Then apply HTMX or any other approach for the few websites that are and need to be dynamic.
- sethammons 2y agoThat is exactly what htmx is and does. Everything is rendered server side and sections of the page that you need to be dynamic and respond to clicks to fetch more data have some added attributes
- tleb_ 2y agoI see two differences: (1) the software stack on the server side and (2) I guess there is JS to be sent to the client side for HTMX support(?). Both those things make a difference.
- victorbjorklund 2y agoThe size of HTMX compressed is 10kb and very rarely changes which means it can stay in your cache for a very long time.
- galangalalgol 2y agoI'm embedded so I don't much about web stuff but sometimes I create dashboards to monitor services just for our team, tganks for introducing me to htmx. I do think html+css should be used for anything that is a document or static for longer than a typical view lasts. Arxiv is leaning towards HTML+css vs latex in acknowledgement that paper is no longer how "papers" are read. And on the other end, eBay works really well with no js right up until you get to an item's page, where it breaks. If ebay can work without js, almost anything that isn't monitoring and visualizing constant data (last few minutes of a bid, or telemetry from an embedded sensor) can work without js. I don't understand how amazon.com has gotten so slow and clunky for instance. I have been using wasm and webgpu for visualization, partly to offload any burden from the embedded device to be monitored, but that could always be a third machine. Htmx says it supports websockets, is there a good way to have it eat a stream and plot data as telemetry, or is that time for a new tool?
- devjab 2y agoWe design for slow internet, react is one of the better options for it with ssr, code splitting and http2 push, mixed in with more off-line friendly clients like Tauri. You can also deploy very near people if you work “on the edge”. I’m not necessarily disagreeing with your overall point, but modern JS is actually rather good at dealing with slow internet for server-client “applications”. It’s not necessarily easy to do, and there is almost no online resources that you can base your projects on if you’re a Google/GPT programmer. Part of this is because of the ocean of terrible JS resources online, but a big part of it is also that the organisations which work like this aren’t sharing. We have 0 public resources for the way we work as an example, because why would we hand that info to our competition?
- jiggawatts 2y agoBy far the lightest weight JS framework isn't React, it's no javascript at all. I regularly talk to developers who aren't even aware that this is an option.
- arp242 2y agoWhen used well, JS will improve the experience especially for high-latency low bandwidth users. Not doing full page refreshes for example, or not loading all data at once. So no, "no JS at all" is not "by far the lightest weight" in many cases. This is just uncritically repeating dogma. Even 5K to 20K of JS can significantly increase performance.
- malinens 2y agoI always ask people to give example of real world SPAs where JS is "used well" and nobody could give me an example
- arp242 2y agoFastMail is pretty good; that's my go-to example. However, you don't need to go full SPA. "No JS at all" and "SPA" are not the only options that exist. See my other comment: https://news.ycombinator.com/item?id=40541555 https://news.ycombinator.com/item?id=40541555 Sites like Hacker News, Stack Overflow, old.reddit.com, and many more greatly benefit from JS. I made GoatCounter tons faster with JS as well: rendering 8 charts on the server can be slow. It uses a "hybrid approach" where it renders only the first one on the server, sends the HTML, and then sends the rest later over a websocket. That gives the best of both: fast initial load without too much waiting, and most of the time you don't even notice the rest loads later.
- iforgotpassword 2y agoTried multiple VPNs in China and finally rolled my own obfuscation layer for Wireshark. A quick search revealed there are multiple similar projects on GitHub, but I guess the problem is once they get some visibility, they don't work that well anymore. I'm still getting between 1 and 10mbit/s (mostly depending on time of day) and pretty much no connectivity issues.
- LorenzoGood 2y agoWireguard?
- iforgotpassword 2y agoHaha yes, thanks. I used Wireshark extensively the past days to debug a weird http/2 issue so I guess that messed me up a bit ;)
- LorenzoGood 2y agoI do that too looking stuff up.
- vmfunction 2y ago>A lot of this resonates. I'm not in Antartica, I'm in Beijing, but still struggle with the internet. Not even that, with outer space travel, we all need to build for very slow internet and long latency. Devs do need to time-travel back to 2005.
- andrepd 2y agoI'm sure this is not what you meant but made me lol anyways: sv techbros would sooner plan for "outer space internet" than give a shit about the billions of people with bad internet and/or a phone older than 5 years.
- lukan 2y ago"I feel like some devs need to time-travel back to 2005 or something and develop for that era in order to learn how to build things nimbly." No need to invent time travel, just let them have a working retreat somewhere with only bad mobile connection for a few days.
- hinkley 2y agoA little time with embedded hardware will teach you a few things too.
- KETHERCORTEX 2y agoThere's no need for retreat. Chrome DevTools have "simulate slow connection" button.
- lukan 2y agoYeah - and do they use it? Does it help experiencing them the joy of wanting just a little text information, but having to load loads of other stuff first and your connection timing out? I am afraid to get the full experience, they actually need to have a bad connection.
- atoav 2y agoMy first education was in industrial design, there designers usually have pride in avoiding needless complexity and material waste. Even if I do web services I try to do so with as little moving parts as needed and with huge reliance on trusted and standardized solutions. If see any addition of complexity as a cost that needs to be weighed against the benefits you hope it brings you will automatically end up with a lean and fast application.
- mkroman 2y agoJust put them on a train during work hours! We have really good coverage here but there's congestion and frequent random dropouts, and a lot of apps just don't plan for that at all.
- qingcharles 2y ago
- rpastuszak 2y agoI lived in Shoreditch for 7 years and most of my flats had almost 3G internet speeds. The last one had windows that incidentally acted like a faraday cage. I always test my projects with throttled bandwidth, largely because (just like with a11y) following good practices results in better UX for all users, not just those with poor connectivity. Edit: Another often missed opportunity is building SPAs as offline-first.
- konstantinua00 2y ago[flagged]
- blackhaj7 2y agoLondon internet (and English internet in general) is just so bad. Having lived in lots of countries (mainly developing) it’s embarrassing how bad our internet is in comparison
- CM30 2y agoOh, London is notorious for having... questionable internet speeds in certain areas. It's good if you live in a new build flat/work in a recently constructed office building or you own your own home in a place OpenReach have gotten to yet, but if you live in an apartment building/work in an office building more than 5 or so years old? Yeah, there's a decent chance you'll be stuck with crappy internet as a result. I still remember quite a few of my employers getting frustrated that fibre internet wasn't available for the building they were renting office space in, despite them running a tech company that really needed a good internet connection.
- zerkten 2y ago>> Another often missed opportunity is building SPAs as offline-first. You are going to get so many blank stares at many shops building web apps when suggesting things like this. This kind of consideration doesn't even enter into the minds of many developers in 2024. Few of the available resources in 2024 address it that well for developers coming up in the industry. Back in the early-2000s, I recall these kinds of things being an active discussion point even with work placement students. Now that focus seems to have shifted to developer experience with less consideration on the user. Should developer experience ever weigh higher than user experience?
- Nevolihs 2y agoTbh, developers just need to test their site with existing tools or just try leaving the office. My cellular data reception in Germany in a major city sucks in a lot of spots. I experience sites not loading or breaking every single day.
- LtWorf 2y agodevelopers shouldn't be given those ultra performant machines. They can have a performant build server :D
- joseda-hg 2y agoI live in a well connected city, but my work only pays for other continent based Virtual Machines so most of my projects end up "fast" but latency bound, it's been an interesting exercise of minimizing pointless roundtrips in a technology that expects you to use them for everyting
- jrochkind1 2y agoChrome dev tools offer a "slow 3G" and a "fast 3G". Slow 3G? With fresh cache on "slow 3G", my site _works_, but has 5-8 second page loads. Would you have consider that usable/sufficient, or pretty awful?
- BehindBlueEyes 2y agoIt depends if you are ok with 1/3 to 2/3rds of your visitors bouncing due to loading times and losing 3 to 5x of convertion rate depending on sources...
- jrochkind1 2y agoNo need to be sarcastic. What page load speed at "slow 3G" speeds do you believe is necessary to avoid that? (I work for a non-profit cultural heritage organization, we don't really have "conversions")
- BehindBlueEyes 2y agoI didn't mean this sarcastically, it is a decision and may not apply to all situations. You can see these kinds of differences with just a few seconds difference, ideally I aim to stay under 2s, even on the slowest connection type. 2s is already very long for a user to wait and many will not. Non profits are tricky. You could see volunteer sign ups and donations as conversions. I manage a non profit site as well and unfortunately I don't have a good solution that is both fast and approachable for our staff to use, so we had to make that compromise as well.
- p3rls 2y agoEh, I'm a few miles from NYC and have the misfortune of being a comcast/xfinity customer and my packetloss to my webserver is sometimes so bad it takes a full minute to load pages. I take that time to clean a little, make a coffee, you know sometimes you gotta take a break and breathe. Life has gotten too fast and too busy and we all need a few reminders to slow down and enjoy the view. Thanks xfinity!