7 ms·
Stop programming like a bunch of clowns!!! Don't build websites on top of a million libraries which you don't need and put it in some container and host it in
by aaccount 6y ago
Stop programming like a bunch of clowns!!!
Don't build websites on top of a million libraries which you don't need and put it in some container and host it in the cloud while using as much of the cloud service providers tools.
Build as much as possible from scratch and host it close to metal as possible.
- swiley 6y agoSeriously! For the "client side": The web is responsive by default, making it not friendly to screen readers/phones takes extra work. Semantic forms are great. You're writing a machine readable description of an API that auto generates a GUI. Theme it with some CSS and leave it alone. No one likes downloading piles of javascript to load text documents.
- masswerk 6y ago> The web is responsive by default, making it not friendly to screen readers/phones takes extra work Oh, the irony of the iPhone. When it was launched, its unique proposition was that it was the only phone which could render normal webpages, while previously specially tuned XHTML code and handheld stylesheets were required. And what did we do with this? We started the era of specially crafted mobile sites and mobile first.
- paulryanrogers 6y agoIIRC it was more because of screen size and finger input. I had a Treo before an Iphone and the stylis made liquid/responsive sites very usable without huge buttons. Still, both then and now mobile requires reducing options to avoid lots of zooming and panning. And less JS is better.
- jordache 6y agoYou are not getting it. Cross device compatibility is not a simplistic notion that the desktop ui just needs to reflow and scale down into a smaller screen. Properly done multi device support will recognize different “job to be done” in mobile vs desktop. If approached the problem space in this way, then you end up with different ui in mobile than desktop, for many applications
- masswerk 6y agoMind that the USP of the iPhone was its ability to render a view into a full-size desktop view with full Webkit capabilities, which was meant to put an end to any special handheld formats like WAP and XHTML + handheld CSS for mobile. If it had been meant to require a dedicated skin, chances are that Apple would have specified a special multitouch media attribute for dedicated stylesheets. Whether rendering desktop views on mobile would have been ideal under the aspects of usability and/or UX, is a different question. (However, I think, developments were originally more driven by the want for a "native UI" experience.) Regarding "not just a simplistic reflow", if you take this notion seriously, this applies not only to the presentation of content, but also to the content itself. Notably, shorter, less "baroque" copy text for handheld devices, but richer text and more related or in-depth information on the desktop. However, I've never seen purposefully redacted content like this, targeting multiple platforms. Instead, it's mobile first also for content on the desktop, where often a mere couple of paragraphs are meant to be a full article or blog post.
- jordache 6y ago>I've never seen purposefully redacted content like this, targeting multiple platforms. When your user base consist of different personas, doing distinctly different job to be done, one option is to tailor the application for each scenario. Depending on the consequence of the app and the business need, ideal UX needs for each persona may no longer seem superficial to ignore. A normalized experience may be a show stopper. In that case it's worth it to invest in building/maintaining different view / functionalities, specific for the user agent type. If you go even further in this direction, then you invest in building a mobile app, to suite the use case of mobile and desktop.
- krageon 6y ago> Stop programming like a bunch of clowns!!! This was my first thought too. It's frustrating to see these questions when the answer is blindingly obvious to someone who takes even a small amount of time to do research. It makes them read as if they're all asked in bad faith, of which I am not convinced they are not.
- bauerd 6y agoClearly the (blindingly obvious) answer is that this industry is run by clowns. With the mere exception of some enlightened guys on HN. Incredible what high horse some people here ride on.
- lmilcin 6y agoExcept it is not "run by". It is caused by collective stupidity inherent to any group of random people that causes collectively suboptimal choices to be optimal from the point of any single group member. With all the processing power and bandwidth I still feel the Web is much poorer than it was 20 years ago.
- deleted 6y ago[deleted]
- krageon 6y agoI do not think "the industry" is run by clowns. There is just a toxic subset of the community that writes a lot of bad software and refuses to accept that that could have been avoided by performing some actual study. That's not a high horse, it's just having an interest in what you do and doing the best that you possibly can.
- joshjdr 6y agoI might be in the minority here, but I appreciate your toning down the hostility of this discussion. I believe if per the article, "the entire network already consumes 10% of global electricity production, with data traffic doubling roughly every two years" the article/share seems like a valid question/concern for the community. Do designers contribute to the problem? Surely yes. Should "all designers should learn to code"? I don't think so. Besides seeming impractical, it sounds like a security nightmare. Perhaps only coders should be allowed to design? /s Seriously though, designers should know that an incredible UI that loads slow is still a bad UX. They should care about this- even if they're not trying to save the world. I'm curious what this means in context: "who the industry is run by" (i.e. Google?) and also the referenced "toxic subset" (i.e. Advertisers, Bitcoin miners?) I know where I'm posting this (please don't hit me!) but I kind of wish this didn't provoke such a "developers vs everyone else" reaction. As right as the accusations of clownery and bad acting may be, honestly it just feels like a blaming the user. One thing I haven't seen brought up in other comments (if it has I'm sorry if I missed it) is javascript timer throttling. I think this kind of solution is really positive because it has minimal negative impact on user, doesn't require a million websites to change, and saves a ton of energy. https://docs.google.com/document/d/1sd9EVERCtRWKvnJXnP3iZ83fM3FLwDbjiyfMkaKWEYk/edit# https://docs.google.com/document/d/1sd9EVERCtRWKvnJXnP3iZ83f... Can we engineer more solutions like that?
- lmilcin 6y agoWhile I share the sentiment I don't think this is going to help. One of course wonders what else my computer is doing to render a piece of text/graphics I want to read/view and if all that is necessary and why I have 1Gbit Internet and still feel like I was on modem (sans blinking lights, linkup sounds and phone bills). Unfortunately, the person or people that will try more energy efficient client side will loose to ones that will use the newly gained performance to waste it on another cool effect.
- jamil7 6y ago> Stop programming like a bunch of clowns!!! This would be great but it won't happen without monetary or regulatory intervention. The industry is hell bent on driving the cost of software to zero. Security, performance and accessibility are always the last to see any investment. The baseline seems to be as long as your website doesn't piss people off completely then it's enough.
- 411111111111111 6y ago> Don't build websites on top of a million libraries which you don't need and put it in some container and host it in the cloud while using as much of the cloud service providers tools. > Build as much as possible from scratch and host it close to metal as possible. Citation needed. Running your site in a container on a shared host will be significantly more energy efficient then running hardware. It's silly to claim otherwise. And the idea that the quantity of js libraries before compile affects energy consumption is a stretch as well. The issue is how many computations you do at runtime. That is completely unrelated to third party libraries.
- bildung 6y agoI think the main problem is that most computation happens at the user's browser - the different types of hosting will barely play a role in the overall footprint of a website. Edit: For an example, look at the app store for the oculus quest: https://www.oculus.com/experiences/quest/ https://www.oculus.com/experiences/quest/ - That site is ridiculously slow for what it actually does: Static text + images. And the current state already is way better than before! Almost all content is either static (the apps) or cachable (the ratings). There are barely 100 apps in the store, so this isn't exactly a case where there have to be hot updates every few seconds. This should be rendered server-side, cached, and then sent to the users as static html. The world could save literally tons of CO2 with proper design here.
- dr-detroit 6y agoYour opinions are flat out wrong. Unless your market is in Japan you don't market your product with html1.0
- jagged-chisel 6y ago> The issue is how many computations you do at runtime. That is completely unrelated to third party libraries. Citation needed. Do you have some linkable metrics on how all those JS libs are reorganized and optimized (similar to how a compiler might do it on native code) such that the call to overlay or animate on a web page doesn't call through a sizable portion of those libs on every call?
- krisgenre 6y ago>> host it close to metal as possible Wouldn't it be less efficient to host something myself than to use some cloud provider?
- amiga-workbench 6y agoI moved all my stuff to a home server, it pulls about 45W and costs me roughly £5/m in electricity costs. It will take about 2 years for me to recoup the hardware costs with savings over what I was previously paying for a VPS. The one major improvement over renting a VPS is that I've now got a large RAID array with many terrabytes of storage, where I previously only had a few hundred gig to play with.
- julianlam 6y agoYou're saving money, but this doesn't necessarily translate to energy savings, the excess you were paying was overhead for the VPS company. While a server in a typical DC would use way more power than a home system, it's also theoretically possible that they are running at near 100% load, meaning all that energy is used doing SOMETHING, whereas your home PC is burning watts at idle.
- pdimitar 6y agoYou can use a single bare-metal server for 20+ services. I've done it and it's a solid setup (with minor exceptions). Plus, that's what cloud providers do anyway.
- masswerk 6y agoMind that "programming like a bunch of clowns" isn't about the programmer's convenience, but all about a replaceable work force. It allows tech companies to manage without owning any specific knowhow (it's all "in the stack") and allows them to hire a bunch of programmers to fiddle around a bit in the first year and then a totally unrelated bunch in the next year for finalizing things ("the app").
- masswerk 6y agoThe irony here is that programming languages and their native APIs are (apparently) not considered part of the stack™ and must be kept away as far as possible from the hands of developers, since this introduces the danger of injecting knowhow.
- jordache 6y agoProgramming languages are general purpose. When you build a specific solution, why opt for a general purpose raw language, when a framework provides a richer set of purpose specific tools? Why get al dogmatic about programming purity? When you don’t intent to use the language’s raw api to that an extend, then your stack is more represented by the framework, rather than language. Not discounting the necessity of mastering the language to be a strong engineer. However the framework being used is just as relevant, if not more so, than the underlying language
- ThrowawayR2 6y ago> "When you build a specific solution, why opt for a general purpose raw language, when a framework provides a richer set of purpose specific tools?" A web framework is often a one-size-fits-all solution designed to handle a variety of use cases, some of which conflict with each other. Like a swiss army knife, it does everything but none of them particularly well.
- deleted 6y ago[deleted]
- MispelledToyota 6y agodoes this actually move the needle? it sounds a bit like trying to avoid braking so much in one's car as a proposed solution to curbing carbon emissions. maybe it helps in some sense but how much, actually?
- lhorie 6y agoPlaying devil's advocate: use every library under the sun even when you don't need, and make websites so unbearably slow that getting off the web and going for a walk becomes an attractive option again. More realistically, maybe don't cherrypick ideas to make up correlations that don't really make sense, and instead do actual environmentally net positive things like buying less stuff or donating
- amiga-workbench 6y agoBloat accelerationism? I suggest we start packing email to the gills with Javascript next.
- pcf 6y agoThat first paragraph was exactly what I was thinking as well. :)
- zoobab 6y agoBan Javascript, program server side and output simple HTML and CSS.
- krapp 6y agoDo you have any data that shows rendering server side uses less energy than rendering client side?
- SPBS 6y ago> Build as much as possible from scratch and host it close to metal as possible. come on guys this is obviously sarcasm
- jordache 6y agoNone of those optimizations matter in the context of energy efficiency, to make a material difference for global warming
- domador 6y agoOne specific, general recommendation: add pagination and browsing by date/cost to sites, instead of just relying on infinite scrolling. I'm often interested in older/cheaper/less-popular articles/products/bits of information, but I'm often forced to scroll eternally or perform several clueless searches to find what I want to find. I can only imagine the extra, useless database queries infinite scrolling requires... not to mention how much and how thoroughly I hate it as a user.