<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ismael Velasco</title>
    <description>The latest articles on DEV Community by Ismael Velasco (@leamsi9).</description>
    <link>https://dev.to/leamsi9</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F873944%2Fac51a88c-b7c2-4b63-9679-da07f952fbad.jpeg</url>
      <title>DEV Community: Ismael Velasco</title>
      <link>https://dev.to/leamsi9</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/leamsi9"/>
    <language>en</language>
    <item>
      <title>How many emissions in a gigabyte of data?</title>
      <dc:creator>Ismael Velasco</dc:creator>
      <pubDate>Sun, 21 Aug 2022 16:31:03 +0000</pubDate>
      <link>https://dev.to/leamsi9/how-many-emissions-in-a-gigabyte-of-data-384d</link>
      <guid>https://dev.to/leamsi9/how-many-emissions-in-a-gigabyte-of-data-384d</guid>
      <description>&lt;h2&gt;
  
  
  The Big Picture
&lt;/h2&gt;

&lt;p&gt;In my post on &lt;a href="https://ismaelvelasco.dev/could-asyncapi-make-a-dent-on-climate-change"&gt;the green potential of event driven architectures and AsyncApi&lt;/a&gt; I gave a high level overview of how to estimate the quantity of CO2 emissions generated by API traffic, and particularly REST APIs. Using the most conservative, lowest estimate of CO2/gigabyte I could find, I arrived at a figure equivalent driving all the cars in Shanghai for a year. Every year. Which would need the equivalent of doubling all the trees in Ireland. Every year.&lt;/p&gt;

&lt;p&gt;This is the Big Picture we need to keep our focus on, which can be summarised as:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The more data we transmit or consume, the greater our digital carbon footprint&lt;/li&gt;
&lt;li&gt;The amount of data currently transmitted is a significant contributor to climate change&lt;/li&gt;
&lt;li&gt;Anything we can do to reduce data transmission, in volume, frequency or duration, through greener infrastructure, architecture and back-end and front-end design patterns such as &lt;a href="https://screenspan.net/blog/green-by-default/"&gt;green by default&lt;/a&gt;; and &lt;a href="https://ismaelvelasco.dev/series/green-mode-design"&gt;green mode design&lt;/a&gt;, we should do to shift the current dismaying &lt;a href="https://climate.nasa.gov/scientific-consensus/"&gt;climate trends&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DD2ObiPG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1661053591358/brN4Frq9P.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DD2ObiPG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1661053591358/brN4Frq9P.png" alt="image.png" width="554" height="554"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At a more granular level however the Big Picture above is your motivation and theory of change, but it's not enough to translate vision into measurable objectives.&lt;/p&gt;

&lt;h2&gt;
  
  
  The challenge of measurement
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Use cases
&lt;/h3&gt;

&lt;p&gt;You need some kind of unit of measure for benchmarking your product's current digital emissions in order to monitor and measurably improve them. This could be purely at engineering team level, &lt;a href="https://greensoftware.foundation/projects/carbon-ci-pipeline-tooling"&gt;incorporated into your CI pipeline&lt;/a&gt; to stay within a carbon budget in your ticket implementations; or it could be part of a company wide digital &lt;a href="https://www.greenit.fr/wp-content/uploads/2021/12/EU-Study-LCA-7-DEC-EN.pdf"&gt;Lifecycle Analysis (LCA)&lt;/a&gt;, &lt;a href="https://publications.jrc.ec.europa.eu/repository/handle/JRC121781&amp;amp;ved=2ahUKEwjll9qhxdT5AhUyQzABHTHNDeEQFnoECBUQAQ&amp;amp;usg=AOvVaw17qVcxC-Phk1pfTjESSYEL"&gt;environmental management systems (EMS)&lt;/a&gt;, or &lt;a href="https://www.seismic-change.com/insights/how-net-zero-fits-with-b-corp"&gt;B Corp certification&lt;/a&gt; process.&lt;/p&gt;

&lt;p&gt;So how much CO2 is generated by 1GB of data? This is a case in which why you measure is more important than how you measure.&lt;/p&gt;

&lt;h3&gt;
  
  
  Focus on the why
&lt;/h3&gt;

&lt;p&gt;Bearing in mind the Big Picture above, you benchmark in order to make measurable progress, and choose a metric in order to monitor and communicate that progress. What really matters in most cases, is not so much the precision of your unit, but the trajectory of your product and organisation.&lt;/p&gt;

&lt;p&gt;Not to say that the precision of your measurements isn't &lt;a href="https://www.researchgate.net/publication/332327135_The_Volkswagen_emissions_scandal_and_its_aftermath"&gt;consequential&lt;/a&gt;, or that expert disagreement on exact bounds or ranges mean there are no bounds or ranges you need to follow to remain rooted in evidence!&lt;/p&gt;

&lt;p&gt;But it is to say, that for most organisational purposes, as long as you are within the ranges indicated by reputable science (meaning pick a scientifically backed metric, even if it differs from another scientifically backed metric), the precise calculus of your units of measurement are less important than how much and how fast your emissions are improving (or worsening).&lt;/p&gt;

&lt;p&gt;Much better to have a measure that turns out to be inaccurate to quantify a 50% annual improvement in emissions, and consistent progress over 5 years, than a measure with superior exactitude demonstrating 10-20% more emissions every year over the same 5 years.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0Q2meMVh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1661053668823/O-UbGAULB.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0Q2meMVh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1661053668823/O-UbGAULB.png" alt="image.png" width="640" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Having said that, there is no exact and constant GB/kWh/CO2 correspondence, which is why there is quite a bit of &lt;a href="https://www.iea.org/commentaries/the-carbon-footprint-of-streaming-video-fact-checking-the-headlines"&gt;scientific&lt;/a&gt; and &lt;a href="https://theshiftproject.org/en/article/shift-project-really-overestimate-carbon-footprint-video-analysis/"&gt;policy&lt;/a&gt; debate in terms of arriving at precise figures.&lt;/p&gt;

&lt;h2&gt;
  
  
  Calculating data emissions.
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Global averages
&lt;/h3&gt;

&lt;p&gt;The most conservative recent figure is 0.015 kWh per GB &lt;a href="https://gerrymcgovern.com/calculating-the-pollution-effect-of-data/"&gt;by McGovern&lt;/a&gt;, and 0.0042 kg of CO2 per GB. The International Energy Agency (IAE) &lt;a href="https://www.iea.org/commentaries/the-carbon-footprint-of-streaming-video-fact-checking-the-headlines"&gt;estimated in 2020&lt;/a&gt; a 0.06 kWh/GB and 0.478 kg CO2/kWh footprint, which would result in 0.028 kg of CO2 per GB streamed.&lt;/p&gt;

&lt;p&gt;So that shouldn't be too difficult right? Just choose one of the metrics above, and start calculating your CO2/GB benchmarks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hardware factors
&lt;/h3&gt;

&lt;p&gt;Except, it is a bit more nuanced than that, if you're after precision. There is a difference in the emissions of the same GB of data by device type (e.g. mobile or PC), and by signal type (e.g. 3G, 4G, Wi-Fi) with mobile emissions &lt;a href="https://www.mdpi.com/2071-1050/10/7/2494"&gt;calculated&lt;/a&gt; at 0.1-0.2 kWh/GB for 4G mobile, so a lot more than the metrics above.&lt;/p&gt;

&lt;p&gt;It follows that if your product involves the Internet Of Things the intensity per GB will likewise vary if you're using a smart watch, a fridge, smart glasses, or &lt;a href="https://www.wired.com/story/this-diy-implant-lets-you-stream-movies-from-inside-your-leg/"&gt;an implant in your leg&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Problem is, once you've accounted for device type, not all device brands and and models within each device type are created equal, so depending on the age, brand and model your 1GB might produce completely different emissions.&lt;/p&gt;

