Skip to main content

Thinking about Data Ethics

Earlier this month, a researcher made a dataset containing the profiles of about 70,000 users public. He didn't really see a problem in doing this because he felt he was only presenting already publicly available data in a more usable form. was only presenting it in a more usable form.

Yesterday, I came across this quote in the very first chapter of Allen Downey's book Think Stats which I liked a lot, and reminded me of this incident.


I hadn't looked at the OKCupid data release and the discussion around it much, but I went back and read this article by a social media researcher who thinks a lot about these things.

She puts forth a lot of interesting ideas to think about ethics. Some things that stood out to me are:

  • Ask yourself how the person whose data you are using feels about the data.
  • Taking a 'what if' impact approach to thinking about data and ethics.

Also, you needn't really call yourself a researcher to be actually doing experiments with (or analyzing) "big-data" and discovering and putting out facts that have an impact – however big or small. You should really go read the article, whether or not you are a researcher using data.

Incidentally, there is a meet-up on Data Ethics this weekend in Bangalore. I'm excited to learn and think more about this, and talk to others who care.

Level-up Tools

Thanks to a friend I got an upgrade to our still-being-setup kitchen. I now have a non-stick pan along with a few more new additions. I would previously use a bowl that people usually use to boil milk etc. for making whatever I did. The non-stick pan feels so great! It has made it a lot simpler to make some of the things I used to, because its non-stick. And it has vastly expanded the possibilities of things I can make, by virtue of being flat and wide based. The pan is such a great addition to my kitchen paraphernalia, and it adds a new dimension to the kind of things I can make. I'm not here to write a user review for it, though.

What are such tools in other things that you do, that drastically changed the way you did something, or added a new dimension to the kinds of things you could do, tools that make you feel like you have a new super-power? Learning to write Python (after starting off with C) seemed to give me so much power allowing me to focus on the problem, rather than fussing over the low level details. Sasha mentions in this post how using a Spaced Repetition System like Anki drastically improved her efficiency because she could focus on thinking about higher level things rather than trying to recall or search for what method or function to use to do something.

What are some such level-up tools for you? Is there a systematic approach to discovering tools?

blog-admin and Nikola

Another post about blogging.

blog-admin now supports Nikola, thanks to yours truly. blog-admin is an Emacs package by CodeFalling that lets you view and manage your (static site generated) blog from within inside Emacs.

Nikola's command line utility is pretty nifty and does a bunch of useful things. I had a few utility functions to do common tasks like create new post and deploy blog. This worked well, but moment I came across this blog-admin's tabular view, I was sold!

org2blog (a blogging tool I used previously) had a tracking file that kept track of all the posts I made, and I used it quite a bit for navigation – thanks to org-mode's search functionality. The tabular view of blog-admin is even better! I really like the fact that the author has tried to keep the package generic enough to support any blog, and adding support for Nikola has been quite easy.

The filtering functionality is crude, but good enough for a start. One thing I want to add is a preview functionality for drafts. Showing some (writing) statistics would also be nice – No. posts in the last month, total published posts, etc. No promises, but you may see some of these things, soon. :)

Tedium in work-flows

I use Nikola for generating this blog. When creating a new post, it prompts for a title, and creates a file for the post.

Often I'm starting off with only a vague idea that needs to be fleshed out before it can be published (or discarded). It is quite difficult to come up with a title at this stage. I just want to start a draft and write things down!

I could use a "draft-title" and change it after finishing a post, but this feels tedious – requires 3 steps – change the title, post filename and post slug. The last two steps are optional, really, but I feel they are important especially when the original title is very different from the new one.

Being forced to come up with a title before anything else, feels tedious and, adds to the effort required to start off a new post. I shouldn't really be worrying about the effort required to change the title of an unwritten post, but it happens subconsciously.

To work around this, I now have a "re-title utility" in my editor that takes care of all the tedious details. I can start with a random title, like Draft-1, and change it when I'm done with the post. I feel this is going to lead to a lot more drafts, at the very least, if not published posts.

Another work-flow related thing I came across recently was @Malabarba's issue on CIDER (an IDE for Clojure in Emacs). The REPL takes a while to startup and this caused him to not use CIDER for running tests, if there wasn't an already open REPL.

