Relishing Failure

Last year, I read exactly one book. It took me three months to finish and I knew by the end of the year that this was a problem. So, I decided to give myself a goal for 2017 – read twenty books.

Of course, I failed. I read 13 books and 4 comics. Adding those comics brought my total to 17, bringing me closer to my goal, but that was such a shameful act that I didn’t add any other comics I read to my list. The goal, after all, was to read full-length books.

But it felt good. Not being able to beat the goal felt good for the first time, because it meant that I aspired to something, that I achieved something over what I had done last year. It took me about one month to read each book. I am a slow reader (basically because I’m a recovering one) and life, and other things often came in the way. ?

Somewhere on my blog is a draft of a list of all the books I’ve ever read. I keep it as a draft because it feels like something that should not be set in stone. It should be kept open, waiting to receive new names to grow the list. But for this post, I’d like to take the books I read and describe the books, or my thoughts around those books, in a few sentences. Bear with me…

  1. Slaughterhouse-Five – This is what I spent January with. It’s a sad tale of how absurd wars are and how oddly they affect people. As I was reading it, I kept remembering Catch-22 and how it too showed the absurdity of war. When SLF merged the war and it’s post-war abducted-by-aliens narrative, things went for a toss, but in a seamless way, because if you believe in war, it’s not going to take you a giant leap to believe in aliens.
  2. Where’d You Go, Bernadette – Ah, Bernadette! This was one of the most exciting novels I’ve ever read! The characters are crazy and the storyline is just brilliantly absurd. Recently, when I was in a bookshop, I told the owner, Dion, that I’d read this book and marveled at the beautiful way Seattle is portrayed in it. If you want to know Seattle from the eyes of Maria Semple, read this book. If you want to laugh at the absurd life of one Bernadette Fox, read this book!
  3. The Golden Compass – I’ve wanted to read this book since a long time, ever since I saw the movie. From what I remember, the movie was only half the book and reading this completed the story for me to a certain level. Perhaps I’ll go back some day and finish the series.
  4. A Knight of the Seven Kingdoms – This book has been sitting on my shelf since a long time and I really just wanted to read something of GRRM and this was perfect. The stories are nice and tie into the main storyline very well. There’s just so much in this world to explore!
  5. Prisoners of Geography – This is only one of two non-fiction books I’ve read all year and I’m okay with that. It’s a great book, with loads of amazing stories and insight into why countries act the way they do with their neighbors. But reading it, I also realized that I’m not a non-fiction reader. I prefer fiction, even fictionalized accounts of events such as James Michener’s Poland and the book my wife is reading right now – The Other Einstein.
  6. Marvel 1602 – I mentioned before that I won’t include 4 comics in the list. Those comics are Archies rebooted with new style of artwork and a more mature theme. Even so, they’re still my childhood Archie comics. Marvel 1602 is the brainchild of Neil Gaiman and he is one of the most fantastical authors I’ve read in a while. His ability to create strangeness out of the ordinary is almost infinite! Then, give him the Marvel universe and let his mind run wild and this is the result. It’s more story than comic (so I guess it’s a graphic novel?) and well deserving to sit here on this list, even though it got a little tiresome and predictable in some areas.
  7. We have no idea – When Jorge Cham (from the famous PhD comics) said that his new book was coming out, I knew I had to have it. It took me a while to get around to this book, but it was a delight. It gets a little tiresome towards the end simply because there are so many amazing questions that get asked in every single page that one can spend an eternity trying to answer them! In some sections, I sat with a notebook and just kept writing down ideas that poured in. If you ever want to write science fiction, read this book and let your imagination run wild on it!
  8. The Unknown Errors of our Lives – This collection of short stories is one of the saddest I’ve ever read. Right from the first one, Chitra paints this picture of life in the US that’s shiny, repugnant, restrictive, celebratory, and very, very dark. There’s sadness in almost every page. It took me a while to recover from this book. But would I recommend it? Absolutely. If you want to know the struggles of Indians in the US, or are going through those yourself and want to read some foresight, some hindsight, and something that you can relate to, read this book. Borrow it from me! I’d love to get it off my shelves for a while so it can’t haunt me!
  9. Origin – Oh yes, Dan Brown came out with a novel and I read it and it’s awesome! I love Brown for his unabashed self-promotion. It’s very clear that he’s the hero of his novels and his character has a style that will sometimes make you want to throw the book away! But once you get past the first few chapters, you stop bothering with the absurd brand references (I don’t even know these brands!) and focus on the one burning question – what the heck was the discovery?!
  10. Why you will marry the wrong person – I’m being cheeky by adding this book to this list. It’s more of an article, extended into a book. I paid good money for the article and for good reason – other than telling us all off for marrying people so blindly (“so you dated for a few years? Do you know why and how your other half is mad? Is their madness compatible with your madness?”), this book also introduces this amazing idea that we should submit to extensive and rigorous psychological testing to help us find the right person to marry. I guess Tinder doesn’t cut it for the authors of this book.
  11. Embers – Gimme a book about the Old World and I’ll enjoy it like a well aged piece of cheese. Embers is poignant and beautiful. I discovered it from a Stanford book club RSS feed and Sandor Marai’s turn-of-the-century Hungarian world is bleak and colorful at the same time. It has layers upon layers and as the story unfolds in to the night, it opens up into this wonderful life lived by these two old men and asks the one important question we will all ask in our old age – “was it worth it?”
  12. The Shape of Ideas –  Grant Snider is one of my favorite web comic authors and his book is fun and inspiring and a great way to pull oneself out of a fug! I read this book once but whenever I’m feeling down or have writer’s block, I’ll read one odd page from this book and it’ll help me get right back on track!
  13. Dandelions – Finally. This book was an excellent way to end the year, simply because it is an unfinished book. The author, Yasunari Kawabata, committed suicide before he completed this book. I really enjoyed the characters’ constant back and forth, almost a bickering, which leads them to reveal the story to us in peels of an onion, slowly, and surprisingly. One of the things I loved was that the story had no preface, but a postface, explaining some things about the book. When I was younger, my Dad once told me how he’s read every book in his studies from end to end, including all prefaces and notes from the editors, authors, etc. and he recommended that I do that. Well, Dad, I find that to be very wearisome because most of these authors just drone on about random things unrelating to the concepts or the stories I’m trying to read! When I read Plato’s Apology a few years ago, it was a forty page book with a fourteen page introduction! That was horrifying to me! Two pages in, I abandoned the droning of the translators and commentators and went straight to the text! It felt so gratifying to be reading the actual words I came to read instead of reading some random person’s boring analyses of the life and times of Plato.