&lt;p&gt;Likewise what data communication protocol (e.g. HTTP, USSD, &lt;a href="https://cloud.google.com/blog/products/iot-devices/http-vs-mqtt-a-tale-of-two-iot-protocols"&gt;MQTT&lt;/a&gt; your device uses to transmit the 1GB of data to your device.&lt;/p&gt;

&lt;p&gt;Got it. So if we &lt;em&gt;just&lt;/em&gt; apply different CO2/GB metrics per device type, per signal type and per communication protocol, then, as the Brits disconcertingly say: &lt;a href="https://en.wikipedia.org/wiki/Bob's_your_uncle"&gt;Bob's your uncle&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now can we go measure?&lt;/p&gt;

&lt;h3&gt;
  
  
  Software factors
&lt;/h3&gt;

&lt;p&gt;Well, say you have 2 identical devices running on the same signal type via the same communication protocol. Different configurations, software installed, operating system, etc. will affect the electricity consumption of that identical machine upon receiving 1 GB of data.&lt;/p&gt;

&lt;p&gt;It will be very different browsing on a minimalist Linux distribution like &lt;a href="https://en.m.wikipedia.org/wiki/Porteus_(operating_system)"&gt;Porteus&lt;/a&gt; which is small enough to fit in an old USB stick and run entirely from system RAM, and browse 1GB or data using a &lt;a href="https://linuxhint.com/best_linux_text_based_browsers/"&gt;text based browser in your terminal&lt;/a&gt;; than browsing 1GB of data a Windows OS opening 100 Chrome tabs while having 10 desktop applications open in the background.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EtFdHbOz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1661087196371/92ewKjPom.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EtFdHbOz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1661087196371/92ewKjPom.png" alt="image.png" width="686" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So let's imagine you have 2 identical machines, identically configured, in identical conditions, with identical hardware and software running. Will your elusive GB &lt;strong&gt;now&lt;/strong&gt; be equivalent?&lt;/p&gt;

&lt;h3&gt;
  
  
  Use case factors
&lt;/h3&gt;

&lt;p&gt;Well actually, no. There is also a difference in emissions according to the what user behaviour that GB of data is meant to elicit. 1 GB has estimated to be equivalent to 600 web pages, or 30 minutes of HD video (caveat emptor: previous paragraphs apply!). By now, you've read enough to be pretty sure that your identical quantity of data will produce different emissions in these two scenarios... but can you guess whether 30 mins of data and CPU intensive video or 600 super optimised web page visits is worse for the climate?&lt;/p&gt;

&lt;p&gt;If we take an average time spent on a web page to be &lt;a href="https://www.klipfolio.com/metrics/marketing/average-time-on-page"&gt;52 seconds&lt;/a&gt; (varies hugely between industries and between websites), then 600 pages is around 8 hours on your machine viewing its screen. That is 16 times longer than a 30 minute video.&lt;/p&gt;

&lt;p&gt;Imagine that 30 minute video was transmitted in HD, not hosted in a green cloud provider, no steps taken to optimise delivery. Meanwhile those web pages were downloaded in a single optimised request via a super optimised CDN from a green cloud provider. Clearly the emissions generated by the GB of video traffic would be incomparably higher than those of your fantastically opitimized and delivered 600 pages.&lt;/p&gt;

&lt;p&gt;Except, all that reckless, high emission, 30 minute video traffic, would STILL use less electricity than keeping your computer monitor, CPU, background processes, etc, in use for 8 hours.&lt;/p&gt;

&lt;p&gt;Taking everything into account so far, and inaccurately working from a global average electricity mix, &lt;a href="https://www.iea.org/commentaries/the-carbon-footprint-of-streaming-video-fact-checking-the-headlines"&gt;streaming a GB of video&lt;/a&gt; will produce around 18g of CO2. In contrast, a laptop that has a life of three years will generate, including embodied carbon, (107g of CO2 per hour of use)[&lt;a href="https://www.hempoffset.com/2022/05/31/whats-the-carbon-footprint-of-your-digital-content/"&gt;https://www.hempoffset.com/2022/05/31/whats-the-carbon-footprint-of-your-digital-content/&lt;/a&gt;], so 828g of CO2: nearly 50 times the 30 minute video's footprint for a single GB of data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Grid intensity
&lt;/h3&gt;

&lt;p&gt;So now we're there, right? You just have to use the same machine to stream the same 30 minute video over the same network for your 1GB of data to translate into a single CO2 emissions metric.&lt;/p&gt;

&lt;p&gt;Not by a long shot!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IrzPp0mj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1661097367030/G0ttZRw3L.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IrzPp0mj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1661097367030/G0ttZRw3L.png" alt="image.png" width="275" height="183"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The emissions of your extremely frustrating GB will vary in relation to the location and time at which you stream your 30m video on the same device over the same network and protocol, hosted in the same server.&lt;/p&gt;

&lt;p&gt;Emissions fluctuate in accordance with the intensity of the electricity grid at the time you stream a video. Your GB will produce more emissions when the grid is at high intensity, and less when the grid is being powered by renewable resources, so the same GB of data will produce more or less CO2 at a different time of day. There's a variety of APIs, like &lt;a href="//electricitymaps.com"&gt;Electricity Maps&lt;/a&gt; (global), carbonintensity.org.uk (UK) and many many more, that you can use to measure your emissions in relation to grid usage, and make your websites and applications not just carbon aware but carbon intelligent.&lt;/p&gt;

&lt;p&gt;An example of one implementation is the fantastic &lt;a href="https://branch.climateaction.tech"&gt;https://branch.climateaction.tech&lt;/a&gt; website. If you look top right, you will see it has 4 performance modes, giving you most functionality at low grid usage times, and reducing the defaults at high grid intensity times. So in low grid intensity mode you get full colour images displayed by default; in moderate you get them monochrome, and in high usage mode you have to click in order to see the image. The "Live" mode is a smart mode automatically switches depending on grid intensity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--n6IEiFWp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1661098178044/ChEUucwO-.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--n6IEiFWp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1661098178044/ChEUucwO-.png" alt="image.png" width="880" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see how they use the UK grid api to measure intensity in this simple JavaScript file: &lt;a href="https://github.com/climateaction-tech/branch-theme/blob/master/js/gridintensity.browser.min.js"&gt;https://github.com/climateaction-tech/branch-theme/blob/master/js/gridintensity.browser.min.js&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Another implementation would be &lt;a href="https://codecarbon.io/"&gt;https://codecarbon.io/&lt;/a&gt; which is more granular and calculates not just the emissions of your website or application in aggregate, but of your actual code, in accordance with grid intensity. This allows you to create carbon aware queueing jobs, which basically allocate the most computing intensive jobs to the lowest grid intensity times.&lt;/p&gt;

&lt;h2&gt;
  
  
  Track to improve, gradually refine
&lt;/h2&gt;

&lt;p&gt;So is there then one answer to the question of how many CO2 emissions are in 1 GB we can use as a consitent metric? Alas no. Which is to say, tools like &lt;a href="//ecograder.com"&gt;Ecograder&lt;/a&gt; in my first posts give you a nice starting point to benchmark and communicate your progress, but if you want to be thorough and maximally impactful, you need to drill down much more in both your measurements and implementations, with the tools and examples I've offered.&lt;/p&gt;

&lt;p&gt;The most important thing, of course, is that whatever metrics and tools you choose, quick and dirty or orchestrated and precise, they help you surface your direction of travel in emissions, and empower you to reduce them month on month, year on year.&lt;/p&gt;

</description>
      <category>data</category>
      <category>sustainability</category>
      <category>observability</category>
      <category>hardware</category>
    </item>
    <item>
      <title>Could AsyncApi Make A Dent on Climate Change?</title>
      <dc:creator>Ismael Velasco</dc:creator>
      <pubDate>Thu, 04 Aug 2022 08:38:47 +0000</pubDate>
      <link>https://dev.to/leamsi9/could-asyncapi-make-a-dent-on-climate-change-400i</link>
      <guid>https://dev.to/leamsi9/could-asyncapi-make-a-dent-on-climate-change-400i</guid>
      <description>&lt;p&gt;It may at first sight seem like linking an emergent API specification to &lt;a href="https://www.theguardian.com/environment/2021/nov/01/david-attenborough-urges-leaders-at-cop26-to-be-motivated-by-hope-not-fear"&gt;the biggest existential challenge of our time&lt;/a&gt; would be like asking whether a new format for restaurant menus might impact on the &lt;a href="https://www.worldobesity.org/news/one-billion-people-globally-estimated-to-be-living-with-obesity-by-2030"&gt;global obesity epidemic&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A closer look however suggests the AsyncApi specification, by accelerating and optimising event driven APIs, could help significantly reduce global emissions, in turn increasing our chances of impactful course correction. Let's break it down.&lt;/p&gt;

&lt;p&gt;CISCO &lt;a href="https://www.networkworld.com/article/3323063/cisco-predicts-nearly-5-zettabytes-of-ip-traffic-per-year-by-2022.html"&gt;estimates&lt;/a&gt; that by 2022 a gargantuan 4.8 zettabytes of data will be transferred over IP addresses. More than all data transferred in the previous 32 years since the Internet was launched.&lt;/p&gt;

&lt;p&gt;Using &lt;a href="https://www.cmswire.com/digital-experience/calculating-the-pollution-effect-of-data/"&gt;the most conservative estimates&lt;/a&gt;, that amount of data equates to 72 million megawatt hours which in turn roughly equals 20 million tonnes of CO2. This is &lt;a href="https://www.epa.gov/energy/greenhouse-gas-equivalencies"&gt;the equivalent&lt;/a&gt; of driving 4 million cars for a year, and only accounts for electricity consumed in transfer, not data storage (data centres &lt;a href="https://www.iea.org/reports/data-centres-and-data-transmission-networks"&gt;account for 1% of all electricity consumption worldwide&lt;/a&gt;), client device electricity, or the embodied carbon of data centres and devices. We would &lt;a href="https://www.encon.be/en/calculation-co2-offsetting-trees"&gt;need to plant&lt;/a&gt; 620-920 million trees to offset that many emissions. These likely conservative estimates are subject to a lot of nuances, caveats and technical debate, but the conclusion is unequivocal: internet data traffic is a major source of pollution.&lt;/p&gt;

&lt;p&gt;But we still haven't made the connection to AsyncApis! The next step in estimations is to roughly calculate how much of the traffic above is mediated specifically by APIs. One good proxy is Akamai, which &lt;a href="https://www.slintel.com/tech/cdn/akamai-market-share"&gt;routes 15-30% of all internet traffic&lt;/a&gt;. They &lt;a href="https://www.akamai.com/site/it/documents/state-of-the-internet/state-of-the-internet-security-retail-attacks-and-api-traffic-report-2019.pdf"&gt;found&lt;/a&gt; that 83% of all traffic through their network was API traffic, and only 27% was html website traffic. If this figure translates more broadly, which is likely, that would mean that some 16 million tonnes of CO2 are generated each year by APIs.&lt;/p&gt;

&lt;p&gt;But what kind of APIs? In 2020 Smartbear's State Of API Report estimated 82% of APIs were REST APIs. A closer look suggests that 93-95% of APIs in their survey are essentially synchronous command response APIs, and only 5-7% are asynchronous, event driven APIs. Again, the precise numbers will differ, but the overall distribution is clear. A very significant proportion of those APIs are queried or query via polling, where repeated calls are made to see if there has been a state change. According to &lt;a href="https://nordicapis.com/stop-polling-and-consider-using-rest-hooks/"&gt;a 2013 estimate&lt;/a&gt; by Zapier, 98.5% of those requests return empty, meaning all the emissions involved across the request lifecycle are entirely wasted. The situation has almost certainly improved dramatically in the intervening 9 years, but is an example of the type of inefficiencies involved.&lt;/p&gt;

&lt;p&gt;Which gets us closer to AsyncApi!&lt;/p&gt;

&lt;p&gt;Increasingly, there is a shift from command driven, to event driven architectures, where instead of waiting for a specific command to trigger a behaviour, that behaviour is tied and automated asynchronously to changes in conditions, that is to say, events. This has huge potential and possibilities, which is why it is growing so rapidly as an architectural paradigm. Gartner projected that by the end of this year (2022)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Event notifications will form part of over 60% of new digital business solutions.&lt;/li&gt;
&lt;li&gt;Over 50% of business organizations will participate in event-driven digital business ecosystems.&lt;/li&gt;
&lt;li&gt;50% of organizations managing APIs will incorporate mediation of event notifications into their operations.&lt;/li&gt;
&lt;li&gt;Most leading providers of application platforms will include high-productivity tools for event-driven design.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The environmental potential of switching from traditional REST APIs and similar command-request approaches, is that you can tie behaviour and consumption to climate aware triggers. You could apply graceful degradation when the grid is not running on renewables, and full performance when it is. You could have an IoT device automatically switch to low energy mode when it doesn't require constant activation. Instead of relying on people to remember to turn off lights or devices, they could be switched on and off upon detecting the user's presence or absence. Indeed, such architectures underpin most smart devices.&lt;/p&gt;

&lt;p&gt;One of the greatest barriers to adoption of this paradigm, which could significantly cut into the amount of data transferred and energy consumed by the internet, is the historic absence of a common language to facilitate interoperability. This is where AsyncAPI (finally!) comes in. It provides a standard and a language to describe event based, asynchronous communication, greatly enabling not just inter-api communication, but also drastically cutting developer design and implementation time, by making possible a wide range of automations, akin to the more familiar OpenApi. Such a common language acts as a universal translator, which allows the emergence of a network of devices, workflows and tools attuned to one another in an emergent, inductive way.&lt;/p&gt;

&lt;p&gt;In addition, the AsyncApi community has the historic opportunity, at this early stage in the spec's evolution, to dedicate serious attention to any way in which it could not just describe, but nudge the nature of event driven communication that is coming, or like Gibson said, is here, just not evenly distributed. It may be that there are elements that could be added to the specification that could greatly increase the environmental potential of all applications built in line with its specification. For instance, being able to flag whether a network is delay tolerant or not, could make a huge difference toward allowing a wide range of energy aware applications, as well as widening digital access and inclusion, and facilitating innovation, specially in the Global South.&lt;/p&gt;

&lt;p&gt;This is a very early, yet therefore also a key moment. Event driven, asynchronous communication is, with cloud and serverless, part of the next (current?) wave of technological paradigms. If AsyncApi can enable and influence the transition from a command-request, synchronous, and climate blind ecosystem, to an event-driven, asynchronous, and environmentally conscious paradigm, then, after all this, yes, I do believe it could be part of making an observable dent on world emissions, and therefore on climate change.&lt;/p&gt;

</description>
      <category>asyncapi</category>
      <category>asynchronous</category>
      <category>architecture</category>
      <category>api</category>
    </item>
    <item>
      <title>2. Green Mode Design: Implementation Strategies</title>
      <dc:creator>Ismael Velasco</dc:creator>
      <pubDate>Tue, 02 Aug 2022 17:01:44 +0000</pubDate>
      <link>https://dev.to/leamsi9/2-green-mode-design-implementation-strategies-5g16</link>
      <guid>https://dev.to/leamsi9/2-green-mode-design-implementation-strategies-5g16</guid>
      <description>&lt;p&gt;In the second of the Green Mode Design series, I will move from the general design concept outlined in Part 1 to a first proposal on how it may be implemented by the four key constituencies: devs, consumers, browser vendors, and web standards/specification bodies.&lt;/p&gt;

&lt;h3&gt;
  
  
  Green Mode Design vs Green By Default
&lt;/h3&gt;

&lt;p&gt;Before that I want to emphasise again that Green Mode Design, integrating both, "graceful degradation" and "user control and freedom", is not a replacement for &lt;a href="https://screenspan.net/blog/green-by-default/"&gt;green by default&lt;/a&gt; design. We should absolutely try and ensure that our products are as climate friendly as possible, before a user ever engages with our app. This is a space where not only developers but specially browsers and standards have a key role to play.&lt;/p&gt;

&lt;p&gt;But even the greenest commercial website or app cannot impose a maximalist approach to CO2 optimisation and expect to survive.&lt;/p&gt;

&lt;p&gt;What would Netflix or Youtube be without videos? Or with minimal viable quality videos only? What would a newspaper site be without images? What would a design agency website be if it was pure black and white? What would most web apps be without any JavaScript?&lt;/p&gt;

&lt;p&gt;This is where Green Mode Design complements Green By Default design. The realistic default that meets not just the environmental, but also the economic and social pillars of sustainability, will still be more energy intensive than will be necessary at all times for all users.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MrAQRAeo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1659458130393/FtGMhQQ_U.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MrAQRAeo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1659458130393/FtGMhQQ_U.png" alt="MusicMode.png" width="880" height="596"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If I go to youtube to listen, without watching, to a music video playlist - do I need to keep streaming the videos? Being able to toggle video streams and sound only would be not just good for the environment, but for my CPU and battery and general speed of my device, so not only "altruistic" consumers, but "selfish" consumers would want to toggle such a feature.&lt;/p&gt;

&lt;p&gt;And where self-interest and altruism coincide, behaviour change is much easier to scale.&lt;/p&gt;

&lt;p&gt;Additionally, given the realistic lag between advocating for Green By Default, and making it standard, Green Mode Design empowers users to override high emission websites to practice client side &lt;a href="https://theshiftproject.org/en/article/lean-ict-our-new-report/"&gt;digital sobriety&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This means that emission reductions do not have to wait for sufficient negative consensus among all the stakeholders, but can start with consumers, which in turn will accelerate commercial and normative adoption.&lt;/p&gt;

&lt;p&gt;Just one powerful green mode browser extension gaining traction across major browsers could potentially have a significant impact on both, emissions, and consumer awareness and behaviour.&lt;/p&gt;

&lt;h3&gt;
  
  
  What would Green Mode implementation actually look like?
&lt;/h3&gt;

&lt;p&gt;There are many vectors out there that could be part of green mode design, but I think they could be integrated into 4 customisable modes and intensities of green mode design:&lt;/p&gt;

&lt;p&gt;1) &lt;em&gt;climate aware&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;client side optimisation without degradation (e.g. unused tab suspension, climate aware metrics/monitoring, ad/tracker blocking/service worker enabled intelligent caching).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2) &lt;em&gt;climate friendly&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;graceful degradation of performance (e.g. all the above + more aggressive service worker caching; blocked image or videos by default, clicking on an image link displays it in a customisable default low-fi quality; clicking on a video link defaults to podcast mode (sound only), or even reader mode (transcript only). &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3) &lt;em&gt;climate first&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;maximum graceful degradation without loss of core functionality ( "print mode", no javascript, minimal css, maximum backward device compatibility, accessibility options (e.g. only text to speech including alt for images, and no other visuals; change font colour or size, etc - this + backward compatibility increases climate resilience)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;4) &lt;em&gt;smart mode&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;customisable default triggers for switching between 1-3 (High CPU, high daily CO2 consumption, full screen mode (degrade all other tabs), non-green cloud host detected, high CO2 website, time of day (this could link to focus mode design thinking).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What can be done already?
&lt;/h3&gt;

&lt;p&gt;1) Consumers can achieve most of the above client side via &lt;a href="https://github.com/Leamsi9/awesome-green-extensions/blob/main/README.md"&gt;browser extensions&lt;/a&gt;, but obviously it will be less seamless with more overhead than at the developer level, particularly in the absence of a Green Mode app that integrates all 4 levels in a comprehensive way.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--b-hWorCk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1659458392197/hPK3-_i0y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--b-hWorCk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1659458392197/hPK3-_i0y.png" alt="chrome-extensions.png" width="880" height="1108"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2) Developer side we have all the tools to implement optional graceful degradation, like client caching both high performance and low fi versions of sites in the client (a bit like the prerendering used already in SPAs to serve crawlers and users different versions). You could also design every app and specially page for graceful degradation to work with low or no js. A lot of accessibility design would also be pertinent. And give your users high, mid and low performance options, plus smart mode, on your UI.&lt;/p&gt;