The tedium that people feel effects how they use the tool. Not surprisingly, making tedious-feeling tasks a breeze with the tool also effects how and how much they use it. Subtle variations in a work-flow could make or break it. How do you discover such potential work-flow make-or-break-ers? I think, these things would help:

  • Use the tool yourself (dog-food)
  • Talk to (or watch!) people using your tool
  • Look at work-flows in other similar tools
  • Thinking explicitly about various scenarios and simplifying or improving work-flows

I'd love to hear examples of this, and any ideas or thoughts you may have on identifying and fixing such things!

Error messages and new users

I was helping a friend of mine setup his blog and we were trying to use Hexo – a static site generator. We chose a Javascript based tool since he's trying to learn Javascript. I skimmed through active Javascript projects in this list and finally zeroed down upon Hexo based on its popularity. I promised to help my friend to set this up, but he first tried to do it on his own and got back to me after an hour or so, quite frustrated and almost on the verge of giving up setting it up. I didn't expect this from a tool that had so many stars, forks, plugins and so much active development.

We finally got it working, but we found that the error messages were horrendous – even for someone who has been using free and open-source tools for a while now. Printing out errors from compiler or interpreter directly along with the stack trace is almost always the worst thing to do for a tool/utility (as opposed to an API or library). The stack trace is definitely useful, for developers trying to build upon or improve your tool. Have a debug or development mode where developers can get all the information they need.

If you care about your users, especially new users, make sure you spend sufficient time on showing human-readable messages. If possible list the possible causes for every error along with tips for troubleshooting.

Deoriatal and Chandrashila

It was the final day and after about 5 hours of descent through the hills on the road, we had stopped for lunch about 100km from Haridwar. Of the 14 people who stayed until the last day, 5 of us were in a Sumo and 9 were in a Tempo Traveller van. We had already said our goodbyes when we got into the vehicles, but we happened to stop at the same place for lunch – thanks to the drivers. Daksh, a 10 year old who breezed through his first trek, came running to us from the van and hugged Arvind who had just finished his second back to back trek and has plans for 2 more next month. Both of them were beaming happiness. This pretty much sums up the past 5 days in the trek! The rest of the trip was just descending further and getting into civilization, reminiscing all the fun, catching up with civilization and slipping back into the bustle and the noise of normal life, with more goodbyes.

I had been travelling for about 2 weeks before the trek, crawling up slowly from Bangalore to Delhi, and then spent a couple of days in Mukteshwar after reading about it somewhere on the internet. I enjoyed the calm of the hills, and the warmth of a family with who I happened to stay with. But, I wasn't done. I really wanted to see the beautiful night sky filled with stars, and gaze into the distance at snow capped mountains and be overwhelmed by their grandness. I knew I had to go further into the hills. I came back to Delhi, to get more winter/cold wear and to go back with a better plan. I mentioned to baali the idea of heading off either to Kashmir or somewhere in the north-east by myself using public transport and local help, or going on a trek with a group. He recommended India Hikes, and helped me find a trek that fit my requirements –

  1. starts as soon as possible, but isn't too long – I had to be back in Bangalore in a week.
  2. had opportunities to enjoy – great views of the snow capped mountains and the night sky.
  3. not too hard – I didn't want to spend all my time thinking about where and how I was going to put my next step. I wanted a relaxed trek with time to look around and take in the beauty.

There were only a couple of treks that seemed to fit the bill. baali pushed me and got me registered for the Deoriatal-Chandrashila trek. I got my "trek uniform" from Decathlon and packed my bags for the trek – I only had a couple of days to do this. I was sorta nervous about all this because I really dislike cold weather, but baali gave me loads of moral support to take the first steps.

Quechua Uniform and Gear

This post is an attempt to record this trek for my future self. If you'd like detailed documentation for the trek, see India Hikes' documentation.

The Base-camp

I reached Haridwar in a bus from Delhi, way before the scheduled time to meet everyone else. I walked around the town before sunrise, reached the station and waited for trekkers to start trickling in. The base camp, Sari, was about an 8 hour ride from Haridwar, that I spent mostly sleeping – it was quite hot! Much hotter than I expected. And I started to feel comfortable about possibly not having enough clothing for the cold. When packing, baali and I were trying to make a sensible trade-off between the amount of stuff I carried and not feeling uncomfortably cold. He had the experience of one-trek and was leaning towards the lighter-backpack side, and this being my first trek I wanted to be heavily on the extra-clothing-for-cold side. The final state of my backpack left behind a slight worry in the back of my mind, which kept coming to the fore from time to time, until the bus ride.

Sari village school

