Full stop.
Does anyone remember the guy who floated around Portland, Oregon in the 1990s with a salmon effigy on his head? The “Save the Salmon” guy? I do. I once had a conversation with him which started at the Lloyd Center MAX stop and carried on until he got off under the Burnside Bridge. That day his point was clear: if everyone stopped towing around the added weight of license plate frames, the cumulative savings in tailpipe gases would save salmon. His message was so simple it was elegant. He had chosen to tackle an enormous problem with a small, approachable solution. Assuming people have common hand tools and the desire to help fish and other living things (such as themselves), they would gladly take part. I know personally, I have never had a frame on any license plate since that day, and I’ve also been conscious of lugging around extra weight in the vehicle when I didn’t have to. Because why not?
I think the dot/period in code commenting is like the license plate frame, except it’s my cause and I’m the Save the Dolphin lady. The past ten years, when working with others on code, I’ll always suggest ways to save less data and achieve the same thing, and I’ll say, “Do it for the dolphins!” Every character, every word, every paragraph, every image we store on servers — are of consequence. Those servers grouped in data centers burn electricity/energy day in and day out storing all the useless shit we forget about. According to the Greenly Institute,
…data storage now accounts for more carbon emissions than the commercial airline industry – and a single data center uses the same amount of electricity that can power up to 50,000 homes. Keep in mind, there are over 8,000 data centers all around the world, and as the need and desire for data storage continues to grow – so do the amount of data centers, eating up electricity, across the globe.
Greenly Institute, Greenly.earth
The International Energy Agency states that data storage and transfer uses 1-1.5% of global electricity use. Holy hello.
Maybe if it’s not actually informational, or helpful to the human race in some way, we should delete the content? It can be stored on a SSD drive and only plugged into your computer for access when desired. And let’s be honest, how much time do you spend looking at your own old photos – every one of them? I try to occasionally go back through my file storage and clean out old crap, but I know I still have an enormous footprint. I’m not actually that kind to the dolphins. But it’s the thought that counts, right?
Stop the Full Stop!
One tiny actionable change is helpful toward making larger changes if many people adopt it. I propose stopping it with the full stop in code comments. Code comments don’t need a period, even if they are full sentences. They might need a period if another comment follows. But this is ridiculous:
/**
* Does something.
*
* @param $parameter parameter one.
* @param $parameter2 parameter two.
* @return array.
*/
WHHHHHYYYYYY?
I recently audited a ~3000 line PHP file and found over 89 periods in comments and PHPDocs. Not many of them was worthy of a period, because few of them was a complete sentence. Yeah, maybe my high school English teacher was a bit strict and terrifying (Hello, Mrs. Bidwell) but if it ain’t a sentence and especially if it ends a line, don’t punctuate it!
Anyway, please someone explain to me, why the heck are code comments getting full stops?! When did that start, and when will it end? The only thing I can think of after looking at so many unnecessary dots in code is that maybe the dots help people find comments (a RTL thing)?
Even if the savings from using unnecessary punctuation would be practically nil, at least we’d be making our English teachers proud, and setting a habit of thought that would influence one another’s lives in other areas.
Kids These Days
I’ll go ahead and celebrate the younger generations with their abbreviated, poorly punctuated communiques. They get their point across efficiently and maybe despite themselves save energy in data transfer and storage. The best thing that can happen is for their social media outlet of choice to go under and burn their data, such that they have to start over. (I bet they haven’t thought about this inevitability when they decided to store their photos this way!)
Kids, go POSSE (it’s so cool, man) and store your data on your drive (like an external hard drive) if you mean for it to be permanent. And don’t forget: that photograph you posted online 10 years ago is still sitting on a server somewhere. That server runs on electricity, for a while (not forever).
It’s like leaving a light on when you leave the room, except your mom/wife isn’t there to nag you. Just me.