Categories
quotes

These are the rules of the internet

“People love koalas and countries not being consumed by fires, but what people really love is nudes. These are the rules of the Internet.

James Felton, in US Model Raises Over 500,000 for Australia Bushfires by Sending Nudes [iflscience.com]

Categories
ranting

Annular Eclipse, Singapore, December 2019

IMG_8219

There was an eclipse today in Singapore. Unlike the last one [confusion.cc] this was an annular eclipse, so at maximum there was a “ring of fire” (aka an annulus, hence the name.)

Unfortunately some clouds rolled in just before maximum and so the eclipse was partially, and sometimes totally obscured. Still I managed to get some dramatic shots, as in a scene from Game or Thrones or The Witcher.

After cleanup I have about 90 photos [flickr.com], some taken with the 200 millimeter lens and some with a 500 mm with a 2x extension tube, so 1000 mm. The ring of fire above was taken with the 200 mm. The one below, taken just after second contact, as the moon begins to move off of the disc of the sun, shows a small dot of light at the bottom, disconnected from the rest of the crescent of the sun. Proof that the moon is not a smooth sphere. Cool. Super cool!

IMG_8697
Categories
ranting

Friendship Through Cyber Stalking

For all the reasons to hate Facebook, there are some times when it is an amazing tool. I am currently in Amsterdam for holiday and the other morning while I was scrolling through Facebook I happened upon a post from an old colleague who lives in Moscow. Coincidentally he was in Amsterdam for a few days of work. So we managed to meet up for drinks and dinner after a decade. This is one of the best reasons to keep Facebook. I suck at keeping in touch with friends who live overseas, but I do stalk a significant number of them on Facebook. It’s a double edged sword because I don’t interact with them but I do feel like I’m still in touch with them. So, as dangerous as Facebook is if you are a bit picky about your friends post significant things and things like travel to your friends it can yield some serendipitous moments.

Facebook isn’t alone. I am writing this while waiting for another ex-colleague who lives in Amsterdam that I have kept up with, off-and-on, via a WhatsApp group. But even my WhatsApp groups are mostly random, far between posting of funny things or rankings and not real contact. Oh well.

The moral of this story should be “I should be a better friend”. But I prefer: post enough of your life to Facebook so others, who you have selectively chosen —never post to the open internet, remember the internet does not forget— can stalk you.

Categories
ranting

Bounty Hunters and Pirates

Vice has a story about how the fragmentation of the streaming video market is driving people back to piracy to get their fix. It focuses a lot on the cost of having all the streaming services —welcome back to the cable era— but it has less to say about a major issue with streaming services: different launch dates and offerings by country.

As a Star Wars fan in Singapore my only option to watch The Mandalorian before the internet shoves terabytes of spoilers in front of my eyes is to pirate it. There is no official launch date for Disney+ in Singapore yet. What the fuck house house of mouse? I understand the level of technical complexity to rolling out global services on this scale. Netflix only conquered the world a few years ago but it suffered for many years from VPN leakage. And Hulu and other streaming services still don’t have global offerings. Maybe a VPN will work for D+?

A major part of the issue with most streaming services is how content has always been distributed. It complicated but in general studios make a show and its purchased (before or after being made) by a distributor who, well, distributes it. In the old days it was distributed physically, with rolls of film shipped around. Back in high school the older brother of a friend was the manager of a local theater and the amount of money they spent to rent the reels of film for a new movie was crazy. I understand why the popcorn and coke is so expensive, I suspect that even with digital distribution the cost didn’t go down… just more profit.

Under this physical distribution model it took a lot of layers of middlemen to get content around the world. And contracts were put in place. As new distribution technology and new touch points with consumers emerged the same model was used. So someone could own the broadcast rights to a move and someone else the digital distribution and someone else the physical distribution (DVDs). And of course exclusivity of a popular title meant more money. Back when music streaming and download was the big battleground another friend was in charge of the Nokia “comes with music” product where Nokia bundled a year of streaming with your phone. He had a small army of lawyers working for most of a year to get the required rights contracts in place, just for Singapore!

Now Disney is the owner of it’s own content, and the distributor via Disney+. So why can’t I watch The Mandalorian in Singapore?

