Contact Us
Sustainable Solutions: Green Software Engineering from the Perspective of a Mobile Engineer

Sustainable Solutions: Green Software Engineering from a Mobile Engineer’s Perspective

In today's world, individuals and companies must acknowledge the impact of our actions on the environment. This concern includes every sector, including software development. In this blog post, we will delve into the environmental implications of software development and provide some practical solutions to mitigate these effects. Additionally, we will assess the effectiveness of tools like ecoCode, which analyse the "greenness" of code.

What is green software engineering?

Green software engineering refers to the development of sustainable solutions with minimal environmental impact. It involves employing green practices and technologies throughout the entire software lifecycle, including design, development, testing, deployment, and maintenance.

According to McKinsey, taking immediate action to improve the sustainability of software and data could result in a reduction of approximately 5% in CO2 emissions by 2030.

Green software engineering aims to reduce energy consumption, carbon emissions, and waste production. This is achieved through various strategies such as:

  • using efficient algorithms
  • optimising code for energy efficiency
  • reducing resource usage
  • utilising renewable energy sources for hosting and deployment
  • promoting virtualisation and cloud computing
  • implementing recycling and disposal policies for hardware components.

How application development impacts the environment

Application development can have both direct and indirect effects on the environment. Direct impacts include the energy consumption from running software programs and data centres, leading to greenhouse gas emissions. Additionally, the exchange of data over networks and the cloud can also have an environmental impact due to the energy required for transmission and storage.

On the other hand, indirect impacts refer to the production and disposal of hardware. It includes servers, mobile devices, and other computer equipment, which generate electronic waste and contribute to pollution.

However, by applying green software engineering practices, developers may be able to reduce the environmental impact of app development and make their apps more sustainable.

How to make app development more environmentally friendly

Developing a greener app can be achieved through custom app development as it provides the flexibility to customise the solution according to specific requirements.

Let's explore some practical examples of actions that can be implemented during the app development process to enhance its sustainability and minimise its environmental impact:

  • Optimise algorithms and code. Write efficient algorithms and clean code to reduce CPU usage and energy consumption. Use profiling tools to identify bottlenecks and optimise performance.
  • Reduce resource usage. Create lightweight software with efficient data structures and reduce resource-intensive activities to optimise memory, storage, and processing power usage.
  • Use energy-efficient libraries and frameworks. Choose libraries and frameworks that prioritise energy efficiency and have been designed with green principles in mind.
  • Implement power-saving features. Integrate power-saving features, such as idle states or sleep modes, into your software to reduce energy consumption when the software is not in active use.
  • Use cloud computing and virtualisation. Leverage cloud-based and virtualisation technologies to reduce the need for physical hardware, lower energy usage, and minimise the carbon footprint associated with software development and deployment.
  • Encourage software longevity and backward compatibility. Design software that is easy to update and is compatible with older hardware to reduce e-waste and the need for hardware.
  • Minimise network usage. Optimise data transfers by using compression, caching, and other techniques to reduce the amount of data sent over networks, thereby reducing energy consumption.
  • Focus on long-term equipment purchases. When choosing equipment for development and deployment, consider energy efficiency, recyclability, and the manufacturer's commitment to environmental responsibility.
  • Adopt eco-friendly workplace practices. Encourage recycling, energy conservation, and other environmentally friendly activities among your development team and your organisation.
  • Monitor and assess regularly. Evaluate the environmental impact of your software products and development techniques regularly, then adjust based on your findings.

The eight standards of green software engineering

After the introduction of eight green software engineering principles, they have been widely accepted as fundamental pillars ensuring software development's sustainability, functionality, and environmental friendliness.

Companies can significantly benefit from adhering to these principles as they provide a framework for creating environmentally responsible software applications. Here is a brief overview of what these principles entail:

  1. Carbon – developing carbon-efficient applications reduces the carbon footprint of software development.
  2. Electricity – developing energy-efficient applications decreases the electricity required to power them. It also potentially saves money and lowers greenhouse gas emissions.
  3. Carbon intensity – prioritising renewable energy sources and increasing energy efficiency minimises carbon and energy waste.
  4. Embodied carbon – developing hardware- and network-efficient applications optimise the environmental effect of hardware manufacturing and disposal, as well as network energy use.
  5. Energy proportionality – improving hardware energy efficiency reduces energy waste and increases the sustainability of software development.
  6. Networking – limiting the amount of data transferred and the distance it travels over the network lowers energy consumption and improves network efficiency.
  7. Demand shaping – developing carbon-aware applications raises environmental awareness and encourages sustainable habits.
  8. Measurement and optimisation – concentrating on step-by-step improvements that boost overall carbon efficiency helps to identify areas for improvement and encourage continual improvement in software development techniques.

Introducing the ecoCode plugin: the idea and tools at the core

The ecoCode plugin aims to reveal bad code practices, such as poor optimisation and memory leaks. It is compatible with Java 11 and higher and operates on docker. The plugin is already available for Android, iOS, Java, Python, and PHP.