The base camp turned out to be a small lodge sort of a thing with cozy rooms for the trekkers and India Hikes trek leads, guides and other support staff. The views from here weren't very different than what I could see from Mukteshwar. There weren't really any snow peaks in our view and there was a lot of lush green and the Sari village in view. We were received by similing faces of the support staff and trek leads, welcoming us on the trek. The comforting camaraderie would be a feature throughout the rest of the trek! Our group had some people who had done treks with India Hikes before, and all the interactions around me were giving me a good feeling of joining a great community. Everyone other than me seemed to know everyone else, yet new people were made to feel comfortable and I felt totally at home.

Tracing the track on a map

Kamal, our trek lead, briefed us about the trek and wished us good luck for the trek. The thing I loved the most about the briefing was our guide Dhan Singh explaining to us that India Hikes aims to make high altitude trekking more generally accessible and that we should treat this trek as a learning experience to be able to go on treks by ourselves with friends and/or family! It was going to be 4 days of learning about all sorts of things from symptoms of AMS and the horrors of it to using micro spikes and different walking styles on snow & ice! It was also the beginning of 4 days of listening to so many stories of various different treks, especially Roopkund.


After some lovely breakfast, we packed and set out for what was going to be a short hike up, to Deoria tal – lake created by the Gods. Beautiful meadows, a lake and glorious views of the snow-capped mountains in the backdrop. Picture perfect! This was exactly the kind of thing I was looking for, I thought, when I ended up at Mukteshwar! This was just what I wanted from the trek. Apart from the gorgeous night skies.

This was the best part of the trek, for me. Even more than the summit.


The rest of the day was spent walking around the camp-site, and taking in as much of the beauty as we could. We walked up to a couple of view points that gave better views of the mountains and walked around the lake, enjoying the calmness. We could see Chandrashila, the peak we were going to summit in 3 days from the second view point. Also, the Rhododendron covered slopes were a sight to watch!

Chandrashila from Deoriatal Campsite

Playing Frisbee with the trekkers and cricket with cooks and other support staff taking care of people at the camp, along with the trek lead and guides added more physical activity that I enjoyed quite a bit. The sport, apart from getting to hang around with people and getting to know them, also helped me keep myself warm, through out the day, without too much clothing.

The camp site had a few other camps, some of whom we interacted with and others who we didn't talk to but were spotted near all of the rest of the camps we were going to have in the next 3 days.

Selfie-Sai at Deoriatal

We had some story telling, singing and oxy-meter readings in the dining tent before yet another yummy meal. My oxygen levels were good, but my pulse was close to 90. It had come back down to 60 during the next couple of days. I wonder if my body was still acclimatising or if it was signs of some of the anxiousness that was going to hit me later in the night. I went back to sleep after fooling around with the other post dinner, till about 10 o' clock. I fell asleep quickly, but I started feeling extremely anxious and uneasy, to the point of me even thinking of hiking back down to the base camp. I'm still not sure what it was that made me so uneasy, and thankfully I didn't have the feeling again during the rest of the trek. I was able to ease back into sleep with some reading.

I would definitely think of Deoria Tal, whenever I felt the need for a calm amidst some awe-inspiring beauty, without trekking too much.


Tala or Rohini Bugyal

We woke up to a clear sky and a serene lake that drew me to go and sit by its side, until breakfast. We got packed up and prepared for what was going to be the longest day, in terms of the time spent hiking and distance covered. The hike was going to be through a forest trail, with lots of Rhododendron trees and dozens of different bird species. This stretch of the trek also had some of the views I liked the most.

The hike was relaxed and we had our packed lunches after about half way through the trek. The lunch, like all other meals, was so yummy that I regretted carrying such a small box. Ankit, Abhirut and Shyamlee with bigger boxes, kindly shared some of their food with me.

Lunch break on the ridge

Near the end of the hike we bumped into Tanmoy – another Trek lead with India hikes who was going to meet us at our next night's base camp. He was mapping the trek route and had covered our 3 day trail in a single day. The next night at Martoli he would tell us his story of how he got into trekking and inspire us with them!

The evening was a musical one. After our daily dose of Himalayan stories, it was great to hear trek lead Kamal, sing some popular numbers with so much feeling. Pooja and Meenakshi followed up with a deluge of songs before and during a fun filled Antakshari session. Sai, Padmini and Sarita sang some old numbers, some of which seemed like "home-productions" to the opposite team.

Tali camp site