Categories
ranting

Server Migration

After 20 years I have finally migrated off of the original confusion.cc server. Since I was in college confusion.cc has been hosted on a server in California. Originally on a physical box in a managed data centre, what is known as a Server Colocation or just “colo”, and later a virtual machine in the same centre. But I’m lazy and have not kept the server up-to-date since I migrated the family email server to a fully managed service ten years ago. And now the confusion.cc server is so out of date that it’s a hopeless task to try and update all the software. Things came to a head a few months ago with the release of WordPress 5.2 which requires PHP 5.6.20. Confusion.cc was limping along on PHP 5.2.5, from 2007!

So, now comes the end of the colo era for confusion.cc. The site is now running on AWS. And if the website sees high levels of traffic in the future, I can easily switch to dedicated server hosting plans. But one does not move a two decade old website without a few issues…

After setting up a vanilla WordPress installation on an EC2 instance and a MySQL RDS instance I uploaded the confusion WordPress database and viola! What’s with all the funny characters showing up in the posts? Best I can tell the original WordPress version used on confusion (installed sometime around 2004, when WordPress was version 1!) defaulted to latin1 encoding but somewhere along the way I started using Unicode characters in posts. For some reason it all worked. Now however, the default WordPress installation uses UTF8, ergo gobbledygook… there are numerous posts out on the web documenting various ways of fixing the DB. Changing the DB config, the individual table config and even the table row config… and there are grep-sed-awk magic spells to cast on a dump file that you can then load into a new DB instance and after a few prays to the elder gods all your Unicodes are correct!

And then there was the one hack to just define the DB_CHARSET variable in the wp-config.php to ‘latin1’ and Cthulhu continues to dream, un-disturbed, in Rayleigh.

Once the posts were loading it was time to tackle all the other assets; scripts and images which on the old server were loaded from sub domains. Originally this was to allow browsers to download the assets in parallel. This is because browsers limit the number of concurrent connections to a sight. However since I don’t have an image heavy design and most scripts are loaded from other sites or CDNs I don’t think it’s a big issue. So I uploaded all the content to an S3 bucket. I had to replace all the links in the theme and posts and then add a mod_rewrite rule to redirect the requests to the S3 bucket.

I also had to drop the “/wp/” from the URL. Long ago when I setup WordPress on the colo I had other things running at the top level so putting the WordPress installation into a directory made sense. Today WordPress is the CMS for the whole site so this setup doesn’t make sense. So off with the “/wp/”, which meant meant updating any post linking back to a confusion post. (This also means that any link to a post from Google or any other random site would be broken. So I added another mod_rewrite rule). I also updated the WordPress settings. And as soon as I did all of this I couldn’t continue to load the pages using the EC2 instance IP. So I had to update the confusion.cc DNS records to point to the AWS site. So, technically it was at that point that confusion.cc moved over to AWS.

Then there was the issue with XML RPC. The WordPress apps were not working. After much investigation I managed to pin it down to lacking PHP support for XML RPC in the default installation. I had to install additional packages for PHP-XML, PHP-XMLRPC and PHP-GD.

The last two bugs turned out to be caused by the same thing. First there was an issue with the icons for the sharing buttons not displaying. The icons are actually a font loaded via CSS from the Jetpack WordPress plugin. Funny thing is they worked on the plugin configuration page but not the site itself. The second issue was with the navigation menu. Clicking on the categories, archives or search option did not display the DIV containing the forms, so there was no way to navigate via categories or archive links and you couldn’t search. On the bright side “Random” still worked. After much tinkering and investigation I found a PHP opening tag was messed up in the header.php file. What should have been “<?php” was just “<?”. No idea how that happened… gremlins.

There may be other things. With nearly two decades of cruft I’m sure I’ve missed something…

Anyway. Next task is to finally consider updating the theme. I’ve been running on this theme since 2013 and it’s only a minor update if an even earlier version and that was my own hack on the original Kubrick theme from WordPress! HTML and CSS have come a long way since then. As well as Javascript – I don’t think in need to use jQuery anymore. So maybe I will get around to fixing it.