&lt;p&gt;The only example I have come across (do you know any more?) of implementing all 4 modes I propose here is the fantastic &lt;a href="https://branch.climateaction.tech/"&gt;branch magazine&lt;/a&gt; site. There is more graceful degradation options that could be added to each of Branch magazine's 4 modes in terms of user control and freedom, but this is a fantastic illustration of the design concept I'm proposing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QRObje5n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1659458532368/ebGAep_dx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QRObje5n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1659458532368/ebGAep_dx.png" alt="BranchMagazine.png" width="880" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What cannot be done yet?
&lt;/h3&gt;

&lt;p&gt;3) Browsers could but are yet to implement much more comprehensive green mode features than &lt;a href="https://lifehacker.com/what-is-microsoft-edges-efficiency-mode-and-how-can-yo-1848666190"&gt;Edge's energy efficient mode&lt;/a&gt;, which itself is yet to be replicated by competitors.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If we could enable service worker type caching on the client side, with the same core strategies available, that could potentially have large impacts on data consumption and computer usage. If you could for instance toggle a feature that implements stale while revalidate strategies if no similar service workers are active from the site itself, you could drastically reduce web traffic and consumption.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;if you could download rather than stream by default, with streaming mode operating only as a buffer until the full download completes, that could also make a difference, specially if you could "expire" the downloads after x time, removing the downloads by default, and giving the user power to keep the ones they like.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;if you could integrate CO2 counters into the browser itself, or at least to dev tools and lighthouse and equivalents, that could also become a powerful behavioural nudge. There are doubtless many, many more ways in which browsers could enable the proposed 4 layers of Green Mode design. Please share any suggestions or ideas.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--epsxo8n2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1659459381552/Br-t4xVMW.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--epsxo8n2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1659459381552/Br-t4xVMW.png" alt="microsoft-edge-efficiency-mode.png" width="880" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4) The other potentially game changing element that is yet to land, would be specifications and standards to integrate both, green by default, and green mode by default.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Sites that conform to green and green mode standards could be prioritised by search engines and similar incentives, as is the case with Accessibility.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Green mode design support (user controlled graceful degradation layers) could perhaps also be incorporated into OpenApi and AsyncApi specifications. This would align with trends in delay tolerant networks, set to proliferate in the coming decade driven by commercial, environmental and humanitarian interests. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Green certifications could be mainstreamed and integrated into things like Amazon's Green Pledge certification and other impact multipliers.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Where to next?
&lt;/h3&gt;

