A Wikiseum

After I understood how Wikidata worked and had begun contributing to it, I thought it was the solution to everything. It made complete sense — a federated, linked, semantic database of everything. What else would anyone need? It would be the hammer for every nail.

Excited, I began showing it to my friends and family. With each demo, I realized that Wikidata is a difficult hammer to use. A friend pointed out the obvious, “Interesting… but how will people use it? No one is going to learn SPARQL”. Even changing the name of the painter in the “show me paintings of Amrita Sher-Gil query isn’t trivial. And working with Wikidata’s Q-id isn’t straightforward either.

The only other way to query this immense dataset is to wait for the big tech companies to eat up all this CC-O data. Siri, Alexa, and Google Assistant will become smarter with it, but they’ll remain a closed ecosystem that often harm the projects they benefit from. On the other hand however, the Google Art Project has helped Commons. Still, it too remains a system of closed collection and curation, with no room for correction or contribution.

While we wait for an open source Virtual Interactive Kinetic Intelligence (VIKI), I wonder what an open virtual museum would be like — a Wikiseum! A VR experience on the open web using open data. Paintings from museums across the world, and a museum guide who speaks your language.

All this is technologically already possible — Wikidata has numerous statements on paintings and museums which is only going to increase with structured data on Commons. Commons itself has scans of many paintings, and Wikipedia has detailed information about paintings, their artists, and the museums they are in.

All that is left to do is some plumbing and a UI.

Silence of dusk — broken,
the pao wala reminds us:
we must eat tomorrow,
like we did yesterday.

Silence of noon — broken,
the kabari wala reminds us:
we’ve been hoarding trash,
like we did last week.

Silent. We are the same.

Writing about reading about writing

Lately, I’ve been reading a lot about writing, and so, just to make this clever sentence, I must do some writing about my reading.

It must’ve been something I saw on television in my childhood that made me think that writing is done when inspiration strikes and words just flow. The image in my head was of an author writing an entire story, in longhand, in one sitting. This has never been the case with me.

Words, for me, have never flowed. They have never even accidentally leaked. Even when I invited them they didn’t come. In my head they all responded yes, but on paper, they didn’t show. I called them up and reminded them of the great time we had last weekend (we didn’t); they made excuses. I promised to make food they like; they pretended to have tummy issues. After a few tries, I thought to myself that they just don’t want to be friends, and left it at that.

But now, after constant advice from Pooja, Rhea, Amber and reading a few books, I am happy to realize that this isn’t the case. Making an outline, writing a rough draft, re-writing, editing, and endlessly repeating, is what writing is about. That, and tricking you into reading about writing about my reading.

WordPress meet-up, December 2017

Siddharth has been organizing WordPress meet-ups in Goa for the last three years. Unfortunately, I am often not in the city to attend them. So, this time, to ensure that I am there, I offered to help him organize it.

Both of us have recently joined a co-working place, 91Springboard, and they offered to host the event. Hampus made us a logo, complete with coconut trees, a Portuguese style house, and a fish thali! Sid wanted circular transparent stickers which we got printed from Midway.

Along with the informal meeting, we decided to have two short talks. The first by Abhishek about Open Source, and the second by me about Gutenberg. This was really an excuse for me to explore WordPress’ new editor.

On the day of the meet-up, we were a bit disappointed with the turnout. Of the 40 people who RSVP’d on meetup.com, only 15 came. We started the talks at 6:15 pm and in an hour both were done. What followed was a lively discussion about the future of WordPress, the nuances of theme licensing, and the standard of government websites. Later, everyone went to Joseph’s to get a drink, but I got sleepy soon after and left for home. What had started with disappointment turned into the realization that the people who did come were the perfect ones.

WordPress Goa, Prateek talking

For next time, we need to remember to start a little late, 5:00 pm on a Friday is too early. We also need to try and get the word out to students. If you would like to attend, talk, or have any suggestions, do get in touch.

Organizing Wikidata WikiProjects

TL;DR: Notes on how I’ve been organizing pages for my Wikidata WikiProjects. These are for my future self but could benefit others too. Suggestions welcome!

NOTE: This is about topic related projects, community WikiProjects like WikiProject India would have different needs.

In the last six months, I have created three Wikidata Wikiprojects with different sizes, depth, and completeness. After rounds of trial and error, I have learned of useful Templates and ways of organizing these pages. Having a good WikiProject page is like having good code documentation, it helps me remember what I wanted to do even when I come back after a month of being inactive. Here are my building blocks:

Introduction

Explain the domain of the project using the P and Q templates. If there are sub-pages with tables (more on this later) I try to list them here, but I am not yet sure if this is a good idea. See the intro section of the CJI project for an example.

Queries

Hoping the reader scrolls at least to the second section, I put up queries and visualizations to create some interest. Using the SPARQL template I show the main query of the project, collecting all the entities of the project’s domain. I use Cot and Cob for all subsequent queries so that they don’t take up too much vertical space.

