Bullet chess - Two studies

Bullet chess at 1 min per side is sometimes a crazy affair, but a surprising number of games have a good dose of strategy and tactics. Still it was a little unusual to have two study like finishes in one morning. So here we go.

Posted on 30/10/2020

Deploying a Flask app on Opalstack

Flask is a micro web framework allowing one to write web applications in python. Its my preferred tool for writing everything from static sites (with flask-freeze as a static site generator) to small websites to larger applications due to its flexibility. I have been using [Webfaction] (https://www.webfaction.com/) for hosting my projects for a few years. For a comparatively modest price, I get a shared server on which I can host any number of apps. Unfortunately, Webfaction were taken over by ... and their automatic migration failed, so I decided it was time to look for a new home for the apps. A little research suggested that Opalstack was the best fit, as their services and setup is very similar to Webfacton.

Posted on 22/10/2020

Writing custom scripts for Polybar

Polybar is perhaps the best and most beautiful statusbars for those who prefer a minimalist desktop and I have been using it along with i3 for the last three years. While it comes with enough built-in modules to satisfy most use cases, one of its strengths is that it is "highly customizable ... without the need of having a black belt in shell scripting".

Posted on 04/07/2020


In Kurosawa's late career film Kagemusha, a thief, rescued from crucifixion to act as a double for a powerful warlord, finds he has a bigger cross to bear when the warlord dies and he has to impersonate him for a while to mitigate the consequences of an untimely death. Like Shakespeare, and perhaps like a lot of other great artists, Kurosawa has the ability to take oft told tales and squeeze a lot more out of them. And this movie is a good example.

Posted on 20/06/2020

Wodehouse to the rescue !

Halfway through "The Inimitable Jeeves" which I had picked up to re-read during my posting in the Covid ward, it struck me that this is, in many ways, about the right time to read Wodehouse. Perhaps you say that any time is right to read Wodehouse, but now especially, when one is, at every moment, struggling each moment to keeps one's head above the deluge of bad news from all sides, it seems all the more appropriate.

We seem to live in the age of news, global, national and regional, real and fake, and it is always the worst parts that trickle down so that almost all of it that reaches us seems to be sordid and depressing. It affects everyone, inducing either feelings of depair and helplessness or anger and frustration. But there is little one can do about such large issues, with the result that most of this anger and frustration is vented on different "social" media, serving only to inflame them further, inducing a sense of helpless impotence.

Posted on 15/06/2020

Foster Parents

A photo series of an unwitting crow couple bringing up a cuckoo. Generally it is strongly discouraged to photograph nesting birds. These were a few photos (one or two pictures once in several days) taken without any disturbance from my balcony

Posted on 02/05/2020

To the top of Saddle Peak, North Andamans

Saddle peak, the tallest point of the Andaman and Nicobar islands, is a lovely place to climb.

Posted on 27/12/2019

Climbing Stok Kangri

It was one of those moments in life that definitely count as strange and vie strongly for the title of strangest. I was halfway up a steep ice and snow covered slope, leaning forward and thinking every move carefully because this was really slippery and really steep and one small slip would send me sliding all the way to the bottom of the slope that I had climbed laboriously over the last hour. Just a few feet to the right of me, an ice axe lay in the snow, abandoned. I didnt have an ice axe with me and was now calculating if the sideways movement to reach the axe was worth the risk of slipping. Far below me, I could just make out the shapes of half a dozen trek mates who had abandoned attempts to climb the slippery slope. Above me, halfway to the ridge at the top, lay M., holding on tightly to a small rock projecting from the snow. He was stuck there for the last half an hour at least and his screams had quitened down to a whimper now. Above that on the ridge, there was some movement against the skyline and I could suddenly see the back of one of our trekmates. His bright red jacket blew a little in the wind and I could suddenly see he was an inflated dummy actually and that a fair was on at the top of the ridge. There were clowns, balloons, shops, a merry-go-round and a ferris wheel. Great, I told myself, I will be up there soon, joining in the merriment and getting something hot to eat. Like I said, it was one of those moments.

Posted on 02/10/2019

When heaven comes down - Sky watching on treks

When one thinks of enjoying nature on treks, the images that come up are rolling mountains, mist filled valleys, green forests, roaring streams, waterfalls and such. The skies are not something one thinks of at first, but take it from me, they are a key component of the natural beauty one encounters on treks. The longer treks generally take you away from civilisation, which means less pollution in general, but importantly less light pollution. Higher altitudes also give you clearer skies. And usually on the longer treks, with no electricity and no phones, one has nothing to do after sunset and so that becomes the elusive final component of the recipe - some time to sit simply and watch the skies.

Posted on 11/08/2019

A personal and unconventional reading list for the young doctor

A healthy dose of literature should be an essential ingredient of every young doctor's training because medicine is as much about people and life as it is about science and disease. Everyone perhaps has their recommended reading list of fiction and non-fiction for this. Here I list my personal reading list. It is a tad unconventional because many of these books would not be on other lists targets at young doctors. I have enjoyed a couple of books from Richard Gordon's "Doctor" series, but while they are fun to read once, they don't make it to my recommended reading list. Siddhartha Mukherjee's "The Emperor of all Maladies" and books by Atul Gawande are more contemporary books that should be read by someone who takes an interest in medicine. if they don't make it to this list, it is because even though I haven't stated it explicitly, I am really thinking about fiction that should be recommended reading. So here goes, my opinionated reading list -

Posted on 24/06/2019

On Walking

Having been on 8 long treks in the himalayas, one climbing Kilimanjaro and another 8 shorter ones in other parts of India, I know that the main parts of a trek are the long, often lonely walks. Hearing about the treks or seeing pictures, people often ask "Is that it? It's just one long walk? Why do you do it?". For one, it is not the walk alone of course. There are the times spent together in the camp, there are the picturesque and often adventurous road travel and so on. And walking provides a slow, contemplative appreciation of the surroundings that is impossible to match if done any other way.

Posted on 14/06/2019
    trek travel

A day in Rishikesh

There are many religious towns and cities along the Ganges that are popular with tourists and pilgrims alike. Among these, Rishikesh was my choice of a destination for a day trip not just because the Ganges here is clean and pristine, being well upstream of the major polluting towns, but also because of its multitude of different faces. It is the yoga capital of the world, one of the best places for white water rafting in India, a magnet for westerners flocking to learn meditation and a stop for nostalgic fans of Beatles and the era of the flower children.

Posted on 14/05/2019

Preparing slides with org-mode and reveal.js

I haven't used powerpoint (or Impress from Libreoffice) for quite a few years now. Org-mode is the ideal tool for outlining and developing ideas. It is perfect for organizing information in a hierarchical manner. It lets you focus on content, hiding, expanding and re-ordering subheadings easily. It is also plain text, so easy to keep under version control. For these reasons, to someone already familiar with emacs, it is the natural tool to prepare slides.

Posted on 28/12/2018
    tech code

On the Goechala Trail

We have been planning to trek in Sikkim for some time and we chose Goechala over Sandakphu as the latter seemed too easy. We trekkd from Nov 2 to 9, 2018. These are some quick notes from the trek.

We flew to Bagdogra a day before and stayed in Siliguri. Siliguri was crowded, charmless and was quickly christened the honking capital of India. The one feature of interest was the tum-tum, an ubiquitous mode of transport here.

Posted on 16/11/2018

Looking back

Milestones are to stop and look back on the road travelled. As the year ends, I am approaching the completion of seven years as an independent consultant electrophysiologist. I also recently completed 1000 device implants and 1000 electrophysiology procedures.

Posted on 12/12/2016

Painting flowers with light

As a small weekend project, I shot a few indoor pictures with a somewhat new (to me) technique. What I wanted was to show colorful flowers with a completely dark background. I didn't want to use a flash because the light would be too harsh, it reduces the "depth" in the picture and may illuminate the background because of its reach. So I used the light from a mobile phone display which was soft and weak enough to only illuminate closer objects. The pictures came out better than I had hoped for.

Posted on 29/03/2015

Walking in Wonderland - Trekking across the frozen Chadar

On no other trek could I have truthfully said that I was struck by a sense of wonder every time I looked up and around. We seemed to be walking and living in wonderland. It was much later, after seeing the reactions of others to the pictures that I realised that this was a near universal feeling, not something limited to me. Perhaps it was the simplicity of the landscape - ice, green waters, blue skies and brown cliffs.

Posted on 03/06/2014

Using wfdbtools

wfdbtools is a pure python module for accessing and using the waveform data in Physiobank. Provides rdsamp and rdann which are the python equivalents of the wfdb applications of similar names. A deliberate attempt is made to try to keep names and usage similar to the original wfdb applications for simplicity of use.

Posted on 15/06/2013

Kurangani to Top Station trek Sep 2012

The promised easy route down from Top Station was slowly turning nightmarish. For more than two hours we were following our guides through dense forest, with no trail, pushing away thorns, trying unsuccessfully to avoid the stinging nettles, repeatedly getting feet entangled in vine that proved much stronger than it looked, as we slid down the slopes and somehow managed to negotiate our way across a steep slope with sparse footholds, a slip from which would have plunged us onto the rocky walls of a stream far below. We were catching our breath in a clearing when the guide casually mentioned that the dead rotting leaves all around us could harbour king cobras. Some how, at that moment, with everything else, it did not seem to matter.

Posted on 25/10/2012

A month with Sublime Text

I don't write code for a living, still the amount of time I spend doing it makes me value a good editor. Like any decent programmer I am picky about what I use and biased towards what I prefer. Over the years, I have tried out a few different editors, notably gedit, geany, SPE, Komodo edit, Vim and Emacs. With patience and persistence, I think anyone will ultimately find the answer in Vi(m) or Emacs. For me it was Emacs that clicked and since the last 4 years or so, I have not really felt the need to try out another editor. With all the noise about Sublime Text, I thought it was time to give it a whirl, especially with the release of version 2, especially since some of the things in my current emacs setup were broken after the upgrade to Emacs 24. I used Sublime Text for about a month and these are some of my impressions -

Posted on 31/07/2012
    tech code linux

Hotkey to toggle touchpad on Thinkpad x220

My thinkpad x220 is my third thinkpad and the first one with a touchpad. While I find it useful specifically for scrolling documents and for zooming in and out for images, it can also come in the way the rest of the time hen I am primarily using the keyboard and trackpoint. So I wanted to be able to toggle the touchpad on and off using a key.

Posted on 31/05/2012
    tech linux thinkpad

Install Mendeley plugin for Libreoffice

OK, I struggled with this for half an hour, so just to document the solution. On my new laptop with Ubuntu 12.04 and Libreoffice 3.5, I installed Mendeley with the deb package from the website. Installation went well, but when trying to install the openoffice plugin, it first complained it could not find unopkg.

Posted on 25/05/2012
    tech linux

Bali pass via Dehradun May 2012

After months of deliberation and planning, we had decided on the trek to Bali pass in May 2012 with 14 signing up. The plan was to reach Dehradun and then drive on to the end of the road at Taluka. From here we would walk, climb the pass whose highest point was at 4800 m, descend on the other side and reach road again at Janaki Chatti from where we would drive back to Dehradun. For 4 of us, this would be the third trek in the Himalayas together, starting with Hampta pass in September 2010. Another 7 would be enjoying their second trek with us and the other 3 were new faces. The group was drawn from a wide range of places from New York and Singapore to Delhi, Pune and Chennai. Finally, the day we had planned for, had waited for eagerly, was there ...

Posted on 24/05/2012

Textcontrol with smart autocompletion for wxpython

For my own use I needed a text entry widget in wxpython that allows smart autocompletion from a list of choices. By smart autocompletion, I mean choices should be displayed in a dropdown box and text entry should narrow down to matching choices.

Posted on 23/05/2012
    code python

Linux on Thinkpad x220

I bought a Lenovo Thinkpad X 220 recently. This is my third thinkpad, the previous ones being an X40 (stolen) and an X61s (showing signs of wear and tear after 4 years of heavy use). Overall, there is nothing to disappoint a thinkpad fan with the fantastic keyboard and solid build as expected.

Posted on 18/05/2012
    linux thinkpad

Kumbakarai to Kodaikanal - March 2012

It was a decision made over just a couple of days. A weekend trek to help prepare for the big one in the Himalayas that lay ahead in May. We learnt about this route from Kumbakarai falls to Kodaikanal which seemed to be relatively well documented and decided on it. Prasanna, Vishravars and Arun drove from Chennai and picked me up in Tindivanam.

Posted on 27/03/2012


Occasional writings on medicine, travel, photography or code. And anything else ...