&lt;p&gt;At the moment the 4 key constituents (consumers, devs, browsers and standards) are at different places in this design trajectory.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Consumers * I suspect consumers are proportionally and numerically the furthest in commitment, but lack the means to express it technologically in the web space.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Green marketing and even green washing are successful because consumer demand is real. So a browser extension could be the most rapidly scalable win, with the most downstream impacts.&lt;/p&gt;

&lt;p&gt;If there is evidence of demand, it follows that software conventions and web and browser standards will change more rapidly. If we could reach a tipping point, we could radically improve our industry's environmental impact on emissions, waste and raw materials, with many secondary benefits.&lt;/p&gt;

&lt;p&gt;The biggest limitation in this area is the fact that browser extensions do not work on mobile.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Developers *&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Assuming the &lt;a href="https://www.pewresearch.org/global/2021/09/14/in-response-to-climate-change-citizens-in-advanced-economies-are-willing-to-alter-how-they-live-and-work/"&gt;statistics&lt;/a&gt; on people's readiness to make changes to protect the climate, I estimate that there are c.9 million developers waiting for the right messaging, tooling and behavioural nudging to implement greener software and design practices, particularly among younger ones.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--O_T2NzKU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1659459555321/PWozBm9VR.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--O_T2NzKU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1659459555321/PWozBm9VR.png" alt="Pew-Green-Changes.png" width="862" height="1282"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This means that those of us who have been advancing the practice of climate friendly design and programming, including ideas such as Green Mode Design, need to step out of the "green" community and bring the messaging, tutorials, libraries and resources to non environmental communities.&lt;/p&gt;

&lt;p&gt;Gaining support for incentivising green software in key platforms, from the big cloud providers, to ecosystems like android and apple stores, NPM, Steam or Github.&lt;/p&gt;

&lt;p&gt;Above all, it means systematic efforts to incorporate green approaches and perspectives, including Green Mode design, into the junior developer pipelines at scale. Computer Science and adjacent university curricula, bootcamp curricula, popular webdev trainers on YouTube, Udemy, etc, and professional development gateways like Pluralsight, or accreditation bodies like ISAQB.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Browsers *&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The most impactful space for Green Mode design is probably at the browser level. Given the &lt;a href="https://www2.deloitte.com/uk/en/pages/consumer-business/articles/sustainable-consumer.html"&gt;acceleration of sustainable consumption patterns and priorities&lt;/a&gt; this could be a source of competitive advantage and traction.&lt;/p&gt;

&lt;p&gt;With 60% of mobile wallets being in Africa, Green Mode options, compatible with less powerful mobile devices, delay tolerant networks and less intensive data plans, Green Mode functionalities at the mobile browser level could hugely expand commercial reach and digital inclusion in the Global South.&lt;/p&gt;

&lt;p&gt;For browsers associated with a hardware ecosystem, the opportunities to extend battery life, reduce energy consumption and increase usability are particularly strong.&lt;/p&gt;

&lt;p&gt;Extending at least green extensions/plugins functionality to the mobile browser sphere could also greatly enable innovation and change user behaviour.&lt;/p&gt;

&lt;p&gt;I believe sustainability discussions are ongoing in many browser companies. These need to deepen, widen and be more publicly visible, and bodies like the Green Software Foundation and the UN ITU could play a role in thus.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Standards and Specifications *&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PC_H08mq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1659458949241/gX7Qvua_s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PC_H08mq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1659458949241/gX7Qvua_s.png" alt="UN-digital-agenda.png" width="880" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Work is currently underway to establish a Sustainable Design Working Group able to make recommendations to WC3. The United Nations Envoy for Technology is also currently consulting on a new Global Digital Compact to shape national regulatory approaches. The UN Secretary General's projected Forum of the Future has digital components across most priority agendas and the Internet Governance Forum brings together governments and civil society stakeholders.&lt;/p&gt;

&lt;p&gt;The green web/green software community needs to be present and proactive in these processes which have the potential to influence international government policies for a long time to come. Tracking the standards and regulatory environment around green web indicators would be an important first step, and the Green Web Foundation is probably well placed to lead on this, perhaps through its Fellowship programme.&lt;/p&gt;

&lt;p&gt;Finally, the Green Software community needs to engage with emerging specifications and protocols, like OpenApi, AsyncApi or MQQT.&lt;/p&gt;

&lt;p&gt;These are of course broader strategies than Green Mode Design, but Green Mode Design could be one impactful low hanging fruit that could be part of the above strategy and vision.&lt;/p&gt;

&lt;p&gt;I would love to hear from colleagues if they resonate with these proposals, and what alternatives or refinements might be needed. Together I truly believe we can shift the environmental direction of the Internet.&lt;/p&gt;

