Wednesday, 24 August 2016

Spring cleaning: cancelling my online subscriptions

Having two kids can be hard on the wallet sometimes. And I'm never happy unless I'm switching browsers, servers, services or distros every few months. So my current effort has been to track all my online expenses and terminate them with extreme prejudice.

Here is a list of all the things I've been using, and what I decided to do with them. First, the ones I didn't cancel:

  • The Browser - Still my favourite source for curated long reads.
  • LWN - And my favourite source of linux news.
  • Saavn - This is only Rs. 100 a month so I'm not saving much cancelling it. My favourite source for music streaming/download.
  • Google Drive - I pay $2 a month for 100GB, and this is too important to cancel. All my kids' pics are here.
  • Gandi - They're my registrar for this website. The site is hosted in blogger so that part is already free.
  • Lastpass - The next service I cancel will probably be this. But its not too expensive, and integrates pretty well with my lifestyle (multiple machines and phone), so I've become rather tied to it.

And here are the ones I have sadly had to cancel:

  • Fastmail - I moved back to gandi's email service. The webmail is not that great but I can always use a dedicated client. I've also moved several newsletter subscriptions to my gmail account to reduce the traffic here.
  • ACM - I initially got this only for the safari account that came with it. But my best study time is during my commute, when I never have any connectivity. Cancelled.
  • Linux Journal - A decent magazine that I've been a member of for the past couple years.
  • Marvel Unlimited - A great service. But apart from the initial couple months, I've started using the service less and less.
  • rsync - I didn't know I was still paying for this until I came across the recurring payment page in PayPal. Cancelled. Good service, but it didn't fit in my workflow.
  • Newsblur - Another good service. I switched to a free alternative (Digg)
  • Magzter - Got a year's worth cheap, but never really used to it. Magazines don't look good on the phone screen. So many things to read, so little time!
  • HotStar - I got this only for Game of Thrones. They do have the Wire and a few other good HBO shows.
  • Netflix - No time.
  • FSF - This one felt bad, because this is the only non-profit I donate to. But the $10 a month did add up to a lot more than many of the smaller ones in this list.
  • Digital Ocean - I had a VPS here for playing around with new tools. My web-to-email tools were also hosted here. A toy VPS is the hardest to part with :(
  • AWS - My free tier expired so I got rid of this asap.

Not bad for a few days' worth of digging around and moving stuff, I guess. I think I've saved around Rs 15000 30000 annually with this. But knowing my nature, it won't be long before I slowly start resubscribing to some of these. A low end VPS is going to be high in that list.

Update: added netflix and the fsf.

Monday, 1 August 2016

Publishing my (Emacs/org-powered) notes online

In the past decade, I've amassed a single, long file called notes.txt file that has a large amount of information I've gathered in my day-to-day activities at work. I use GNU Emacs exclusively to edit and search it. It is now more than 21000 lines long, and when I need to find the workaround for some obscure bug I hit several months back (if not years), the answer is always a C-s away.

Still, in an attempt to reorganize my notes, I spent my free time in the past few weeks in slicing up the file into smaller categories. I decided to properly use org-mode to format them this time. As a bonus, org-publish is a lovely way to render html pages out of them.

My workflow has also improved: I use a bookmark to open the file and just dump the content there. Later I re-file them to the appropriate section. I use deft (bound to F8) to quickly search through them.

Since they needed a permanent home, I've uploaded the notes to GitHub. I was happy to see that github was able to render the .org files natively. The notes are infinitely more malleable within emacs itself of course :)

Here are the main sections:
And here is the project in GitHub:

Update: GitLab looks really nice so I created an account and migrated my repositories there, so here's the link for my notes repo in GitLab: 

Monday, 6 June 2016

RAGE gallery

I thoroughly enjoyed this game. It's not often I start taking side quests near the end of a game just to prolong the experience. The scenery is lovely to look at. As you'd expect from an id game, the game flows well, the weapons are fun to use, and the plot is nothing to write home about.

Thursday, 5 May 2016 - Convert RSS feeds to a digest email

I finally scratched a long-pending itch and wrote a python application that:
  • Reads a list of feeds (that update more frequently than I prefer) once a day,
  • Extracts the last day's posts,
  • and mails it to me.
I used mailgun's neat APIs to send out the mails, and feedparser to do the rss/atom parsing.
The application hinges on twisted to asynchronously parse multiple feeds at a time.
Here's the package in PyPi:
And here's the product page:
The mail below is what a sample mail looks like when I get it for one of the sites.
----- Original message -----
From: RSS Digest Mailer <snipped>
To: <snipped>
Subject: Digest mail for 3quarksdaily
Date: Thu, 05 May 2016 13:02:46 +0000

Dangerous Fictions: A Pakistani Novelist Tests the Limits

Dexter Filkins in The New Yorker: Hanif got the idea of writing about a nurse in a decrepit hospital. Alice Bhatti (named for his old editor) is a ferociously strong young woman: smart, independent, and rebellious to the point of...

Our brain uses statistics to calculate confidence, make decisions

From PhysOrg: The directions, which came via cell phone, were a little garbled, but as you understood them: "Turn left at the 3rd light and go straight; the restaurant will be on your right side." Ten minutes ago you made...

Trump-Sanders Phenomenon Signals an Oligarchy on the Brink of a Civilization-Threatening Collapse

Sally Goerner in Evonomics: The media has made a cottage industry out of analyzing the relationship between America's crumbling infrastructure, outsourced jobs, stagnant wages, and evaporating middle class and the rise of anti-establishment presidential candidates Donald Trump and Bernie Sanders....

Stop telling kids you're bad at math

Petra Bonfert-Taylor in the Washington Post: Why do smart people enjoy saying that they are bad at math? Few people would consider proudly announcing that they are bad at writing or reading. Our country's communal math hatred may seem rather...

Blockchain technology will revolutionise far more than money: it will change your life

Dominic Frisby in Aeon: The impact of record-keeping on the course of history cannot be overstated. For example, the act of preserving Judaism and Christianity in written form enabled both to outlive the plethora of other contemporary religions, which were...

Warsan Shire: the Somali-British poet quoted by Beyoncé in Lemonade

Rafia Zakaria in The Guardian: She writes of places where many Beyoncé fans rarely go, the portions of London where the faces are black and brown, where men huddle outside shop-front mosques and veiled women are trailed by long chains...

The Essence of Mathematics, in One Beatles Song

Ben Orlin in Math With Bad Drawings: Okay, here's a life regret: No one has ever stopped me on the street, grabbed me by the collar, and demanded that I explain to them the essence of mathematics. Me: So, you...

How should we live in a diverse society?

Kenan Malik in Pandaemonium: 'Can Europe be the same with different people in it?' So asked the American writer Christopher Caldwell in his book, Reflections on the Revolution in Europe, published a few years ago. It is a question that...

Sarah Palin, Jimmy Kimmel and Scientists on Climate Change

Why did the death of a single lion cause a sustained uproar?

Jason Goldman for Conservation Magazine: When the story of Cecil the lion's death at the hands of an American hunter hit the media, the global response was "the largest reaction in the history of wildlife conservation," according to a new...

Tuesday, 19 April 2016

On meat and ethics

As a vegetarian, I am often interested in arguments both for and against eating meat. A recent link I read started a chain of fascinating resources arguing in either direction. Spoiler: my opinion hasn't changed, yay.

It started with this post in 3quarksdaily in defense of eating meat that got me annoyed. It is fairly obvious that animals feel pain, and are intelligent to varying degrees. Saying that the pain of an animal is of a different degree that we cannot fully comprehend is a pretty weak argument. Another gaping hole is in arguing that the non-existence of a cow is somehow worse than the horror it goes through in a farm or slaughterhouse.

I also ended up reading the utilitarian Peter Singer's 'All Animals Are Equal' paper, and loved it for its clarity. The entire piece is well worth a read for the problems it anticipates, and the thought experiments it proposes.
The truth is that the appeal to the intrinsic dignity of human beings appears to solve the egalitarian's problems only as long as it goes unchallenged. Once we ask why it should be that all humans—including infants, mental defectives, psychopaths, Hitler, Stalin, and the rest—have some kind of dignity or worth that no elephant, pig, or chimpanzee can ever achieve, we see that this question is as difficult to answer as our original request for some relevant fact that justifies the inequality of humans and other animals.
In another few decades, I won't be surprised if animal rights acquire the same level of seriousness in public discourse as race, caste and gender equality have in the past few generations.

P.S. This also lead me on an unrelated but interesting overview of Singer's utilitarian ideas.

Monday, 4 April 2016

Python 3 Unicode annoyances

Every once in a while I feel guilty for not using Python 3, so I spin it up for a few rounds. My experience is usually:
  1. Start using Python 3
  2. oops, UnicodeDecodeError
  3. Go back to Python 2
Looks like I'm not the only one who has this frustration. Knowing when to use encode vs decode was always a frustrating exercise in trial and error. There are some good tips in the linked thread and is worth a thorough read. A useful bit is this comment from redditor Fylwind, part of which is:

  • encode: textual data to binary data.
  • decode: binary data to textual data.
The term "encode" means to a transformation from some high-level structure into bytes, hence in the context of strings it means converting text into binary data.
Q. What are the appropriate data types for textual data and binary data?
  • In Python 3:
    • Textual data is str, written as "foo".
    • Binary data is bytes, written as b"foo".
    • The encode function only works on textual data, and the decode function only works on binary data.
  • In Python 2:
    • Textual data is unicode, written as u"foo". If unicode_literals is enabled, then it's "foo".
    • Binary data is str (alias: bytes), written as "foo". If unicode_literals is enabled, then it's b"foo"

Friday, 1 April 2016

No-Cost RHEL Developer Subscription now available

 My past two distros at work and home have been RHEL derivatives so I'm happy to see this news:

Today, Red Hat announced the availability of a no-cost Red Hat Enterprise Linux developer subscription, available as part of the Red Hat Developer Program.
Offered as a self-supported, development-only subscription, the Red Hat
Enterprise Linux Developer Suite provides you with a more stable
development platform for building enterprise applications – across
cloud, physical, virtual, and container-centric infrastructures. 
 No-Cost RHEL Developer Subscription now available – Red Hat Developer Blog