There you have it. These are the books I read and these are my thoughts on them. If you want to look at my Goodreads year in review, here it is. It’s a nice feature Goodreads has. It tells me that I read a total of 3,644 pages. Those were some good pages!

If you’ve made it so far, I’d like to talk about something. Over the last two years, I’ve been reading Tolstoy’s epic tome, War and Peace. I started some time last year and this year, I’ve moved the needle from 50% 0f the book to 77%. It’s really not one book. It’s fifteen books and two epilogues, each with twenty to twenty-five chapters of ridiculous length. If I listen to my wife, I should be able to introduce these sub-books to the Goodreads listing, immediately putting me over my stated goal of twenty books, and then some. But I won’t do that. This book is more of a research project and relaxation system rolled into one. Whenever I’ve had a long day at work, I uncurl with a few pages of War and Peace and love how I’m transported to this amazing world where Napoleon has invaded Russia and hopes to conquer and get out. God only help these buffoons. If only they had “Prisoners of Geography”, they’d understand that Russia is not a simple thing to be quickly run over and forgotten. Russia is a crazy world, with one foot firmly in Asia and the other well in Europe. Russia is Old World and New. Russia is a sleeping dragon better left undisturbed. I read and laugh with the characters, cry with them, get surprised when they die or turn up alive. I am living this book out over the years and when I do finish it, which I am slated to in 2018, I’ll mark it as completed and either start on some other similarly long story, or restart this book, so I can once again live this beautiful book through.

That was my 2017 in review. I truly enjoyed failing at my reading challenge. It was a pleasure to read so many amazing books and feel this immense sense of achievement at having read so much, even if it’s a drop in the bucket of how many books get published every year!

Now, I’m off. Time to start the next book. I’m going to begin 2018 reading Cixin Liu’s The Three-Body Problem, which I picked up from the Bellevue Amazon bookstore, after overhearing someone talk about what an interesting book it is! After that, it’s on to a few books I acquired at a charming little bookstore in an magical place called Sunriver over in Oregon. But that’s a story for another time. ?

Photo by Kilkennycat

Changing my relationship with Facebook

I’ve come across two posts today that are of high interest to me (and probably to you, dear reader).

First is this official Facebook blogpost here. It talks about how Facebook has discovered that those who use social media passively, just for browsing, end up sadder than those who use it actively, commenting and chatting with friends. I’ve seen people use Facebook for posting material which I sometimes thought was too long or too short or too general to be posted on what is supposed to be a rather private network. But if it brings joy to them, and helps me connect with them, then why not, right?

The second post is here. It’s a heartbreaking tale about how the algorithm destroys relationships and makes us devoid of important information. The algorithm is prioritizing information for us and in the process is making us less human. Please do read it.

I’ve been thinking about Facebook’s blogpost and I’ve come to the conclusion that the only way forward is to game the system. What does that mean? It means to post frequently and interact with people. It means to force the algorithm to think that I’m some sort of high value poster. Till date, I’ve refrained from cross-posting my tweets to Facebook. I believed that Facebook is reserved for longer posts, meatier ones that mean something to the people to whom I’m posting. But the algorithm doesn’t think like that. The algorithm rewards those who post often instead of those who post things of value. So I guess that ends now. Thoughts are thoughts, no matter how small they are. I’ll post them on Facebook simply so that one day, when I want to post something of value to my friends on Facebook, the algorithm deems me of enough value to make sure they see my posts.

Some of you may object to this on the basis that you see my posts on twitter (and other places). Well if you do and do not interact with my posts on Facebook, the algorithm will downgrade me for your experience. In that way, what Facebook does to control our lives is highly personal and deeply disappointing. Hopefully, you’ll see that.

To all others, I hope you like my short gripes which I send out every once in a while. I’ll try this for the year of 2018 and share the results with you at the end of the year. I posit that inputting more to Facebook will mean I’ll also get more output from it. Let’s see if that turns out to be true.

Everything wrong with Google Play Music’s iOS app

I’m not much for introductions on such topics. The following is part kvetch and part bug list about the Google Play Music iOS app. It’s a crappy app with a lot of problems.

 

1. Oh Playlist, where art thou?

I like listening to reading music while I’m reading. So one day, I searched for such a playlist (aptly named “reading music”) and added it to my library, marked it for download and started listening to it. After that, I didn’t listen to it for a while and moved on to some other music.

The playlist effectively disappeared. The My Library tab has these options – “Recent Playlists”, “Auto Playlists”, and “All Playlists”. Once the reading playlist was no longer a ‘recent’ playlist, I assumed I’d find it in the All section. Nope, not there.

It’s not my own playlist. It’s a playlist that I’ve effectively subscribed to, downloaded, added to My Library (three separate actions they made me do to ensure I have easy access to the playlist). But if I don’t have ownership, does that mean it’ll not even show up in my library? That’s more horrible a design than Google AMP!

To this day, I don’t know where most of my downloaded playlists are. They’re consuming space on my phone but I don’t even know which ones they are, let alone have a way to play them.

In the end, I had to add the entire ‘reading music’ playlist I like to another playlist I created. That’s the only way to get it to show up in my own collection.