</description>
      <category>sustainability</category>
      <category>design</category>
      <category>standards</category>
      <category>extensions</category>
    </item>
    <item>
      <title>If You Treated Technical Debt Like You Do Financial Debt... How Would You Measure Your Risk of Going Under?</title>
      <dc:creator>Ismael Velasco</dc:creator>
      <pubDate>Thu, 21 Jul 2022 01:20:41 +0000</pubDate>
      <link>https://dev.to/leamsi9/if-you-treated-technical-debt-like-you-do-financial-debt-how-would-you-measure-your-risk-of-going-under-135j</link>
      <guid>https://dev.to/leamsi9/if-you-treated-technical-debt-like-you-do-financial-debt-how-would-you-measure-your-risk-of-going-under-135j</guid>
      <description>&lt;p&gt;Today we take a deep dive into technical debt: what is it, when is it good, when is it terrible, how to measure it, how to cost it, how to address it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o19zPRh9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658365848019/lXG6VHiRN.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o19zPRh9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658365848019/lXG6VHiRN.png" alt="image.png" width="880" height="491"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  So what is tech debt?
&lt;/h2&gt;

&lt;p&gt;Very often, tech debt is defined as a conscious trade off of quality for speed, or a result of poor design decisions. But while both of those are good examples of tech debt, tech debt can also come to absolutely top quality code: if it fails to evolve with the tech ecosystem. The cutting edge app of 2010 is very often the creaky, slow and plainful monolith of in 2020. It's not that the original choices were suboptimal: it's that time moves fast in tech, and code needs to constantly evolve to keep in sync.&lt;/p&gt;

&lt;p&gt;But not all technical debt is created equal.&lt;/p&gt;

&lt;p&gt;Below is a model you may find useful in mapping different parts of your application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical Debt Accounting Model
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;### Low Interest Technical Debt&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Technical debt, like financial debt, can be useful, helping you enter the market and gain traction with an MVP, or allowing you to innovate, or rebuild. That's when your debt is "low interest", you understand the trade offs and the pain is in your future, with a plan to pay it back before it gets painful.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;### High Interest Technical Debt&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;High interest debt, that's risky, and much harder to pay off. Here your technical pain is not ahead but right now, and if you're nor careful, it will compound into a debt default. Technical debt now places serious operational and commercial constraints on the entire company, and creates reputational risks, from security breaches to service interruption.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;### Technical Debt Default&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This is where your company is at existential risk because of technical debt. Your core platforms may have passed End Of Life with widely publicised critical exploits, and you advertise this in your website headers. Your system has become so bloated and is so highly coupled that no one really knows what everything does, and everyone is afraid to change things because every change creates side-effects. Your new features grind to a halt, your devs leave, your company stagnates and loses users to more reliable competitors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical Debt Accounting
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://youtu.be/McO_ONKxwNU"&gt;https://youtu.be/McO_ONKxwNU&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So equipped with this model for understanding and categorising your technical debt, the questions of implementation remain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;How do you rigorously measure it to know in which category any given part of your codebase falls? &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How do you know which specific classes are most tightly coupled or more likely to create side effects or most difficult to understand? &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How do you measure the impact, as opposed to the presence of technical debt on your team or company's feature development process? &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How do you estimate its financial cost? &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How do you choose which areas of the code to refactor first? &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How do you know when replacement is the only option?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How do you persuade the business of the need to invest in technical debt?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Metrics for measuring technical debt which I cover in my training course include formulas for code complexity, cognitive complexity, class and method complexity, afferent and efferent coupling (one is likely to have side effects in many parts of the code, the other is likely to be vulnerable to changes in many parts of the code); package dependency metrics and more. There are also powerful visualisations which can help you find the seams in your application, identifying the low hanging fruit for modularising or service decoupling, as well as the highest risk areas. The metrics above have also proven to be 70-80% predictive of bugs, so they allow you to identify likely bug prone classes and methods.&lt;/p&gt;

&lt;p&gt;A different type of metric is escape velocity, the amount of times new work releases bugs into production. There are algorithms like &lt;a href="https://github.com/topics/szz-algorithm"&gt;szz&lt;/a&gt; that estimate this in repository commit histories, both globally and by file.&lt;/p&gt;

&lt;p&gt;A different approach uses issue trackers like Jira. You can create queries and even dashboards that quantify and monitor live the rate at which tickets previously marked as done are reopened. You can also track the number and rate of tickets marked as "bug" or "fix", the time it takes to respond to a bug, and to resolve it. These process based metrics are particularly important because they help you quantify and cost the compounding of technical debt into operational and strategic debt. You can track how much time is spent on bugs and fixes, and this is time deducted from new features, with associated opportunity and competitiveness costs, and also user pain points, which can affect adoption and retention.&lt;/p&gt;

&lt;p&gt;These process metrics allow you to put financial estimates to your technical debt. You can track how many hours your product team (inc. devs, managers, product owners, qa, customer service) spend on bugs, and get pretty precise figures of pro-rata aggregated staff costs. If you compare this to revenue, profit and turnover streams, you can see how significant a cost that is beyond the raw amount, as it might negate the entire profit from a product vertical. You can also, more roughly, estimate the cost and frequency of roadmap delays or slowdowns, against commercial projections predicated on them as a proxy for opportunity costs. Finally you can make correlations between customer acquisition and retention and bug introduction rates as well as customer complaints. This kind of analysis is essential to get business buy-in for investing in technical debt, and for identifying where in my proposed framework your product might be.&lt;/p&gt;

&lt;p&gt;Technical debt also compounds in to security debt, as it almost always entails vulnerabilities that can be tracked and measured via static analysis tools like Sonar, or API testing tools. Finally, technical debt compounds into environmental debt, as you can link speed, requests, data transmission, server intensity, infrastructure configuration and more to higher CO2 emissions, battery and CPU usage, and several downstream and upstream costs. This could have implications to your ESG accounting, your brand values, and your transition to Net Zero.&lt;/p&gt;

&lt;p&gt;You can find an illustration of the above framework, metrics and tooling in &lt;a href="https://ismaelvelasco.dev/technical-debt-the-good-the-bad-and-the-costly"&gt;a talk I recently gave on the subject&lt;/a&gt;. Indeed, you may have noticed I added a &lt;a href="https://ismaelvelasco.dev/tech-talks"&gt;new Tech Talks section&lt;/a&gt;. OK, no way you noticed. It has recordings from meetups, conferences and even COP26 on a wide range of software engineering subjects. I will periodically introduce one here. I started with Technical Debt, because I am genuinely thrilled to have been selected to give a &lt;a href="https://conferences.isaqb.org/software-architecture-gathering/full-program/#advanced-technical-debt-management-the-good-the-bad-and-the-costly"&gt;1 day online workshop on the subject&lt;/a&gt; in November by the &lt;a href="(https://isaqb.org/)"&gt;International Standard in Training and Certification of Software Architects&lt;/a&gt; - probably the world's foremost software architecture certification body.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1_HHpCLI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658420516629/l_QMkLHE8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1_HHpCLI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658420516629/l_QMkLHE8.png" alt="image.png" width="880" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To be dedicated 9 hours (there's also a follow-on talk on &lt;a href="https://conferences.isaqb.org/full-program/#modernizing-monoliths-principles-patterns-risks-and-roadmaps"&gt;Modernising Monoliths&lt;/a&gt;) at one of the world's &lt;a href="https://conferences.isaqb.org/software-architecture-gathering/"&gt;leading architecture conferences&lt;/a&gt;, at the invitation of such a literal standard setter, feels humbling, exciting and challenging, all at the same time. The talk above can be taken as a taster for my online workshop, which will actually train you to apply this framework, tools and metrics in practice.&lt;/p&gt;

&lt;p&gt;If you enjoy it, you might want to &lt;a href="https://conferences.isaqb.org/software-architecture-gathering/tickets/"&gt;sign up&lt;/a&gt; for the (online) workshop. Do please share any feedback on this blog post or the talk above, and suggestions for things I should clarify or add ahead of the course.&lt;/p&gt;

&lt;p&gt;Also check out the entire conference and training days, there are some really fantastic talks in the programme!&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>metrics</category>
      <category>strategy</category>
      <category>training</category>
    </item>
    <item>
      <title>Green Mode Design Through Graceful Degradation</title>
      <dc:creator>Ismael Velasco</dc:creator>
      <pubDate>Wed, 13 Jul 2022 20:19:22 +0000</pubDate>
      <link>https://dev.to/leamsi9/green-mode-design-through-graceful-degradation-554c</link>
      <guid>https://dev.to/leamsi9/green-mode-design-through-graceful-degradation-554c</guid>
      <description>&lt;p&gt;Wouldn't it be great if you could toggle green mode on the websites you consume and greatly lower your CO2 emissions, make your battery last longer and extend the life of your devices?&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Green Mode design?
&lt;/h2&gt;

&lt;p&gt;What I'm choosing to call &lt;strong&gt;&lt;em&gt;Green Mode design&lt;/em&gt;&lt;/strong&gt; is the combination of two UX principles:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://www.nngroup.com/articles/user-control-and-freedom/"&gt;user control and freedom&lt;/a&gt;: allowing users to control their experience of the system while providing means to undo their selections.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.techtarget.com/searchnetworking/definition/graceful-degradation"&gt;graceful degradation&lt;/a&gt;: the ability of a system to degrade its performance without affecting its core functionality.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So Green Mode design could be defined as:&lt;/p&gt;