We woke up to some rain and cloudy weather. We delayed the start a little bit, to make the trek more comfortable, since it was going to be a short trek anyway. The skies cleared up pretty quickly and we hiked up to Martoli through a maze of Rhododendron trees!

Bhrujgali was supposed to be our next camp-site but we camped a little lower, at Martoli, because it had a more accessible water source. We did the same at Rohini Bugyal, the previous day, camping at Tala instead of the usual spot.

The hike was a pretty simple one, that took about 4 hours. We stopped at a refreshing stream on the way, where we had our lunch and took lots of photos! The trail was a forest trail that seemed very similar to some of the trails through the Sahyadris. One of the trekkers, Padmini, took a different trail at a fork and we had a few anxious moments, looking around, for her. She had some very anxious moments, but was really happy that she was brought back safely to the group by Dhan Singh. It may be useful for the trekkers to carry a whistle to make it easier to seek attention in such cases, Sai mentioned. I spent some time during the rest of the hike walking with Padmini, chatting up and getting know things about each others' lives.

I decided not to click any photographs and look around more. Also, not having much power in the battery helped enforce this decision. Batteries drain pretty quickly in such cold weather, and I learnt that keeping the batteries in your sleeping bag can help prevent that. I wonder why people don't carry some kind of solar chargers, instead of carrying so many spare batteries and power banks. Also, it may be interesting to look for devices that convert some of the energy spent hiking into usable power.

The evening was spent relaxing, talking and getting to hear more stories! We also had the company of the group who had gone to the summit on that day, and were trying to help us with some tips from their newly gained experience! We were taught how to use clamp-ons, micro spikes and gaiters, in case there is snow or ice on the trail.

Sunset at Martoli

It was going to be a 4am start the next day, and almost everyone hit the sacks immediately after an early dinner. Rajesh and I, though, were struck by the beauty of the night sky. I tried my hand at some night sky photography and got some okay-ish shots, including one which captured a shooting star. A wide angle lens and a tripod would've been extremely useful.

Shooting star & Shaky hands?

Summit day

Activity started in the camp-site from as early as 2:30 am. Excitement was in the air. Trek leads and guides were pushing hard to get people lined up as early as possible, to avoid hiccups due to melting ice and snow in the trek. We managed to get the whole group going by 4:15 am. It was going to be one of our steepest climbs of the trek, to Bhrujgali, in the darkness. Owing to the darkness, the two guides and the trek lead had to be helping people out, more than usual. I ended up being the sweeper until it was dawn, with some company from Abhirut, Ankit and Shyamlee. It was fun just screaming out to push people, mentally. Much like cheering from the sidelines during a game of Ultimate.

It was inspiring to see people pushing themselves hard, despite their physical problems. Asthma, cramps, come what may, lets get to the top! I hiked up with Padmini, who was probably the eldest trekker and was slowly but steadily making her way up. It always helps to have someone talking to you, to distract you from your lizard brain. She was quite happy that I walked with her all the way up.

The bird watchers amongst us, were delighted by how many Monals they spotted. The view from the top was gorgeous. Many many dozens of photographs were taken, in various poses, and various directions. It all looked so glorious that nobody really wanted to stop. So many snow covered peaks, all around. Raju bhai, Dhanno bhai and Kamal bhai had a lot of work to do, telling all of us the names of the different peaks that we could see. But, not before the excitedly told the rest of the India Hikers that everyone in the group had summit-ed. They were very pleased by the fact that the whole group made it safely to the top!

Reflecting atop Chandrashila

On some of the previous nights, I saw some folks use apps on their phones to help them identify stars and constellations in the night sky. Nobody seemed to have an app that helped identify the peaks. It would be interesting to find or build something that does this.

The descent was much simpler and quite relaxed. 5 of the trekkers left early, because they wanted to get to Haridwar for some more adventure and fun – rafting and more bird/animal watching.

The weather suddenly turned bad. It got super cloudy and the wind got really chilly, before there was hail and snow. Everyone got into their tents for the afternoon, and this was practically the first afternoon I spent inside the tent. Once we got out of the tents after a couple of hours, the landscape had totally changed. Everything above about 50m from where we were was filled with snow, and we experienced the coldest and harshest weather of the trek. It was the first time, I felt I had got the balance of how much cold clothing I should be carrying wrong. I had used up all the layers of clothing I had, and yet felt a chill when I was not inside a tent. Next time around I'll definitely erring on the side of carrying more. The weather didn't get any better until the next morning.