You can check the list of Android/iOS best practices that the ecoCode development team refer to. Here is an extract of the rules for Android:

  • Use dark theme on devices.
  • Avoid third-party animations in the user interface.
  • Use workManager.
  • Avoid using Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS.
  • Monitor changes in the charging status of the device using a broadcast receiver registered in the ACTION_POWER_CONNECTED and ACTION_POWER_DISCONNECTED actions.
  • Do not use getSystemService(Context.VIBRATOR_SERVICE) unless absolutely necessary to save the battery.
  • Check if the low power mode is enabled and adapt the resource usage accordingly.

Here are the rules that have already been brought to Android:

  • FusedLocationRule.class,
  • BluetoothLowEnergyRule.class,
  • KeepScreenOnAddFlagsRule.class,
  • KeepScreenOnSetFlagsRule.class,
  • BrightnessOverrideRule.class,
  • InternetInTheLoopRule.class,
  • KeepCpuOnRule.class,
  • ThriftyMotionSensorRule.class,
  • WifiMulticastLockRule.class,
  • LocationLeakRule.class,
  • CameraLeakRule.class,
  • SensorManagerLeakRule.class,
  • DurableWakeLockRule.class,
  • MediaLeakMediaRecorderRule.class,
  • MediaLeakMediaPlayerRule.class,
  • RigidAlarmRule.class,
  • ContinuousRenderingRule.class,
  • KeepVoiceAwakeRule.class,
  • ThriftyBluetoothLowEnergySetAdvertiseModeRule.class,
  • ThriftyBluetoothLowEnergyRequestConnectionPriorityRule.class,
  • ThriftyGeolocationMinTimeRule.class,
  • ThriftyGeolocationMinDistanceRule.class,
  • ChargeAwarenessRule.class,
  • VibrationFreeRule.class,
  • TorchFreeRule.class,
  • ThriftyNotificationRule.class,
  • UncompressedDataTransmissionRule.class,
  • SensorCoalesceRule.class,
  • JobCoalesceRule.class,
  • SaveModeAwarenessRule.class,
  • ThriftyGeolocationCriteriaRule.class,
  • HighFrameRateRule.class

There are more rules registered in the candidate rules list and not implemented yet.

Putting the ecoCode to test: insights from ELEKS’ project

At ELEKS, we decided to put the ecoCode plugin to the test on one of our projects.

And here is the example of issues identified on the Android app:
  • 7 issues with the use of a light theme in themes.xml which can affect power consumption on smartphones.
  • 4 issues with <uses-permission android:name="android.permission.WAKE_LOCK" /> turning on the screen that drains the battery.
  • 1 issue regarding the use of Firebase Analytics which may be a threat to privacy.
  • 10 notifications-related comments from Cordova.
Here's the result for iOS

Based on our experience with ecoCode, we can say that ecoCode is at the initial stage of development and still requires fine-tuning and expanding the code analysis rules. But from the results we received, you can already see what goals it sets for itself.

Key takeaways

As the world strives to become more sustainable, green software engineering is emerging as a key player in developing solutions with minimal ecological footprints.

Companies have several options to ensure a greener solution, including taking actionable steps such as optimising code, integrating energy-efficient libraries, implementing power-saving features, etc.

Following eight green software engineering standards can also help establish a framework for environmentally responsible software development. Additionally, companies can opt for external tools that help ensure the code's eco-friendliness. Our investigation has shown that even though the ecoCode plugin is still in its early stages of development, it has the potential to help develop more sustainable applications.

Have a question?
Speak to an expert
app development
Explore our application development services
Contact Us
  • We need your name to know how to address you
  • We need your phone number to reach you with response to your request
  • We need your country of business to know from what office to contact you
  • We need your company name to know your background and how we can use our experience to help you
  • Accepted file types: jpg, gif, png, pdf, doc, docx, xls, xlsx, ppt, pptx, Max. file size: 10 MB.
(jpg, gif, png, pdf, doc, docx, xls, xlsx, ppt, pptx, PNG)

We will add your info to our CRM for contacting you regarding your request. For more info please consult our privacy policy
  • This field is for validation purposes and should be left unchanged.

The breadth of knowledge and understanding that ELEKS has within its walls allows us to leverage that expertise to make superior deliverables for our customers. When you work with ELEKS, you are working with the top 1% of the aptitude and engineering excellence of the whole country.

sam fleming
Sam Fleming
President, Fleming-AOD

Right from the start, we really liked ELEKS’ commitment and engagement. They came to us with their best people to try to understand our context, our business idea, and developed the first prototype with us. They were very professional and very customer oriented. I think, without ELEKS it probably would not have been possible to have such a successful product in such a short period of time.

Caroline Aumeran
Caroline Aumeran
Head of Product Development, appygas

ELEKS has been involved in the development of a number of our consumer-facing websites and mobile applications that allow our customers to easily track their shipments, get the information they need as well as stay in touch with us. We’ve appreciated the level of ELEKS’ expertise, responsiveness and attention to details.

Samer Awajan
Samer Awajan
CTO, Aramex