2. When everything is Search, nothing is Search

Google Play Music wants you to Search for everything. The Search button is prominent everywhere but it only does Universal Search. When I’m inside a playlist, it doesn’t search the contents of that playlist. I have a playlist called ‘all’. I dump all my favorite songs in there and then when I’m bathing and listening to music, I know I’m listening to stuff that I like. But every once in a while (once a day) I don’t want to start my music with the first song in the playlist (Taylor’s Look What You Made Me Do). So I go searching for some other song. I have to scroll through the entire playlist and hope to hit on the song I want at random.

Mind you, it took Spotify forever to add in-playlist Search. But isn’t Google supposed to be all about design and iterations and learning quickly? Oh wait, maybe I’m thinking about Facebook (hey google, look what you made me do)!

It’s a simple ask – add Search to your app in a meaningful way. Maybe since they don’t actually listen to anybody, they don’t know that’s an ask.

3. Integration, Integration, Integration!

At the bottom of my ‘all’ playlist is a section that invites me to watch YouTube videos of some of the songs on my list. It’s not a very smart offering – it doesn’t take into account my favorite music, just whatever they want me to watch videos of (I can hit the more button to see loads of videos that might interest me).

So I’m thinking, if they’re so tightly coupled with YouTube, that’s awesome! No. It’s not.

Search for a song that they don’t have and they’re point you to the YouTube video for it. Maybe. This service has gotten better over time but it still doesn’t point me to the right video for a lot of songs. Besides, what’s even the point of this? Do I want to watch the song on YouTube? No, I want to hear it on Google Music. If you don’t have it, just say so and move on! Instead, they show me related musicians, radio stations and then bring up the videos. Also, this brings me to the next one –

4. Competition, Competition, Competition!

Why am I on Google Music? My brother bought YouTube Red’s subscription and liked it so much that he was one of the first people to sign up for the YouTube Red family plan. He got me in and I’ve really started enjoying no-ads YouTube. Experimenting with the options available to us through this, we came to understand that it includes YouTube Music and Google Play Music premium subscriptions too. That’s amazing! But not.

What service would you rather use? Shitty Google Play Music or weird YouTube Music? YT Music is confusing and half-baked. It has nice video/audio modes and background play but it doesn’t support playlists. Google Play Music has tight integration with YT but not YT Music, and it opens the YT app for any video I click on, and starts autoplaying it. Convenient, but irritating. YT Music is essentially Google Music’s own competition and they’re both the worse for it. Neither service is usable. I understand there’s some licensing nonsense behind this, but hey Google, you’re GOOGLE. Getting your way with licensing should be second nature.

5. Tabs. Such useless tabs.

You know what I do when I open the Google Music app? I go to my “Library” tab and look for things manually. If I can’t find them there, I search for them using the universal search. You know what I do not use? Every other tab in the app.

The Browse tab – It has three options – Top charts, New releases, Browse stations. None of these interest me because they’re not suited to my taste. They’re generic.

The Recents tab – what’s the point of this? The Library tab has a Recent playlists section. That’s pretty useless too. So the Recents tab is even more useless. It’s just a list of albums? songs? playlists? I have no idea. There’s no explanation of recent what?

Home – this one is even more weird. It’s got random playlists such as “For fans of blah” and TGIF. No reasoning for these. We’re just supposed to assume that they’re customized to day-of-the-week, listening habits, etc. My top recommendation is Latin Guitar Classics. I don’t know why. I’ve been listening to classical music and I daresay the Guitar is hardly a classical music instrument.

When you look at how good the Google Photos app or the Google Home and Assistant apps (which have some weird overlaps) are, it’s amazing that Google has a division making such a confusing and functionally terrible app.

6. The making of an app

When the Amazon Prime Video Apple TV app came out a few days ago, one of the laments people had was that it looks and acts like a website skinned to work with the Apple TV. It’s not horrible (the Hulu app is horrible) but it’s irksome. The Google Play Music iOS app is a joke. The app regularly forgets state and resets me to Library tab. The settings page is long, confusing and not well sectioned.

The album art is also a joke. Most of the music on there has a YouTube video play button as album art. Is this my personal library scraped over the years or a service run by a multi-trillion dollar enterprise? I wonder.

The display icons for artists under the Library tab are huge and most of the time don’t include any photos of the artists and are either blank or some half screwed up album art. The overall design of the app is not material or bootstrap or anything in between. It’s a monstrosity.

7. Misc.

Can your service one-up other music services? Well, if you can’t sort my playlist by any order (RPM would be nice and Spotify doesn’t have that, but I’d take Alphabetical, frequency, year of release, anything), if you can’t play videos within your app, if your service doesn’t include podcasts (I don’t listen to them. I just know other services have them), if your algorithm can’t predict what kind of listener I am (bollywood music, bhangra, pop instead of OMG this guy is Indian we have no idea what to do) and have music discovery in a meaningful way, what better are you than Spotify or Pandora or, heck, Napster?

Does your service have a landscape view? Most music apps do not. But come on Google. Study your competition and trounce them!

What’s with the name, by the way? Was ‘Google Music’ taken?

Recently, I uncovered another glitch in the app. When the missus tried to airplay a song to the Apple TV, if she airplayed the entire screen, the audio was broken and glitchy, but if she did it from inside the app, it worked fine. You’d think they’d hire a test engineer for these things.

There are so many ways Google Music can be better than Apple Music and Spotify and right now, the only cachet they have for me is that it’s free with YouTube Red. That’s just sad.

 

Epilogue

A few weeks ago, I screamed at Google Music on twitter for these issues. They asked me for feedback but I’d cooled down and didn’t bother to send them the feedback. Now they have the information they requested. Let’s see what they do with it.

You’d be asking me, why are you still using Google Play Music if you hate it so? You know what I hate even more? Paying for redundant services. I’m already slated to get rid of Hulu as soon as this season of Grey’s Anatomy ends. If Google ever gives us the option to drop Google Music from YouTube Red and pay less, I’ll gladly go back to Spotify. Till then, I can kvetch.

