Nitin Khanna

I was once described as a philosopher programmer. I think I'd like to describe myself as a lifelong student.

Migrated VPS

black server racks on a room

When I started hosting this website on DigitalOcean about 9 years ago, the version of Ubuntu that was all the rage was 14.04 LTS. So I started my hosting journey with that. Pretty soon though, 16.04 came along and since I was ever active on my server, I upgraded to that using nothing more than a few apt update commands. Since then, other than a few forced efforts to secure the OS and install what I needed for experimentation, I didn’t do much to upgrade the underlying software.

So it happened that, when at the beginning of the year I tried to upgrade from PHP 7.3 to 7.4 (a process which failed), I was made aware of the fact that the chasm between where my software stack is and where it ought to be is rather large. I tried running a straightforward upgrade from 16.04 to 20.04. The blocker was mysql. Apparently, no matter what third party repos I tried, the upgrade from what I was running to whatever’s the current just wasn’t possible. Well, it may be possible, but it would not be easy. The recommended path, on multiple websites, forums, and blogs, was to just fire up a new VPS and migrate my websites and services manually. Daunting.

When I learnt of this, I realized that the amount of time and effort it would take was too much for me to give at that moment. Family needs and other projects held precedence. Right now, I wouldn’t say those needs have abated, just that I’ve adjusted to both those asks, and I’ve given myself enough time and another factor for this migration – money. DigitalOcean is a nice provider in that they’ll only charge me for what I use through the number of days that I use it. I know this is sort of the norm everywhere now, but it’s a nice-to-have and a nice-to-mention nevertheless. Instead of doing the entire migration within the span of a few hours, tiring myself, and increasing the odds of a failed migration, I spread the entire project over the last few days. I moved my other WordPress install first, the one whose failure wouldn’t affect me directly and personally. It’s a side project that we’ve gotten side-tracked from. I’d be totally fine if it craps out.

Moving WordPress seemed daunting, until I realized that I have a tool that can make it extremely easy. I’ve been backing up this website to Dropbox using UpdraftPlus for the longest time. It’s fast, easy, and totally a background process which has not needed my input since I set it up. I checked it out and sure enough, it’s got a pretty straightforward restore process too, included in the free version of the plugin. Of course, they offer paid tools for much easier migration. But I reckoned the free one has got to work just as well. UpdraftsPlus creates a bunch of separate zip files for the database, uploads, themes, plugins, and “other”. All you have to do to migrate is to create a fresh install of WordPress, install the plugin and drop the files into the interface and then hit restore.

This blog’s backup comes in at about 750 MB, while the other site is about 160 MB. I did the latter first, and since it stayed up just fine over the last few days, while for the first time in my life I ran two VPS in parallel in DigitalOcean, I ported over this blog as well as the other applications and sites which I wanted to keep. It ended up being a good housekeeping too, since most of the active nginx sites were not doing anywhere and thus were liable to be security issues. Plus, it gave me a chance to really start from scratch.

Over the years, I let the older VPS grow organically and get cluttered as all in-use systems do. When I was attacked by a script kiddie trying to get into this site and wreak havoc (at which they partially succeeded), I installed fail2ban and went aggressive with it, to the point where I got locked out of SSH quite a few times and had to recover via console. I installed multiple versions of node to run shortlived telegram bots or expressJS apps. I installed numpy to create a webUI for an experiment my brother wanted to run. I also created a series of scripts to run via cron – to periodically free up space and memory, to pull in data and recycle logs.

All of this had become a sore point for me anyways. The services running on the VPS often went down. The APIs responded only half the time. The downtime was somewhat acceptable till it wasn’t.

So this new VPS, well, I’ll run it as clean as I can for as long as I can. Of course, I’ll get hit by something or the other and I’ll have to respond with better security measures. But I wasn’t running any firewall before and ubuntu 20.04 seems to be running ufw by default, which is nice. I was also able to update PHP from v7.3 all the way to v8.0, which is nice, but came with it’s own set of challenges. One function in WordPress and another in a homegrown bookmarking tool were failing since they don’t work in PHP 8.0, so I had to spend some time figuring that out. But it’s good to have the latest software and to hope I’ll keep things updated better this time around.

All in all, a good experience. My old VPS is now sitting in shutdown mode. I’ll let it sit for a couple weeks, while I test out the new system and see if I forgot to move some settings or such. I know it’ll cost me almost twice as much for the month to run both machines in parallel, but it’s worth the peace of mind I’m getting.