We spent the evening in the dining tent, chatting away and playing Uno – led by Mitali, a 10 year old who also breezed through the trek along with Dhruv who was also 10. We stuck together the whole evening to keep ourselves warm, and the trek was officially called to an end with certificate distribution and everyone sharing some of their thoughts about the trek.

Martoli post-snow

The end

I got back to Delhi with the others, from Haridwar and then to Bangalore. Its nice to be back amongst friends and family and back in familiar places. But, the silence of the mountains does haunt you for a while.

If I do go back up the mountains through a trekking group, you know who I'm going to be going with! India Hikes did manage to give me that feeling of being a part of wonderful community that is trying to make High Altitude trekking more accessible by documenting various treks and arranging treks with excellent support including some very delicious food.

I've always liked the idea of "leaving a place better than you found it". India Hikes seems to really believe in this idea, and is trying really hard to encourage trekkers to imbibe this value and help each other in this mission. I really hope that there's at least a handful of people in each trek, who take back this idea along with pleasant memories from the mountains.

Water, cold and clear

On the whole the trek was an amazing experience. Gach yaara! I am definitely looking forward to go on more treks. As much as I dislike harshly cold weather, the beauty of the mountains is just too irresistible.

You can view more pictures of the trek here.

Book Review: 5 Love Languages

  • Author Gary Chapman
  • ISBN 080241270X
  • Read 2016-01-13
  • Rating 5/5

I first heard of this book in a discussion on relationships amongst friends from RC. The discussion was quite interesting and the book received more than a couple of strong recommendations. So, I decided to pick it up.

Very simply, the book is codified common sense explaining what Love is. Gary Chapman, the author, started with the question "What makes you feel loved" and found that the answers could be grouped into the following 5 categories:

  1. Words of affirmation
  2. Quality time
  3. Receiving gifts
  4. Acts of service
  5. Physical touch,

which he calls the languages of love. He also proposes that people have a primary language of love, and a failure to speak to a person in their primary language would make them feel unloved.

The book is filled with anecdotes to explain what each of these languages means and how to speak them, along with practical advice and exercises to learn to speak each of these languages. Though the book has been written with couples in mind, the fundamental ideas in this book can be applied to any relationships. I feel like it has been helping me connect a few dots, ever since I've started reading it.

It has been totally worth my time to read this book. A highly recommended read!

Below are some of my notes. Feel free to suggest improvements (for readability and otherwise) on the notes.


Partial postgres db dumps for a Django app

Off late, I have been working with a large postgres database that is used by an app built in Django. I wanted a partial dump of the database to try out some experimental clean up scripts. I haven't really used databases before, and the last time I had to do this I did it in a pretty ad-hoc fashion. This time around, I tried to do it more methodically and to document it.

The Django Route

I looked around for tools that let you do this, and found django-fixture-magic. I first tried it out on my older partial dump (10% as large as the original db) and it turned out to be reasonably fast and worked well, after making a few changes to get it working with Python 3.x. Its kitchensink flag to the dump_object seemed like a promising option, but didn't really seem to get all the required tables for ManyToManyFields. I worked around it, by getting a dump of all the models which were related using Django's dumpdata.

Get a dump with objects of interest

The dump_object command lets you run commands to select the objects that you want to have in the dump, and that is quite a useful thing.

python dump_object dataset.Product -k --query '{"subcategory_id__in": [1886, ...]}' > products.json

Also, get a dump of related tables.

# Dump of related fields
python dumpdata dataset.Attribute > attributes.json

Create the new empty db

Next, create a new database where this fixture can be loaded!

# Create the db
sudo su - postgres
createdb mydb

# Create a user, if required
createuser -P

Grant access to the user

In the psql prompt type the following to grant the user permissions for the database.


Fix and create tables for the models.

Make changes to to use the newly created database, and then create the tables used by the app, and then load the data.

python syncdb
python loaddata products.json

Too slow!

This method worked and was reasonably fast when I was trying to get 20k rows from a table with about 200k rows, with all the dependencies.

But, when I tried to get a dump of about 200k rows from a table with 2M rows, it was way too slow to be of any use. There could've been a couple of reasons for this, which I didn't have the time to look into, and debug.

  • The web-server where the Django app was running, and the db server with the postgres database were on different machines in separate datacenters, which could've been adding a significant amount of latency.
  • Just the size of the database being much larger could be making it slower?