Photo by The Logo Smith

A quick review of Dan Brown’s Origin

This is a typical Robert Langdon book, where the hero is the most well-connected, smartest-in-the-room, teacher-of-genius, yet-dumbest-when-it-comes-to-technology larger-than-life persona in the book, for whom women ache and doors open and helicopters fly at will. It was improved by the other two characters in the book, who, frankly, were in ways more important than Langdon himself.

Brown’s final explanation, that beautifully crafted, extremely vivid crux of the novel, which we read his books for, outdid itself this time. It was elegant, very well researched, and perhaps so coherent that Brown may well be a messiah of the times to come!

There was an expected thing that happens towards the end – the betrayal of technology – which you begin to expect almost as soon as you read about the technologies involved in this novel. Yet, in the cold light of the morning, I realize that while Brown had to make it trope-y, he managed to squeeze in an element of elegance there. The betrayal is typical of all science fiction, yet somehow away from it, as it resides in the world of Robert Langdon, and it is done and discovered in Langdon-style. The character’s response to it is also surprisingly Luddite.

All in all, it’s a good read. There were a point or two where it could have been tightened, where obvious spoilers could have been skipped to maintain the suspense. But those side-suspenses don’t matter. The main suspense was enough to whet our Dan Brown appetites!

Photo by quadralectics

Running Compass on Vultr

Intro

Recently, I came across a tweet by Aaron Parecki, where he talked about a lifelogging app he built (and recently released) which tracks our location constantly.

I’ve been using Moves on-and-off over the years and partly due to it being now owned by Facebook, and partly because it’s a very crashy app (first time works fine, doesn’t open ever after that and stops tracking properly soon after; I assume the developer is now working on some darker features for the Facebook apps and so doesn’t spend as much time on his own creation), I’ve never been satisfied with Moves.

So, I downloaded Aaron’s Overland GPS Tracker app (free!) and set it up. The app is rather bare and the functionality is not well explained (within it). But it’s free, open source, a one-man job, and in line with the vision for indie dev, so it’s up to us to figure things out. I asked a few questions, got pointed to the settings explainer here. Well worth a read if you download the app.

The next step of the app was to install a remote server which ingests the data and makes it human readable and useful. As Aaron explains, the quest is to answer the question – “where was I at blah date at blah time?” The app’s official homepage recommends one of two servers to send the data to – a service called Icecondor and a server Aaron wrote called Compass. Compass looks nicer than Icecondor, is self-hosted, and I’ve been itching to play with Vultr.com‘s SSD Cloud, which competes with DigitalOcean in pricing and resources. So, here’s a walk-through for getting yourself setup with Vultr, installing Compass, and setting it up with Overland GPS to start tracking your location as creepily as Facebook and Google do it! 🙂

Vultr

Vultr is a nice competitor to DigitalOcean. At $2.50/mo for their cheapest VPS, it’s half the price of what DigitalOcean offers ($5/mo for the same RAM, storage, and CPU, but DO offers twice the bandwidth and, well, is trusted more). There had to be a caveat, right?

I signed up and the first thing I was told to do was to add money to the account. I had the option of not adding any cash and just attaching my credit card, but I’m going to end up using Vultr for something or the other, so I threw $10 at them (shut-up-and-take-my-money style!).

Then, they told me I can deploy a new server! I picked Seattle as my server location, Ubuntu 17.10 as my poison (which was probably a bad idea; more on that later), and scrolled down to the Server pricing. The $10/mo server was pre-selected for me and the $2.50 option was grayed out! (Seriously though, they should give names to these tiers. It’s silly to keep referring to the price.)

I googled around a bit and found out that they keep disabling the cheapest tier (they call it “Temporarily Sold Out”) as a sort of bait-and-switch model to drive new users to the more expensive options. But that sounds somewhat bullshit. If this was truly the behavior, I’d like my money back. But, and I’m glad I did this, I went back and started clicking around to look for solutions. It came in the form of New York! Turns out, they try to drive users to lesser used data centers while everyone who’s trying to set things up actually tries to use the “Silicon Valley” data center (seriously? Who the heck put a data center there???)

New York and Miami currently have open $2.50/mo tiers (ugh, that naming is so needed! I guess I’ll call it the Micro tier and the next one Mini), and networking is not a problem for me (who cares if a little more bandwidth is needed to get this non-time-sensitive data to New York and back), so I picked New York and threw my hat in the ring.

The server came up within… minutes? (Seriously, it was fast!) and I had an IP address to point to! Yay! But, what’s the password? The usual Ubuntu password didn’t work and I looked around at their docs and there wasn’t much to go by (Vultr’s docs aren’t as awesome as DigitalOcean’s. They’re good, just not there yet. They have a documentation bounty program if you’re interested, dear reader.) Then I checked the email which I would have received on server activation. It said that the password is on the dashboard (silly me!).

As I said before, Vultr’s documentation isn’t great, so I followed a mix of Vultr’s LEMP install here and DO’s LEMP stack installation instructions here. I installed PHP 7.1 with FPM (which, I must admit, was a little leap-of-faith because I wasn’t sure Aaron’s code would work without throwing up legacy issues, which it didn’t) and skipped most of the tweaking that Vultr recommends (YMMV).

Compass

Then, I copied over the Compass files (from here) and started following the Setup. The first issue was the .env file. There’s a few settings in there which are confusing, so here’s what I did –

BASE_URL -> This is your website. It uses HTTPS. More on that below.

STORAGE_DIR -> This is the data directory which is supposed to store your incoming data. Oddly enough, it doesn’t. When you use the application, the GUI prompts you to make a ‘database’ (it should be called a ‘project’ Aaron). This database makes its own folder in the Compass directory, so this variable invariably doesn’t get used. Set it anyways.

