I've been inspired to jot this down because I've been reading Mark Twain's travelogues, which are truly a revelation to me. Yes, Twain is Twain, but having never read anything beyond Tom Sawyer and Huck Finn before, I really didn't have any idea of what an incredible writer he really was. He was thoughtful, observant, witty and had what are amazingly prescient observations that still ring true 150 years after he first put them down on paper. If you haven't read The Innocents Abroad, Roughing It, Life on the Mississippi, and A Tramp Abroad, you really need to take the time and do so as they are some of the best books I've ever read. (I especially recommend the audio books as read by Grover Gardner linked above - he's an incredible narrator who brings Twain to life.) Twain is revered for good reason, I just hadn't truly understood why until I read these books. As an example of what I'm on about, here's an excerpt you probably will never see in a list of famous Twain quotes, but should be, as it's truly hysterical:
While I am speaking of animals, I will mention that I have a horse now by the name of “Jericho.” He is a mare. I have seen remarkable horses before, but none so remarkable as this. I wanted a horse that could shy, and this one fills the bill. I had an idea that shying indicated spirit. If I was correct, I have got the most spirited horse on earth. He shies at every thing he comes across, with the utmost impartiality. He appears to have a mortal dread of telegraph poles, especially; and it is fortunate that these are on both sides of the road, because as it is now, I never fall off twice in succession on the same side. If I fell on the same side always, it would get to be monotonous after a while. This creature has scared at every thing he has seen to-day, except a haystack. He walked up to that with an intrepidity and a recklessness that were astonishing. And it would fill any one with admiration to see how he preserves his self-possession in the presence of a barley sack. This dare-devil bravery will be the death of this horse some day.
He is not particularly fast, but I think he will get me through the Holy Land. He has only one fault. His tail has been chopped off or else he has sat down on it too hard, some time or other, and he has to fight the flies with his heels. This is all very well, but when he tries to kick a fly off the top of his head with his hind foot, it is too much variety. He is going to get himself into trouble that way some day. He reaches around and bites my legs too. I do not care particularly about that, only I do not like to see a horse too sociable.
-Mark Twain, The Innocents Abroad
That sort of acerbic humor is dotted throughout his books, though not excessively as bits like this are surrounded by long passages of flowing elucidation or scrutiny.
One of my favorite parts of Roughing It is Twain's observations of California's wilderness:
A Californian forest is best [seen] at a little distance, for there is a sad poverty of variety in species, the trees being chiefly of one monotonous family—redwood, pine, spruce, fir—and so, at a near view there is a wearisome sameness of attitude in their rigid arms…. [Californians would] stand astonished, and filled with worshipping admiration, in the the presence of the lavish richness, the brilliant green, the infinite freshness, the spend-thrift variety of form and species and foliage that make an Eastern landscape a vision of Paradise itself. The idea of a man falling into raptures over grave and sombre California, when that man has seen New England’s meadow-expanses and her maples, oaks and cathedral-windowed elms decked in summer attire, or the opaline splendors of autumn descending upon her forests, comes very near being funny—would be, in fact, but that it is so pathetic. No land with an unvarying climate can be very beautiful.
-Mark Twain, Roughing It
As someone who grew up in New England, I've always been less than impressed by California's forests - saving of course for the truly awe-inspiring giant redwoods and sequioas - this rings incredibly true to me. I've never really been explain my opinion to the nature worshipers here on the West Coast who constantly rave about the wilderness here. I just can't relate. In my teen years and through college, I lived in the White Mountains of New Hampshire, right next to the Appalachian Trail. I don't have fond memories of northeastern winters, to put it mildly, but summer hiking in the mountains (as relatively tiny as they are) was something I remember with fondness. Trekking up the numerous, well-marked trails, leaping among the giant granite boulders, playing in crisp streams, discovering secret ponds and immersed in emerald green foliage everywhere with not a rattlesnake or venomous spider to be found beats out anything California has to offer, hands down.
(Side note: I had an absolutely batshit crazy Track coach who had the cross-country team jog up Mt. Washington one August before the school year started as part of our training. Getting to the top of the 6,000 foot peak and scrambling over the last bit trail, muddied and soaked from the clouds surrounding the summit, surprising the flock of tourists who had driven up the Auto Road to the visitor center is an amusing memory I'll never forget).
Anyways, I've been in California for 25 years and I've always been vaguely disappointed every time I go for a hike. I find it comforting that Twain thought the same thing a century ago, when California was even more pristine. All that said, 23 years of New England winters is enough for a lifetime. I'll take year-round clement weather, no matter how monotonous, over 7 months of dreary grey weather from now on, thanks.
Another amusing thing I discovered while reading Roughing It was the fact that young Samuel Clemens once went surfing in Hawaii. In the late 1800s!! For some reason, the idea of it amuses me greatly. Twain cultivated an image of the perfect Southern Gentleman later in life - despite living in Connecticut - and the fact that he went all the way to Hawaii and surfed 100 years before The Endless Summer is pretty great:
In one place we came upon a large company of naked natives, of both sexes and all ages, amusing themselves with the national pastime of surf-bathing. Each heathen would paddle three or four hundred yards out to sea, (taking a short board with him), then face the shore and wait for a particularly prodigious billow to come along; at the right moment he would fling his board upon its foamy crest and himself upon the board, and here he would come whizzing by like a bombshell! It did not seem that a lightning express train could shoot along at a more hair-lifting speed. I tried surf-bathing once, subsequently, but made a failure of it. I got the board placed right, and at the right moment, too; but missed the connection myself.—The board struck the shore in three quarters of a second, without any cargo, and I struck the bottom about the same time, with a couple of barrels of water in me. None but natives ever master the art of surf-bathing thoroughly.
-Mark Twain, Roughing It
Seriously, if you haven’t read anything else by Twain except Tom Sawyer, you need to do yourself a favor and read his non-fiction. It's all truly fantastic.
-Russ
]]>This is a pretty exciting moment in tech. Like clockwork, every decade or so since the broad adoption of electricity there’s been a new technical innovation that completely upends society once it becomes widely adopted. One could even argue it goes back to the telegraph in the 1850s.
With appropriate caveats and rough dating, here’s a list I can think of:
And now AI. This is a big one. The timing is right, and the technology is the requisite order of magnitude improvement over previous ways of doing things.
In response to Tim Bray's somewhat dismissal blog post about Large Language Models (LLM), I left this (somewhat edited) comment:
The data sets that current LLMs are trained on are basically any old shit off the Internet...
Sure, but also every line of open-source code, manuals, how-to guides, recipes, all of Wikipedia, online magazines, patents, research papers, medical sites, dictionaries, Project Gutenberg books, museums, MIT open courseware, US government sites (USGS to the Smithsonian), etc., etc. The amount of useful information online *vastly* outweighs the entirety of Twitter, Facebook and disinformational blogs combined and then some. To think otherwise is just pure cynicism.
Yes, the quality and consistency of LLM summaries could be better, but that's only part of what's going on. It's the ability of LLMs to follow detailed instructions which is truly mind boggling. This is one of those monumental leaps forward in computers akin to the integrated circuit or the GUI. Web search like queries and a "write x in the style of y" examples barely scratches the surface of what's possible.
Prompts are programming without the details.
For old school techies who have spent decades learning how to break down tasks into their constituent components, sometimes down to the byte, it's going to mean having to do a lot of unlearning. Prompts seem more like user stories that a product manager would write, rather than something a computer could process and implement. The fact that it works seems like magic, even to hardened computer experts. Actually, more so, as they know what it would take to program its functionality by hand. The other issue is that the AI output isn't consistent or predictable - always a red flag for a computer programmer, who expects that a program being run twice will always produce the same results, and if it doesn't something is seriously wrong. But it doesn't matter, what's being produced is already good enough and getting better at a pace that is astounding. LLMs bring the power of computer programming to the masses.
For those who are just starting to interact with LLMs, it might be a bit confusing, as prompts look more or less like the command lines or chat boxes we've been using for decades. But prompts aren't just queries and REPL like commands - they allow input of complete instructions as if you were telling an intelligent being what to do. Adding detailed context and rules to the prompts allows the LLMs to create everything from code to poetry with surprising utility. The outcome isn't just a replacement for a Google search, it's so much more.
These plain language instructions prepended to prompts is how Bing's implementation differentiates itself from ChatGPT and sets up guardrails and response type. This is what people are messing with when they "jailbreak" the chats. Seeing this is what finally flipped the light on for me. Imagine trying to write all the code to implement those instructions manually. It'd be nearly impossible.
Just look at the depth and breadth of these example prompts:
https://github.com/f/awesome-chatgpt-prompts
Yes, LLMs aren't perfect right now, but it's sort of like DOS users complaining about the mouse. The speed at which this stuff is improving is truly mind blowing and represents a fundamental shift in HCI that will be with us for the rest of our lives. This isn't a VC fever dream or another Web3 debacle. This is for real.
One last note: You'll know you truly get what's happening when you become very, very frightened. It's not a Skynet AGI style apocalypse - it's worse. It's "information mechanization", and just like what mechanization did to manual laborers, AI is going to do to office workers.
-Russ
]]>Since today is the Super Bowl, I figured it would be a good moment to reminisce about something that happened a few years ago when I was working at Amazon.
It all started because someone at Amazon forgot to return an email.
It was December 2015 and CBS Sports was beginning their run up to Super Bowl 50 which, in addition to the NFL Playoff games, was to be streamed for free online. Here’s an article which ran at the time about it:
Fierce Wireless: As Super Bowl preps its largest live stream ever, the OTT industry scurries to catch up to broadcast
February 3, 2016
…CBS will make the Super Bowl stream available on desktops and tablets via its website, as well as on its CBS Sports app on Apple TV, Roku, and Xbox One. (Verizon smartphone users will be the only viewers able to live-stream the game on their mobile phones, using the NFL Mobile App.)
The broadcaster's digital unit has been preparing to stream the Super Bowl for the better part of a year, according to Jeff Gerttula, SVP and general manager of CBS Interactive.
"What we've had to do is go through … every piece of the stack and work to optimize it. From a stability standpoint we're making sure we're eliminating any single points of failure, making sure we have redundancies built everywhere, and from a latency standpoint we're making sure that there's no unnecessary inefficiencies," Gerttula said. "For us, we're inserting ad tech, we're inserting viewer tracking. There's a lot of data components with this and making sure we're testing each of those and optimizing along the way is really important to reducing latency."
[Emphasis mine.]
By the end of 2015, Fire TV had been out for over a year and a half and it was really quite successful. In fact, by then it was already the most popular streaming media box being used according to our internal numbers. And yet, CBS Sports was going to be streaming to Roku, Apple TV and the XBox but not Fire TV. It seemed pretty crazy that CBS was simply ignoring the platform or had balked at supporting Fire TV for some business reason - especially since they were streaming the games for free.
Only they hadn’t. From what I understand, the previous summer, someone at CBS Sports had reached out to someone at Amazon to talk about their plans to live stream the NFL Playoffs and the Super Bowl and wanted to include Fire TV as one of the streaming media devices supported. Only no one got back to them.
Fast forward to mid-December and CBS streamed their first playoff game and started promoting the Super Bowl with ads and a press release about the free streams and all the devices you can use to view them on - with the noticeable lack of support for Fire TV. That was the weekend when I first learned about it. What the hell? Amazon hadn’t done a deal with CBS? Or did they not consider Fire TV an important platform to support? What was going on?
At the time, I worked for the web tech group at Amazon Lab 126 which ported the Chromium browser engine to Fire tablets and Fire TV. (If you’re unfamiliar with it, Lab 126 is based in Silicon Valley and is the devices division of Amazon that also made the Kindle and Echo.) The resulting Amazon WebView (AWV) is an important library which powers a ton of apps, including BBC and Pluto, among many other big name media companies and hundreds of smaller media channels. I worked as the Technical Evangelist for the group, where I would do stuff like write up articles and blog posts, create sample projects and give presentations about how to best use the WebView to create web powered apps for both our Fire tablets and Fire TV.
So as soon as I got into the office on Monday after the first live stream, I went to my manager to ask what the deal was. Why wasn’t CBS streaming the Super Bowl to Fire TV?
I can’t remember if he already knew about the debacle or if he went off to find out more info, but my general understanding was that I wasn’t the only one at Amazon who had noticed and shit was already hitting the proverbial fan. Especially since the Seahawks were in the playoffs, and Amazon execs up in Seattle weren’t able to watch the streams on their Fire TVs at home.
It seems someone had definitely screwed the pooch by not following up with CBS. Worse, it turned out that CBS Sports didn’t even have an app on Fire TV to stream the games even if somehow a rush deal could be signed. Given that the Super Bowl was just over a month away, it looked like Amazon was going to be the only platform not invited to the viewing party.
This is where I come in.
One of things I did in my job as Tech Evangelist was to come up with lots and lots of prototypes and ideas for how to create WebView apps. A year or so earlier I had helped come up with the idea for a template app that mobile app developers could use to get started making apps for TVs. We had been talking to devs from Grokker - a tablet app that played yoga videos - and they were completely clueless how to port their content to a TV interface. Going from a touch based interface to using a remote control is filled with gotchas, and these and other mobile devs were clueless where to begin. The idea turned into the Web App Starter Kit for Fire TV, a batteries-included open source web project which generated complete media apps with support for streaming video stored on a web server, or serving channels using the YouTube API. By the end of 2015, I had developed dozens of example apps - including helping with some live products.
So, after learning that Amazon was basically screwed, I decided to see if I could come up with a quick solution. How hard could this be? It’s all web tech - if CBS is streaming to PC browsers, then there was no reason it couldn’t stream to a Fire TV using an app with AWV - especially since our media player supported all the common streaming systems used (something only our WebView could do at the time). I went back to my desk and started poking around the CBS Sports website and found the micro site where they were hosting the playoff streams. By this time, they had already streamed at least one game, so they had a “Come back next Sunday” message on the page that would contain the media player during the live streams.
Doing some spelunking in the source of the web page and scripts on that page, I found the endpoints for the HTTP Live Streaming (HLS) URLs which would be used during the games. With a bit of experimentation, I was able to find a test stream that was broadcast in a loop, which I assume was used during the development of the various streaming clients. Perfect! I quickly made a test app using the stream (with a little hacking since our Starter Kit hadn’t been modified yet to support the live video yet) and it worked as expected. I wasn’t even surprised.
So then I looked on YouTube and sure enough, CBS Sports had its own channel filled with content. I created a new YouTube API dev key which would allow me to use their API to pull in a list of the CBS Sports videos, playlists, etc. from their YT channel, then pulled in some of the graphics from their website for the background and icon and within an hour or so had a prototype for a fully branded CBS Sports app, filled with the latest CBS Sports videos and support for the live NFL playoff streams. Easy peasy.
I then called over my manager and said, “Check this out.” You might think he would have had his eyes bug out or had to pick up his jaw off the floor, but by this time I had come up with this sort of slight-of-hand a few times before, so he just nodded at me, smiled and said, “Send that to me,” and walked away. Since AWV powered apps are essentially just Android apps wrapping a browser engine displaying a web app, hosted on a regular web server, I sent him a link to where I was hosting it and sat back and waited while he ran the app up the chain of corporate execs.
I don’t know what sort of mad scramble of phone calls, legal wrangling, promises or begging, etc. this set off, but within a day or so a deal was signed, and a group was tasked to launch the app for real in the next few weeks using my prototype as the foundation.
There was, as you can imagine, work to be done to convert a prototype into an app that could be robust enough to be used for such an important event. Before it launched, it had to be approved by the techies at CBS who were incredibly nervous about this last-minute addition to their streaming targets. They had never streamed to such a large audience before and were terrified that some rogue client would take down their servers somehow and cause mass chaos on Super Bowl Sunday.
This is foreshadowing.
Converting my prototype to an app that could be used by 10s of thousands of customers in just a few weeks required a bit of work.
After a few days of a deal being signed with CBS, I received a single PDF document which laid out the requirements for the app, including official URL endpoints for the media stream to be used for testing and production. I had already figured out most of what they sent, but it was nice to get confirmation, as well as officially sanctioned access.
Again, to be clear, web-based media apps on the Fire TV are simple Android wrapper apps which contain a browser engine which pulls the HTML, CSS and JavaScript from a web server for the user interface. So it’s basically a standard web page. The main difference is that your controller acts as a keyboard sending up/down/right/left/enter key commands to the page rather than a mouse, so the UI has to be made to highlight the various buttons and menus using just those buttons. When a video is playing, then the play/pause/rewind/fast-forward keys are used as well. The Web App Starter Kit (WASK) my group created has all this pre-made, so really all you need to do is modify the images and text to get a media app up and running. In addition, the YouTube API support allowed the app to automagically get all this stuff from a specific YouTube account and fill it all in for you.
So the first thing I did was set up an AWS account for the app, create an S3 bucket and appropriate public gateway services to serve the static pages. This could easily serve thousands of requests per second, and so was a simple, scalable way to host the web app.
First on the CBS requirements list was that the app had to have a kill switch embedded in the app which CBS could use to shut down the streams for all the Fire TVs in case something went wrong and they caused the stream issues for the millions of other viewers expected to be viewing it on their PCs, smartphones and other set top boxes. That was relatively simple to implement: During playback, every few seconds the app would query a plain text document on the web server and if it contained a “false”, it would shut down the media player, killing the stream for any Fire TV that was viewing it. CBS was super twitchy about the stability of their streams given the high-profile nature of the event and having never done anything on this scale before. The late addition of another device using the stream must have given the techies there fits. So, if CBS decided something was up with the Fire TV CBS Sports app, they could pull the plug and the game would go dark for Amazon customers. Honestly, I wasn’t worried about this much at all - the Android media player was solid and well tested at this point (it had been used for major apps for over a year), so to me, this was just a formality.
Next up was captions. This was a bit more difficult and out of my hands. Captions were a legal requirement for any stream being broadcast publicly on American networks, even if people are accessing them via the internet. CBS wasn’t using web standard WebVTT captions, but instead embedding them into the binary data within the MP4 based media being streamed.
The first issue was that the basic WASK app template didn’t have caption support, so the user interface to turn them on and off needed to be added to the UI. But secondly, the Fire TV’s native media player used by the browser didn’t support the FCC mandated CEA-708 embedded captions in the stream. I’m not a low-level developer by any stretch, so this work was done by another developer on the team who would modify the player to support these types of captions, wire it up to the browser so the standard media player caption APIs would work and then wrap it all up into an Android media app. To give ample credit where it is due, this was a non-trivial task for the Android devs who - from what I understand - had to figure out the vagaries of this odd caption standard, get it working reliably in the player, and then get it all compiled into a custom browser engine which would be bundled into the Android wrapper app. All I had to do was update the web UI with a button and menu - a much easier task.
Next up was metrics. CBS of course wanted to know everything about the viewing of the game. How many users viewed the pre-game show and the game itself, for how long, and most importantly, which ads they viewed. CBS wanted two reports, a preliminary count immediately after the game completed (I assume for PR purposes) and a more complete report after (I assume for monetary reasons).
I implemented this using Amazon Mobile Analytics - the AWS commercial metrics service which is designed for exactly this type of data tracking. I wired up all the events you can imagine: App start, app end, player start, player end, ad start/end, YouTube videos viewed, etc. This was done using a small chunk of JavaScript provided by Analytics, which would pull the appropriate library from their server and provide an API to use to create various events to capture, pinging their servers with the data which would collect it all and present charts and graphs. If there was a connection problem, it would cache the events so nothing was lost. In other words, it was designed to be a robust, reliable way of keeping track of a mobile app’s usage, which is essentially what a Fire TV app is.
For the privacy conscious out there, this is all done anonymously - Amazon has strict rules about associating user accounts with analytics. Each app would have its own unique ID created when the app is installed, but it’s not tied to user accounts in any way. So you can tell that user #12345 viewed such and such video, but there’s no way of knowing who exactly that user is or what Amazon account they use to purchase things. In other words, the app wasn’t spying on anyone in order to sell them more stuff, it was just keeping track of viewership in the same way Nielsen or any other web tech does. If you uninstalled the app or wiped its storage, a whole new ID would be created.
The Analytics service was a bit opaque in terms of raw data, and the results could take a while to be aggregated, so in the same JavaScript function which called the Amazon Mobile Analytics APIs which posted user events to their servers, I added my own web request as well, sending the same data to my own database which I set up on AWS using Lambda and a DynamoDB table. This way I could keep track of the app events “live” and know what was going on as the apps were being used. Unlike Analytics, my data would just be a lengthy list of raw events, but I felt it was useful to keep track.
I then modified the app’s media player which was going to be used for the live stream, disabling the fast-forward button, and giving a message to users who tried to tune in before or after the stream was being broadcast. In addition, I copied the CBS Sports countdown timer they had on their Super Bowl mini site, which showed the number of days, hours and minutes until the Big Game.
Finally, I had to make sure that all these apps didn’t blow through the meager YouTube API quota provided by Google. Google allows apps and websites to embed videos using their JavaScript player without any limitations. You can view as many YouTube videos as you want for as many times as you want and they don’t keep track or care, which makes sense as any advertisements are embedded in the video player itself. Though, because Fire TVs don’t identify themselves as standard browser User Agents - just as custom Android WebView apps - advertisers didn’t target it back then and app users never saw ads.
The YouTube API, however, was limited. You signed up for a free developer ID from Google per app and could use it to get lists of videos, playlists, channels or do searches. Each request cost a certain number of credits and was rate-limited to a certain number of requests per second. The number of credits an app gets is numbered in the low thousands, so not a lot to work with. There was a contact email provided online which supposedly allowed devs to request a higher quota of credits, but I’ve never heard of an app actually getting any. I assume this low number was to make sure that Google’s YouTube app couldn’t be recreated completely by using the API to simply get a list of every video or for competitors to use to scrape YouTube’s library of videos. (As if there’d be any other service out there that would be able to deal with the millions of videos uploaded every minute). Additionally, it was against the Terms of Service to cache any API requests on a server, so you couldn’t, for example, blow through all your daily credits with some automated script and then serve that data from your server.
All this meant that apps had to be very judicious in how they handled API requests. Searches would always need to be live, but the app would need to be set up so that it did a single set of API requests (usually filling out a channel requires several to get a list all the playlists and videos) only once a day, and to re-request the list in case the requests per minute limit was hit and the API barfed at the app the first time. The WASK template was just meant as an example app, so didn’t have any of this stuff built in, so I had to add it to make sure the thousands of CBS Sports apps that were used to watch the game didn’t tap out the number of credits. To help lower the requests, I hard-coded the playlist IDs in the app, which would have failed if CBS suddenly decided to update their YouTube channel, but back then they only added a few videos every couple days, so I was confident it would be fine. I’d update the code after the big game to pull the live list again once there weren’t so many people using it at once.
And that was about it for the app. I never got any official graphics or other assets from CBS, just that single PDF with some media URLs and requirements. So I just ripped off anything I could find from the CBS website, whipped up some backgrounds and anything else needed. We worked on the app throughout January, testing during the playoffs and CBS finally approved the app just before Super Bowl weekend.
Once it was clear that the app would be ready, the marketing department went into full swing and started promoting Super Bowl 50 on Fire TVs, and CBS started including it in their online promotions. Though as you can see from the article above, even by the 3rd of February, only the original three set top boxes were mentioned by CBS. Interestingly, the PS4 and Android TV were also added at the last minute. So one wonders if there was a scramble inside Google and Sony during those weeks as well.
On Friday before the game, I uploaded the CBS Sports app to the Amazon Store, and the Fire TV Home Screen was updated to encourage users to download it.
We had a discussion amongst ourselves about how many actual Fire TV users would download the app given how late we were at launching it. I guessed around 15,000 downloads, max. Given the numbers I had seen from other apps at the time, it seemed like a realistic number. Though we had millions of Fire TVs in the market at the time, there was only about 48 hours until the big game and I couldn’t imagine that many people out there would bother. It takes a while for people to get around to installing new apps, especially on TVs. They usually just go with the default installs and many never install anything else.
It turns out I was off by an order of magnitude.
I went home that weekend and set up my own little monitoring station to keep track of the installs and watch the metrics to see how things were going. I had several Fire TVs set up with the app running just in case there was some memory leak or something, and I had one logging debug messages to my computer. I also had a custom Lambda script set up to update a web page with current stats that would refresh automatically. Remember, the UI side of the app is just a web page which is loaded every time the app starts, so if there was a last-minute issue, I could tweak that side of things - though if the Android wrapper had issues, it would require an App Store update. Happily, that didn't happen.
At the end of Saturday there were already over 35,000 installs and some moderate usage. People would see the ad, download the app, peruse the YouTube videos, try the live stream, get the message to check back on game day and then close it. Things seemed to be fine.
On Sunday, February 7th, 2016 the Broncos played the Panthers just down the road from me at Levi’s Stadium. To this day, I have no idea what happened during the game even though it was playing on the TV in front of me. Looking it up now, I only just now realized who was playing and who won. To say I was occupied during the game is an understatement.
The game was to be played midday, and preceded by a live pre-game show which was also streamed. The downloads picked up all morning, in just a few hours another 90,000 installs happened … by the time the game started, over 110,000 Fire TVs were simultaneously running my app. Not millions, to be sure, but given the late start we had, and my low expectations - I was astounded.
The problems started soon after the live stream began during the pre-game show. At first things worked fine, but as more people started streaming, the trouble began. Every time an advertisement appeared, all of the Fire TVs which had tuned in early simultaneously fired off a web request to the metrics servers, both Amazon Analytics and my own Lamda/DynamoDB server. At about 50,000 simultaneous users, shit hit the fan. I was monitoring the AWS console logs and could see it was starting to buckle under the load, rejecting thousands of requests. Fuuuuuuuuck!
First, I was worried the rejection might cause issues with the playback, but I happily had added a try-catch around my code’s request and the browser engine was blithely ignoring the error, so the stream was unaffected for now. Phew!! But what was going on? My code was set up to have a 30 second timeout and the server settings were at 5,000 simultaneous requests per second. The WebView engine should submit the request and then wait until it got a connection, get a response and disconnect. It should have easily been able to handle the traffic, but the console was showing a bright red line at 3,000 requests per second and dropping everything else.
Things were working, but for how long? Those rejected requests were being handled by the browser, sure, but they might cause issues in the long run, causing memory leaks or networking issues and possibly lock up the app, or maybe the whole Fire TV.
Meanwhile, the Fire TV’s debug log started flipping out. It was scrolling so fast I couldn’t read the messages without pausing the output. Something was seriously wrong. The stream was still playing fine, but the metrics were completely hosed. Stopping and starting playback didn't help. Even restarting the app didn't help. I checked my second and third Fire TVs and they’re all doing the same thing, so it wasn’t just an issue with the one box.
I had no idea what was happening and at this point the game was going to be starting in less than an hour.
Another member of my team was monitoring an internal CBS support group chat in case they gave the word to fire the kill switch or any other issues came up. We also had a chat open for just Amazon people as well, which I was on. I started swearing like a sailor into the chat. “Fuck. Fuck. Fuck. Fuck. The fucking logs are going nuts. I have no fucking idea what the fuck is going on!!” Amusingly, he was at home and one of his children came over to see what Daddy was doing at that moment and wanted to see the chat. He had to shoo him away before he was subjected to my furious expletive-filled rantings. It was conveyed to me that I wasn’t the only one with issues - other device makers were also struggling and losing it in the CBS chat (which I thankfully wasn’t in). Misery loves company I guess.
Finally, I realized the settings I was entering into the server console to increase the request limit on my script were being ignored for some reason, so I found the AWS support page and clicked the “call me” button.
What I hadn’t realized until that moment is that internal AWS projects have top tier support. Clicking that button got essentially the same level of response as a client like Netflix. To my surprise, my phone immediately rang and a support person asked what she could do to help. (OMG. Thank all that is holy.) I explain that the gateway is barfing at 3,000 requests per second and she asks me to hold on while she takes a look.
Finally relaxing a little bit, I took the opportunity to figure out what was going on with the debug log. The requests to my service should have generated a single error message per failure, not this crazy chaos.
The problem was with Amazon Mobile Analytics servers. Once I took a close look, it wasn’t my code which was vomiting all over the logs, but the API library. Something was wrong and it was filling the screen with errors. Oof. Their servers were just rejecting requests or timing out. I decided to come back to that after.
The support person came back on the phone and told me she found the issue. There was a hard limit to the number of requests per second an end user could set on the gateway. You could put any number you wanted in, but it would only serve 3,000. She could, however, enter a number from her end. What number would I like? 8,000! Now! I nearly yelled, and in a second or two she said “done.” I pulled up the traffic graph and the red line had disappeared. All the requests were being handled with lots of capacity to spare. I checked the status page I had created and could see all the metrics being saved. The stream was still playing on all my Fire TVs. With just an hour or so left until gametime.
Now, about the Analytics errors. I hadn’t fully debugged it (did I somehow mess up an endpoint?), but I figured while I was on the phone with support I would ask. So I say to her, “OK, I’m also having issues with Amazon Mobile Analytics. Their servers seem to be down. Is that something you can help with?”
She replies, “Oh, they seem to be having an outage of some sort. Apparently, there’s a distributed bot attack on their servers. They’re on a group call right now, should I patch you in?”
I immediately knew it wasn't a coincidence. Oh, shit. What did I do??
I said, “Ummm, OK.” and waited while she contacted someone and before I knew it, I was connected into the middle of an ongoing discussion… I could hear raised voices of multiple people talking at once. Which then immediately stopped as soon as I connected.
“Who just called in?” someone asked into the ominous silence.
I’ll let Douglas Adams describe the exact feeling I had at that moment.
“Vogons!” snapped Ford. “We’re under attack!”
Arthur gibbered.
“Well, what are you doing? Let’s get out of here!”
“Can’t. Computer’s jammed.”
“Jammed?”
“It says all its circuits are occupied. There’s no power anywhere in the ship.”
Ford moved away from the computer terminal, wiped a sleeve across his forehead and slumped back against the wall. “Nothing we can do,” he said. He glared at nothing and bit his lip.
When Arthur had been a boy at school, long before the Earth had been demolished, he had used to play football. He had not been at all good at it, and his particular speciality had been scoring own goals in important matches. Whenever this happened he used to experience a peculiar tingling round the back of his neck that would slowly creep up across his cheeks and heat his brow. The image of mud and grass and lots of little jeering boys flinging it at him suddenly came vividly to his mind at this moment.
A peculiar tingling sensation at the back of his neck was creeping up across his cheeks and heating his brow. He started to speak, and stopped. He started to speak again and stopped again. Finally he managed to speak.
“Er,” he said. He cleared his throat.
“Tell me,” he continued, and said it so nervously that the others all turned to stare at him. He glanced at the approaching yellow blob on the vision screen.
“Tell me,” he said again, “did the computer say what was occupying it? I just ask out of interest.…”
Their eyes were riveted on him.
“And, er … well, that’s it really, just asking.”
I spoke up in a small, timid voice. “Umm, hi? I’m Russ - I work in the Fire TV group. I think I’m the one attacking your servers.”
From there, the conversation proceeded as you might expect.
Apparently, what had happened was that 100,000 Fire TVs had suddenly, and without warning or provocation, simultaneously started hitting the Analytics servers every time an advertisement was shown on the stream. As one might expect, Amazon has a robust and extensive anti-bot system which immediately reacted and clamped down hard on the traffic. Every time they tried to lift the barrier, it would get flooded again and slam back down.
The first questions for me, of course, were who the hell am I, what the hell am I talking about, what the hell did I do to cause this and most importantly, after I explained the situation completely, did I modify their code?
Oh shit, did I?
I didn’t think I did. As the conversation continued, I frantically pulled up the code I had used for the Analytics service, then grabbed the latest SDK from the public server and compared. The code was identical. I hadn’t done anything to it and was using it exactly as intended. Dodged that bullet. I emailed off a copy of the code, and a link to the actual running website to show my code wasn’t the culprit.
Then, while still in the call, several of us started examining the Analytics JavaScript library and found the problem almost immediately. There was a bug in the caching code. The networking backoff logic that should have run if there was a connection issue didn’t know how to respond if it didn’t get an answer from the server. The DDOS defense mechanism Amazon uses just black-holes requests. It doesn’t respond at all. The library’s logic didn’t account for this, so when the request went into a black hole, the library looped immediately and fired the request again. And again. And again. As fast as it could, which it turns out, is quite fast.
By the time the game started there were 110,000+ Fire TVs hammering the servers multiple times a second. Millions of requests per minute. Hundreds of millions. Over and over and over. And every time an advertisement played, it cached the event and the payload of the requests got larger and larger.
Every time the Analytics group tried to lift the defenses and respond, the network would get overwhelmed and slam the door shut again. Still on the call, they brainstormed ideas to mitigate the issue, and eventually asked if it would be OK if they “blacklisted” the account, which would cause the client code to shut off and stop logging events. This didn't sound wonderful considering CBS was expecting that data, but in the spirit of cooperation, I agreed. But then they tried it and it didn’t help. At all. The problem was the blacklist command would never get to the clients as they were in an endless loop trying to post their backlog of metrics events.
The amount of traffic the TVs were generating was truly absurd. I saw a graph in the weeks afterwards, it had a line barely above the bottom line - normal traffic - and then an almost vertical line to the top of the graph where it flattened out for hours before finally coming back down again. It was pretty impressive.
The call ended and I tried to think of a way to update the apps to stop the requests, but there was nothing I could do. I patched the code on the server so any apps starting from then on wouldn’t join the frenzy, but any code that was running would keep looping until it connected to the backend or the app was closed. The Analytics service was out of commission for good.
So now, the only thing keeping a record of the ad views and other metrics for the freaking Super Bowl was my slapped together Lambda script and a DynamoDB. Joy. Also, my initial worry in the first half hour or so about my own system's requests causing memory or network issues bringing down the stream were now scaled up accordingly.
To the credit of our browser engine, Fire OS and media app teams, the app remained rock solid and the stream played without a hitch, despite the fact that in the background a rogue JavaScript library was doing its level best to take out some of AWS's servers.
I monitored my Fire TVs for the rest of the game pulling up the memory overlay to see if anything horrible was going to happen, but it looked fine. The stream survived and then after the game I pulled the DynamoDB data down from the server and prepped the after-game report for CBS. I had lost a half hour or so of ads during the pregame show, but the rest were all recorded perfectly. This isn’t surprising as 110,000 clients isn’t really all that much in the scheme of modern-day web development, so the traffic of that many requests every 30 seconds or so - even if made nearly simultaneously - wasn’t an issue. I could see in the data where Lambda had to throttle a few times, but the numbers of errors were tiny and could be filled in based on the start/stop times of each client.
I loaded the data into a SQLite database and wrote up some scripts to clean up the data and export to Excel. I don't think anyone at Amazon would care almost 6 years later, so here’s the inexact numbers from Friday launch til midnight on gameday:
While I was working on the stats to send to CBS after the game, I got a call at about 10 that night. It was one of the Analytics guys. The traffic was still hammering the servers even hours after the game had ended. He wanted to know when the app would stop. I was initially surprised, then I thought about it. Apparently, many people after the game had just turned off their TV and gone off to do other things, leaving the Fire TV and the app still running. The stream had stopped, but the browser engine was still alive with the script in the background endlessly looping forever. I told him that until the users went back to the home page or opened another app, the app would just keep running forever - especially if the media element was still in the foreground. The apps are specifically made to make sure apps don’t time out if media is playing; no user interaction needed. He thanked me and hung up. Poor guy.
Besides a congratulations email which listed my name among a bunch of others and some extra RSUs at the end of the year (those were nice), the only thing I ever really heard about this event afterwards was some emails from the postmortem meeting where I saw the insane traffic numbers our inadvertent bot storm had caused.
Then a month later, I happened to get on the elevator with a Lab 126 director. Just as he was about to get off on his floor, he turned to me.
“Super Bowl?” he said.
Startled, I turned and said, “Uh… Oh! Yes?”
“Nice job.”
Hey, I'll take it.
]]>Below are links to some of my work as a Technical Evangelist, Marketing Technologies Manager and blogger.
Work
Articles by Russell Beattie on Amazon Developer Blog (archived)
Personal
Work
Personal
So I've been ramping up my search for a job in what is without a doubt the worst tech job market in a decade. If you haven't seen https://layoffs.fyi it's pretty bad out there! I've been applying to Senior Technical Product Manager positions, but my experience with that isn't as good as my Developer Advocate / Technical Evangelist position, so I've recently begun applying for those jobs as well. I enjoy both roles, so either would be good. Better than asking if you want fries with that.
Despite making an effort, Applicant Tracking Systems (ATS) still absolutely hate my resume in either PDF or DOCX form. I've tried to reformat the damn thing a few times - making it simpler and re-arranging job title and employer, etc. but the systems are just random as hell and make a total hash of it. I'm still not sure if it's just the low-quality of the various job systems out there or my resume - I'm starting to think it's the former. Seems like a great area to disrupt an established market, honestly. There has to be a better way to find good new hires. I did find a great Chrome extension called Simplify which is great - you fill in your details once, and if it detects an applicant system it recognizes, it fills in all the details for you. This is seriously a time saver and has helped me really buckle down and apply to just about everything I can find.
So far, I've applied to 50+ jobs:
Seems pretty crazy, and somewhat futile as my resumes are undoubtedly just going into a black hole of systems, where it's compared to a hundred other candidates. I have 25+ years of experience, but only the most recent decade or so really count. I do have a couple patents in my name from Yahoo! but they don't seem to be impressing anyone (and actually expire in the next few years! Time flies!!)
The best way to find a job of course is through recommendations. My previous boss at Nokia is now at Nvidia and has put a good word for me in there, I've had several people at Google recommend me as well and some others. Thanks to everyone who's recommended me, I really appreciate it!
Pro tip: You can whip up cover letters in no time using ChatGPT! Just paste in your resume text, position title and company name and ask it to write a cover letter for you. It summarizes your skills really well in context of the position and company. Such a time saver. Like everything else AI does lately, it's absurdly good and in Ryan Reynold's words, "mildly terrifying." I have no idea who actually reads cover letters, but making them isn't nearly as much of chore as it was before.
The resume recommendation articles talk about how resumes should have clear results on them, not just descriptions of what you do, but they all seem somewhat impractical. As a techy you generally work on the project and then hand it off to some project manager or exec team to track results in terms of revenue, growth, etc., and you focus on bug reports, feature upgrades and the next release. Also, as time goes by, a number that seemed amazing in 2015 (say, 150,000 installs in three days) is pitiful in 2023, even though at the time it represented more than 25% of the devices in the market.
One of the things I really need to do is go through the online interview prep articles out there so I'm more prepared if I ever actually speak to anyone (I haven't gotten so much as a phone screen yet - it's absolutely insane.) I haven't actually gone through the process in a decade, since I joined Amazon in 2013, so I know I'm way out of practice. I need to get those "what's your greatest weakness" questions down pat.
The other thing I need to do (and will do next, actually) is organize and flesh out my "portfolio" of work. As time goes by, this is getting harder to do as websites disappear (all my Nokia Research Center effort is totally gone, for example). This basically involves me going out and finding all the blog posts, sample code, media, etc. that I've done and put it into a single spot. Probably should have been doing that for years!
Anyways, that's an update. Will also be posting about Hypertext as well, and finally (after a three month hiatus) updating the editor (which I'm using to write this) to include an all-in-one document format in HTML. So many things to do!
-Russ
P.S. The AI image generators out there are great for coming up with quick illustrations for blog posts!
]]>So I've been out of work for a while, so to raise cash I've been selling all the extra stuff I have. It's amazing how much money one can spend on tech gadgets, only for the prices to drop to literally 10% of what you spent on them! I tell my son all the time that it would have been nice if I had developed a deep interest in something like real estate or cars or something that held value, instead of being a techy. So I've liquidated the garage full of stuff I had - most of it just becoming e-waste, honestly. I mean, I had a box filled with all my smart phones dating back to the 2000s and every Android device I worked on at Amazon, which are almost worthless after five years. I truly wonder what it's like to sell stuff for a profit?
I also realized I have non-physical things to sell as well. Noooo... I'm not talking about anything crypto related! I'm talking about the original online ownership-of-nothing scam that we all know and love: Domain names! I actually put the first one up for sale a month or so ago on sedo: rb.io . (If you know anyone with those initials or a biz or maybe a ruby developer who wants a nice domain, send them my way!)
Update: I auctioned the name off and someone won the auction with a bid of $4k, which was great - but then they didn't complete the transaction. Ugh! Will be re-listing again now.
I've never been overly attached to the rb.io domain, but this made me start thinking theoretically about the rest of the ones I own... I wonder... How much would my personal domain name be worth to someone out there who happens to share my whole name! Not just russellbeattie.com, but also .info, .net, .org and rbeattie.com to boot. I mean, if you don't share my whole name, they're all pretty worthless, I get that... but it has to be valuable to somebody! There's got to be, what, a few thousand Russell Beattie's out there in the world, right? I wonder what the chances are that a few are doing well financially who really want their own name domain... There's got to be a law firm out there (there used to be I know) with a combo of those names, right? I know there's at least a few active Russell Beatties out there - I regularly get some of their Australian bank's spam as they can never seem to spell their own email address correctly.
It's such an oddly specific question of supply and demand.
But wait... As an early adopter, I own that name (however long and unwieldy it is) on all the major services. What do you think the whole lot would be worth to that random Russell out there. Facebook, YouTube, Google, Yahoo!, Telegraph, PayPal, Instagram, LinkedIn, Github... I also am just "Russell" on Skype and Nintendo Network. (I deleted my original Twitter account with my full name years ago, so I don't have the full set for maximum business card potential, sadly.) I can sorta imagine some seething Aussie, who has been a few months behind me when registering their username since the 1990's cursing me every time I show up before him.
Anyways, If you've read this new blog, you're probably aware I'm not particularly attached to my name anymore anyways, so why not? What would a complete digital namespace like that be worth? Especially given having to restart with a whole new digital life, right down to the email address. Has anyone done this before? Sold their whole digital imprint? (Yes, I'm aware the joke is that it might actually be the preferable option, and maybe I'll pay someone to take it all for me someday.)
-Russ
P.S. For your amusement, here's a DALL-E 2 generated image when I prompted it to "Create a logo for a company called 'rb.io'". I discovered it's not good at creating specific logos, but it is amazing at creating insane usernames. I am totally using Riiboiblio as everywhere if someone wants to buy my domain names for enough to pay off my credit cards. Fuck, I would change my name permanently to Rii Boiblio in that case for sure. (Or Rii Boi Blio or Riiboi Blio?)
I mean, you have to admit. It's absolutely majestic.
]]>I decided to play with ChatGPT:
Write an essay of at least 500 words about "information ochlocracy".
Information ochlocracy, also known as "information anarchy," is a term that refers to the overwhelming and often conflicting information that is readily available in the modern age, particularly through the Internet. This phenomenon can lead to confusion, misinformation, and ultimately a lack of trust in institutions and the information they provide.
The proliferation of information in the digital age has brought with it many benefits, such as easier access to knowledge and the ability to connect with people from all over the world. However, it has also made it easier for false or misleading information to spread, as anyone with a device and an Internet connection can share their thoughts and ideas with a potentially unlimited audience. This can lead to the spread of conspiracy theories, misinformation, and other forms of "fake news."
One of the main drivers of information ochlocracy is the algorithms used by social media and search engines to personalize content for individual users. These algorithms prioritize content that is likely to engage the user, rather than content that is necessarily accurate or reliable. As a result, people may be more likely to encounter and believe false or misleading information, especially if it aligns with their preexisting beliefs or biases.
The ease with which false information can spread online has led to a general mistrust of institutions and the information they provide. This is particularly true for traditional news media, which is often seen as biased or untrustworthy. The term "fake news" has become prevalent in recent years, and is often used to discredit legitimate news sources or to spread misinformation.
The impact of information ochlocracy can be seen in the polarization of society and the erosion of trust in institutions. In a world where people can easily find information that supports their beliefs, it becomes harder for people to come to a consensus on important issues. This can lead to political polarization and a breakdown in the ability to have productive discussions and make informed decisions.
One solution to the problem of information ochlocracy is to prioritize fact-based reporting and to promote critical thinking skills. This can be done through education, as well as through initiatives to improve the quality and reliability of information available online. For example, social media platforms could prioritize content from reputable sources, or provide tools to help users evaluate the reliability of information they encounter.
Another potential solution is to increase transparency and accountability for the spread of false or misleading information. This could involve establishing regulations or guidelines for online content, or holding those who spread false information accountable for their actions.
Overall, the problem of information ochlocracy is a complex one, and there is no easy solution. However, by promoting fact-based reporting and critical thinking skills, and by increasing transparency and accountability, it may be possible to mitigate the negative impacts of the overwhelming and often conflicting information that is readily available in the modern age.
You have to admit... that's pretty good.
-Russ
]]>
The Hitchhiker’s Guide to the Galaxy isn’t just a humorous sci-fi novel, it’s a roadmap to the future and has been my go-to book for 30+ years. The entire series is a gold mine of predictions, analysis, and commentary about every facet of society from tech to religion, quantum physics to philosophy, genetics, mathematics, politics, space travel, and the very nature of reality and our place in it. It uses a core plot device where the more improbable something is, the more likely it is to happen, as a writer’s ultimate Deus ex machina which springboards the reader into a thousand different ideas. I’ve been reading it and listening to Adam’s personal narration of it for years and I still discover gems of insight I had missed.
Sadly, like all authors who write about the future, as what they describe becomes reality, later readers start to dismiss their work - think Jules Verne as an example. So now the idea of a portable handheld device containing all the information you can imagine connected via invisible communications system doesn’t seem as amazing as it did in the 80s and 90s.
But now that we’re entering the age of Artificial Intelligence, Adams insights are yet again showing his astounding prescience. Every time Alexa responds to me with some overlong response spoken in some pseudo-hip manner, I can’t help but think of Adam’s Sirius Cybernetics Corporation’s Genuine People Personality™.
Just in the last several months alone, as the various AI image and text services have gained popularity and people started exchanging elaborate prompts which produce the best results, I’ve been amazed at how much they resemble Arthur trying to describe to the Nutri-Matic Drinks Dispenser exactly how to make a cup of tea.
"No," Arthur said, "look, it’s very, very simple…. All I want… is a cup of tea. You are going to make one for me. Now keep quiet and listen."
And he sat. He told the Nutri-Matic about India, he told it about China, he told it about Ceylon. He told it about broad leaves drying in the sun. He told it about silver teapots. He told it about summer afternoons on the lawn. He told it about putting the milk in before the tea so it wouldn’t get scalded. He even told it (briefly) about the East India Trading Company.
So that’s it, is it?" said the Nutri-Matic when he had finished.
"Yes," said Arthur. "That is what I want."
"You want the taste of dried leaves boiled in water?"
"Er, yes. With milk."
Think of the detailed prompts given to GPT-3, DALL-E or Stable Diffusion to help guide it to create the right output. If you’re not amazed at a book written in the late 1970s predicting with such clarity our interaction with artificial intelligence decades later, then I can’t convince you. Adams was truly a prophet.
When many of us first read Adams, most technology you take for granted now just didn’t exist. Adams foretold a technological future which, amazingly, has become reality in so many ways. A future in which everyone uses - and more and more commonly interacts with - computers and information technology. But when we first read about (or listened to, or watched on BBC, or played on the C64) this absolutely mind blowingly cool future, it was total science fantasy.
And then the fantastic technology Adams was writing about started becoming reality! If some of us have cult-like devotion towards Douglas, this is why.
Adams main genius was extrapolation. From 1978 to 1983 - before the Mac was even launched and every computer looked like an adding machine - he looked at the current state of the world and the latest science and technology and played the future out in his head. From particle physics and advanced mathematics to Artificial Intelligence and more. He started with a base premise and expanded until he was literally mentally exploring of all of the universe and time itself, and taking us along for the ride. His later works included incredible thoughts on multidimensional realities! It will be years before we see all of the things he talked about, but there’s no doubt in my mind much of it will happen.
But more than just the ideas in H2G2 - which are truly unmatched in creativity and foresight - it is Adams' command of the English language itself which sets him apart from those who simply write stories about the future. Adams wasn’t a scientist, but a writer, actor and musician with a degree in literature from Oxford. Science and technology were Douglas’s hobbies, writing was his job. This is where Adams both shines and suffers. The work of writing drove Adams mad as he was a perfectionist with too many ideas. That’s why he wrote so few novels before his untimely death in 2001.
But what Adams did write is incredible. His command of the English language is as good as any novel written in the 20th century. It is expressive, witty, and exuberant with word choices and observations that can have you crying with laughter or overloaded with ideas. His Wodehousian turns of phrase are always amazing.
The ships hung in the sky in much the same way that bricks don’t.
Add to this, his invention of the most freeing plot device known to have ever been gifted to a writer, and the books are amazing examples of English literature at its best.
The plot device in question is twofold: First, the novel is about a book which happens to have the same name as the novel itself. This duality means that "The Guide", which you are nominally reading, can be an omnipotent narrator, or a way of setting up a chapter by expositing on some seemingly unrelated topic written as the Guide itself. The narrator/guide allows Adams to jump around seemingly at random, while maintaining a consistent narrative.
Secondly, he invented a ship which is powered by improbable events, allowing Deus Ex Machina to be an integral - if not required - part of the plot! This is such an ingenious plot device, by the final book, you have been trained to expect improbable things, regardless of whether or not the ship was anywhere near the main characters.
"… So what happens? We get in his trijet which he had souped up into something totally other, crossed three parsecs in a matter of weeks, bust our way into a megafreighter I still don’t know how, marched on to the bridge waving toy pistols and demanded conkers. A wilder thing I have not known. Lost me a year’s pocket money. For what? Conkers."
"The captain was this really amazing guy, Yooden Vranx," said Zaphod. "He gave us food, booze—stuff from really weird parts of the Galaxy—lots of conkers, of course, and we had just the most incredible time. Then he teleported us back. Into the maximum security wing of the Betelgeuse state prison. He was a cool guy. Went on to become President of the Galaxy."
After all these years, it's still not clear to me exactly what conkers are supposed to be.
I’ve Googled it, and it doesn’t make much sense. I’ve read forums covering the topic and the general consensus is that Adams was just talking about the game of his youth involving smashing chestnuts together. But Hitchhikers was written and rewritten a dozen times. There were various radio edits and drafts. He could have meant something else, especially since it’s such an odd reference. It's a mystery to me.
The problem with the 2005 movie is that though it was faithful in most ways, it just wasn’t funny. There’s a flow to Adams work that needs to be there, and an honest sense of W.T.F. Even to someone who’s read the book 100 times, there are opportunities to surprise and delight. In the movie, for example, the Infinite Improbability Drive (again, the most amazing mechanism for Deus Ex Machina ever written) was hardly tapped. The words were there, but the WTF was replaced with movie cliches like Arthur not telling Trillian about the Earth getting blown up. Also, I thought the bad guy was just weird, but that is apparently Adams fault.
Hitchhiker’s Guide needed to have the original words of Adams combined with the general humor of Back to the Future, where the main character can't believe what is going on, but slowly accepts the absurdity of it all.
Arthur is the audience. We should feel what he feels: Bewilderment, incredulity, exasperation and sense of being totally overwhelmed.
Arthur is not an idiot, nor is he boring or a loser. In fact, he’s incredibly sarcastic and witty. He is also incredibly stubborn, but not unreasonably so. He is both the everyman and the hero.
Trillian is not his love interest. She’s also a genius.
Zaphod is an egomaniac for which everything always goes right. We’ve all known this guy. It’s like a superpower.
Ford is the consummate conman. You should never be sure if what is coming out of his mouth is the truth or not.
The Guide is both the omnipotent narrator and the book. It provides context and background to everything. The line is blurry.
Adams uses incredible turns of phrase in his books, many which may not be directly usable as dialog. But if you’re going to use his words, use them exactly.
The overall point of H2G2 is the exploration of infinity. If the universe is truly infinite, then literally everything that happens in the books can and will occur. To truly understand what infinity means, you need to be willing to accept the truly absurd.
Adams gave himself two insanely great tools in writing his books: The first is a literal guide that can give exposition on any topic, without feeling as if that’s what it’s doing. This easily sets up jokes and provides context for every scene, no matter how crazy. The second is a mechanism for gracefully incorporating the unlikely. In fact, the more improbable something is, the more likely it is to occur. From a writer’s perspective, this truly is pure genius. Imagine the running jokes that could be included into a long running series where things keep occurring in ways which bewilder everyone else (a potted plant showing up again and again, accidentally knocking over the same person, again and again, etc.).
So, if a show can capture the above, it has a chance of being somewhat good. But most likely it will be a superficial space comedy that doesn’t do the original material justice. Adams was an incredibly prescient author who expounded on religion, society, technology, and science - literally, life, the universe and everything - and it’ll be a miracle if a show can capture that in any real way.
BTW, What I mean by "use his words"" is to not mess with the best lines. For example, "sorta like tea"" is not the same as, "almost, but not quite, entirely unlike tea"". And, "the ships were huge"" is not the same as, "The ships hung in the sky in much the same way that bricks don’t.""
Adams had an amazing way with words, if you’re going to use them, use them correctly is all I’m saying.
As I briefly mentioned above, the core theme to all the Hitchhiker's books is infinity. Adams instinctively understood what an infinite universe would mean, and used it liberally as a plot device that incorporated deus-ex-machina into the story itself. The original H2G2 story explored the fact that probabilities mean nothing when infinity comes into play, and his last examined an infinite multiverse in which "luck" is taken to its logical extreme, where changing the future means manipulating the various divergent paths of the past so that just the right thing happens at the right time and place in the present.
His talent was in following ideas to their absurd conclusions. The original series was supposed to be a bunch of different vignettes in which the Earth was destroyed at the end of each. But after writing the first, he thought, "What comes next?", and continued to flesh out the rest of story. This is a fundamental Adams hallmark, and the part of his writing I love most.
Douglas had incredible foresight, but not in an Arthur C. Clarke sort of way. He was a gadget freak without doubt, but he didn’t really understand technology at a deep level. What he did was to take what was already common knowledge - from quantum mechanics to evolution to computers - and extrapolated their concepts to their logical conclusions. If you were to have a computerized "book", then it would need to be such and such a size, and look and sound like so, and get regular updates over a pervasive wireless network, etc. It just made sense, and history has born him out. He did this with so many topics - again, including Artificial Intelligence - and it looks like his thoughts are still incredibly applicable almost 20 years after his death.
It’s sad that as times goes by, Adams work will eventually be shelved and as irrelevant as Jules Verne. Even today, the Guide is so like a modern smartphone, it doesn’t feel to new readers as if there’s anything novel or futuristic about it (like it was in 1978), which is too bad. Eventually, even his thoughts on Artificial Intelligence and our interactions with it will eventually become just another subject that someone in the distant past had predicted. Like moon shots or GPS satellites. It comes with the territory of futurism, I guess. It's just sad that Douglas didn't live to today - it would have been amazing to see if he could have continued building on his ideas as they became reality around him, and to see what he would have predicted today.
- Russ
Long form writing contained in blogs served as static web pages seems to be making a comeback. In addition to consumer sites like Substack, which are making it easy for people to build both a following and an income from their writing, the latest trend among techies is a simple text-oriented blog written on their computer in text, converted to HTML locally and posted to a static server. No backend blog software needed. It's a fantastic trend, of which I am a happy participant.
This week, Twitter started going through serious corporate drama, culminating in today's layoffs. I hate to be mean, but I'm all for it. Twitter - among other social media platforms - helped killed rational thought on the web. Not just the popularity of individual blogs, but the expectations of both the writer and reader of the web in general. When Twitter launched, it was described as a “micro-blog”, because that’s what it was. But quick posts about random subjects soon morphed into its own thing: A tweet.
We all know what a tweet is: A short polemic statement, usually emotional, biased or opinionated, but expressed as self-evident without any justification, explanation or thorough analysis. It became the norm for the web as we know it. Blogs became a thing of the past - almost a cliche. They were something to be embarrassed about. "I used to have a blog" was spoken in the same hushed tone of admission along with having a MySpace page. The blogs that did remain were written by die-hards, or more often by commercial content farms whose main focus was driving clicks or spreading disinformation under the guise of a "blog".
I was an avid blogger at the time Twitter started, with thousands of daily readers. I had every reason to continue. And yet after I and others started tweeting regularly, my blogging slowed and then stopped. The reason is pretty simple: When you blog regularly, there’s a certain itch to express an idea or an opinion that builds up and you want to scratch it by writing a post. But before you wrote, you’d ruminate on the idea, and as you wrote you expanded and clarified it, like I am now. The end result was usually a decently sized essay with both a thought and the rationale behind it.
But tweeting could scratch that itch instantly - no need to save up enough of an idea to write a full blog post of a few paragraphs, you could just write, “Wow, foo sucks. Totally prefer bar instead.” And the feeling was satisfied. I remember thinking back then that I'd save up some ideas that I had tweeted about and write a longer post later. But later never seemed to come. And then, when it did, I'd be so used to culling my opinion down to the essential idea for a pithy tweet, fully expressing a thought became harder. Besides, the more open-ended a tweet was, the more opinionated, the more it would get reactions. In fact, expressing fully formed ideas wasn’t worth as much.
Twitter infected the entire blogging world like this. It was a vicious cycle, you’d blog less, and others who used to blog their ideas or leave comments wrote less as well, and that great feedback loop stalled as everything moved to tweets. Intelligent analysis was replaced by emotional exclamations and hard opinion. There’s no room for nuance in a tweet.
This was pretty obvious, even back then - I blogged about it at the time - but by the time it became clear how bad tweets were for intelligent discourse, the damage had already been done. But worse, Twitter embraced their role in the chaos - taking years to increase the size of tweets even a little, and doing nothing to encourage longer, more well thought out ideas. The fact that even in 2022, I regularly see "tweet storms" of connected tweets rather than a simple single page post shows how little they want their users to think about anything. Controversy and chaos is good for their platform, and they have encouraged it throughout their existence, regardless of the effect on society as a whole.
I never really tweeted all that much, but stopped for good in January 2016 in protest against the company for ignoring their own community guidelines and allowing a demagogue to use the platform to spread lies and disinformation. I didn't delete my account, but I did write a script to go through and delete all my old tweets. Later, I learned about the vast Russian disinformation campaign which created thousands of fake AI bots which engaged users in order sow discord among the Western democracies. And again, Twitter did nothing.
So to say I have little sympathy for the company and their employees now that they have Musk in charge, doesn't really express my feelings about it. But it's not schadenfreude or even glee - it's just a feeling that maybe justice is being served. Though really, I doubt Twitter will collapse because of the new management, and all those laid off employees are just going to flood the job market making my own job search all that much harder. So really, it's just more pain all around. The world would truly be a better place if Twitter never existed, or if it ever had the right employees who could have admitted the negative effect it was having on public discourse and dialogue, and did the right thing from the beginning. But they didn't. And we're all paying the price for it.
What I hope though is that today marks a crest of a wave for the age of tweets, and that the trend towards a more thought-out web, filled with complete thoughts and fully expressed ideas will again become the norm.
-Russ
]]>This is part of a series of posts I'm writing about creating an HTML Document format:
So my first thought when I started down the path of creating Hypertext HTML Document Editor was that I wanted an "all in one" file format which would include the CSS, images and other assets that a web page usually needs. I figured, "How hard can it be to throw together a zip file with an index page and a folder of files that an editor can read?" Silly me! It turns out that during the past 25 years or so, lots and lots of other developers and organizations have thought the same thing. Yet apparently it's one of those things which seems to never get any sort of traction.
After taking a look at what's been done already in order to not recreate the wheel, I came to realize a few things: First, I decided that nothing that's been done so far would have the simplicity nor widespread support that I was looking for. Secondly, trying to create Yet Another Bundled Web File Format was a really bad idea. But most importantly, since my goal was to replace Markdown as a simple, easily manageable rich text document format, trying to also tackle the bundling issue was besides the point. Markdown doesn't include files, doesn't care about them and will never have them. There's no reason for an HTML Document standard to deal with encapsulated files either, as essential as it might first seem.
All that said, I'm sure someone, somewhere might wonder why my Hypertext editor doesn't have some sort of option to save as a zipped file format of some sort, I thought I'd share what I discovered reading up on the topic. Then maybe someone can get the W3C, Mozilla, Google and Apple to finally make up their minds and decide on a standard that we can use in the future. (I won't hold my breath.
So, let's take a look at some of what's out there. But first, a look back in time.
You won't be surprised to find out that way back in 1995, ideas for the web encapsulation problem had already been batted around, and some had actually been implemented. I found a message from someone named Dan Grillo at NeXT to a CalTech email list about the .htmld file format used on NeXT servers. (See the original here.):
From: Dan Grillo <Dan_Grillo@NeXT.COM>
Subject: What's in a .htmld or .htmd?
To: webstep@xent.caltech.edu, khare@CALTECH.EDU> This one is a raging open question, but probably the easiest settled
> Generally, we want such a format to be self-contained, so the intention is that
> the wrapper can include other files, directories, symlinks; and that such
> structure should be preserved by cooperating applications (eText, for example,
> garbage collects). Here are a few of the design choices:
>
> .htmd (HyperText Markup Document) vs .htmld
> index.html vs. _____ (TXT.rtf, multiple topics, a la sanguish)
> multi-format representations (index-ascii, index-mono, index-color)I'll continue with this one.
First, .htmld is already registered with NeXT's type registry;
I did it a long time ago. I don't think .htmd is.What should be in a .htm[l]d? Right know I know of 3 forms.
1. foo.htmld/index.html
2. foo.htmld/TXT.html
3. foo.htmld/foo.htmlI think forms 1 & 3 are useful.
Pages, StepWise, and NeXTanswers all currently serve files saved as .htmld
Right now NeXTanswers uses form #3, so the internal .html can be FTP'ed
or saved from a web browser and used on it's own. This is hard to
do if they all are index.html.--Dan
Of course the thread goes on with a bunch of questions about the format, and as we know, it disappeared from existence. It just goes to show...
In 1999 the MIME encapsulated HTML format was standardized. Here's the Wikipedia description:
MHTML, an initialism of "MIME encapsulation of aggregate HTML documents", is a web page archive format used to combine, in a single computer file, the HTML code and its companion resources (such as images, audio and video files) that are represented by external hyperlinks in the web page's HTML code.
The content of an MHTML file is encoded using the same techniques that were first developed for HTML email messages, using the MIME content type multipart/related.
MHTML files use a .mhtml or .mht filename extension. [Also commonly .eml as well. -R]
This is still used for emails formatted in HTML and you can still export pages from Chromium browsers ("Save As -> Web Page, complete") where a page is saved literally as a fake email, complete with a "<Saved By Blink>" in the from: header. (That special from: tag actually turns on some restrictions in Chromium, so it's not just a random entry, without it the browser apparently goes into a less secure Internet Explorer mode.) I had never actually looked closely at that page before, so I was pretty surprised to see what a hack it is, and yet it's the way Chrome still works 20+ years after the format was defined, with little change.
In terms of using it as a basis for a cross platform document format, it's not supported by Firefox any more, nor Safari. Even though it's all nominally text, it's not a particularly user-friendly format, using as it does a mess of MIME-encoded HTML text with tons of embedded MIME-encoded data chunks. Though it is nice that the page has everything it needs, and is separated into sections (embedding a data:// url is much more disruptive in terms of content flow), it's not compressed in any way, and not something you'd want to store an .mp4 video in and send it to anyone.
Amusingly, on my Mac, the .mhtml file format is registered to Microsoft Word, not the default browser. If I had Outlook installed, it would probably claim first dibs. Opening the file in Word ignores all the embedded files - for security reasons I presume - making it a bit less than useful in that app. Opening an .mhtml file in Chrome also has a bunch of odd restrictions as well. And examining the page in DevTools doesn't really expose all the magic that's happening - like the process of decoding the file attachments nor the explicit security issues. It's very weird.
A Bugzilla entry from 23 years ago(!), showed some enthusiasm for using .mhtml in the then upcoming Mozilla Editor, though I'm not sure if that ever happened. Just shows again how long this topic has been floating out there. Apparently, XUL even had an <editor> tag.
Slightly off topic - but since I'm already talking about MIME. Linux is the only OS that actually pays attention to a text-file's MIME type, like "text/html", etc. Windows and macOS both depend on the file extension to decide what type of file it is. Thus, if you save an HTML5 file as .xhtml it will be treated as XML file - with the strict XML validation rules - regardless of the DOCTYPE or other meta tags in the header. If you name it as a .mhtml file, it will add extra security to the page, preventing it from opening images and other links from external sources. Using MIME-encoded HTML, though possible and even considered as a solution at one point to encapsulated HTML, really isn't really a good solution today.
From Paolo Amadini's website :
MAFF files are standard ZIP files containing one or more web pages, images, or other downloadable content. Additional metadata, like the original page address, is saved along with the content. Unlike the related MHTML format, MAFF is compressed and particularly suited for large media files.
Support for reading and writing MAFF archives was provided in the Mozilla Application Suite, Firefox, and SeaMonkey thanks to the Mozilla Archive Format add-on from 2004 to 2018. While the original add-on is no longer maintained, the file format specification is still available and can be referenced by third-party software to provide better interoperability.
Seems pretty simple! Too bad it's dead.
Checking out the file format spec, you can immediately see it's a product of its 2000's era conception: The meta-data file which specifies which files are included in the zipped bundle has to be .rdf: An oddball XML spec which doesn't make any sense to anyone not really into the "semantic web", though it's not particularly horribly done in this instance. Paolo's site has a few examples, and it seems pretty simple. My best guess for why it died is browser security concerns about pulling in some random zip file into the browser.
A MAFF spec v2 could easily solve some of its shortcomings by using a JSON file as the meta, requiring a CSP header on the index page to prevent malicious scripts from running, and adding in a signature of some sort to guarantee that the file matches what the manifest says, similar to signed JAR files. But I guess that would be a totally different spec.
Nowadays, Firefox doesn't bother with a single-file format at all, not even MHTML. Saving a page as "webpage, complete" simply creates a folder with all the page's assets and it rewrites the URLs to point at it, just like Chromium does using the same save as option. (By the way, is it "Webpage" or "Web Page"? Chrome uses the first, Firefox uses the latter.) I find both browsers defaults to save the folder with the same name as the web page's title, complete with spaces, incredibly annoying, as it ends up having to put %20 everywhere in the URLs, or worse (Chrome) just including the spaces in the URLs, making what would be a relatively clean export into a complete mess. Also, rather than separating out the various media types - css, images, icons, etc., the browsers just dump them all into a single folder.
Of course, Apple has to be "different", so Safari doesn't have an option to download a web page and all the assets into a separate folder (in other words, "complete"), instead it only has the option to save in .webarchive format, which (according to Wikipedia, again) is, "
a concatenation of source files with filenames saved in the binary "p-l
ist"
format using NSKeyedArchiver". If you ever want to see what's inside, you can convert the binary p-list into an text plist by using the command plutil -convert xml1 foo.webarchive -o foo.plist
and you'll see that Apple simply just saved all the page's assets in a bog-standard Mac XML property file.
This format is supported by macOS Safari as well as iOS, though I can't imagine many people actually know about it, let alone use it much. There doesn't seem to be any projects out there that open or create a .webarchive using JavaScript, though there are some written in Python, Go and Ruby. I can't imagine it would be too hard to figure out, but then only Safari has support for reading the format natively, which isn't the idea.
Apparently, in addition to being Apple-only, .webarchive files aren't particularly safe to share. The way it stores scripts allows it execute in the context of the opener. It's basically as simple as MAFF above, but done using Macs/iOS in mind.
While I'm here, I'll express my long held belief that whoever came up with Apple's property list format didn't really understand how XML and/or SGML-like tags actually worked. Does it make sense to you that p-lists have stuff like <key>WebResourceData</key>
instead of simply just <WebResourceData>
? It's like they were confused.
So the ePub format seems like it might be an ideal web document container, but it's got quite a few limitations, the biggest of which is that it requires XHTML, rather than HTML5. It's also focused quite specifically on eBooks, not on documents, which are sort of the same, given that the former is made up of the latter.
Using Apple's Pages word processing app, you can export your doc as an ePub, which is pretty cool. It's just a zip file, so you can open it up and see what sort of decisions they made to create it, and how they include CSS, images, etc. The problem, of course, is that it's a one-way export. One would think that since the ePub nominally contains all the parts that make up the document - and the possibility to include as much metadata that may be missing - that they might create some sort of "editable ePub", but sadly they didn't.
A .pages document, just for those who are curious, is a zip file filled with some XML meta data and .iwa "iWork Archive" binary files which are compressed with "Zippy" - a Google originated compression format. So weird.
Just to be confusing, there's another format out there called "web archive" as well. Did you know that the Internet Archive uses its own HTML bundling format - ISO 28500:2017 - which is supported by the United States Library of Congress?? I had no idea...
A WARC format file is the concatenation of one or more WARC records. A WARC record consists of a record header followed by a record content block and two newlines; the header has mandatory named fields that document the date, type, and length of the record and support the convenient retrieval of each harvested resource (file). There are eight types of WARC record: 'warcinfo', 'response', 'resource', 'request', 'metadata', 'revisit', 'conversion', and 'continuation'. The content blocks in a WARC file may contain resources in any format; examples include the binary image or audiovisual files that may be embedded or linked to in HTML pages.
It's not meant for an individual file as much as it's meant for entire websites. But in case you were ever wondering how archive.org stores snapshots of the entire Internet, now you know. Pretty cool.
Compiled HTML - Microsoft created their proprietary .chm format in the 1990s for its Windows Help system to use. It's actually still supported in Windows 11, though the format hasn't been updated since the early 2000s.
WACZ - Web Archive Collection Zipped - is used by the WebRecorder project, which seems to be an active effort to create an open standard for web archiving, though you wouldn't realize it by the design of their website. I almost thought it was also a dead 1990s effort until I saw the August 2022 update.
SingleFile and SingleFileZ is an actively developed web extension for archiving web pages. It takes all the binary assets and converts them into data:// urls and then embeds them into the page automatically, so the end result is a (very large) plain-text .html file. Basically it's sort of like MIME, but using data urls. It works, but I wouldn't want to try to post-process the file.
So I wrote all the above relatively quickly, as I had a familiarity with most of the stuff I listed, or it wasn't too hard to look up and get familiar with the details. Then over a week has gone by while I tried to wrap my head around what's going on with the latest efforts by the W3C Web Incubator Community Group (WICG) and browsers, specifically the Chrome team. I can't promise I still have a handle on it, so if you see something wrong or see something missing, please let me know. There's a Github repo for the W3C Web Package community group which has an overview of what they're trying to do.
From what it looks like, it's a concerted effort to finally figure out a standard way to bundle up various bits of a web site or web app into a safe, secure single file archive for a few different use cases. The first is to save web pages, like the various solutions I wrote about above. Another is so that browser clients - especially on mobile - wouldn't have to request so many tiny files over the network. Another is that a standard archive could also be used to package web apps or whole web sites for installing or sharing offline. All well and good. However, concerns about privacy, safety and security has caused a lot of headaches, which they're trying to address in various ways. Here's their explainer. There was also an effort by the W3C Digital Publishing Interest Group to define the use cases for web publications. How all these groups inter-relate besides linking to each other in their docs, I have zero idea.
There is a new, open-spec archiving file format called CBOR. It seems to underpin the web packaging efforts currently going on by the browsers and W3C. CBOR is basically like Apple's binary p-lists, except that it uses JSON to organize all the meta data and compressed binary data contained within the file, which can be addressed and extracted individually without decompressing the whole file. Signing and Encryption has been built in (though covered by another spec called COSE), so it's apparently good solution for a variety of problem domains, including messaging and apps.
So the latest proposed bundling format is called Web Bundles, which is still in draft stage and available behind a flag in Chrome. Though it nominally addresses the problems listed above, its announcement immediately got blowback because of the idea that web servers could potentially start to serve all their content using bundles. The problem being that if sites started only serving bundles, it would essentially break the web as we know it, because each of the individual files would be opaquely contained within the archive. This would mean that ad-blockers would stop working, and it could potentially have security and privacy issues as well, as who knows what sort of stuff could be contained inside the bundle. The guys at Brave were among many who lost their proverbial shit over the proposal.
The one and only post from Google about it was back in 2019... so I think the pushback may have been enough to stall this spec for a bit. As of right now, none of the other browser makers seem interested. Also, despite being available via a flag in Chrome, I've yet to get any of the .wbn bundles provided in that post to work on my computer.
This doesn't mean web bundles are dead and gone, however, as now it seems the focus has been changed from a general, all-purpose solution for bundling web assets, to being a way of bundling PWAs. This is definitely something that's needed, so I can't see it maybe getting a less harsh reception. Web Bundles may also contain "Isolated Web Apps" which are archived PWAs with strict CSP limitations which help with security.
I think that's about all the relevant specs, formats, and proposals for web archiving out there. This whole post started as an attempt to learn about what sort of solutions were available which would be a "standard" that could be used for a self-contained HTML Document, including CSS and Images, mostly. Like I thought in the beginning, how hard could it be to throw a bunch of files into a zip and call it a day? Apparently, quite a lot.
Sadly, not even the latest efforts really provide a solution, as they're focused on web apps and thus have to figure out how to make the bundles safe and secure, and as a result, aren't something that would be easily editable like an encapsulated document - ala .docx or .pages. The one format, ePub, might be a solution, but it's focus on books and its use of XHTML means that it's not suited at all for something easy and simple.
My next post will be about a proposal for an HTML Document format that I think could be implemented in browsers within a reasonable time, and some ideas as to how that might happen. You can probably guess from the above: It will be text-only, so a MIME-style solution with embedded base64 blobs similar to SingleFile's solution, plus a strict Content Security Policy ruleset which disallows scripting for safety and security. In order for this to work, it would need to have its own file extension - like .mhtml or .xhtml - so that browsers could automatically add those restrictions to HTML Documents opened from the file system.
I'll flesh it out in the next post.
-Russ
This is a long, personal story about how I discovered five years ago at age 45 that my dad wasn't my biological father, who he was, who I am and the effect it has had on my life and mental health. It helped a lot to write it, hopefully it might be of interest for someone to read it.
By 2017, I had suspected for a decade or so that maybe something wasn’t exactly as it seemed in my family. First, I’m 6’3” and don’t look anything like my dad or only brother David (he’s 6 years older), who are both short and stocky. Every family has a black sheep, so I just assumed that was me.
But when I was 13 and started my rebellious stage, and having had my growth spurt, I started using my longer reach and size to fight back against my dad, whose form of discipline was always physical and usually involved his belt or "lathes" - long pieces of splintered wood taken from the walls of the 200 year old houses my family renovated. At one point we were about to get into a fist fight at the top of the stairs when my mom broke it up. She was screaming at me, saying that she chose her husband, but didn’t choose me. That's a quote. You might think I was some sort of teenage hellion, to earn that sort of treatment, but I wasn’t. Especially in hindsight as a parent of a teen, I can see what a decent kid I actually was.
My parents continued this sort of attitude throughout my teen years, refusing to support any extracurricular activities I did at school like sports because it was a “waste of time”. They wanted me home after school so I could do manual labor for whatever they needed - to help their business or otherwise. At school though, I was well liked and a successful athlete, eventually becoming the NH state champion in the 200m in track as well as captain of the team. My parents never came to see me run once. I'm still quite bitter about it.
My reaction to their lack of support or interest was to do really badly in school, mostly out of spite, but also because of untreated ADHD and other emotional problems. After I graduated high school I hadn’t gotten into college. My parents refused to help. They said that my older brother had gone to college and what had his degree done for him? Nothing. College was, in their opinion, another “waste of time.” I immediately moved out, but after a summer and winter living on my own, I managed to con my way into a small college in Vermont (based on my SATs which were relatively high) where I spent a semester getting good grades before transferring to a bigger state school back in NH. I quit after a few years once the bills started getting too high to manage on my own and realizing that the college was basically filled with unambitious kids mostly looking to party. I was editor of the college newspaper in my second year there - something that wouldn't have been possible at any other college.
Life went on and I decided that my parents were who they were and I wasn’t going to obsess over how unhappy my childhood was. And it was definitely unhappy. But, I forgave them, really. My parents and I had a normal long-distance relationship where I called every month or so and visited occasionally. And when I got married and had a kid, I wanted them part of my son Alex’s life, imagining some happy extended family I didn’t have growing up.
But my parents weren’t really interested in being grandparents - unsurprising in retrospect, given how little they wanted to be my parents - so I gave up on that idea and explained to Alex that they were just older, far away and just weren’t that sort of attentive grandparents who baked cookies, and that was that. He has a whole other family back in Spain that dotes on him when he visits like he’s a little prince, so I wasn’t worried about it.
At some point over the years, my dad and I had a weird conversation that I never forgot. His older brother Ken had come up to NH from Florida to take a DNA sample from my dad. (This was years before DNA testing was an online consumer thing). My dad’s family had a history, because his mom was a young widower with a baby son when she remarried my dad’s father (who I am named after) and had three more kids. Ken, the oldest of the new family, wondered if he really was Russell’s son or not and wanted my dad to give him some DNA to test. I happened to call while Ken was visiting, and though usually I just talked to my mom, and almost never had a conversation with my dad, I ended up chatting with my him that time and he asked me, out of the blue, “Would you care about this if it was you?” He explained that my cousin Bobby - who was adopted - had no interest in finding his parents, and my dad thought Ken was being silly. A little taken aback, I of course told my dad what he wanted to hear, which was “Nah, of course not. Why would that matter now?”
But after I got off the phone I immediately thought, “Huh. Well, that would explain some things!” and from that point on I assumed I may have been adopted (unlikely given how much I resemble my mom and her family) or that Dad wasn’t my biological father. Over the years I confessed this to both my ex-wife and my brother, who both said I was being overly suspicious, but maybe...
In 2011, the online service 23andMe launched their DNA service and as I'm a geek, I thought it was pretty cool, so I signed up and got my genome sequenced. Not thinking about my parentage or anything, just for fun. Later, my aunt Dottie (one of my mom’s two sisters) got really into genealogy, and joined the same site, then got her two daughters (my cousins Cheryl and Nicole) to join as well as her grandkids too! Then she started tracking down distant relatives and getting in touch. Being part of the same service, I would get updates as new relatives were detected.
A few years later, I thought my brother David might like to see his genome data, and thought it would be nice to have him linked up to the rest of us, so I got him a DNA kit for Christmas in 2016. We both joked that this would tell us for sure about Dad, but neither of us really thought much about it.
It takes a few months for the service to get back to you after you send in your spit in a test tube, and David took a month to get around to it. A few months later, in April, I was out food shopping when I get a call from him: “Hey there half-brother!” I immediately knew what he was talking about. So right there in the store, I pulled up the site myself to see the new link. Sure enough, we shared 25% DNA and we’re clearly marked as half siblings.
Wow.
So, now what? Talking to my brother, I decided to talk to mom privately first, then give him an update so he could talk to her, and then go from there. But we forgot about my aunt Dottie, who in her retirement is online every day doing genealogy stuff.
Dottie immediately got an email about a new relative online - her nephew David. So she opens the website and sees that he and I are half-brothers and she’s shocked. Apparently, she actually started to doubt the science of DNA or questioning the accuracy of 23andMe, because to her, it was impossible. Dottie and my mother have talked once a week for literally their entire lives (my grandfather drowned when mom was only 3yo, and my grandmother never got re-married, so my two aunts, Dottie and Barbara, and my mom were all very close).
So, Dottie immediately calls my mom (before I do) and says, “What in the world? This can’t be right. Should I call that company and give them hell?” and my mom, who is an incredibly secretive and private person, apparently responded, “Shut up. Mind your own business. Richard doesn’t know. That’s the last we’re talking about this.”
But then, of course, my aunt calls my brother - not me for some reason - to tell him about her conversation with our mom. And David then calls me and tells me that mom knows what's coming This all happened within the space of a few hours... Joy.
I email mom and ask her to call me when Dad’s not around because I wanted to ask her something. She responds that she can guess what I’m going to ask, and tells me to call Saturday morning. I do and we have a very short conversation.
She tells me that when she was in Massachusetts in 1971, her and my dad were having troubles and she had a short affair with her boss. She couldn’t remember much about him (as it was 45 years ago), besides that his name was John (she thinks) and that he worked for a sketchy weather proofing company where my mom was a secretary. The place was sketchy because it tended to overbill or do work that wasn’t needed, hard-sell tactics, etc. He was also much older than her (she was 25 at the time) but she wasn’t sure how much.
Mom then told me that her and my dad made amends and basically within the week she had quit the job. Later when she realized she was pregnant, she thought at first that the baby was my dad’s. She said it wasn’t until a couple years later she realized the truth. (Not sure how much I believe this.) She decided to not tell my dad, but did write a note to me, which she had left in her will, so I would have found out some day. Really mom? The call was short and awkward - as expected of the Puritan New England family we are.
What’s crazy about this story is that after she quit, her and my dad went out and bought a new truck and decided to move to Florida and get jobs in the restaurant business (my dad is a trained chef). I had heard this part of the story for my entire life. They packed up my brother, who was 5 yo, and drove south. When they got there, they couldn’t find any work and were forced a month later or so to move back to New England where they had family and could get work. They had no money, so they lived in a campground in Vermont, where they stayed until the snow started falling in November. I was born in Brattleboro in January. My mom talked about being 8 months pregnant, ironing my dad’s shirt in the middle of a campground so he could go to work as a waiter. What had been left out of that whole story was that days before they left for Florida, apparently, they had been having problems which had lead to me.
Lots of things are apparent in retrospect. My parents definitely weren’t planning to have another kid, ever. They never really liked being parents and considered my older brother simply free labor - he was washing dishes in their busy restaurant kitchen when he was 8 or 9. My arrival six years after him wasn’t something they were overly excited about, and this was clearly communicated to myself in so many ways. It also influenced my brother who hated me for a long time. I always assumed his dislike of me was something I had somehow done when I was younger, so I made a major effort to fix my relationship with David in my mid 20s, but if I hadn't, we would never had spoken as adults. He still doesn't particularly like me very much, but there's nothing I can do about that, despite "loaning" him thousands of dollars over the years - he's got his own issues.
OK, so now that my lifelong suspicions had actually been confirmed - which I never really thought would happen - I wasn't about to just not find out more. Going on the few details of when and where my biological father was in 1971 and started trying to track him down, looking up old businesses, sending emails, etc. What I also did was to sign up to Ancestry.com, MyHeritage.com and a few others to see if there were any DNA matches.
At this point, I should briefly explain how DNA family matching sorta works: You share 50% DNA with your parents, basically half from each. The best metaphor for this is a deck of cards. You need a full deck to be a person. First your mom shuffles her deck and gives you about half of them. Then you ask your dad to help fill in the cards that are missing. The end result is that you have about 50% shared with each parent, though exactly which bits were shared, and the exact number might be off by a bit.
Here is the standard relationship chart:
Also, to explain cousins, the terms first, second, etc. is about your shared grandparents, great grandparents, etc. Grand = first, great = 2nd, great-great = 3rd, etc. The term “once removed” is about children of cousins. My aunt’s grandkids (my first cousins’ kids) are my first cousins once removed.
On Ancestry I got a match with a woman named Imani Coppola, who is African American and shared 11% DNA with me, which was labelled as probably first or second cousin. That was a bit confusing, but not impossible, so I sent her a contact request and then tracked her down off the site by her profile pic, but she didn’t respond as she didn't use the service much. Amazingly, it seemed that she had a minor hit song in the 90s called Legend of a Cowgirl.
Here, check it out:
On 23andMe I had lots of 3rd and 4th cousins, but it’s hard to determine which side of the family they’re on and they’re too distant to be of much use. How much do you know of your great-great grandparents or more? I sent some messages but didn’t get any response.
Then in August, I got a hit on MyHeritage from a woman named Jennifer from New York who had just signed up. We shared 13% DNA! This meant she was probably my first cousin. Wow!! We immediately connected, I told her my story, and happily she responded with incredible kindness and we started trying to figure out where I fit into her family.
I told her everything I knew, and we soon narrowed it down to her father’s family. Jennifer was the same age as I was, and from a very large Italian family that had emigrated to New York in the early 1900s. Her father Jerry is one of four brothers and sister: Jerry, John, Jeff and Jane. Sadly, her father had only recently passed away, as had her uncle Jeff. They were both in their 70s. Jane never had a family, and her uncle John is a sort of hippie musician type whose second marriage to an African American woman produced a bunch of kids, including another John, Maya and Imani the rock star.
At first, we thought, “Well, I guess my biological father must be Jennifer's uncle John” as that’s the name my mom gave me. But wait, his daughter Imani and I shared 11% DNA. If she was my half-sister, we'd share around 25%, just like I do with David. So that didn’t make sense. We couldn't ask Jeff as he had already passed away, so Jennifer sent a message to his two children Jeff Jr. and Angela. It turns out that Angela was also on Ancestry, but had her details hidden. She turned access on for me, and it turns out I shared just 12% DNA with her as well.
So, Jane has no children, and I only share ~12% DNA with the rest, which each of the services insisted meant they were my first cousins.
Then I ask a couple questions which finally cleared everything up. How old were her uncles in 1971? Well, it turns out the oldest would have only been 22, and my mom said she definitely remembered my father being much older than her. Then I asked, “Are there any other men named John in your family?” And she said, well, her grandfather is named John as well. It’s a family name.
Bingo.
Jennifer, Imani and the rest aren’t my first cousins, but my half-nieces/nephews! What would normally be a 25% shared DNA is only 12.5%, just like a first cousin. Apparently, all the online services want to pretend half relationships don’t exist, so they don’t point it out, and thus the labels of first cousin were wrong.
After some more analysis – including a primer on DNA I just explained - and online conversations with my half-siblings John and Jane (who took a while to convince I wasn’t some con artist, since I'm some random guy on the internet as well as the fact that my existence means that her father wasn’t faithful to her mom), I finally got a clear picture of who my father was.
My biological father is named John Coppola. He was born in Reggio Calabria, Italy in 1920 and came to the U.S when he was 3yo with his older brother and parents. I found the Census from around that time and can see where he was listed. Most likely there’s an entry in Ellis Island as well. He grew up in New York and Long Island, served in the Military during WWII, was a salesman (thus his work in the waterproofing company), had four kids and stayed married his entire life. He died in 1999, so sadly I'm 20 years too late to meet him. He's buried in a military cemetery in New York.
(Holy shit, I'm half Italian! For someone who grew up thinking they were a boring New England WASP with the most exotic relatives being from Canada, this is quite the revelation.)
After we figured this out, I had several conversations with some of my half-nieces and half-siblings John, and I got added to a Coppola family group on Facebook - where I found I have some first cousins still living in Italy. My long-lost family is pretty cool - a combination normal and weird in the usual ways. They have all been very warm and welcoming to me.
In June 2019, I took a weekend to go to New York and visit them on Long Island and Manhattan where they live. I met half-siblings John and Jane (both in their 70s - my father around 50 at the time of my conception, so his other kids are all my parents age), and we visited some of my half nieces and nephews including Jennifer and Tom and my first cousins Liza and Jo-Ann and Jo-Ann’s daughter Marissa. They were all New Yorkers to the bone.
It was quite the whirlwind tour, but it accomplished what it was meant to and gave me some answers and a bit of closure. I confirmed to myself that I hadn’t missed out on some alternative life that would have been drastically different from my own. It wasn't a big worry or anything, but the thought was there. The Coppolas are your typically unique American family and have their good and bad like any other family. Again, I wasn't expecting otherwise, but confirming that was nice. Apparently I take after my father in a lot of ways, which goes to show that the question of nature vs. nurture isn't as clear cut as it may seem.
As for my mom and Richard. Well, the last time my mom and I talked a few years ago, she said that she had told my dad, and that he was OK with it, said that I shouldn’t worry as I was still his son (thanks?), but – quite damningly - that he had suspected it all along.
I wasn't happy about that at all. My parents acted like they didn’t want or even like me my entire life, and now I know why. They never supported me in any endeavor except out of a basic level of parental responsibility - I still have health and dental problems from their neglect during my childhood. They actually encouraged me not to go to college, then later didn’t understand and vaguely disapproved of my career in tech.
But worst of all, and unforgivably, they basically treated their only grandson Alex as if he was someone else’s kid, or more like a pet I owned. On phone calls they’d rarely ask about him and if I talked about what he was up to (a topic I love to talk about), they’d hmm and not really pay attention. They'd send thoughtless gifts at Christmas, and worse, send birthday cards during the wrong month - twice!! - or not at all. When they did bother to mention their grandson during a conversation, they'd give me ominous warnings about what terror was coming when he became a teenager. Every single conversation. "Just you wait," they'd say.
This is how they eventually rationalized their treatment of me. I remember having an unhappy childhood filled with fear, shame and guilt, but it's just moments. But my teens I remember clearly, and the neglect and dislike I received from them (“I didn’t choose you.”) is still clear in my mind. My parents claimed I was an uncontrollable, horrible teen, and I was completely ready for this to happen to me when Alex got to that age. But it didn’t. Of course, it didn’t. He went through his teen years of course, but he was no worse or better than I had been, and since that wasn't bad at all, it wasn’t all that difficult to manage for any adult with half a brain to deal with. Especially if you love your kid as much as I love my son. My son was and is a great kid – no crime, no bad influences, no drinking or drugs, lots of friends, did OK in school and always college bound, where he is today. Exactly like I was at his age. I love him like crazy, and proud of him in every way.
The only good thing about my parents is that whenever I've needed to handle a parenting situation, I think back to how they would have done it and then do the exact opposite. It hasn't failed to be the perfect solution yet.
I decided it was best for both Alex and myself to just stop reaching out or responding to them. I didn’t cut them off or make some big announcement. I just stopped responding. It didn’t take them long to stop sending messages or calling regularly – and even in the emails my mom did send, there wasn’t even the slightest mention of the most important thing in my life, my only son and their only grandson. Soon they stopped all together and just like that, they were out of my life. I assume they stopped responding so quickly because, after 46 long years, I was finally out of their lives. So now they don’t bother emailing or calling me - or Alex of course, though he never had anything to do with my silence - and that’s honestly great. I’ve told my brother I don’t want to hear about them, and I haven't regretted it.
It wasn’t until a couple years later that I realized what a mental time bomb this really was. At first, it was a sort of interesting topic. I'd tell people at work what I discovered, or women I was dating, and they'd inevitably ask, "How are you doing?" And I say, fine, why wouldn't I be? It was just an odd thing that happened. In fact, if you look online it's almost a stereotypical part of life now that DNA testing is common. So many articles about people discovering half-siblings or other family secrets thought long buried. In the past year or so, I've mentioned it only to have the other person say, "Oh, that happened to my sister-in-law," or similar. It's almost a cliché.
But that's if it hasn't happened to you personally. After a while, it started really eating into my head. Every memory I had from growing up – mostly very bad memories of screaming and crying and begging Richard to stop hitting me – was now given a different context and I realized how unloved and unwanted I truly was. I wasn't being punished because I was a bad child, I was being punished for my mother's infidelity. The sense of not being wanted wasn't imaginary, it was real. The reason my brother hated me so much didn't have anything to do with what a jerk I was as a teen - in fact I idolized him, Alex's middle name is David - it was because of my parents subtly communicating how little they thought of me and he obviously picked up on it. The context for everything I remember when I was young, every lesson I thought I had learned, every instinct I developed ended up being re-evaluated. Turning 50 didn't help this process at all - it was like a mid-life crisis on steroids.
Anyways, my mental health has suffered more than I thought was possible as a result of this discovery. It went from being a curiosity, to something that really hurt, and caused a slow, steady depression that increased over time. It wasn't so much that I had been lied to for 45 years, it was the gradual understanding of what had been really going on in my childhood, and why my parents would have preferred that I never existed. It's sort of hard to explain why this really got to me, but one example is that I look a lot like my mother, as one might expect. As I get older I can see it more and more. So for a while - like a couple years - I'd look into a mirror and if I caught the resemblance for some reason, I'd get really upset. Not being able to see your own reflection without being overcome with waves of depression is sort hard. The same goes for my own voice, or expressions I might use. I'd get into a downward spiral just from an exclamation I might blurt out, suddenly realizing where I had learned it from. I'm finally past this all now, thankfully.
Five years after first learning the truth about my father, I'm finally feeling better and moving on. But the past couple years were pretty hard as a result. This craziness, plus turning 50, plus Covid ended up with me leaving a job I loved and leading to a full on mental breakdown last year, which I'm only now starting to finally recover from.
If you're like I was a few years ago, you might think this is all sorta silly. Who cares? Such drama over something that happened so long ago! You're an adult now! Jesus, get over it and move on already! I totally get it. I probably wouldn't have even read a post like this all the way through, quite honestly. I'd have read to the bit which revealed who my father was and then skipped all the touchy-feely bits as exaggerated whinging. So that's fine - I think something like this is pretty hard to relate to unless you've had something similar happen to you.
But in general, I agree. It's time to move on. It took a long while to get my head in order, but it finally happened. I'm even over the bitterness about how much time I lost to dealing with it. I have to admit though, now that my head is back on straight, the rest of my life is a mess, which I now I have to start cleaning up. I'm broke and alone and have all sorts of social issues I still need to work out (my fear of rejection has been off the charts for a few years now), but hopefully the hole isn't too deep to climb out of. Or, well, at least I've stopped digging.
Thanks for reading.
-Russ
]]>
I truly loathe Markdown. Truly. But given the widespread use of Markdown, it might seem strange that I have such aversion to it. If you somehow really like it, or are so used to it by now, you might be tempted to think I'm the oddball. But I'm definitely not alone in my dislike of the format:
You get the idea. My point is, I'm not the only one.
Markdown definitely has some benefits, otherwise people wouldn't use it. Off the top of my head:
Because, as pointed out by others before me, Markdown sucks. Let me list some reasons why:
Like what? Plain text doesn't provide rich text. And the standard apps for creating documents are neither simple, open nor standard.
This means that if you want to write a document in HTML as easily as you create a Google or Word Doc, you’re out of luck. It's not that word processors always create horrible output - Google Docs does a decent job of exporting a web page as an .html or zip file - but it's always a one-way process. Good luck importing that back into the editor or Word or anything else. And again, each has its own custom way of implementing each style. Oh, and the exported web page inevitably doesn’t actually look exactly like the document you were just editing - margins and spacing are off, etc.
I have zero idea. In fact, we seem to be getting farther away from one as Markdown popularity surges.
The other day I read a blog post by the folks at Mozilla - who are supposed to be the standard bearers of, um, web standards, and was truly shocked that they decided to convert all their documentation to Markdown last year. What?? In fact, they stopped using HTML in order to do it.
The blog posts starts out by saying that the reason was because Markdown is "much more approachable and friendlier" then proceeds to list the various Mozilla-specific Github projects that one needs to download and install (not including Node, Yarn and Git), and the multiple steps needed to actually generate the docs. Again... what??
And of course, Mozilla too has its own variant of Markdown, which builds on GFM. And of course, since Markdown doesn't do much besides headers, paragraphs, bold, italics and bullets, they need custom macro tags to make it do what they need. Which is of course both non-standard, as well as being completely invisible to the writer, so who knows what the end result will be:
I mean, kill me now. If Mozilla, of all organizations, have dumped HTML in favor of Markdown and consider the above better than, you know, <span class="foo">, then I must be tilting at windmills. I get it.
That doesn't mean I'm wrong.
As I wrote in my previous post, we need an HTML Document standard. It's not a matter of technology at this point, it's a matter of simply deciding on a manageable subset of HTML and CSS and then calling it a standard. Then it needs to built in to every browser on the planet. I'm using my own Hypertext HTML Document editor to write this, but I shouldn't have needed to go through the effort. Mozilla should really be ashamed of itself for not doing it first, quite honestly. There is a W3C Working Group dedicated to Web Editing, but they're just focused on a few APIs it seems, basically continuing the focus on "web apps". The ePub Working Group is only focused on read-only e-books, and don't seem to be concerned at all about doing anything to enable actually writing them using web standards.
My next post will be about the three decade long quagmire of "encapsulated HTML" formats that are out there, as it's an interesting topic of dead-ends and disagreements between browser makers. Then after that I'll be posting on a proposal for what an HTML Document spec would look like.
-Russ
]]>
I whipped up a quick introduction video which shows the features and functionality of the Hypertext Document Editor. As I said in the video, it's a basic run through - I'll create something fancier, as well as actual documentation - soon.
If you have any questions/comments, let me know!
-Russ
So in addition to the Hypertext HTML Document editor PWA app I made, I also created a quick NodeJS static blog generator which works with the docs that Hypertext spits out.
You can grab it from Github here.
Here's a quick intro on how to use it, first grab it from the repo, either with git or downloading the repo:
$ git clone https://github.com/russellbeattie/hypertext-blogmaker.git
$ cd hypertext-blogmaker
$ npm install
Once the dependencies are installed (it doesn't use many - just JSDOM for parsing, EJS for template, chokidar to watch for changes and an XML library), you can start to customize.
Next, edit the settings.json file:
{
"title": "Sample Hypertext Blog",
"description": "This is my blog.",
"home_page_url": "http://example.com/blog",
"feed_url": "http://example.com/blog/rss.xml",
"icon": "http://example.com/blog/images/bluesky.jpg",
"favicon": "http://example.com/blog/",
"author": {
"name": "Author Name",
"url": "http://example.com",
"avatar": "http://example.com/blog/images/bluesky.jpg"
},
"initials": "AN",
"twitter": "@example",
"copyright": "© 2022 Author Name",
"analytics": "UA-XXXXXX-X",
"root": "/blog/",
"siteheader": "<span>Example</span> Blog"
}
Once you've done that, you can run npm start
and it will apply the templates and output an empty website, which it will serve on localhost:3000.
If you want, you can put the folders in other locations so you can generate different blogs with the same script.
First, from the project directory, use the command line and enter:
npm link
This will put an entry in your path called "blogmaker" you can use from any folder.
Next copy the docs, templates and assets folders and the settings.json file into another folder. To build the website, cd to that directory from the command line.
blogmaker
blogmaker serve
The latter is handy when using Hypertext so you can add images and see them in the editor.
Any questions, feel free contact me in the usual places.
-Russ
]]>Hypertext is a new rich-text editor for creating documents using HTML instead of using an 18 year old text format or complex word processor files. It's an app created using web technologies for creating actual documents, not websites, web pages or web apps.
In the second decade of the 21st century, there is now a full-featured, powerful web browser on literally every device with a screen. These browsers - the result of countless millions of man hours - are more than capable of being used as editors for HTML. In fact, most writing is moving online, using web-based word processor like Google Docs or Microsoft Office 365, blog creation sites like WordPress, Substack or Medium or even services like Slack or Notion.
What if you just want to write a document on your computer, using basic rich-text formatting like bold, italic, headings, etc. ? The choices for for documentation, a report, an academic paper or something similar aren't great. You can use a bloated desktop word processor like Microsoft Word or Pages on your Mac, built-in text editors like Word Pad or TextEdit which are nearly useless, or use a text editor to create plain text file with awkward, non-standard markup for formatting.
The question is, why can't we just use HTML for documents - as it was originally designed?
Phase 2 -- Target: 6 months from start
In this important phase, we aim to allow the creation of new links and new material by readers. At this stage, authorship becomes universal.
- Sir Tim Berners-Lee, 1990
WorldWideWeb: Proposal for a HyperText Project
The problem is that HTML has become a read-only format, despite being more than capable of being both a viewer and editor, and has for years. There's no real reason for this besides simple organization and standardization. The problem is that HTML can now do so much, that any attempts to create a consumer-focused app to edit it soon get unfocused and unusable. Inevitably they end up as full-featured "page design" apps, bogged down with so many features and functionality it becomes unwieldy and unused.
For the past decade or so, web browsers have been focused on incorporating more and more interactive functionality to becoming a platform for powerful JavaScript powered applications, and its original vision of being a platform for anyone to create content which could be both read and updated by anyone. In fact, some of the earliest browsers like Netscape Navigator had an editor built in. Today, creating a page in HTML is done by developers, and using a browser to create content is limited.
Project Fugu is an effort to add in the functionality needed to create full-fledged web powered desktop applications which are indistinguishable from native apps. Hypertext is taking advantage of some of these recently launched features to create the first HTML Document editor.
HTML Documents, as the name implies, are rich-text documents using web standards. Hypertext is both a web app for creating and editing these documents, as well as a proposal for a new .htmd document format. The vision is to create a specification for a standard, safe, guaranteed-editable document using a strict-subset of HTML and CSS which replaces the variety of Markdown, AsciiText, Office file formats, etc. currently in use. The .htmd format is self-contained, non-proprietary and includes the necessary Content Security Policy header to make sure it doesn't contain JavaScript. The latter keeping it focused on just content, with security and privacy built in. By using just semantic HTML tags, the documents will be guaranteed to be able to be read and edited, even if all CSS styles are removed. Finally, the format will have a separate MIME type and standard .htmd extension so that browsers can modify their parser and security rules accordingly (like .hmt and .xhtml today) as well as add in the option for basic, built-in editing.
The vision is that by finally defining a standard format, in the future, very browser app will enable their users to be able to both view and edit the document, finally fulfilling Sir TBL's second phase for the World Wide Web he proposed in 1990.
Rich text, such as bold and italic, among other examples, shouldn't be optional or considered extraneous to language. The fact that computing technology has gone so long ignoring these essential parts of communication is bewildering. You can send a text message from your phone including a variety of customizable emojis in various skin tones, but basic text formats used for literally hundreds of years are either impossible to enter, or lost in transmission. There's more than subtle a difference between, "You really should do something," and "You really should do something". Having to write out ideas using plain text with weird symbols such as _ this _ or * this * is truly a loss, and in the 21st century, completely inexcusable.
One of the main complaints about standard word processing apps and doc formats is the distractions and compatibility problems that are caused by having too many visual design options available to writers and readers. Sending an highly customized or newer .docx file to someone with a different version of Word is always a disaster. Additionally, the proprietary nature of these apps result in files that are either inaccessibly stored online, or nearly impossible to version using git, maintain by others or used in post-processing, making them unusable for documentation or other collaborative writing projects.
Using a standard set of semantic HTML and CSS as the underlying markup for documents solves these problems. The class-based styling means the document's visual design will be more organized and maintained, and anyone can just turn off or remove the custom styling and still see the basic rich-text underneath (as bold, italic, headings, tables, bullets, etc. will still be visible). The files themselves are just text, just like the rest of the other text formatting options out there. But instead of being a proprietary mess, .htmd documents use a universally supported markup language familiar to literally billions of people.
If you agree, help make this a reality. The code to Hypertext is up on Github with an MIT license. It's just an prototype of what is possible. But the goal isn't to fork this project, but to help create a new document standard. The objective is to lock down the .htmd format as well as the capabilities in a standard HTML Document Editor so that Google, Mozilla and Apple and the folks at the W3C can just adopt it wholesale and include the functionality in future browsers.
In a few years every browser should be able to view and edit HTML Documents, then they can start to optimize the browser engines so that composing documents becomes fast and reliable, every forum, blog or web-based app where people write text can start embedding HTML Document formatting sections in their pages, maybe with a <textarea rich="true"> style tag or similar. Imagine how great it would be for anyone from children to office workers can create a "web page" without signing up to some online service or needing a bloated app to do it.
And just think how happy TBL will be to finally have Phase 2 completed after 30 years.
-Russ
]]>I’ve recently been messing with Markdown (to my utter chagrin) with the idea of using it to update my resume and blog. I was simply astounded by how much recreation of solved problems is going on in that space. I prefer JavaScript/Node so I’ve played with UnifiedJS (remark/rehype), MarkdownIt, MarkedJS, and others. It’s honestly just absurd how over-engineered each project is.
If all you’re producing is HTML - which is 99% of what Markdown is used for - having to deal with a raw AST in order to modify a document is like deciding to use Assembly instead of Python. Sure, it could be more efficient if you really want to spend the time, but it’s generally a step backwards in every way. I soon realized the only predictable, reliable and maintainable way to deal with Markdown was to extract the frontmatter, then convert the rest into bog-standard CommonMark HTML and then use JSDOM to do any additional manipulation. So instead of fighting with some wonky AST tree and APIs, I can use the DOM and standard web tools and code.
But then I gave up. Markdown was created in 2006, when web browsers were anemic compared to today's monsters. Using Markdown in 2022 is like using COBOL. Sure, it works, but we can do better.
What I would like to see is a new HTML Document standard (none of the various implementations out there qualify) that mimics the core reason Markdown and other plain-text systems like AsciiDoc or LaTeX exist: To separate the writing from the presentation, but with some basic formatting as needed for most documents. There are various custom HTML doc formats out there: ePub and mobi files use HTML inside, as does Microsoft’s CHM and MHT. And there’s a hundred zipped XML file formats out there - docx, odt, etc. But they’re either write-only, proprietary or are too complicated for this purpose. This doesn't even include MIME HTML, CBOR files like Web Bundles, the Internet Archives WebArchive format, WARC and more.
What I would want is a simple .htmd standard file format, which - like all the "lightweight markup languages" out there - is just text containing a strict subset of HTML (no forms and iframes) and CSS which basically mimics the output of Markdown. It wouldn't have any JavaScript, enforced by the file extension/mime-type and CSP, nor embedded files like images. The subset would be limited to just semantic tags and reasonable formatting, to guarantee editable HTML. Nothing dynamic or crazy. Just pure WYSIWYG. If the W3C were to adopt the standard, also allow custom editor skins like CKEditor, TinyMCE, Trix etc. But again, with standard output. This would be great for online forums like HN or reddit. In standalone apps, like Apple’s Text Editor or Microsoft’s WordPad, the output would be a cross platform rich text document that is readable and writable by any browser or standard .htmd editor.
The idea is to Keep It Simple Stupid, but also provide basic cross-platform WYSIWYG editing where the simple, clean formatting is always displayed exactly like it looks when editing. I used Typora, which is a great little rich text editor that uses WebKit for the interface, and then exports Markdown, which I then process into a web page. It’s insane. We need to cut out that moronic middle step.
Since a basic HTML Document editor doesn't exist yet, I made one. It's called Hypertext. Go try it out. I'm using it now to write this.
Browser engines have progressed so far since Markdown was created. It’s all a matter of standardization at this point. Keep the spec simple and focused on just creating simple documents. If someone wants to use the output as a full-on web page, then it’s just a matter of post-processing (just like is done now) and adding full-strength CSS, JavaScript, etc. The CommonMark spec could even be updated so that .htmd is the standard output of a processed .md text file.
The web has tilted too far towards the dynamic app end of the spectrum, and lost its roots as a document format. I think something like this would be a great way to get back to that.
-Russ
]]>Hi there! It’s been a while.
I’m almost not even sure how to write these things any more, after doing it daily for like a decade or so, it seems weird starting again. But it’s time - it seems long-form writing is making a comeback after the social media apocalypse decimated intelligent thought on the interwebs. Thank goodness. Plus, I need a job - and given I’ve found my last few jobs through my blog, it only makes sense. (More about the job stuff in a later post.)
My website has been statically hosted on S3 for years now, as it wasn’t getting any updates, but now that seems static websites have become the new hotness. So a month ago I took a look at all the static blog generators out there and after playing with a few, I decided, of course, to create my own system as well as a new HTML editor called Hypertext to go with it as it didn't exist and my hatred of Markdown has no limits). Both are available on Github.
I decided to name this version of my blog, my third in like 20 years, “Notes” for several reasons. The first is a callback my original blog I started 20 years ago called the Notebook. That actually started as a Wiki I created for myself using Java of all things, hosted on a dedicated computer housed in some random server farm. Then later, I switched to a hosting company and after playing around with WordPress for a bit, re-wrote the site using PHP. Then after I decided I wasn’t going to be posting much, I saved all the generated pages as static HTML files, threw them on an S3 bucket and mostly forgot about it.
Both of those versions used pretty much raw HTML that I’d write by hand - which I didn’t mind much as that’s what I did on a daily basis anyways. When creating this blog, I was just going to grab some off-the-shelf generator and use Markdown, as that seems to be the “standard” used by everyone from random bloggers to Google, Mozilla and Apple. I have zero idea why. I hate it with the heat of a thousand suns, and though learning how everyone else is producing their docs and blogs was a good thing, I decided to try to create a revolution which I've called, unimaginatively, HTML Documents, with the extension of .htmd. More on this in another post.
In addition to the Notebook, I also like the name Notes as that’s how I got my start back in 1994 - as a Lotus Notes developer. I still have a soft spot in my heart for that database system, so it makes me happy to use the name.
Finally, even though I haven’t been publishing my thoughts for the past decade, I’ve been writing them down anyways as personal notes or more often in long, boring comments on sites like Hacker News. I’ve got literally hundreds of pages of random ideas, brainstorms and rants that I’ve socked away in Joplin, Google Keep, as text documents, half-formed Word docs, and strewn around various hard drives and cloud storage. So “Notes” definitely seemed to be a good name. I'm going to gather a few of the better ones and post them to get the blog started.
So… Welcome! If there’s anyone actually reading this? Well, get ready to drink from the firehose, as I've got a lot to say.
-Russ
]]>