Inspiration
One of the most pressing societal issues right now is the environment impact of CO2 emissions. Companies and organizations around the world have made huge efforts in an attempt to avoid environmental disaster. The field of Computer Science often overlooks these issues because from the outside, it seems programming would not have a negative impact on our planet’s health. However, it is important that we be aware of the part we play and know how we can help by improving the way we code.
What it Does
EverGreen is an eco-aware IDE. Given an expected amount of traffic and set of computer specs, EverGreen is able to capture the environmental impact that a programmer's code will have by using various metrics such as the carbon emitted in the average lifespan of a car. Since many of today's large computations are done on the cloud, we have provided users with various industry standard AWS instance type based architectures.
How We Built it
- CALCULATING APPROXIMATE CO2 EMISSIONS After reading through several papers and articles we formulated a means of calculating the CO2 emissions. Following the results of this paper, we used the following equations to calculate the CO2 emissions for a given piece of code: https://arxiv.org/abs/1906.02243
We then needed to generalize the emissions for other hardware. This was done by using profiling and static analysis to extrapolate and approximate the CO2 emissions for other architectures.
- SUGGESTING CODE IMPROVEMENTS We used a Context-Free Grammar to map various commonly written code with lines that produce less CO2 emissions. Additionally, we made it such that we can easily create more rules in the future.
Challenges We Ran Into
One of the most difficult aspects of the project was to suggest improvements for inefficient code. Initially, we attempted a "find and replace" solution, but we quickly saw flaws in attempting to make our code flexible. Our solution was to use grammars in order to figure out a seemless way to create additional performance suggestions.
Accomplishments That We're Proud Of
A primary goal of ours was to evoke emotion about environmental impact, and we are really proud of the graphics we created to do so. Using hand drawn graphics, we created animations that give an impactful visual representation of the enviornmental influence of the user's code.
What We Learned
We spent a significant amount of time learning different ways to analyze our code. We learned to use RAPL and profiling to measure the power consumption of our local machines and static analysis to suggest code to the user.
What's Next For EverGreen
We hope to improve our grammar to suggest more efficient python code. Additionally, we would like to add support for multiple languages to help all programmers be more environmentally conscious about their code.
Log in or sign up for Devpost to join the conversation.