&lt;p&gt;_ &lt;strong&gt;giving users a reversible option for degraded but still functional performance in exchange for reduced emissions and longer device life.&lt;/strong&gt; _&lt;/p&gt;

&lt;p&gt;It surprises me that I have so far only found a single website (do you know of any others?) with a &lt;code&gt;green mode&lt;/code&gt; toggle: &lt;a href="https://theorganicagency.com/our-website-green-mode"&gt;https://theorganicagency.com/our-website-green-mode&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t50hVTMW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657733328703/slQl7wHaJ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t50hVTMW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657733328703/slQl7wHaJ.png" alt="image.png" width="880" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would have thought there would be hundreds if not thousands of examples, given we learned the art of "graceful degradation" well over a decade ago, and so many of us deeply care about climate change.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rise and fall of graceful degradation
&lt;/h2&gt;

&lt;p&gt;Graceful degradation, in web development, generally means that you build your site to take advantage of all the features of the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API"&gt;web APIs&lt;/a&gt; supported by the latest browsers, but also create fallbacks for people using older browsers or devices. &lt;/p&gt;

&lt;p&gt;Interest in graceful degradation peaked around 2011, because the difference in CSS and Javascript support between browsers was massive, particularly with Internet Explorer 8, which had the least functionality and the largest market share.&lt;/p&gt;

&lt;p&gt;This meant that every website had to cater to both, the shiny new kid on the block who excelled at gymnastics (Chrome would edge out Internet Explorer by 2012), and the less than athletic grandparent who controlled the PCs. &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5BwKihbM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657747979009/UivY5wDC-.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5BwKihbM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657747979009/UivY5wDC-.png" alt="image.png" width="500" height="559"&gt;&lt;/a&gt;To grow and retain your website's user base, therefore, it became common practice to create a high performance version with a low performance fallback for laggards. To experience a good example of graceful degradation, if you have access to gmail, go to your inbox on the browser, and once there, &lt;a href="https://www.technewstoday.com/how-to-enable-disable-javascript/"&gt;disable javascript&lt;/a&gt;. You will get an option to view your mailbox in html only. Accept and behold graceful degradation in action. Before: &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lMyFuMEV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657759125607/9gqs8fqr5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lMyFuMEV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657759125607/9gqs8fqr5.png" alt="image.png" width="690" height="454"&gt;&lt;/a&gt;After: &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--r38c5ozz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657759060975/TjfBZQ-Nn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--r38c5ozz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657759060975/TjfBZQ-Nn.png" alt="image.png" width="880" height="495"&gt;&lt;/a&gt;As the web api became more standardised, and browsers more interchangeable, graceful degradation largely faded from developer discourse, as an artefact of an earlier, more painful era. You could now safely let rip and flex your web muscles. Which of course also meant that we were pretty much responsible for exponentially increasing planetary emissions, with more and more powerful applications requiring more and more energy and imposing faster and faster hardware obsolescence and waste.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementing Green Mode Design
&lt;/h2&gt;

&lt;p&gt;Many of us are familiar with the &lt;a href="https://www.cars.com/articles/what-is-eco-mode-440386"&gt;eco mode&lt;/a&gt; option in cars. When enabled, the system modulates things like air conditioning, heated seats or other functions to take away pressure from the engine.&lt;/p&gt;

&lt;p&gt;The benefit is better fuel efficiency, lower emissions and cheaper costs. The trade off is that it inhibits the performance of the engine (acceleration, gear shifts), and degrades things like lights (less bright) and air conditioning (more interruptions, less power).&lt;/p&gt;

&lt;p&gt;While eco mode is ideal for most trips, it's not suited for driving up steep hills, or accelerating quickly to overtake. Choosing maximum performance would make more sense in these situations, both for safety and for the car's health and longevity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YBbx2wsQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657748912383/zffuqnA_a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YBbx2wsQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657748912383/zffuqnA_a.png" alt="image.png" width="612" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Similarly, you might not choose graceful degradation on a website for high end gaming, watching a blockbuster, or sleuthing through image based OSINT.&lt;/p&gt;

&lt;p&gt;But for day to day use, you probably don't need all the animations, background videos, images and trackers when reading articles, listening to music on YouTube in the background or aimlessly procrastinating.&lt;/p&gt;

&lt;h2&gt;
  
  
  Will the real slim browsers please stand up?
&lt;/h2&gt;

&lt;p&gt;If the option for excluding such "extras" when requesting web pages was a standard feature available to the 5 billion people that use browsers, the impact of even fractional adoption would reduce global emissions in a noticeable way.&lt;/p&gt;

&lt;p&gt;And yet, compared to consumer electronics, the web ecosystem has been slow on the uptake, to put it politely. Green Mode Design (in practice if not in name) is fast becoming standard in consumer devices, with eco mode an option from wearables to laptops, mobile phones to whole smart houses.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YMMsm8n9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657738250753/Kl1CFOz2s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YMMsm8n9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657738250753/Kl1CFOz2s.png" alt="image.png" width="880" height="567"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It was only in the last year that Microsoft released a still little known feature, &lt;a href="https://blogs.msmvps.com/brink/2022/07/01/turn-on-or-off-efficiency-mode-in-microsoft-edge"&gt;efficiency mode&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It aggressively reduces CPU and RAM usage by lowering video and animation quality and putting to sleep unused tabs. This is a pretty weak offering, considering that the &lt;a href="https://www.tab-suspender.com"&gt;tab suspender&lt;/a&gt; extension is much more powerful and fine grained.&lt;/p&gt;

&lt;p&gt;I have not come across any &lt;code&gt;efficiency mode&lt;/code&gt; equivalents in Chrome, Safari or Firefox. Some of the features are replicated, like tab sleeping and more esoteric optimisations like wake up javascript throttling, but they are not designed as user controlled options, so they do not conform to my definition of Green Mode Design, offering graceful degradation but no meaningful user control and freedom.&lt;/p&gt;

&lt;p&gt;It is a bit bizarre then for the web to be so far behind this curve, when there is so, so much that could be done by browsers to offer truly customisable green mode options, with potentially huge impact on climate change.&lt;/p&gt;

&lt;p&gt;Does that mean that &lt;code&gt;green mode&lt;/code&gt; is largely impossible for responsible consumers?&lt;/p&gt;

&lt;h2&gt;
  
  
  Hacking Green Mode on the user side
&lt;/h2&gt;

&lt;p&gt;While there is no native, comprehensive tool to achieve meaningful and customisable green mode in browsing the web, there are ways to "hack" a green mode approximation for responsible net surfers thanks to the efforts of enterprising devs in the browser extension ecosystem. I have already name checked Tab Suspender:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Te36f9Bk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657734345846/rYa8WZjaT.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Te36f9Bk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657734345846/rYa8WZjaT.png" alt="image.png" width="616" height="1002"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see you can create powerful rules. As a pathological multi-tabber (if multi-tabbing was a sport, I'd have a shot at the Olympics), this has been a godsend. After my chosen interval, the tab goes completely inactive, while its ghost remains ready to come alive on my return: &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4qR1frjS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657734480633/iNsOR2XRyI.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4qR1frjS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657734480633/iNsOR2XRyI.png" alt="image.png" width="880" height="402"&gt;&lt;/a&gt;My CPU and ram usage has, since I added the extension, been very dramatically reduced. &lt;/p&gt;

&lt;p&gt;Other extensions allow you to block (not hide) adverts from youtube videos; block (not hide) videos from youtube, only streaming the sound, which is great if you use youtube for music or podcasts.&lt;/p&gt;

&lt;p&gt;Yet more extensions allow you to disable JavaScript with a quick toggle on a single page (as opposed to the browser as a whole in the settings).&lt;/p&gt;

&lt;p&gt;There are extensions to automatically choose the minimum resolution of videos you stream (the greatest source of web emissions on the user side).&lt;/p&gt;

&lt;p&gt;You can also use extensions to monitor your web consumption and emissions, and there are also extensions that plant trees every time you open a new tab, or search the net, or shop online.&lt;/p&gt;

&lt;p&gt;I hope to devote a separate blog post to this extension ecosystem.&lt;/p&gt;

&lt;p&gt;It has inspired me to set myself the goal, this year, to create an open source "green mode" extension, that integrates all of these features and more in a granular way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reclaiming Graceful Degradation for Green Mode web design
&lt;/h2&gt;

&lt;p&gt;Instead of designing fallbacks for antiquated browsers, like we used to as standard practice, web developers could design fallbacks for user facing "green mode" toggles, which should be present in every web application we're responsible for.&lt;/p&gt;

&lt;p&gt;Ideally we would offer more than on/off options. You could have green/greener/greenest options, with increasing levels of degradation that do not break core functionality.&lt;/p&gt;

