今日推薦開源項目:《塔防 Mindustry》
今日推薦英文原文:《As Web Developers, How Can We Help Fight Climate Change?》
今日推薦開源項目:《塔防 Mindustry》傳送門:GitHub鏈接
推薦理由:國慶節當然就是玩啊,下次放假可就是元旦了。這次要推薦的項目是一款開源塔防遊戲,興許有人已經在某蒸汽平台上看到過它了,在這裡你要做的不僅是造塔防禦,還需要自己動手收集材料,這也是它比起其他塌方來說有所創新的地方。國慶雖長,但也要注意勞逸結合,誰也不知道下次周末還能不能抽出空閑來休息。
今日推薦英文原文:《As Web Developers, How Can We Help Fight Climate Change?》作者:FelDev
原文鏈接:https://medium.com/better-programming/as-web-developers-how-can-we-help-fight-climate-change-80bc8dd4ec56
推薦理由:儘管網路開發者這個職業看起來很環保,但一樣可以使用更環保的工作方式阻止氣候的變暖
As Web Developers, How Can We Help Fight Climate Change?
The internet is a growing source of pollution worldwide. Can we be part of the solution?
When you think of 「dirty」 professions, IT professionals rarely come up first. We don』t burn coal in the office or throw away single-use computers daily, but the internet is a growing source of pollution. Most of the problem comes from the fact that many countries get their electricity from fossil fuels, coal, and other non-renewable resources.Recent studies estimate that video streaming alone creates 300 tons of CO2 yearly. (Numbers vary from study to study, but it』s safe to assume that the truth is many hundreds of tons.)
So, as web developers, what can we do to help? Quite a few things, actually. Starting with our own personal impact.
The Things That Apply to Any Office Worker
Remote work
Not using a car to go to work is obviously a great way to reduce your impact. For those of us who really can』t get to the office without a car, there』s something even better than cycling to work. Work from home!Even if you do it only one day out of 10, that』s 10% less car-related pollution.
Stream less
Streaming music is nice, but it』s surprisingly not much greener than buying CDs. You know that you』ll listen to some music over and over again, so why not save those tunes to your local drive?Also, when you do stream music, avoid loading the 4K video clips that come with it if you』re not going to watch it.
Use less
Are you still subscribed to a boating newsletter even though it』s been a decade since your last boat trip? Unsubscribing to services you don』t use anymore is good for the environment and even better for your sanity. At least unsubscribe from marketing lists you don』t enjoy anymore.(It』s cool if you want to use {LESS} as your CSS preprocessor too.)
Talk to your coworkers
「The world will not be destroyed by those who do evil, but by those who watch them without doing anything.」 ― Albert EinsteinIt』s awesome if you walk to the office and bring your lunch in a reusable container and all, but it』s even better if the whole office makes an effort. You don』t have to be annoying to raise awareness levels. Just suggest solutions when you see them. Open up conversations when the timing feels right. People are likely to be thankful in the long run.
The Web Developer Specific Stuff
You』ll be happy to learn that a great way to make your websites greener is to make them more performant.Is your website overweight?
As you might know, the web has an obesity problem. Websites are getting heavier year after year, and this has an impact on the number of resources required to store and serve them. Clearly, the people who make those websites can be part of the solution!I won』t get technical, but general ideas for a thinner initial load include optimizing media assets, lazy loading, optimized code, and not using a whole framework just to display text and images. Use one if you need one — not because X is trendy.
Don』t call for no reason
Another way to make your projects both greener and more performant is to reduce the amount of HTTP requests.Not so long ago, I stumbled on a forEach loop that was iterating over an array of IDs and sent a request to the server for every ID. Why not send the whole array in one request? I did. And then the performance was instantly better.
You can also make your API calls thinner. If all you need from a JSON object is one value, why send the whole object? The more users you have, the more relevant those considerations are.
Clean up after yourself
Whether it』s SAAS, PAAS or IAAS, all cloud services require energy to run. If not both energy and money! It』s very easy to leave stuff hanging around for no reason in software.When was the last time you made sure all the services you use actually do something? It』s an exercise worth repeating every other year and definitely at every new job. I remember finding SSL certificates on auto-renew that were attached to nothing, GBs of worthless data hosted on a CDN, a small server doing nothing 24/7…
You get the idea. If you don』t use it, lose it.
Speaking of cloud services…
There』s now such a thing as 「Green Hosting.」 In a nutshell:「Green hosting includes Carbon offsetting, powering a data center directly with renewable energy, planting trees, plants and grass around and over Data Centers and more day-to-day activities such as energy conservation and the use of energy saving appliances.」 ―WikipediaIt』s the digital equivalent of buying organic food. And while the cost could be a bit higher, truthfully claiming that your servers are eco-friendly is an easy way to boost a company』s reputation.
If your boss thinks customers don』t care about green certifications, you can show him this picture of 500,000 people demanding action towards climate change.
September 27, 2019, in Montréal. Source: The New Climate
Using your skills
If you』re reading this, you probably have in-demand skills. Why not use those to create useful tools? There are so many things you could do with your expertise! What if you could:- Make carpooling easier.
- Ease the process of giving food that would go to waste.
- Make interesting data visualization to help raise consciousness.
- Build management tools for local initiatives.
Closing Thoughts
The challenge of climate change is one that will most likely be solved by tons of small changes, not one superheroic breakthrough.Making one website 1MB lighter will not improve the web』s ecological footprint by much. But if thousands of people make their websites 1MB lighter, that』s a small step forward as well as faster load times.
Until we come up with a superheroic breakthrough, the least we can do is our part.
下載開源日報APP:https://openingsource.org/2579/
加入我們:https://openingsource.org/about/join/
關注我們:https://openingsource.org/about/love/