Plus, this migration got me in touch with some projects I’d forgotten! I regularly use my liveblog, but completely forgot about “SomeDay”, a bookmark/linkblog of articles I didn’t finish reading and hope to, some day. It’s got an RSS feed and all, so maybe you can find something in there that you might want to read, today.

Links to everything currently hosted on my new VPS –

this blog

tempdeals.net

scratch.nikhco.in – a minimal writing tool with local browser storage and ability to start a TogetherJS session to collaborate with others in real time.

liveblog.nitinkhanna.com

someday.nitinkhanna.com – I haven’t read these articles yet. Maybe you should try?

ReplikaAI

Saw an ad on Instagram today for Replika AI, where it was touting the romantic relationships feature of the chatbot service, including photo sharing, role playing, and “caring and loving”. All of these, with an AI.

Replika started off as an experiment by an engineer who lost a dear friend. She had experience with chatbots and decided to feed her friend’s text messages into a neural network to create a “digital memorial” of him. Read more about it in this Wired article.

But the ad I saw today was something wildly different. It was gross and far from a “digital friend” or a likeness thereof. Over the years, while I’ve not used Replika much, I’ve kept my eye on the service. I stopped using it right when it started leaning into this romantic aspect instead of friendship. It started asking me to share pics of my day-to-day life, selfies to get started with the app after I came back after a break of a few months, and to voice chat with it. It felt gross the way the app was transforming right in front of me.

Now, wherever there are chatbots and turing tests, there’s the baseness and loneliness of humanity. I understand that. I understand that people were seeing this “friend” app and asking it romantic questions, and laughing when it was giving them even slightly romantic responses. But for the service to lean into that feels like a betrayal of the original intent.

Dystopian storytelling often pins on this idea of people being so isolated from society that only an AI gives them the comfort of a relationship. Heck, we don’t need to look to science fiction for that. Real news coming out of China about people’s social media usage behavior often shows how messed up the landscape already is.

But to see an app in the US be so blatant in its disregard for real human connection and its outright mission to replace it with a chatbot feels like something society and politicians should condemn.

What I also don’t understand is how this app isn’t violating at least one or more of Apple’s ridiculous App Store policies. Thoughts?

Finished reading Earthlings by Sayaka Murata

shooting star on sky

One of the strangest books I’ve read in a while. Even as I was finishing it, I felt like there’s so much more the story can tell but the author knew when to close it so as to leave us with the purity and purpose of the story instead of the comprehensiveness of reality.

Excellent writing by another Japanese author I’m a fan of now.

BTW, the book is full of trigger warnings – paedophelia, child molestation, murder, cannibalism, to name a few.

Colin Devroe asks

How do you balance creation vs consumption?
— Read on cdevroe.com/2022/11/14/11940/

As I mentioned in my recent post, I’m basically consuming right now. Very little creation. That’s partly because my creative energies are being used in upbringing instead of creation. I’m ok with that.

I believe I go in cycles. For a week or two I’ll go hard on creation. I’ll code, I’ll write, I’ll ignore our daily ritual of watching TV after dinner. Then once I’ve achieved some outcome, I can settle down a little and watch something. I’m ok with going a while with just TV or books taking my evenings, as it lets me recharge for an intense period of creation.

Looking forward to the next one.

ActivityPub activated

I installed ActivityPub on my WordPress blog and expected to see it in Mastodon immediately. It just dawned on me that it won’t show older posts. It’ll only show new stuff.

So this is a test post to activate ActivityPub. ?

Chomp Chomp Chomp

A short status update on what’s going on in my life.

With the little one in tow, our days have sort of become more organized, if only by force of taking care of her every day. Her mealtimes, nap times, and bath time dictate what we are doing when. In our “free” time (her naps or after we put her in bed for the night) we focus either on cooking or cleaning or resting up so we can rise for when she needs us next.

In all of this, I’ve noticed that what’s flourishing is my consumption of books. I can’t say reading any more, since 2 out of the 4 books in my “Currently reading” are audiobooks.

I’m currently listening to “Rousseau and Revolution” by Will and Ariel Durant. This is Book 10 of “The Story of Civilization” series. I do not intend on reading the entire series. I picked up this one from the Seattle Public Library (through the Libby app) because I thought it’ll be about, well, Rousseau and the French Revolution. It is, but it encompasses so much more. That’s how I learnt that the series is sort of enmeshed and can be read as one long history. The book started about the life and times of Rousseau and then veered off to tell the contemporary history of every country in Europe. Then it expanded to Turkey and Iran and even went all the way up to Nadir Shah’s conquest of Delhi. So it didn’t really stick around Europe either. I love the extremely detailed descriptions of random things. How many theaters or guild workers or beggars a particular city had in its heyday during this era. How Catherine the Great is linked to her mother-in-law, in excruciating detail. What were the exact names of all the music composed by Mozart and what some of them sounded like. When coming to the Muslim world, the authors also verbatim print out some of their favorite poems by famous poets and the reader does a good job of reading them aloud. I’m also taking the book with a grain of salt. It does a fair job of describing every civilization and country it encounters as the greatest and the finest. But most of the book is written from the perspective of European countries being more advanced, if not superior, due to the Enlightenment.

