Fever Pitch

I spent a couple of blissful months unaware of the happenings of the world, cut off from my muscle-memory visits to The Guardian, Hacker News, Google News and a dozen other websites as I wait for my code changes to build. When I first stopped reading the news, I thought I’d miss being out of the loop and “relapse” pretty quickly, but I managed to hold off for about three months. Towards the end of it, I dipped back every week or two, mostly to know how COVID was ravaging the world and whether I’d be allowed back into India (Has any other country ever shut down all international flights and refused entry to its own citizens?), just in case that became a necessity. I even managed to read more long-form articles (Thanks Aeon!) and books, since there was a surprisingly big chunk of free time that I would have otherwise filled with news.

All of that came crashing down with Ruth Bader Ginsburg’s death last month, and the imminent US election. The anxiety of not knowing what was happening out there quickly exceeded the anxiety I felt when I tried to keep up with the news. I can’t think of a time when so much has hung in the balance of an election - The US is set to withdraw from the (non-binding!) Paris climate agreement in November, and those who wish to trample upon women’s rights are surely emboldened by the recent anti-choice declaration led by the US and of course, the coup de grâce, RBG’s replacement.

I’m really looking forward to cutting news out of my life again, but I cannot imagine skipping the news first thing in the morning for the next two weeks.

Ruth Bader Ginsburg

I struggled with last weekend’s news of Ruth Bader Ginsburg’s death.

Even though I have nothing whatsoever to do with the US, I remember feeling grateful and wildly optimistic as I followed along RBG’s championing of same-sex marriage rights at the US Supreme Court in 2015. For better or worse, America (yet?) wields enormous influence over the rest of the world, and that verdict seemed to pave the way for a lot of queer activism around the world. India’s Supreme Court striking down a section of a British-era law in 2018 that criminalized homosexual activities seemed to be a continuation of that wave of progress.

Reading RBG’s powerful dissents have often been a reprieve in an otherwise bleak decade, especially when I was in Poland as the Polish government tried to pass a total ban on abortion. Sisyphean though they might have been given the conservative majority in the US Supreme Court in recent years, it was refreshing to know that there was still room in the world for well-reasoned counterarguments and respect for diversity.

I can’t help but wonder how devastating it must be to pass away knowing that everything you stood for, everything you worked towards for decades, was never at greater risk of being destroyed at the hands of totalitarians in all but name. Is that when you truly grasp that “every generation must fight the same battles again and again” and hope that you’ve nudged the needle of progress forward at least a little bit? I just read the progressive Kannada author U R Ananthamurthy’s ಹಿಂದುತ್ವ ಅಥವಾ ಹಿಂದ್ ಸ್ವರಾಜ್?, his final work before his death in 2014 that chronicles the secular or religious Indian identity that newly independent India had to choose between in the last century, and how that planted the seed for Hindu nationalism in present-day Indian society. Written at a time when Modi’s election-winning vision of an unabashedly Hindu nation found many takers, it reads like a breathless lament for the hard-fought progress that might soon be dismantled.

I know, I know that we’re making progress on a lot of fronts, even if that sometimes just means having conversations about things that might have gone unnoticed a few years ago, but when I hear of the death of someone as pivotal as RBG to social change in recent memory, I find myself thinking that the walls are closing in as the steady drumbeat of fascism’s march to power across the world gets louder, and can’t help but feel despondent.

I suppose all you can do is pick your battles, stay the course and hope that it makes a difference.

Thank you, Duchess of Krakenthorp

Gardening during COVID

Hello!

It’s been a while, and I’m trying to get back to blogging.

I’m alive and well, and I’ve spent most of this year in Kisumu. I was in Kisumu when countries started restricting international flights, and I just couldn’t decide whether to go to India or elsewhere, so I stayed put.

In hindsight, it was a great decision. I took over the office compound, which felt like an island, cut off from the realities and rapidly rising daily statistics of the outside world. The compound also has lots of space, and since I’ve always harboured ideas of living on a self-sustaining farm one day, I took up gardening.

The first order of business was to eliminate food waste from garbage. Burning is the predominant method of waste management in Kenya, and it’s sadly quite common to see plumes of smoke in the evenings as people set their garbage on fire.

I remember reading about compost circles (but I can’t seem to find any reference to it online!) and decided to use one for composting. A compost circle is a circle that’s about half or one-foot deep (depending on the amount of food waste your household produces) that you fill with your food waste. If the circle is big enough, it should take you about 6 weeks to complete a full circle, by which time the first section of the circle should have turned into fresh compost. It’s a great, continuous source of compost for your plants