APP_KEY -> This confused me a bit. I don’t think this is a password. But I set it to something like a password. It’s a 32 char string, so have fun setting it up.

DB_CONNECTION -> Set this all up as you would any other MySQL application. Use the WordPress tutorial by DigitalOcean as a hint of what to do.

DEFAULT_AUTH_ENDPOINT -> This was one of the more confusing things I saw. Was the idea that this was some generic authorization? To figure out, I found Aaron’s own Compass website and tried to login. Turns out Aaron uses a very neat authorization process. There’s no password. All you do is tell which Indie authorization website you want to use to authenticate who you are and it’ll allow you to login. Specifying this URL will mean that if you can login to that other website, you can login to this website. The default is set to ‘https://indieauth.com/auth’. If you let this remain, it’ll mean that anyone who has an indie auth login anywhere will be able to create an account on your Compass server and potentially use it for their own data. So, I authenticated myself into Aaron’s server and now I have an account there! Of course, I don’t recommend this. I changed this Endpoint to my withKnown.com site. That way, only people who can login to my withKnown site can login to my Compass server. Who can login to my withKnown server? Only me. 🙂

There’s a piece of the puzzle which needs addressing. APP_DEBUG is set to true right now. So whenever there’s an error, Compass spits out the entire MySQL connection string, including password, as well as very important system information out to anyone to see. I suspect that once you’re done setting up this server and you trust it, you should follow the Laravel process of ‘migrating’ the application from dev mode to production. This will help secure your application.

 

After this, I moved on to running Composer to install all the dependencies which I needed for Compass. Here’s all the issues I faced there –

“Composer not installed” – Install using

"apt install composer"

“danielstjules/stringy 1.10.0 requires ext-mbstring” –

"apt install php7.1-mbstring"

“phpunit/phpunit 4.8.21 requires ext-dom” –

"apt install phpunit"

“zip extension and unzip command are both missing” –

"apt install zip unzip"

Now, you can run ‘composer install’ and it’ll work.

 

nginx

I recommend using nginx. You’ve got a small server and you don’t want Apache to drown the memory, so just use nginx.

Aaron’s config for nginx were clear, but not helpful, because it doesn’t go with the usual nginx config floating around tutorials. So here’s mine (relevant portions only) –

index index.php index.html index.htm;
root /var/www/nitinkhanna/html/compass/public;

location / { 
    try_files $uri /index.php?$args; 
}
location /index.php { 
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;    
    fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ \.php$ {
    include snippets/fastcgi-php.conf; 
    fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
}

At this point, I thought I was done. But then, when I tried to open the site, I ran into some very nice errors in the application. First of all, notice the root. The root of the application is not the compass folder itself, but the public folder inside it. This is not mentioned anywhere in the documentation and was well worth twenty minutes of “what the heck?” and then some. But you have it on good authority that this is what you’re supposed to do.

Secondly, the application wasn’t done making me install stuff. So I also had to install curl –

apt install php-curl

Then, I wanted to digress a little and make my life a little more difficult (or easy, depending on who you ask). Aaron’s own Compass server uses Let’s Encrypt based SSL. I’ve always wanted to secure my own sites using SSL, but I’m lazy. For this, I thought, why not!

I found the CertBot instructions for installing with nginx and Ubuntu here. They’re pretty straightforward, with a small error that I ran into – Cloudflare. I use Cloudflare as my DNS, security, loadbalancer, God of Small Things. Cloudflare provides SSL. It’s literally a one click. When you add a new A record to your domain (such as compass.p3k.io), it adds DNS and security itself by routing traffic through Cloudflare’s network. CertBot doesn’t work with that. CertBot needs direct access to the server. So, I had to disable Cloudflare’s lovely protection for my subdomain and let certbot do it’s job. It did so. It automatically modified the nginx config to accept HTTPS-only connections and to route all traffic to HTTPS. I was even able to setup crontab to auto-renew certs –

43 6 * * * certbot renew --post-hook "service nginx restart"

After this, you run the job queue commands as listed by Aaron and you should technically have a running website. But there’s a catch, as there always is. This server that I’ve got is not a ‘mini’. It’s a ‘micro’. 512 MB RAM is not enough to run MySQL, Ubuntu 17.10, nginx, php-fpm, and actually run an application on top of that. So, I ran into a very cryptic error –

[PDOException]                                    
SQLSTATE[HY000] [2002] No such file or directory 

At this point, I had the application running and I was able to visit the site and all, but try to login and it threw this error. The php artisan command also started throwing this error (by the way, you’re supposed to run the ‘php artisan queue:listen’ command in the background for this server. Follow the instructions here to set up supervisord to do so). Most people on StackOverflow seemed to think that if you replace ‘localhost’ with ‘127.0.0.1’ in the app’s settings, it’ll start working again. But that didn’t help. Finally, someone recommended (not in real-time. I’ve only once ever in my life used StackOverflow in real-time to get answers to a question) restarting MySQL. Well duh.

Oh? MySQL won’t restart. Why???

It was this community question on DigitalOcean that gave me the answer I was looking for – I had run out of RAM. Turns out, 512 MB is just enough to play with a server, but not enough to run it for reals. Nonsense. Let’s just add a swap!

I used this excellent and very easy DO tutorial to add swap to my VPS. Notice the shade it throws at you for trying to use swap on SSDs. They specifically say that it doesn’t recommend using swap for DO “or any other provider that utilizes SSD storage” and that this degrades hardware performance for you and “your neighbors”. DO recommends upgrading your instance so it has more RAM instead of using swap. We don’t listen.

Added swap and voila! It’s working! MySQL fires up and the app stops throwing silly errors! I ran htop all night on the instance to monitor for Memory and Swap use and it works just fine! At last, we can login!

 

Overland

OK, we logged in using our designated Indie Auth website! Now what? You’re staring at the blank screen that recommends you create a database. Do it. You give it a fancy name and it spits out a bunch of configuration. Now what? First of all, change the Timezone in the settings to where you are. It’s set to UTC right now, but for me, it’s PST. Also, use

dpkg-reconfigure tzdata

in your Ubuntu command line to change the timezone of your server to where you are. Remember, my server is in New York. But I told it that its timezone is America/Los Angeles. Because.

OK! You’re good to go! You can throw some data at this server! Head over to the Overland GPS app and add this endpoint to it. Only, what’s the endpoint? I added just my compass server’s URL and that didn’t seem to work. Then I looked at the app screenshots and there it was –

https://compass.p3k.io/api/input?token=E6ncEYWxT...

That’s your Receiver endpoint! But, where should I find this? In your Compass ‘database’ settings, You’ve got a read token and a write token. Next to the write token is a link which says “show API endpoint”. Click it and out pops another line which shows you the above. Simply copy this and magically move it to your phone (I WhatsApp myself these things) and you can plug it into the app and start sending data! The first time you plug it in, the app will collect all the data you’ve accumulated till then (I had some 25000 points of data to transmit) and smoothly move everything to the server (Aaron really has done a great job with the app). After that, it’ll move the data in batches the size of which you can specify (God knows why).

But. You’ll see some odd things. For example, in the afternoon, the server’s map changed the date over to the next data (I suspect this is because my server was still on UTC time. Running the tzdata command above should solve this). Also, whenever there’s no data (or the data hasn’t loaded yet), the map points to Portland. I get that Aaron is from there, but I think we should be able to configure this (Seattle, woooo!) because it’s a little jarring. Finally, this will teach you how bad your GPS data is anyways. Most of the time, the map has me squarely in the water, or swimming out and coming back, or has me cross the I-90 bridge by, well, not crossing the bridge but swimming along it). But, that’s just the world we live in.

 