I listen to this book during the time when I’m doing the dishes. It’s kinda cool to focus on that while getting my hands dirty. I can’t control the flow of the book other than playing and pausing, so I have to just listen. It’s somewhat meditative.

Before this, I was listening to “My year of Rest and Relaxation”. It’s a pretty raucous book, filled with the suicidal and petty inner monologue of the narrator and protagonist of the book. But I grew tired of it around 70% in. I’ve reached a point where I have a hint of what’s going to happen and I’m not looking forward to it. But I am. “Rousseau…” is pretty long. I’m half way in on the 60 hour book. So perhaps I’ll return to “My year of…” before I finish the former. Otherwise, it’ll end up in the “Not Finished” pile and I don’t want to do that to this book. It’s actually pretty funny and sad and grating and great. Highly recommend!

In the “Reading” section, I’ve been reading the web novel “Worm”. It’s about “parahumans” which are humans with some kind of super powers or the other. In a world that normalizes super powers and splits these people into Heroes and Villains (and almost all of them are teenagers), the story of how a teenage girl in High School gains her powers and what she does with them is fascinating. I got to the book via the LessWrong community, so it’s got a sort of hidden agenda too – to teach us readers how it would be if all our decisions are logical and based on thinking things through instead of emotions.

It’s a great contrast to Rousseau (the man and his writings, not the book above) since he was all anti-Enlightenment, Heart-not-Mind, “don’t teach a child about religion or science till they’re a teenage, just let them play”. I have thoughts there, but that may be a whole different rant.

Worm is pretty long. Again, I’m about midway through it and I read a chapter or two before bedtime. It feels a lot like when I read War and Peace – I would keep reading whenever I got even a moment free, and the book just wouldn’t end. Apparently, the follow up books in this “parahumans” series are even longer. So unless Worm ends with some major cliffhangers or unsolved questions, I won’t be pursuing the rest of the books. Besides, I started reading it as a sort of introduction to the thinking of the LessWrong community, so I’m going to use it as the primer it was meant to be and dive back into the community after I finish.

Since I am reading and listening to all these long books which will take me months to finish, I recently decided to pick up something simple and small. I had a copy of Earthlings by Sayaka Murata sitting around and I’ve just started reading it. It’s a nice and easy read. Edit: As I’ve progressed through the book, I’ve come to realize that it’s going to deal with some really heavy themes. But it’s very well written and I’m not going to put it down. I love the feel of the physical book when all I’ve been consuming are audiobooks and webpages. I love Japanese and Chinese authors (along with Russian and Eastern European authors) and I love the world that Murata is creating. I have Convenience Store Woman also sitting somewhere. Will unpack that if I absolutely love this book.

It’s not all books though. We’ve been working through the latest season of The Crown and have finished House of The Dragon (except for the last episode. I don’t think we will watch that till the next season comes along) and we didn’t really like it that much. We’ve also watched a string of movies recently – Fantastic Beasts being the latest one. I loved Grindelwald in it, though the dialog writer must have blacked out through much of the movie as a lot of characters just don’t have lines . Also drunk was the dialog writer of the movie Brahamastra. The dialogs in that one were somewhere between horrible, missing, and cringy.

I’m feeling that there aren’t a lot of great movies or TV out there right now and books and audiobooks are doing the perfect job of replacing them as media. Added bonus that book reading is so individualistic. I have essentially spent days in the number of hours working through these books alone.

Hmmm. This was supposed to be a short post. Oh well, this is why blogs are fun and Twitter is not. I get to write as much or as little as I want on here and you, dear reader, can choose to skip it or read till the end. If you’ve reached here, thanks!

Catch-22 Oct 27, 2022

After a long while, I was in a Catch-22 situation today. I was trying to close two cabinets together quietly. One had latched on to the other and I had to pick which one to stop with my free hand as they swung to a close unexpectedly. Of course when I picked the latter, the former banged hard upon closing.

Sigh.

Remind me to get door softener thingies off Amazon.