These are things I should be looking into and learning about, when I have more time at hand. For now, I needed a quicker way to get a dump. Even though the raw SQL route was more manual, it turned out to be much quicker.

Raw SQL dump route

Get a dump of the interesting tables

First, I had to get a dump of all the tables with the data I was interested in, one-by-one.

COPY (SELECT * FROM "dataset_product" WHERE ("dataset_product"."subcategory_id" IN (319557, 94589, 332, 406, 626, 1886) AND "dataset_product"."gender_id" = 1)) TO '/tmp/products.tsv'

COPY (SELECT * FROM "dataset_photo" WHERE "dataset_photo"."product_id" IN (SELECT U0."id" FROM "dataset_product" U0 WHERE (U0."subcategory_id" IN (319557, 94589, 332, 406, 626, 1886) AND U0."gender_id" = 1))) TO '/tmp/photos.tsv'

-- Copy a bunch of other tables!

Load the data from the dumps

-- syncdb
COPY dataset_product FROM '/tmp/products.tsv' ENCODING 'UTF8';
COPY dataset_photo FROM '/tmp/photos.tsv' ENCODING 'UTF8';
-- Copy a bunch of other tables!

Make tables writable

Some of the tables did not let me write anything to them, until I altered the sequence for these tables.


It would be pretty nice if all of this was automated – allow a user to enter exactly the same kind of a query that django-fixture-magic lets you run, and figure out the SQL copies that need to be done to get the requested dump. Its something that currently would qualify as yak-shaving, but may be a handy thing to have. Someone somewhere possibly already has something that does this.

Clock in and get-shit-done

I had setup a couple of hooks about an year ago that turn off all notifications while I'm clocking in. But, I find myself switching to the browser and jumping to twitter, out of habit. I've tried get-shit-done in the past to help myself break this habit. But enabling get-shit-done manually is step that quickly became a non-habit.

So, I hooked up get-shit-done into an org-clock-in-hook. The snippet below is what I added into a function that is added to this hook.

  (cd "/sudo::/")
  (shell-command "HOME=/home/punchagan get-shit-done work"))

get-shit-done needs to be run as root, since it does things like modifying /etc/hosts and restarting networking. Just calling get-shit-done as a shell command fails with the error sudo: no tty present and no askpass program specified. I found a couple of ways to fix this. The snippet above piggy-backs on tramp to allow for a way to enter the password for sudo to use. This also means that I don't need to enter the password, as long as the tramp connection is alive.

For someone worried about having such an easy way of running something as root, using something like gnome-ssh-askpass as the askpass program might work better.

(shell-command "SUDO_ASKPASS=\\"/usr/lib/openssh/gnome-ssh-askpass\\" get-shit-done work")

Elfeed hook to fetch full content

I have started to use Pinboard's unread tag as my to-read list. It has a bookmark-let that works pretty well for adding stuff into my "to-read" list. I then catch up on this list using elfeed and subscribing to the unread items' RSS feed. The work-flow is pretty nice for adding stuff into the list, and finding items on the list. But, when it comes to the actual reading part, the entries in the feed don't have the actual content I want to read, and I end up opening the links in a browser.

Inspired by a comment from FiloSottile, I realized it should be pretty easy to setup a hook that fetches the actual content to make my reading work-flow smoother. I wrote a small script, using python-readability, to fetch the page content, given a URL. This script is then hooked onto elfeed-new-entry-hook, to fetch content of for new entries as they are fetched. All the old entries can be easily fixed with a single call to elfeed-apply-hooks-now.

(defun pc/get-url-content (url)
  "Fetches the content for a url."
  (shell-command-to-string (format "~/bin/ %s" url)))

(defun pc/get-entry-content (entry)
  "Fetches content for pinboard entries that are not tweets."
   (let ((entry elfeed-show-entry))
     (list entry)))

  (let ((url (elfeed-entry-link entry))
	(feed-id (elfeed-deref (elfeed-entry-feed-id entry)))
	(content (elfeed-deref (elfeed-entry-content entry))))
    (when (and (s-matches? "" feed-id)
	       (not (s-matches? "\\\\|pdf$\\\\|png$\\\\|jpg$" url))
	       (string-equal "" content))
      (setq content (pc/get-url-content url))
      (setf (elfeed-entry-content entry) (elfeed-ref content)))))

(add-hook 'elfeed-new-entry-hook #'pc/get-entry-content)