Questions/Issues
  1. Why does this server need MySQL? The Compass documentation says that the data is stored in flat files. Then is the MySQL database only used for temporary storage of data before it’s processed and saved to flat files?
  2. Is HTTPS a requirement of the server or a nice-to-have? I am not sure about this and I just took the safer route.
  3. The app, in debug mode, spits out way too much information which it shouldn’t. I’d like clear instructions on migrating it off debug mode.
  4. Did I decipher the meaning of DEFAULT_AUTH_ENDPOINT correctly? Not sure. Also, Aaron, if you’re reading this – what do I do with my login on your Compass server? Can you allow people to store their data on there, just for visualization (and wiped every night so as not to flood your server).
  5. I still don’t know what the best configuration is for the app (battery-use to tracking). If you’ve got pointers, throw them in the comments below!

Thoughts on a required reading page for blogs

I’ve been following Colin Walker’s thoughts on a ‘required reading’ page since Monday and have been thinking about it myself. His own thoughts were based on Dave Winer talking about the idea.

What is a required reading page to me?

Dave Winer seems to suggest a page which would link to articles that deeply affect the blogger, or explain their motivations and give context. Colin took the idea further and talked about old posts which the blogger would want to highlight. There could be external links which the blogger would want the reader to get acquainted with before weighing in on the subject the blogger talks about.

Why are we talking about it?

Two years ago, Derek Sivers and party introduced the idea of the /now page. It’s an easy way for bloggers to talk about what they’re doing right now. There was a marked effort to explain that this page would not be automated, so that the blogger frequently updates it and nurtures the page as a window into their lives. You can read my /now page here.

These ideas – a now page, and a required reading page, are extensions of a blog and a way to empower bloggers to build a blog as an extension of their lives. Sure, you can post what you’re working on on Instagram, and rant about it on twitter. But when it lives on your blog, you care about it more, and so does your reader.

When I was thinking about it, I felt that the required reading page is better implemented by the blogger simply choosing to write about the topic they care about. If you want people to notice a certain article, just blog about it, quote it, and explain your take on it. Ask the reader for their takeaway too. Perhaps, in that sense, a required reading page is every page on your blog. If you care about it enough to write about it, I’ll know that you recommend that I read it too. That is how it works right now, and that’s why I read Dave Winer’s post – because Colin Walker was talking about it.

But when you look at the way people blog now, a lot of bloggers have, since a long time, maintained a page of reading which they want to highlight. Famous bloggers often have a page which lists their most popular blog posts (a great example is this page by Leo Babauta) and others often point to external reading that they value. It’s time this too is formalized into a format and a ‘named’ page, so as to guide future bloggers (and current bloggers) and help leapfrog the blog from a stream of thoughts and articles to a centerpiece of activity and a deeper reflection of the blogger’s life.

p.s. Named pages are useful in both kickstarting a blog and maintaining it for your readers. Examples are the About page, the /now page, the Colophon page (which talks about your tools, your blog’s history; sort of an extended About page; here’s an example), and now, hopefully, the required reading page. As Colin says in his post about the Required Reading page –

I’m going to spend some time considering what I might have on mine.

Twitter backlash, again

Every time twitter changes something, it faces backlash. That’s not new, that’s common to all consumer tech companies. There’s a set of users around the world used to things the way they are and some who are looking forward to the change. Whenever Facebook makes a change, they get floods of comments attacking them. Perhaps that’s why Facebook has gone shadowy about all the changes they make to their algorithm. They’ll talk to the public about it, but not really explain anything.

When twitter changed the look of their app and service a few weeks ago, many liked the change and I got upset about it. It’s not that I use the official app or site a lot – I don’t care for it. But it seemed like such a useless change when there are so many other things to deal with.

The same happened yesterday, when twitter announced that they’re increasing the tweet chars limit to 280 for some users, as a test. I’m not part of the small group, but I’m one who’s been saying for a long time that this should happen.

Others, as John Saddington, over here on his blog, believe this betrays the fact that twitter is ending up like the next Yahoo!, having lost its soul a long time ago in the many quagmires it failed to defuse in its long march to infamy.

