Developer Bits on Sustainable Computing

The world is trying to “green up” our cars, light bulbs, clothing, and even our laptops. Apple is pushing the greenest laptops of all time. Google goes lead free and commits to 100% recycling practices. Massive data centres recycle water and implement radical new energy efficient cooling technologies. But, as consultants, we primarily write code – what role do we play in sustainable computing? Some will argue that our role here is best served by the principle of, “Every little bit.”.

A quick search of the Internet reveals thousands upon thousands of books, articles, and studies focused on becoming more efficient. Blogs on the agile methodology preach bringing speed to development and TDD strives to make the QA cycle a blip on the project timeline. Grails and Spring Roo bring projects and prototypes online in minutes rather than days. It cannot be argued that more efficient development reduces cost and makes good business sense – but are there other benefits as well?

Doing the same work in less time
As developers our days mandate carbon output – what we get in return for our expenditure is variable. As we develop we need to be conscious about making the most of our machines each minute that we are in front of them as well as time we spend away from them. An few moments of consideration can save thousands of watts of power each day. Do you stare at your console while compiling or do you execute other tasks during that time? Do you practice TDD to remove much of the overhead of manual testing? Do you hibernate or fully shut down your machine when leaving for meetings or lunch? These are all small things by themselves, but few million persons doing them everyday makes a very large difference.

Conserving bandwidth
Each bit we push and pull across the wire has a cost associated with it. As such, it is in everyone’s best interest to conserve bandwidth (unless you are in the business of selling bandwidth) at every turn. Servers will do less work, switches and firewalls breathe more easily, pages load faster, and all while using less energy and costing your client less. Here again, the work we do can have a large impact over time.

  • Have we minimized and optimized CSS and JavaScript?
  • Are we serving only compressed images?
  • Have we done all we can to leverage client side caching?
  • Is Ajax being used to reduce full page loads?

All of these things result in more speed for the user, less cost for the client, and less carbon out of the pipe.

Optimising code
Servers are like athletes – the harder they work the more energy they need to consume to keep going. World class athletes have figured out that at a certain level of performance even the smallest gains in efficiency determine victory or loss. Cyclists shave fractions of grams of weight off each component to save weight, then test in wind tunnels to reduce drag. Swimmers now wear full body suits of technologically advanced material modeled after shark skin to reduce friction in the water. They do this all to finish fractions of a second faster than they could before. Can we learn from the world’s elite athletes and reduce total clock cycles necessary to compete a task?

Here again we have a situation where everyone wins. When we fully optimize our code we will use fewer resources to complete the same set of tasks. Our code will be faster, the user experience better, client costs reduced, and less energy will be wasted. While techniques for code optimization is beyond the scope of this writing it is something that we as developers need to be conscious of and work to master.

While the methods and mechanisms that can be used to make software an integral part of sustainable computing are seemingly infinite, we can all work to implement a small, finite set of options every day and together make a huge difference. Whether we simply add break statements to for loops or implement reduced carbon data centres, we can all do something everyday to reduce the number of bits of carbon we produce.

About the Author

Object Partners profile.
Leave a Reply

Your email address will not be published.

Related Blog Posts
Natively Compiled Java on Google App Engine
Google App Engine is a platform-as-a-service product that is marketed as a way to get your applications into the cloud without necessarily knowing all of the infrastructure bits and pieces to do so. Google App […]
Building Better Data Visualization Experiences: Part 2 of 2
If you don't have a Ph.D. in data science, the raw data might be difficult to comprehend. This is where data visualization comes in.
Unleashing Feature Flags onto Kafka Consumers
Feature flags are a tool to strategically enable or disable functionality at runtime. They are often used to drive different user experiences but can also be useful in real-time data systems. In this post, we’ll […]
A security model for developers
Software security is more important than ever, but developing secure applications is more confusing than ever. TLS, mTLS, RBAC, SAML, OAUTH, OWASP, GDPR, SASL, RSA, JWT, cookie, attack vector, DDoS, firewall, VPN, security groups, exploit, […]