I try to set an interesting defaultView for the queries so that people can visualize the data, but I haven’t used images, screenshots, or interactive charts yet. Those would surely get more attention, but images will go out of date, and I still haven’t learned Vega. Should explore SparqlCharts too.

Properties

While the first two sections are for people visiting your project, the next sections are for those doing the work. The properties section should define all the details you want to add to the entities. If there are too many, you might want to break them down to Core and Extras to ease the workload.

It took me a while to learn and understand the features of List of Properties/Row. Customize the table using description, example-subject, example-property arguments. I used the contextualized-qualifier for the first time in the core properties of the CJI project.

Data table and sub-page

A table of all the entities and properties of the project is useful in doing and monitoring the work. I prefer to keep it on a sub-page as its usually too large for the project page. See Delhi Metro/Stations for an example.

The Wikidata list template gives you a table based on a SPARQL query that gets updated by a bot every day. This has been very helpful for me, I watchlist the page with this table and I get an update if any property of any object that I care about has changed, whether or not it was direct, and whether or not that object itself is on my watchlist. The template also lets you see labels in multiple languages, but unfortunately not descriptions.

Resources, scratchpad & questions

At the end, I have miscellaneous sections to document helpful resources, questions, ideas, or anything else that doesn’t have a place. Often bullet points here become properties to be added, or citations used on the objects.


In the case of WikiProject Delhi Metro, which is the largest WikiProject out of the three I also have a section to help get contributors started, and a userbox too.

For both Delhi Metro and ISRO I have sections for broad topics like launch vehicles or stations, and sections for queries, properties, and resources within them.

He came by bus from Margao,
no he isn’t from Margao.
Someone on a bike
dropped him from Quepem.

He came by bus from Margao.
Just for this?
When I was younger,
maybe I would have too.

He came by bus from Margao,
I dropped him to Porvorim.
Someone on a bike
came to pick him up.

He said his aunt used to live
near where I live now.

Remember to Breathe

During a long chat with Nick, I discovered a solution to one of my long standing problems. I had a list of advice to myself on Google Keep. Not wanting to set it as my browser homepage I tried to make a habit of going to that page everyday. This obviously did not last very long, and soon, there was an item on my todo list that said, “Figure out what do to with advice to yourself”. This stupid, and funnily worded todo item remained on my list for almost a year.

Until of course Nick showed me his homepage. Yes, he had built a homepage for himself, long before the flood of “start page” browser plugins. Among the links to commonly visited pages, and the nine different search fields, what intrigued me most was the word “breathe” randomly written in the middle column. Refresh the page and the word changed to “simplify”. He had programmed it to pseudo-randomly choose from a list of words that he had selected. Jackpot!

breatho logo

Not being as old-school as he is, I decided to make a “start page” browser plugin. This was around the time of the bittersweet Mozilla announcement:

By the end of 2017, and with the release of Firefox 57, we’ll move to WebExtensions exclusively, and will stop loading any other extension types on desktop.

With support being added for chrome_url_overrides in Firefox 54, I started work on Breathe. A WebExtension that shows you a message from your pre-decided list every time you open a new tab.

breathe screenshot

You can download the extension from AMO right now, I am still working on getting it published on the Chrome Web Store (Update: Published!). If you don’t like waiting (for the Chrome version, or for updates) you can install it directly from the source.

MediaWiki API errors in FileAnnotations

I am working on FileAnnotations’ error handling. When I started writing the patch I wasn’t aware of all the cases we’ll have to tackle, Mark was nice enough to guide. Below is a list of errors that could occur and how to handle them.

AbuseFilter
AbuseFilter does not reject the mw.Api promise, but returns an object that has a warning.

Use the abusefilter-disallowed message here.

No edit permission
This one rejects the promise and the function has the error code as a string and an object literal that has details. It has the same object again as the third argument, I wonder what that is about.

Should probably not show the add annotation interface if the user does not have permissions in the first place. In case we do, use the permissionserror message from core.

Session expired
Tested a few cases for this. If the user is logged out in the middle of adding an annotation they’d get a permissiondenied error. But if one logs out and logs into a different account in another tab, the new edit is correctly attributed to the newly logged in account.

Unreachable server
I found the api-error-http error message but haven’t been able to figure out how or when it triggers. Have filed a separate task for now.

Block
This rejects the promise with error messages too. Could show api-error-blocked here, but it doesn’t show some of the useful information that is returned.

Protected page
Should protecting a File page automatically protect the Annotations page too? This is the same as some of the other errors, and core already has a protectedpage message.

Looking at all the api-error-* messages in core, these might show up too.

  • autoblock
  • badtoken
  • http (timeout error?)
  • timeout
  • unclassified

Here is the updated patch.

Rhythm of prime numbers