While I agree that the service is, in general, in shambles and begging for someone to whip some sense into it, this change is not anything which will destroy twitter. If anything, it’ll give users such as me some breathing space.

Yes, I can be pithy and reword my tweets to be exactly 140 chars or less. But who wants to? “Brevity is the soul of wit”, said the man who wrote 884,647 words in his career. Well, I don’t want to be witty all the time. I want to get my point across, and if it takes 145 characters to do so, so be it.

Yesterday, while discussing this change, twitter made a feeble attempt at giving a technical reason for this change. They explained on their blog that the reasoning is that some languages, unlike Japanese, Korean, and Chinese, are more visual in nature and can explain a lot more in one character than others, such as English, Spanish, and French. Therefore, they are making this change available for the latter languages. They also explained that only about 9% of all tweets reach the 140 characters limit.

That last bit surprised me. I thought about it a bit and realized that this number, 9%, is probably flawed for various reasons –

  1. Twitter has a lot of spam. Like, a lot. So, when someone talks about 9% of all English language tweets, they’re probably counting a lot of bots, crap, spammers, and the general noise you see on twitter. Remove all of those and the number might actually jump into double digits.
  2. Most people who want to express themselves better have gotten used to the idea of tweetstorming. They know that twitter’s not going to fix this issue, so they use tools, or just hit reply manually to post things in a better way. If twitter counts tweetstorms as one tweet, I’m sure, again, that they’ll tip over to north of 10% easily.
  3. Everyone else who ever faced the predicament of having a red negative number blocking their tweet just went ahead and reworded the tweet to fix things. Had they any method to tweetstorm from the official app, they would have done so, and, again, twitter’s numbers would be more truthful.

Given these factors, there’s not less reason to implement 280 chars, but more.

But, here’s a prediction, if I could make one –

When twitter revisits these numbers in a year or two, they’ll see that the number hasn’t really shifted a lot. If they see 9% now, they’ll, maybe see 10-11% a year from now. The reason is simple – when we’re given an arbitrary limit, our thoughts go towards meeting that limit instead of finding ways around it to fully express ourselves. Now that twitter has gotten everyone used to 140 chars, when the noise settles, those who need a few extra chars to express themselves will take those and use the space. Others will not. Simple.

This new limit is nothing to fret about. It’s not going to destroy twitter. That’s already to job of twitter’s bad advertising, political hand-wringing, and spam. All this is going to do is give some breathing space to people like me, who need a few extra chars once in a while.

Side note – I noticed that tweetbot took the 280 char limit and presented it beautifully since yesterday. I haven’t had to update my app for it. No good twitter app has a hard limit of 140 chars built into the stream display. That just shows that there’s no real reason for twitter to go back to 140 chars. The endless stream of tweets that people are used to will work exactly the same way as before. Don’t worry about it. Worry about everything else that’s still wrong with twitter.

p.s. – My thoughts are partly explained by Colin Walker here, funnily enough, in fewer words.

Photo by mkhmarketing

No updates please

I was an avid software updater. I would read the updates list, hit the update button and see the download happen. I enjoyed doing this manually because it’s a fun process to acknowledge all the work someone has put into this update that I’m downloading. In that sense, websites are no fun – they change suddenly and have no changelist to describe what all has changed and what new features are available.

But then I got bitten. First, on my iPad Mini (Series 1). iOS 9 slowed everything to a crawl. I still have use for the iPad, but it’s limited to two apps – Scrivener and Kindle. Everything else is basically unusable. I don’t even browse the web on it. It’s just easier to bring out my iPhone 7 Plus for that.

Then, went my Macbook Pro. The main reason is under-use. When I’m developing something, I’ll update the packages, update Xcode, get the latest and greatest of iTunes. But when I’m browsing or reading on it, Safari suffices. Chrome is a crybaby on OSX, so I dumped it and never looked back. Perhaps the lack of Chrome Sync is what drove my usage down? Not sure. All I know is that my Mac cries for updates and I deny it. I don’t even know what version of OS I have. It’s a pain to find out and keep track. I don’t have Siri on it. APFS, you ask? Not gonna do it.

Finally, the iPhone. Oh, the iPhone. I still enjoyed downloading and updating apps on it for the longest time. It’s the most used device I have (and I have the Apple Watch strapped to my wrist most of the day. It’s just not used in the same way). I have truly enjoyed watching app updates change the way I use my iPhone and what I keep on my main home screen.

Then, the inevitable happened. I got bitten. The app update didn’t mention that Terminology 3 was going to change one of the main features of the app – opening on the search view. I thought the cries of a thousand users would make the developer reconsider. I don’t even know where that debate went.

Then, I updated an app I was just trying and the developer put an ad at the beginning of the app, destroying the experience completely. I gave my first ever App Store review – a 1 star with a few choice bad words. I calmed down after a day and updated the 1 to 4 stars. But I made the developer notice. I made sure they understood that not mentioning the ads in the app update is the reason why they got the bad review. They changed the update text to include mention of the ads.

I don’t mind change. I’d just like to have it mentioned to me. Today, browsing the app updates page, I saw that Delta Dental had updated their app. I opened the details and all it said was “bug fixes”. There’s more effort made to inform users of what’s changing in SnapChat than what’s changing in an insurance company’s app. There’s technology for you.

Twitter changed. Instagram changed. Facebook changed. I see more ads and more crap ‘features’ in these apps that anyone around me. Maybe they’ve labelled me guinea pig?

One day, I updated Google Search’s app. There was a time I used it as my main search app. The app team had added Cards to the app. The feature destroyed the app. It had slowed down to a crawl, it was not even loading the cards properly and wouldn’t let me jump right into a search. Google eventually fixed the cards and made the thing faster, but the app’s main focus is still ‘showing information’ instead of letting me ‘search for information’. My main ‘search’ now happens through Safari – it’s got adblocking, it’s got session retention (Google Search app is crap for that), and it’s just nicer to use.