Digging a compost circle

With food waste covered, it was time to make sure I had a source of fresh vegetables - I dug two patches of about 2m X 3m, and planted green beans (I found a dried-up plant elsewhere within the compound and used the dry, pearly black seeds in pods, unsure if they would grow, but grow they did), cucumbers and tomatoes. It’s astonishing how quickly beans grow and how resilient they are to poor watering and intense sunlight - While the tomato plants drooped and wilted if they weren’t watered abundantly everyday, the beans seemed to flourish. Within a month, the bean plants had flowered and produced sweet, fresh beans. I’d take a break after work meetings in the evenings to water the plants and snack on young beans fresh off the plant 😍

The cucumber plants started off well, but the leaves turned yellow and the tiny cucumbers whose growth I was so excited to monitor everyday died on the vine before they could ripen. I realised it was a mistake to plant them in a spot that received sunlight for at least eight hours everyday - While the beans and tomato plants loved the direct sunlight, I believe cucumbers like the shade. Talking to a friend about the cucumber situation, I learnt there are insects that burrow into the soil and destroy the roots of cucumber plants. I did not get to confirm this because the cucumber plants were already too far gone.

Fresh green beans and the late office dog Kike, patiently waiting for treats

I purchased tomato seeds of a variety called “Rio Grande”. I’m not sure if it’s true of tomatoes in general or the variety I tried, but tomato plants need a lot of love! Careful, plentiful watering at a consistent schedule, trellis/support, and more susceptible to diseases.

Fresh tomatoes

Gardening is such a joy, and I’m so glad I had the opportunity and the space to experiment with it. For a few years now, I’ve been thinking about finding a piece of land somewhere, growing my own food, if only just to feed myself, and living the life of a hermit in an environmentally sustainable way. COVID lockdowns gave me an opportunity to test that lifestyle, and I’m more confident now that I can swing it!

Hey Big Tech, Support Regional Languages!

A few months ago, I bumped into someone who was using Kannada as their system language on their iPhone. Curious to find out Android’s support for languages that are not English, I switched my system language to Kannada as well and was pleasantly surprised to find nearly everything on stock Android in Kannada. The app ecosystem on the other hand is a different story.

Uber and Ola, India’s leading taxi apps, don’t seem to care about regional language support - While Ola makes no attempt to support use in Kannada, Uber’s attempt at Kannada internationalization seems to be an afterthought, with entirely broken screens.

Why support regional languages?

  • Barrier to entry - As a person in tech, with friends who work in or take an interest in tech, it’s easy to forget that using technology is hard for a lot of people. Adding a language barrier into the mix makes it worse. English is intimidating to a lot of people, especially in India. Anecdotally, I’ve had relatives tell me that they’d really like to be able to use taxi apps to move around, but they’re afraid of selecting the wrong location or ordering the wrong class of taxi (resulting in memorising the flow of taps 🤦). There’s an argument to be made about better UI/UX, but I think interfaces that are exclusively in English become a barrier to entry.

  • English is not inclusive - The history of English in India is steeped in colonialism (well, duh!), casteism, and elitism. Walk around in any “second-tier” city in India, and you’ll see advertisements for a multitude of companies, schools and websites offering to teach you how to speak “fluent English”. The clamour to learn English is of course driven by its employment potential, but I’d argue that it has to do with caste and elitism as well. Indian society places a high value on English fluency, and apps are silently reinforcing the discrimination that comes with it.

  • Content availability is a problem - There’s a classic chicken-and-egg (could not find an equivalent vegan expression!) issue at play - Platforms don’t have support for regional languages, and there’s not enough regional language content to make it worthwhile for platforms to support them. It looks like Amazon is yet to support Kannada content on Kindles! For now, you have a choice from as many as TWO Kindle eBooks if you search by language. TWO!

  • $$$$ - Okay, fine! I’ll stoop to appealing to capitalism - Companies are leaving money on the table by making their products and services inaccessible to a lot of people! Think about the growth potential, the happy investors, those beautiful graphs in upswing!

  • Because squiggly letters are awesome! ದಯವಿಟ್ಟು ನಿಮ್ಮ ಫೋನ್ ಹಾಗು ಕಂಪ್ಯೂಟರ್-ಗಳಲ್ಲಿ ನಿಮ್ಮ ಭಾಷೆಯನ್ನು ಉಪಯೋಗಿಸಿ

