It is American Thanksgiving (well, in America, it’s the next day here in Japan) and Justin asked a good question in the Mega Maker Slack today and I wanted to share my answer publicly.

When it comes to tech or business, what are you most thankful for?

My answer:

Open source. Not just because there’s a bunch of high quality tools available for free (gratis), but that it shows that humans, no matter where they’re from or what they believe can work together for the greater good.

When I was first getting into programming windows ruled and the idea of being able to work using open source all day every day was still a bit for dreamers. Grateful that’s no longer the case.

Sustainability of websites is mostly determined by how much electricity the website consumes. All websites consume electricity 24/7. There’s a server powered up, listening for requests. They consume it by proxy transferring bits to the client and they consume it on the visitor’s computer by rendering the content.

You can’t do much about electricity consumption of a server being online 24/7 beyond simplifying your hosting infrastructure (you don’t need a load balancer). What’s easier to control is the the number of bits you send to clients who visit your website.

Images are a large source of unnecessary bits. We shouldn’t be uploading raw uncompressed 40MB images designed for a poster to display on a smart phone. They’ll load slow, chew through our visitor’s data plan, and consume unnecessary electricity to transfer and render such a large image. You should resize your images for the web.

Traditionally images are input into a website with a simple image tag like below:

<img src="https://jamesvandyne.com/wp-content/uploads/2020/10/voted.png" alt="Ballot approved" border="0" width="600" >

You tell the browser where the image is, give it some alt text for cases where the image doesn’t display / accessibility purposes, and maybe even set a size. Once your browser encounters this tag it will dutifully download and display the image. Life is good.

But what if that image is halfway down the page and completely off screen? Doesn’t matter – still downloaded.
It doesn’t matter that they may not scroll down far enough to see the image, it’s in your markup the browser downloads it. This is a waste of electricity and bandwidth.

There are methods using Javascript to dynamically change the src attributes of your image tags when the user scrolls near, but then your simple image tag now requires Javascript and client side computation just to display. It’s not an elegant solution.

Turns out there’s a better way without Javascript using the loading attribute on your images. Support is in all major browsers since mid 2019 / early 2020. It works out of the box on Firefox/Chrome, but it must must be enabled in Safari under the Advanced > Experimental Features settings for now.

Graph displaying caniuse data for the loading attribute

By simply adding loading="lazy" to our image tags the browser will lazy load our images, i.e. it won’t download the image until is nearly in view.

So by modifying the example above to

<img src="https://jamesvandyne.com/wp-content/uploads/2020/10/voted.png" alt="Ballot approved" border="0" width="600" loading="lazy">

we can reduce the number of data transfers, reduce total transfer size (unless they scroll the image into view), reduce electricity consumption across the board, and improve page load times. It’s a win-win-win.

I recently mused about how my next computer should be a Thinkpad running Debian. I still half-think that, but I feel conflict on the issue. Let me explain.

My first Mac was an iBook G3 running OS X 10.1 in 2002 and I’ve been on Apple computers exclusively since. I came from running desktop Linux (Gentoo at the time) and a major reason why I switched to OS X was the unix environment without the fiddling.

Over the years I starting developing native apps and valuing apps that take the time and effort to be consistent with the systems. The consistently between apps made the entire system feel cohesive and easy to use. “Mac Apps Behave / Are Designed Like This”. I was hooked. I am hooked.

But the world has changed since those days. We’re now connected to the net with fiber rather than dialing in for a ~couple~ all hours of the night. Web browsers have become the new platform to target and Every app is cross platform and nothing is native.

Hardware is a growing concern for me as well. Apple makes some of the best laptops. I look forward to the Apple Silicon Macs. But repairing your Mac often means replacing the entire unit and paying more than purchasing a new one. They’re no longer upgradable and filled with glue.

Contrasting with Thinkpads you can upgrade the ram, swap out the hard drive, add in LTE modems, and even change the display. If something breaks you can replace just that part. Expandability should allow the machine to have a longer life. I can even get them fully supported with Ubuntu or Fedora Linux.

If the software I use on a regular basis no longer native, not designed for the Mac, and everything is inconsistent, what’s the advantage of using them on the Mac?

Whose computer is it? (tinyapps.org)
Some Apple apps bypass some network extensions and VPN Apps. Maps for example can directly access the internet bypassing any NEFilterDataProvider or NEAppProxyProviders you have running

I understand why Apple would want its apps to access the internet unencumbered by potential nefarious network filters installed on a system, but at the same time it’s my computer. And that decision should me left up to me. More and more I think my next computer should be Thinkpad running Debian.

I finished watching Long Way Round while waiting for new episodes of Long Way Up. The adventure travel reminded me a lot of blogs I used to read when I was in high school1 and college2 and dreaming of studying abroad in Japan and living in Japan in general.

In those days, we’d blog, maybe post a bad photo or two, and commented on each others’ sites. Nobody knew each other in real life, but, over time, you’d get a real sense of community. You were of course following the posts, but there were also a regular cast of commenters that you’d also get a sense of knowing. It felt authentic…and innocent.

Why can’t we have this today – but on larger scale? How would you even find these sites on the modern web? Everything is hidden behind “the algorithms” and or paid for by a marketing campaign. Can you even find them?

1 Sushicam.com was a great photo blog by a guy living in Japan. I used to have a few prints of his and also bought his old Canon 10D – until my parents said “If you have enough money to buy a camera, you have enough money to pay rent”.
2 Justin Klein was a great blog from a traveling programmer. Not just Japan, but all over the world.

I watched The Social Dilemma on Netflix. Much of the information presented I already knew – big tech mines all of our personal data and manipulates us to increase screen time in whichever way they can.

The movie itself has a story in-between the interview clips that help demonstrate the effects that social media (and cellphones) enable within a family. In one scene the son’s cellphone’s screen’s cracks and the mom says that she’ll replace it if he can not use his phone for a week, since, as he says “it’s no big deal”.

The algorithms notice his usage has changed, i.e. stopped, analyze that similar people in his area haven’t changed their usage and start a “reactivation” sequence, to suck him back in. To tempt him to open the app they find a recent event that will entice him back in and, like a drug addict, he’s back.

It reminds me of the seemingly random push notifications I get from instagram when I haven’t used the app in a few days. Nothing is random with social media, but it didn’t occur to me that they were trying to “reactivate” me and just how slimy that is. There’s no regard for the “user” – only their advertisers, which is their real user.

Most of all, watching The Social Dilemma makes me grateful for the indie web, communities like micro.blog, and apps like Sunlit that allow social media without algorithms without manipulation for advertisers, powered (more or less) by RSS and other open standards.