I’d like to remember what exactly it was that broke the camel’s back, but there’s just a very long list to look through. One day, I was just not updating apps with the same zeal and the same frequency. I realized that the release notes were a joke, and features were going to keep changing at whatever terrible pace the developers decided was right. I’m a developer, I know that it’s very easy to decide to change something (and very difficult to implement it). So I respect the devs who put hours into these updates. But I’m just not going to update apps (and OS versions) as frequently as they come out with them.

Since the last few days, we’ve been talking about iOS 11. My wife has been asking me to backup her phone and update it. She’s never been this excited about an OS update. But I couldn’t be farther away from it. I’m not excited about HEIF/HEVC. I’m not interested in iOS 11 ‘degrading’ my phone. I’m not even excited about all the bugs they’ll eventually iron out with a point release in a month or two.

But, I’ve readied my phone for it. I’ve deleted about thirteen thousand photos from my phone, primarily because I was tired of keeping them around (is it true that less storage used translated to better battery life?). I’ve taken a backup or two. Maybe I’ll update my phone today. Maybe I’ll update my wife’s phone first and see how that goes.

But app updates? No, thank you.

Unraveling the future of Day One Sync

Thursday was an important milestone for Day One and its users. The launch of the Day One browser extensions marks a time when the Day One team is ready to launch API based products outside of their default apps, a somewhat return to the time when Day One 1.0 was a beautiful, open garden of apps and services that could plug-in (and out) without much trouble. Day One 2.0 robbed a lot of people of those options and these browser extensions allow us to come back into the fold.

I’m not under the impression that this means that Day One will suddenly be as open and accepting as it once was. No, the walled garden that the team has created will remain. Their promises to end-to-end encrypt all data (while allowing complete access through their API), their wish to remain free of third-party sync services such as Dropbox, and their interest in keeping their company growing, mean that Day One is never headed back to the old days.

But that doesn’t mean things can’t move forward to a good place. Of course, with the launch of Day One Premium, what that good place is, is a little unclear. Yesterday, while launching extensions on Instagram, the Day One team answered a few questions and that gives us a hint of how things are going to work from now on.

Let’s first summarize what we understand of the customer ‘levels’ for the Day One service –

  1. Basic – This is a new tier. If you download the Day One app today (or are a Day One Classic user updating to Day One 2.0 today), on iOS or Mac, you’ll be a free user. All your data will be saved locally on the device which you use and any time you want to a. Create multiple journals, or b. Sync your data to the Day One Sync service, you’ll be prompted to pony up and become a Premium member.
  2. Premium – This too is a new tier. If you want to sync your data across devices, get access to the encrypted journals feature, support Day One in their awesome venture, and get 25% off print book orders), you get to buy into the Day One subscription service. It’s currently $35/year for new users and $25/year for older users, as explained in the FAQ.
  3. Plus – This is the new name for the old tier. If you downloaded Day One 2.0 on any platform before the Premium tier was introduced, this is where you stand. You get access to Day One Sync, get to make up to 10 journals, get access to data encryption, use cloud services such as IFTTT, etc.

Here’s what you don’t get with the Plus subscription –

  1. If you bought Day One on one platform (iOS or Mac) before Premium was launched, and bought it (for free) on the other platform after, you don’t get Sync between devices. You can still export your Day One journal and import it at the other end, but that’s just too cumbersome.
  2. Similarly, you don’t get access to more than 10 journals, and can have no more than 10 images per post.

But yesterday’s release taught me something interesting –

Day One is still a company that cares for its users. So, it seems that if you’re a Plus member, many future features and launches will work for you. Day One browser extensions currently work only with unencrypted journals. However, since Plus members do get access to encryption and Sync, in the future, it’s possible that support for end-to-end encryption will be added to the extensions and as a Plus member, you’ll still be able to use them.

Similarly, right now IFTTT is the only third-party sync service allowed to plug into Day One. You can use it in a lot of ways – saving your Instagram posts to Day One, emailing an entry into Day One, stashing away your tweets, your weight (using Withings), the day’s weather, your Instapaper Likes, and your Evernote entries.

But I suspect that when Day One launches their API, Plus members will definitely get access to it. They’ll get access to it for both encrypted and unencrypted journals, and will be able to use a lot of the tools and services they were using with Day One 1.0, updated to work with the API, of course. This seems not only likely, it seems definitive with the way the Day One team launched the browser extension.

Why am I even talking about Plus? It would seem that most future users of Day One will be either Basic or Premium members, right? But most of their current users are Plus members. On top of that, I believe that a large percentage of Day One users fall in one of two categories – they either have only on Apple device (iOS or Mac) and so don’t care for a lot of Premium features, or they went ahead and bought both Mac and iOS apps, and so they didn’t get affected by being pushed into the Plus tier either.

However, I am part of a significant majority which either want Day One access on Windows or Android. This is why understanding the Day One team’s motives behind every move they make is important to me. From what I’ve understood, they’ve got nothing but good intentions when it comes to treating Plus users with fairness, even if it comes at the cost of Premium subscriptions in the short-term.

Future Day One apps (for Windows and Android) will be free and siloed the way the new versions of the iOS and Mac apps are. You’ll have to be a Premium user in order to sync between these devices. But the devices on which you’re a Plus member right now will give you a pretty premium experience, and any third party tie-ins and API based features should be available to Plus members without having to move to the subscription model.

Of course, with the launch of the browser extensions, the Day One team has solved a very big problem – getting journal entries in, on Windows (and Mac for iOS-only) for Plus users. That saves people like me from a lot of time and effort!

p.s. According to the Day One team, Day One Classic is still around, just not under active development. Most of us (specially if you read till the end), have moved on to Day One 2.0, but if you download the Day One Classic app (or still have it installed on your system), Day One Sync is still working on it and syncing to it. So if you have that, keep using it!