I had been reading about music theory on Wikipedia and was fascinated with the amount of mathematics involved in it. After going into the rabbit hole of the circle of fifths, the duodecimal number system, and this crazy clock face, I finally decided to go to bed. Having read so much (and understood so little), I started to wonder where prime numbers fit in.

As I understand rhythm better than harmony and melody, I decided to map the first few prime numbers to a beat. Since most prime numbers below fifty are either one more, or one less than a multiple of six, I knew it’ll lead to interesting results.

Rock

The rock beat has a hi-hat on every eighth note, and I am counting every eighth note for mapping the prime numbers. There is a snare and the bass drum on 1 and 3, and 2 and 4 respectively to make a basic rock beat, a clap for every prime number, and a cow bell for multiples of six.


The accentuation is on the 6th eighth note of the first bar, the 4th eighth note of the second bar and so on, because of prime numbers lying adjacent to multiples of six. I feel this gives the beat some swing.

Jazz

Because of Jazz’s triplet beat structure, it lends itself better to multiples of six. I counted every triplet to map the prime numbers. Its the most basic jazz beat with the low tom playing for prime numbers.


Both beats sound alright and not as random as prime numbers are, mostly because we stuck to those below fifty. If you want to count along with the beat, here are slowed down versions of both:



The band Tool is known to have used the Fibonacci sequence in Lateralus, I wonder if they or someone else used prime numbers too.

To dwell

There are but two choices —
To follow the heart,
Clockwork you never understood.
Or to follow the world,
Why dream, even if you could?

No bread playing Soul out on the streets,
No soul spending days balancing sheets.
Earn the bread first, the heart can wait,
Play Soul today, the bread will come late.

Follow the heart and the world cries,
Follow the world and the heart dies.
The heart is dead,
The world moved ahead.

But the decision is simple —
Where do you often dwell?
The world or the heart.
Where do you go for solace?
Your wallet or your art?

Make Firefox fast

Recently, I have been trying to untangle myself from closed software, and move to open source and free (as in speech) alternatives. The first switch I made was from Chrome to Firefox. I was always a Firefox fan, but after college, when the only computer I had was a borrowed 8 year old MacBook Pro, I had no choice but to switch to Chrome for it’s speed.

Even though I have a fast computer now, I was a bit skeptical about Firefox’s performance. I use it often for testing and the speed did not compare favorably with Chrome. Upon a friend’s suggestion I installed the Developer Edition and was pleasantly surprised to see the improvement that Electrolysis brought! After a few days of using it, I decided to do some more research and stumbled upon a config that lets each tab run it’s own process. I set the process count limit to 128 and since then it has been smooth sailing.

These features exist in the normal versions of Firefox too, but are hidden behind config flags. To set them, go to about:config and set the following:


browser.tabs.remote.autostart true
dom.ipc.processCount 128

Restart, and see multiple browser processes (Activity Manager on Mac OS). Enjoy your new 128 Foxpower browser, yes foxes are better than horses.

Update: Based on when you’re reading this, you might need the Developer Edition or the Beta version of Firefox for this to work.

Contentless RSS feeds

I’ve been using Feedly regularly now and am loving it. Being able to stay up to date with the websites I like without having to follow them on Twitter or Facebook has made me more of a follower than I was.

There are however certain feeds that make it hard for anyone to like them. The Dilbert Daily Strip for example, apart from its weekend comic, the feed only has the following content:

Dilbert readers – Please visit Dilbert.com to read this feature. Due to changes with our feeds, we are now making this RSS feed a link to Dilbert.com.

This is what shows up in my reader everyday. Thankfully, Feedly has an option to open the linked web page directly, which is what I have now done for this feed.

Why do publishers do this? To get more ad impressions? Are ads not allowed on feeds? I’d really love to know the reasons behind this strategy.

Nearby Wikipedia articles for the Pebble

The Nearby API from Wikipedia has always fascinated me, so when I received the Pebble Time last month, I knew I had to use it to make an app for my wrist.

In the excitement of the Kickstarter campaign I had already started dabbling with the JavaScript SDK using Cloud Pebble. It took me a while to get started with the SDK on my computer because I couldn’t find a clear way to initialize a JS project. Things went smoothly once I realized that I had to clone the pebblejs repository first, and copy my files there.

The Pebble.js environment is still in beta and it shows. While the documented features work, I kept wishing for more, especially those that let me add color. I could get a few colors using textColor, and highlightTextColor, but couldn’t find any documentation on what was actually supported. I made my peace with the lack of colors and released the app on the Pebble app store.

splash

Analytics tells me that around 400 people are using this app and that makes me happy. The people are nice too — I got two emails reporting an issue on iPhone (I am working on it), both being informative and polite. This might not mean much, but I feel its an important litmus test for the community.

I hope more APIs get exposed to Pebble.js soon, until then feel free to contribute code and bug reports on Github.