&lt;p&gt;That way you could go from this: &lt;a href="https://moves.basicagency.com/"&gt;https://moves.basicagency.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To this (beware, heavy swearing ahead): &lt;a href="https://tinyurl.com/sweary-but-ecofriendly"&gt;https://tinyurl.com/sweary-but-ecofriendly&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With less extreme options in between.&lt;/p&gt;

&lt;h2&gt;
  
  
  Call to action
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YXkqIgdM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657763615406/qwwxQkxzI.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YXkqIgdM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657763615406/qwwxQkxzI.png" alt="image.png" width="880" height="492"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Consider this post an invitation to all web developers to reach into our drawer and dust off the graceful degradation manual, and reclaim it as a tool for climate action.&lt;/p&gt;

&lt;p&gt;Just as developer design choices have been instrumental in our industry outstripping aviation as polluter, developer design choices can be instrumental in making our industry a lever of sustainability.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>1. Green Mode Design Through Graceful Degradation</title>
      <dc:creator>Ismael Velasco</dc:creator>
      <pubDate>Wed, 13 Jul 2022 20:19:22 +0000</pubDate>
      <link>https://dev.to/leamsi9/1-green-mode-design-through-graceful-degradation-1lo5</link>
      <guid>https://dev.to/leamsi9/1-green-mode-design-through-graceful-degradation-1lo5</guid>
      <description>&lt;p&gt;Wouldn't it be great if you could toggle green mode on the websites you consume and greatly lower your CO2 emissions, make your battery last longer and extend the life of your devices?&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Green Mode design?
&lt;/h2&gt;

&lt;p&gt;What I'm choosing to call &lt;strong&gt;&lt;em&gt;Green Mode design&lt;/em&gt;&lt;/strong&gt; is the combination of two UX principles:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://www.nngroup.com/articles/user-control-and-freedom/"&gt;user control and freedom&lt;/a&gt;: allowing users to control their experience of the system while providing means to undo their selections.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.techtarget.com/searchnetworking/definition/graceful-degradation"&gt;graceful degradation&lt;/a&gt;: the ability of a system to degrade its performance without affecting its core functionality.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So Green Mode design could be defined as:&lt;/p&gt;

&lt;p&gt;_ &lt;strong&gt;giving users a reversible option for degraded but still functional performance in exchange for reduced emissions and longer device life.&lt;/strong&gt; _&lt;/p&gt;

&lt;p&gt;It surprises me that I have so far only found a single website (do you know of any others?) with a &lt;code&gt;green mode&lt;/code&gt; toggle: &lt;a href="https://theorganicagency.com/our-website-green-mode"&gt;https://theorganicagency.com/our-website-green-mode&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t50hVTMW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657733328703/slQl7wHaJ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t50hVTMW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657733328703/slQl7wHaJ.png" alt="image.png" width="880" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would have thought there would be hundreds if not thousands of examples, given we learned the art of "graceful degradation" well over a decade ago, and so many of us deeply care about climate change.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rise and fall of graceful degradation
&lt;/h2&gt;

&lt;p&gt;Graceful degradation, in web development, generally means that you build your site to take advantage of all the features of the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API"&gt;web APIs&lt;/a&gt; supported by the latest browsers, but also create fallbacks for people using older browsers or devices. &lt;/p&gt;

&lt;p&gt;Interest in graceful degradation peaked around 2011, because the difference in CSS and Javascript support between browsers was massive, particularly with Internet Explorer 8, which had the least functionality and the largest market share.&lt;/p&gt;

&lt;p&gt;This meant that every website had to cater to both, the shiny new kid on the block who excelled at gymnastics (Chrome would edge out Internet Explorer by 2012), and the less than athletic grandparent who controlled the PCs. &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5BwKihbM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657747979009/UivY5wDC-.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5BwKihbM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657747979009/UivY5wDC-.png" alt="image.png" width="500" height="559"&gt;&lt;/a&gt;To grow and retain your website's user base, therefore, it became common practice to create a high performance version with a low performance fallback for laggards. To experience a good example of graceful degradation, if you have access to gmail, go to your inbox on the browser, and once there, &lt;a href="https://www.technewstoday.com/how-to-enable-disable-javascript/"&gt;disable javascript&lt;/a&gt;. You will get an option to view your mailbox in html only. Accept and behold graceful degradation in action. Before: &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lMyFuMEV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657759125607/9gqs8fqr5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lMyFuMEV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657759125607/9gqs8fqr5.png" alt="image.png" width="690" height="454"&gt;&lt;/a&gt;After: &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--r38c5ozz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657759060975/TjfBZQ-Nn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--r38c5ozz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657759060975/TjfBZQ-Nn.png" alt="image.png" width="880" height="495"&gt;&lt;/a&gt;As the web api became more standardised, and browsers more interchangeable, graceful degradation largely faded from developer discourse, as an artefact of an earlier, more painful era. You could now safely let rip and flex your web muscles. Which of course also meant that we were pretty much responsible for exponentially increasing planetary emissions, with more and more powerful applications requiring more and more energy and imposing faster and faster hardware obsolescence and waste.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementing Green Mode Design
&lt;/h2&gt;

&lt;p&gt;Many of us are familiar with the &lt;a href="https://www.cars.com/articles/what-is-eco-mode-440386"&gt;eco mode&lt;/a&gt; option in cars. When enabled, the system modulates things like air conditioning, heated seats or other functions to take away pressure from the engine.&lt;/p&gt;

&lt;p&gt;The benefit is better fuel efficiency, lower emissions and cheaper costs. The trade off is that it inhibits the performance of the engine (acceleration, gear shifts), and degrades things like lights (less bright) and air conditioning (more interruptions, less power).&lt;/p&gt;

&lt;p&gt;While eco mode is ideal for most trips, it's not suited for driving up steep hills, or accelerating quickly to overtake. Choosing maximum performance would make more sense in these situations, both for safety and for the car's health and longevity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YBbx2wsQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657748912383/zffuqnA_a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YBbx2wsQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657748912383/zffuqnA_a.png" alt="image.png" width="612" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Similarly, you might not choose graceful degradation on a website for high end gaming, watching a blockbuster, or sleuthing through image based OSINT.&lt;/p&gt;

&lt;p&gt;But for day to day use, you probably don't need all the animations, background videos, images and trackers when reading articles, listening to music on YouTube in the background or aimlessly procrastinating.&lt;/p&gt;

&lt;h2&gt;
  
  
  Will the real slim browsers please stand up?
&lt;/h2&gt;

&lt;p&gt;If the option for excluding such "extras" when requesting web pages was a standard feature available to the 5 billion people that use browsers, the impact of even fractional adoption would reduce global emissions in a noticeable way.&lt;/p&gt;

&lt;p&gt;And yet, compared to consumer electronics, the web ecosystem has been slow on the uptake, to put it politely. Green Mode Design (in practice if not in name) is fast becoming standard in consumer devices, with eco mode an option from wearables to laptops, mobile phones to whole smart houses.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YMMsm8n9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657738250753/Kl1CFOz2s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YMMsm8n9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657738250753/Kl1CFOz2s.png" alt="image.png" width="880" height="567"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It was only in the last year that Microsoft released a still little known feature, &lt;a href="https://blogs.msmvps.com/brink/2022/07/01/turn-on-or-off-efficiency-mode-in-microsoft-edge"&gt;efficiency mode&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It aggressively reduces CPU and RAM usage by lowering video and animation quality and putting to sleep unused tabs. This is a pretty weak offering, considering that the &lt;a href="https://www.tab-suspender.com"&gt;tab suspender&lt;/a&gt; extension is much more powerful and fine grained.&lt;/p&gt;

&lt;p&gt;I have not come across any &lt;code&gt;efficiency mode&lt;/code&gt; equivalents in Chrome, Safari or Firefox. Some of the features are replicated, like tab sleeping and more esoteric optimisations like wake up javascript throttling, but they are not designed as user controlled options, so they do not conform to my definition of Green Mode Design, offering graceful degradation but no meaningful user control and freedom.&lt;/p&gt;

&lt;p&gt;It is a bit bizarre then for the web to be so far behind this curve, when there is so, so much that could be done by browsers to offer truly customisable green mode options, with potentially huge impact on climate change.&lt;/p&gt;

&lt;p&gt;Does that mean that &lt;code&gt;green mode&lt;/code&gt; is largely impossible for responsible consumers?&lt;/p&gt;

&lt;h2&gt;
  
  
  Hacking Green Mode on the user side
&lt;/h2&gt;

