Nitin Khanna

I was once described as a philosopher programmer. I think I'd like to describe myself as a lifelong student.

Deleting Duplicate items in Fever RSS

My Fever RSS setup has a lot of feeds that often duplicate items. There are feeds from news sites such a The Times of India corresponding to National, International and Governmental news as well as feeds from tech sites that often repeat things. The end result is that I often see the same title, the same post and thus repetitive news many times during the day. I found the following script to be an excellent way to remove duplicate items from Fever. This works on the MySQL level and so you should be careful when using it, lest you delete everything because of some coding error on my part (though I’ve checked and this works). Continue reading

A view to forget

As I was climbing the steeper side of the mountain, I kept thinking to myself, “why am I doing this? I could have been on a road trip in my nice air conditioned car. I could have been sitting in Starbucks reading a book. Heck, I could have been home, coding! Why?” And pat came the reply – “for this view.”
I stood there a minute, took the view in and then thought, “heck, I’m not even a photographer! Let’s get the hell out of here!”

The easier route, which I should totally have taken! I learnt two things today – 1. No matter how much water I think I need, I will need 3-5 times more than that. 2. If there are two ways to the top of the mountain, one easy and one tough, start by taking the easier one. In the words of every villain out there, don’t try to be a hero!

Published via Pressgram

The boy looked on as raindrops kept falling on the windshield in an uneven fashion. The car was fast and the terrain was whooshing past without refrain. The raindrops were now forming teams and racing down to the bottom, to their ultimate destiny, the race deciding on their fates. The bright light from the sky glinted in the boy’s eyes and he leaned forward to track the race better. The windshield was now nearly full and the two drops that had started it all were gaining speed and weight. The boy was now rooting for one of the drops and hating the other with all his heart. The father, who was driving, noted loudly, “hmmm, can’t see anything!” and simply hit the wiper switch once, to clear the screen. Suddenly, the race was gone, the raindrops were gone and their destinies were gone. The boy stared on, not sure what to do now.

In a few minutes, two new raindrops were racing and the boy was rooting hard for one of them. Indeed, the other one was evil. The drops were now thin, because the rain had increased and as often as the drops picked up new passengers, they were hit by falling drops and split into smaller bits. The father again said, “Bah! Can’t see anything in this rain!” and turned the wiper on. The race was again gone and so was the glint in the boy’s eyes.

The wife and kids were out. He had the entire place to himself and for the longest time, he just sat on the sofa and relaxed for a much deserved break from work. Soon, he noticed the dust on the carpet. He brought out the vacuum and worked his way from the living room all the way to the bedrooms. Then he noticed that one of the bulbs was out and he went ahead and replaced it. After that, he realized that the trash needed to be thrown and the laundry done, so he did all that. Finally, feeling tired, he sat down on the couch and blinked. By the time he woke up, the family was pulling into the drive-way and he realized he’d done all those things only in his dreams.

Facebook Messenger’s Genius Inputs

Ah, Facebook! You’ve been at the center of so much controversy about privacy, callousness towards users and crappy advertising strategies. But if there’s one thing you do well, it’s the ability to slip in some gems of code into your apps and platforms. The latest one, I discovered recently, is the variety and innovation of inputs in your iOS Messenger app. Chatting is something that comes naturally to people. The quick and painless flow of information (hey, gossip is information) is vital to relationships and of late, we’ve been doing a lot of that on mobile phones. iOS, in it’s standardizing tone, has set up the following method of sending information to others – fire up an app, type something you want to send and hit Enter. If you want to send a photo, press a dedicated button to select a few images or take one and send it. If you want to send emoji, press a dedicated button, select the emoji and it’ll be added to your text input. All of this is fine, except the photo sharing part. Recently, I was looking at how redundant that is. The entire process of selecting photos to send (and many apps only allow one photo at a time) and the process of using a single Camera UI to decide if you want to upload old pics or take a new one, is restrictive and kludgy. In comes Facebook Messenger, with the following UI – Continue reading

UnAAPologetically Indian

So, Kejriwal is in jail for a defamation case (charged, not convicted) and India’s social janta is going nuts after the fact. Ever since he quit his short-term Chief Minister-ship of Delhi, the people of India have rebuked, ridiculed and made Kejriwal the butt of every political joke not directed towards Rahul baba. Now, people are asking if he’s relevant any more, whether being sent to jail means his political career is at an end and if he should just remain there. Continue reading