JavaScript vs. the World

Before I started my backend developer position at WebDevStudios, I needed to buy a laptop. Having worked exclusively on Apple computers since 2004, I bought what was at the time the latest and “greatest” offering, the late 2016 model of the MacBook Pro with Touch Bar.

It has come to be perhaps my biggest regret; I have had nothing but problems with the machine. Occasionally glitchy graphics, power control issues when running dual 4k displays, and start-up/shutdown issues aside, my biggest complaint has to be the keyboard. It’s gotten so bad, in fact, that just yesterday, I finally brought my laptop in to have the keyboard replaced, only to notice beforehand that the “Service Battery” message was displaying.

The tech at the Genius Bar told me I’ll perhaps get the battery replaced for free as part of the keyboard replacement, because apparently the keyboard, battery, and track pad are all one component in these machines. I’ll find out in 7-10 days, but in the meantime, I’ve powered up the ol’ Raspberry Pi that I won as part of a contest at Midwest PHP a couple of years ago.

Adventures in Computing

I’m on vacation until after the new year, and going from a powerfully unreliable machine to a reliably non-powerful machine is a shift. In fact, before I remembered that I even owned this Raspberry Pi, tucked away in a drawer as it was, I thought I might just have to miss out on the coding exploration I’d so looked forward to as part of this vacation.

Last weekend, I spent upwards of 10+ hours scaffolding out a new infrastructure for this site, wrestling with server configurations, learning how to properly register a subdomain, setting up a package server, and otherwise doing the sorts of modern dev-ops-ish sorts of things I do every day at work. Of course, I didn’t intend to spend my whole vacation that way, but I did want to do enough of it that I’d feel satisfied that I learned something new over break. Taking my laptop in for repairs and being told it would be 7-10 days before I saw it again was something I dreaded, but knew I’d deal with. I do, after all, have other devices I can use to browse the web, but nothing else I can use to make it.

After I rediscovered my Raspberry Pi, I dug out all of the things I needed to make it work: a power supply, a wired keyboard and mouse, and an HDMI cable. My first job was to figure out how to uninstall the RetroPie app I’d installed awhile back to play the SNES games I own at my desk. Thankfully, the developers included an uninstall script that did the job, and before I knew it, I was back online browsing in…the Epiphany Web Browser.

Let’s say that this was a less than ideal experience.

Fast forward a couple of hours, and I’ve installed the following on this tiny computer with 28GB of storage and just 1GB of RAM:

  • Git
  • PHP
  • Nginx
  • MySQL
  • Chromium

I’ve also read tutorials that suggest that the IntelliJ editor is installable on Raspberry Pi, and I’m going to give that a go next.

Still, the most fascinating part of all of this is just how unusable the web has become.

Browser Testing

The model of Raspberry Pi I own ships with two web browsers: the aforementioned Epiphany Web Browser, and something called NetSurf. Epiphany is functional, but appears to run an outdated version of WebKit where most websites will tell you you must update it to access their site. I was able to login to Gmail only after watching it crash a handful of times, and even then, I received an HTML-only experience that dates back to a much simpler time. NetSurf is a non-starter, as it doesn’t seem to have an ECMAScript engine to speak of, and of course, the vast majority of the web requires JavaScript to function at all.

After installing Chromium, I was at least able to get a modern web experience, though even writing this post in the new WordPress editor, I’m starting to notice significant lag as more and more blocks come into play. Amazon-owned sites like The Washington Post and both crash after trying to load all of their assets, so clearly they’re not designed for everyone.

It’s been a bit of an eye-opening experience, browsing the modern web with a modern (for educational purposes), but underpowered machine. As a developer who works in the WordPress sphere, it’s especially interesting to think about how “democratizing publishing” has changed so drastically, to the point where it may in fact be much less democratized when factoring in JavaScript rendering engines and accessibility. I hope these are some of the problems we start tackling in 2019, and that we’ll remember that not everyone is viewing our work using the latest and greatest technologies.