&lt;p&gt;While there is no native, comprehensive tool to achieve meaningful and customisable green mode in browsing the web, there are ways to "hack" a green mode approximation for responsible net surfers thanks to the efforts of enterprising devs in the browser extension ecosystem. I have already name checked Tab Suspender:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Te36f9Bk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657734345846/rYa8WZjaT.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Te36f9Bk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657734345846/rYa8WZjaT.png" alt="image.png" width="616" height="1002"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see you can create powerful rules. As a pathological multi-tabber (if multi-tabbing was a sport, I'd have a shot at the Olympics), this has been a godsend. After my chosen interval, the tab goes completely inactive, while its ghost remains ready to come alive on my return: &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4qR1frjS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657734480633/iNsOR2XRyI.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4qR1frjS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657734480633/iNsOR2XRyI.png" alt="image.png" width="880" height="402"&gt;&lt;/a&gt;My CPU and ram usage has, since I added the extension, been very dramatically reduced. &lt;/p&gt;

&lt;p&gt;Other extensions allow you to block (not hide) adverts from youtube videos; block (not hide) videos from youtube, only streaming the sound, which is great if you use youtube for music or podcasts.&lt;/p&gt;

&lt;p&gt;Yet more extensions allow you to disable JavaScript with a quick toggle on a single page (as opposed to the browser as a whole in the settings).&lt;/p&gt;

&lt;p&gt;There are extensions to automatically choose the minimum resolution of videos you stream (the greatest source of web emissions on the user side).&lt;/p&gt;

&lt;p&gt;You can also use extensions to monitor your web consumption and emissions, and there are also extensions that plant trees every time you open a new tab, or search the net, or shop online.&lt;/p&gt;

&lt;p&gt;I hope to devote a separate blog post to this extension ecosystem.&lt;/p&gt;

&lt;p&gt;It has inspired me to set myself the goal, this year, to create an open source "green mode" extension, that integrates all of these features and more in a granular way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reclaiming Graceful Degradation for Green Mode web design
&lt;/h2&gt;

&lt;p&gt;Instead of designing fallbacks for antiquated browsers, like we used to as standard practice, web developers could design fallbacks for user facing "green mode" toggles, which should be present in every web application we're responsible for.&lt;/p&gt;

&lt;p&gt;Ideally we would offer more than on/off options. You could have green/greener/greenest options, with increasing levels of degradation that do not break core functionality.&lt;/p&gt;

&lt;p&gt;That way you could go from this: &lt;a href="https://moves.basicagency.com/"&gt;https://moves.basicagency.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To this (beware, heavy swearing ahead): &lt;a href="https://tinyurl.com/sweary-but-ecofriendly"&gt;https://tinyurl.com/sweary-but-ecofriendly&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With less extreme options in between.&lt;/p&gt;

&lt;h2&gt;
  
  
  Call to action
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YXkqIgdM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657763615406/qwwxQkxzI.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YXkqIgdM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1657763615406/qwwxQkxzI.png" alt="image.png" width="880" height="492"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Consider this post an invitation to all web developers to reach into our drawer and dust off the graceful degradation manual, and reclaim it as a tool for climate action.&lt;/p&gt;

&lt;p&gt;Just as developer design choices have been instrumental in our industry outstripping aviation as polluter, developer design choices can be instrumental in making our industry a lever of sustainability.&lt;/p&gt;

</description>
      <category>design</category>
      <category>sustainability</category>
      <category>extensions</category>
      <category>performance</category>
    </item>
    <item>
      <title>A starter kit for building climate friendly software</title>
      <dc:creator>Ismael Velasco</dc:creator>
      <pubDate>Sat, 02 Jul 2022 01:58:00 +0000</pubDate>
      <link>https://dev.to/leamsi9/get-your-webdev-cape-on-its-time-to-save-the-world-36db</link>
      <guid>https://dev.to/leamsi9/get-your-webdev-cape-on-its-time-to-save-the-world-36db</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MqKFAefW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2f3vs0xmrykq82l5dm6r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MqKFAefW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2f3vs0xmrykq82l5dm6r.png" alt="Set of tools" width="880" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you think about climate change, it's easy to feel fatalistic. Not an unfamiliar feeling to anyone who has had to face the Big Bad Ball of Mud for the first time.&lt;/p&gt;

&lt;p&gt;And when you read more about it, it's easy to feel not just fatalistic, but guilty, seeing as the code you continuously deploy into the wild, the apps you lovingly (or frustratingly) maintain, the servers you consume, account, when added to the work of all your peers, for as many CO2 emissions as the whole of the aviation industry! Everyone tells you to cut down on flying, but &lt;a href="https://theshiftproject.org/wp-content/uploads/2019/07/2019-02.pdf"&gt;who&lt;/a&gt; tells you to cut down on &lt;code&gt;&amp;lt;video&amp;gt;&lt;/code&gt; tags?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_ZgrrOZa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1656871563265/4ehGnUk9E.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_ZgrrOZa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1656871563265/4ehGnUk9E.png" alt="image.png" width="880" height="704"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Still, we're not fatalists, we're software engineers: problem solving is what we do. Every week we get to feel like crime scene investigators, obviously doomed idiots, and certified geniuses, twice over. In a single day.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BBCbOK9_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1656871623326/1MSnIORpO.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BBCbOK9_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1656871623326/1MSnIORpO.png" alt="image.png" width="700" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Being responsible for so many emissions, counter-intuitively also gives us an extraordinary opportunity for postive inpact. By applying green software patterns and integrating things like tree planting apis, we can build not just low carbon, but carbon positive digital products. Given the scale of much of what we work on, if just a small percent of us commit to a green web, our impact on emissions could be exponential.&lt;/p&gt;

&lt;p&gt;Still, if you're like me, you may not know how to start. Green web patterns are not yet regularly discussed in meetups, tutorials, vlogs and general dev land. So here are some resources that might help get you started.&lt;/p&gt;

&lt;p&gt;The green web journey began for me when I stumbled across this fantastic blog piece by Phil Sturgeon of &lt;a href="https://phil.tech/2020/tech-climate"&gt;Build APis You Don't Hate&lt;/a&gt; fame.&lt;/p&gt;

&lt;p&gt;Soon after, I was invited to organise a panel and present at COP26+ on Engineering and Climate Change at the invitation of the International Environment Forum. I instantly thought of Phil, who graciously agreed to join me, and two other superb speakers, on what proved to be an insightful and empowering exchange. The experience made me aware of the power of engineering communities to both inform, and motivate, and I set about looking for the best one in the tech space.&lt;/p&gt;

&lt;p&gt;I am confident I found it in &lt;a href="https://ClimateAction.tech"&gt;https://ClimateAction.tech&lt;/a&gt;. They have built a fantastic and impactful green tech community, including many of the pioneers and leading voices in the green software movement .&lt;/p&gt;

&lt;p&gt;From their website you can join the &lt;a href="https://docs.google.com/forms/d/e/1FAIpQLSdtvNeUkNkPybk9_Ln5klL1RUPHUCwfK4OfF-odRWnHME9d-g/viewform"&gt;Slack group&lt;/a&gt; which is probably the best single place to keep track of developments, network with fellow travellers and ask questions.&lt;/p&gt;

&lt;p&gt;Other good resources to get started are:&lt;/p&gt;

&lt;p&gt;The &lt;a href="//greensoftware.foundation"&gt;Green Software Foundation&lt;/a&gt; and its podcast, &lt;a href="https://podcast.greensoftware.foundation"&gt;Environment Variables&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Well Architected Framework's &lt;a href="https://aws.amazon.com/blogs/aws/sustainability-pillar-well-architected-framework"&gt;Sustainability Pillar&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And resources like &lt;a href="https://github.com/philsturgeon/awesome-earth"&gt;awesome earth&lt;/a&gt; and &lt;a href="https://www.cloudcarbonfootprint.org"&gt;https://www.cloudcarbonfootprint.org&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As to the skillset involved in environmentally aware software, I suspect you'll find you already have a strong foundation.&lt;/p&gt;

&lt;p&gt;It just so happens that what's required for green tech is exactly what's required to reduce costs, cpu usage, improve speed and user experience in any web application! These should be part of the arsenal of any experienced engineer, and part of the journey of every committed junior one.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Move your application to a (greener) cloud provider/zone&lt;/li&gt;
&lt;li&gt;Make your content delivery as local to the client as possible (e.g. via CDNs)&lt;/li&gt;
&lt;li&gt;Minimise your page loads and data consumption by targeted caching strategies using service workers&lt;/li&gt;
&lt;li&gt;Design your APIs to minimise http requests and data exchanges&lt;/li&gt;
&lt;li&gt;Optimise your images and reduce the javascript and in general the data you send to the client front end, by minification and exclusion.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So while you may not have thought about the emissions side too much to date, I suspect you already know a thing or two about performance optimisation, api design, caching, and graceful degradation/progressive enhancement for "digital sobriety".&lt;/p&gt;

&lt;p&gt;Which means you're already set to go on your green journey, equipped with a community, good resources, and your own accumulated skill.&lt;/p&gt;

</description>
      <category>sustainability</category>
      <category>tools</category>
      <category>career</category>
      <category>architecture</category>
    </item>
  </channel>
</rss>