What can you do?

  • Strength in numbers - Don’t be an elitist, prop up regional language numbers by switching your system language on your device(s)
  • Contribute translation strings to open-source projects! I started contributing Kannada translations to Signal Messenger’s Android app, and it’s surprisingly fun and very satisfying to see the number of untranslated strings go down on every submit :)
    • Find open-source projects that could use your help at Weblate
    • Join (or create) a GNOME internationalization team here
    • Contribute to Mozilla’s apps and websites
  • Lobby governments to mandate the availability of regional languages (perhaps in addition to other languages?) on government websites. In 2019, governments paying third parties taxpayer money to build websites that lack regional language support is like building footpaths that are not wheelchair-friendly - egregious and just plain criminally negligent!

Commit to Master Branch on GitHub Using Travis CI

I’m trying to turn my pet project to find visa requirements for couples, Nomad Couple, into a full-fledged progressive web app (PWA) that has regularly updated visa requirements data (from Wikipedia) through a Travis CI cron job.

As part of that, I’ve set up the wiki scraper repo to be rebuilt every month and any changes in the visa requirements for citizens of different countries (available in dist/output) to be automatically committed back to the master branch.

Attempt #1 - Travis’ Github Pages deployment

I noticed that Travis CI offers automated deployment to GitHub Pages via configuration in .travis.yml. By default, it commits code to the gh-pages branch, but the configuration has a target_branch property to customize it. This is the configuration I tried

language: node_js
node_js:
  - "lts/*"

# ...
# Unrelated configuration for node.js/electron project
# ...

script:
  - npm run scrape
deploy:
  provider: pages
  skip-cleanup: true
  target-branch: master # Commit to master instead of gh-pages
  github-token: $GH_TOKEN
  keep-history: true # By default, Travis uses push --force and wipes out commit history
  verbose: true
  on:
    branch: master

The GH_TOKEN mentioned in the config refers to a token generated (with public_repo permission) on the GitHub personal access tokens page that I’ve saved on Travis CI as an environment variable.

While this was super easy to set up, it has a few issues.

Drawbacks

  1. This approach is dependent on Travis CI’s GitHub Pages support. You’re out of luck if you’re using a different Git hosting provider or your own Git server.
  2. Travis listens for commits on the master branch and triggers a build. Since the commit at build time is pushed back to master, this triggers an infinite build loop[1]!
  3. It’s not possible (as of Apr 2018) to customize the commit message. This rules out adding "[skip ci]" to the commit message to avoid the infinite loop.

Attempt #2 - Good ol’ shell script

Travis supports after_success, a hook that is called when the build succeeds. I replaced the deploy section in .travis.yml above with:

after_success:
- sh .travis-push.sh

travis-push.sh

#!/bin/sh
# Credit: https://gist.github.com/willprice/e07efd73fb7f13f917ea

setup_git() {
  git config --global user.email "travis@travis-ci.org"
  git config --global user.name "Travis CI"
}

commit_country_json_files() {
  git checkout master
  # Current month and year, e.g: Apr 2018
  dateAndMonth=`date "+%b %Y"`
  # Stage the modified files in dist/output
  git add -f dist/output/*.json
  # Create a new commit with a custom build message
  # with "[skip ci]" to avoid a build loop
  # and Travis build number for reference
  git commit -m "Travis update: $dateAndMonth (Build $TRAVIS_BUILD_NUMBER)" -m "[skip ci]"
}

upload_files() {
  # Remove existing "origin"
  git remote rm origin
  # Add new "origin" with access token in the git URL for authentication
  git remote add origin https://vinaygopinath:${GH_TOKEN}@github.com/vinaygopinath/visa-req-wiki-scraper.git > /dev/null 2>&1
  git push origin master --quiet
}

setup_git

commit_country_json_files

# Attempt to commit to git only if "git commit" succeeded
if [ $? -eq 0 ]; then
  echo "A new commit with changed country JSON files exists. Uploading to GitHub"
  upload_files
else
  echo "No changes in country JSON files. Nothing to do"
fi

TODO: If you’re using Travis on public GitHub repositories, your build log is publicly visible. If there are any Git related errors, it is possible that the origin URL (with your GitHub personal access token with access to ALL your public repositories) may be logged, which is a huge security risk. It is strongly recommended to redirect the output of all git commands to /dev/null (e.g, git push origin master --quiet > /dev/null 2>&1) once you’ve verified that the script works for your repo.

References: