Blog

  • C25K Complete

    C25K Complete

    I can’t remember when I started the C25K program. I know it was sometime in the last 5 years. I do know when I got real serious about it – A year ago. After multiple breaks for travel, falling ill, and general laziness, I’ve finally finished the program. I followed it up with a great 10K that weekend too in celebration.

    This is how I used to think of running

    Last week I started half marathon training. I ran for two weeks and missed day 3 because of a broken sleep cycle and I missed Sunday’s run because it rained all morning. When I think back to finishing C25K, I’m confident that if I don’t finish the half marathon training plan in 12 weeks, it isn’t a big deal, I may take a while to finish it, but I’ll still do my best to eventually finish it.

  • Gurgaon Cross-Country 10K

    Gurgaon Cross-Country 10K

    Saturday seems like ages ago. I took the metro to IFFCO Chowk, where Souvik picked me up to go collect the bib. The most difficult part of the race is just getting to the starting point. The map marker is basically in the middle of nowhere. If you don’t believe me, look for yourself.

    On Sunday morning, I woke up at a god forsaken hour and Souvik picked me up around 0400. It was a nice long drive over to the start point. Despite the fact that I was there the previous morning, I felt like we were nearly lost several times (we weren’t). Once we got there, we met the other crazy people like us who woke up incredibly early and made the long drive to the middle of nowhere to run a cross-country race. Rahul Verghese acknowledged this when he got on the mic. He said, “Congratulations, you’ve done the toughest part of this race. Getting to the start line!” The sun was just about rising when the half marathon folks started at 0530.

    The 10K and 5K group was flagged off at 0545 or so. I’ve noticed that if I start with the crowd, everyone tries to run fast and eventually I burn out quite quickly. This time, I started off right at the end and walked for a few minutes before I started running. In fact, I was among the last few people cross the start line. I made a good attempt to run by feel/colour, though I suspect I need more practice.

    The trail. Can you see how uneven it looks?

    Rahul warned us that things would get tricky very quickly for about 3.5 km and then it would open up into a nice smooth trail. Damn, he wasn’t kidding. It was dusty, there were rocks all around, and thorns. I think we’ve all got scratches and bleeds today. At that point, I was warmed up enough to slowly start passing people. If the rocks didn’t get you, the mud would. Or the thorns on the ground. Or the thorns on the trees. Being tall, I had to duck very often to avoid thorny branches. About this time, I was warmed up enough and confident enough to overtake folks who started too fast 😀 That went well for a while until the bottom of my feet hurt like hell as through I had a stone inside it.

    I stopped and cleared out my shoe thinking I had one of the sticky thorns stuck inside my shoe. I found nothing. I tried walking again and it still hurt. It then dawned on me that I stepped on a thorny branch. The thorn broke off and it was poking my feet through my shoes. I found a large stone, sat on it, and then started trying to pull the thorn off. It took me a good minute to get any grip on it. Perhaps, the next time I should carry a pair of pliers 😉

    After the stretch of stones and thorns, it opened up into a nice wide trail. This stretch was good to run on and I made good pace here. I mostly ran this stretch with a few short walking breaks when I noticed I was out of breath. Between the Faridabad XC and now, I certainly feel like I can do longer stretches of running. Every time I wanted to slow down, I told myself that I’d slow down in the thorny area anyway.

    The heat was horrible. By the time we started, the sun was high up in the sky and the heat was tearing at us. On the way back, the last 0.5 km or so was awful with no tree cover at all. This time, I seem to have managed to smile at the camera more often. Also, look less like I’m about to die.

    Nearly at the finish line :)

    At the finish line everyone was congratulating each other and talking about their experience. The best feeling in the world is when I got the cold towels and dumped it on my face and head. That felt good. I forgot about Strava when I finished. I only had eyes for the water counter. I desperately refilled my bottle and finished it in one gulp.

    My goal was to finish under 1:22:00 to qualify for the Airtel Delhi half Marathon. Thanks to some confusion though, the 10K ended up being actually a 11K. Though my GPS told me it was about 11.2K. I finished the race at the official time of 1:27:13 with a pace of 7:56 min/km. I’m incredibly happy with the pace, especially considering it’s my first 10K and first cross-country race.

    Today, I signed for my next 10K.

    The medal and my bib
  • Live Word Count in Vim

    As a distraction free writing environment, vim has worked great for me in the past. And using sites like 750words.com leads to me being more distracted. It’s far easier for me to full-screen vim and use that as a distraction-free environment. 750words.com has one thing that I like – A live word count in the footer of the page, so I know when to stop. I did some googling around and here’s what I found on stackoverflow for doing something similar in vim.

    Add the following to your .vimrc

    " Live Word Count function! WordCount()   let s:old_status = v:statusmsg   let position = getpos(".")   exe ":silent normal g<c-g>"   let stat = v:statusmsg   let s:word_count = 0   if stat != '--No lines in buffer--'     let s:word_count = str2nr(split(v:statusmsg)[11])     let v:statusmsg = s:old_status   end   call setpos('.', position)   return s:word_count endfunction 

    And then, if you’re using ftplugin, add this to .vim/ftplugin/markdown.vim

    setlocal statusline=wc:{13371f13f0bf161e7595c2ac5df92e005bed3de1d132ef646d0a44f3a1a9ee62}{WordCount()} 

    This will give you a small counter at the bottom with the word count, like so.

    Word Count in vim. See bottom left corner
  • Using Different Browser Profiles

    A while ago, I was talking to Christian Villum about working habits and using LastPass. I separate my work browser and non-work browser. This could probably help more people who want to keep their browsing history, sync, and credentials separate.

    I use two different browser profiles of Firefox when I work. Each one is themed differently to help me visually differentiate them. They also run two different versions of Firefox (Aurora and Nightly), so the logos are different. I use Awesome, so they live in different workspaces as well. I don’t do this as a config, just something I manage manually. It’s been long enough that it’s muscle memory already. An alternative is to use different browsers. My non-work browser is my default browser (and default profile), so that’s what opens up when I click a link.

    Advantages

    • When I’m done with work, I just turn off my work browser, and I’m switched off from work.
    • Complete separation of history. This is helpful when I use Firefox Sync. I sync my non-work history to my phone.
    • My work profile doesn’t have my social media passwords. When I’m having a distrated day, I just turn off my non-work browser.

    Disadvantages

    • Memory usage is significantly higher for running two browsers. Though, I’ve done this setup with my old laptop which only had 2GB of RAM and it worked fine.
    • Some passwords are shared between two accounts, like GitHub. I have to manually update those, which is a bit of a pain.
    • Because of how I’ve set it up, I need to start my work browser first and non-work browser second. If I change the order, the non-work browser doesn’t start up. This can be mitigated, but I specifically set it up that way 🙂

    How to Set it Up

    • First close all running Firefox instances and re-open Firefox with the Profile Manager. firefox --ProfileManager
    • Create a new profile called Work. Once Firefox opens up, quit it.
    • Run the same command as above and select the default profile. Now quit Firefox again. This will setup the default profile as your old profile.
    • Create a shell script with the following contents. Running this will create a new instance of the Firefox with the profile called Work.

      #!/bin/sh

      firefox -new-instance -P Work

    • Remember to open Firefox as usual first and then run the shell script to open the Work profile.

    Does anyone else separate work and personal browsing history?

  • Playing with Yeoman and Grunt

    I’m a very old-fashioned developer and I’ve been staying away from grunt, gulp, yeoman and other JavaScript tools. As a sysadmin, the entire Node.JS ecosystem, frankly, terrifies me. When the recommended install method for your language is to download a shell script from the internet and run it via curl, well, it isn’t going to sit well with me.

    I know I can extract what needs to happen from that script and run it myself, that’s what I actually do. However, that isn’t really part of the documentation. This leads to a larger debate of languages that move fast and how to handle package management tools that move fast as well. I don’t have a solution and I don’t want to get into that argument in any case.

    This week, I had some free time and I played around with Yeoman and Grunt. The goal was to see how the developer workflow would look like. I’ve been wanting to write some better tooling for my Jekyll blog and never got around to it. Right now I use Fabric for all my automation and that’s about it. I’m looking to modernize it with bower and combine and minify the CSS and JS. But, first I wanted to try it out.

    Merely out of curiosity, I built my seizure tracker. It’s just a web app (that currently uses client-side js) that shows days and hours since my last seizure. It can definitely be better, but the point wasn’t to build it but to test the workflow.

    Installing things in node.js is painful. A lot of apps want to be installed globally. I refuse to install them with sudo, so I end up setting a custom prefix that’ll install them to a folder in my home directory. And to top it off, npm install gives me very little insight into what it’s actually doing while consuming a reasonable amount of CPU and RAM.

    I like bower. It makes it easy to install and update a lot of the dependencies and generate the bower.json based on what I’ve installed. I tested a few countdown libraries and ended up not using a library at the end, because it was side tracking me from my goal of playing with the tools. Since I used generator-webapp, it setup a few grunt tasks for me. grunt serve is gorgeous. I love how it refreshes the page on the browser when I save the page. I finally understand what all the hipsters have been raving about! The internet tells me though that I should try gulp instead.

    Quick look through the ecosystem, I like what I see. In the next few days I will probably be working with Gulp and bower to update the tooling around my blog so I can serve it even faster than right now!