Comments

It all started as a little hack by Srini and I at the Yahoo! Openhack Event conducted in Bangalore. The hack by itself wasn’t that fancy when compared to the other finalists but we did feel good when our hack got shortlisted for the finals. We wrote a little web app which would index delicious bookmarks and enable Full Text Search on the Content with a neat tagging mechanism.

Meanwhile, applications were open for the second round of StartupChile program. A seed of 40K equity-free USD and an exotic location, sounded rather interesting. We added some new ideas to the original delicious hack, drafted a nice crisp application and applied a few hours before the deadline.

Fast forward a month, We are delighted to announce that Cruns is one of the 154 startups that made it through the 2nd round of the program.

These are still early days, I am all excited, happy, anxious and scared, all the same time. Never have I budgeted for things months in advance. Ever since I passed out of college, I have been living in the relative comfort of working under a great team at Serendio where I began my baby steps as a programmer.

I have to admit, I am finding myself outside my comfort zone all of a sudden. Something which I hope I will adapt to sooner or later. One thing is for sure, Interesting times wait ahead :)

So there, Announcing Cruns; Something which we hope will help you to organize your information better.

Congratulations to the other 153 teams that made it through. Looking forward to meeting you all this January!

Comments

Picture this. You are at work on a Friday evening. You are all pumped up! Who wouldn’t be. Two full days of zero work ahead! You shutdown your computer, rise up, turn around to leave and BAM! This happens,

The key to ‘Lumberg Evasion’ is not only to stay ‘hidden’ but also to be aware of your boss’ whereabouts. Information is wealth and can potentially save your weekend.

I wanted to check out Pygame and hacked out a little python script which does this. The idea is that you position your webcam (el-cheapo-no-brand webcams sell for peanuts) near your cubicle/desk and get notified if there is some movement in a predefined area. Also works great if you have a laptop and want to know if someone is peeking over your shoulder (yeah, yeah… I know about mirrors).

The script can detect movements within the red rectangle. Here is how it does this

  • When we start the script, the average color within the red rectangle is determined. This will act as the reference color.

  • Deviations in this average color is monitored in consecutive frames. If its more than a certain threshold, there is some movement.

  • When this happens, play a sound and pop up a little notification

Of course, it goes without saying that its just a simple hack. Works well if the background color is of an uniform color.

P.S: No, I don’t work for an ‘Initech’.

P.P.S: If you are one of those ‘Bill Lumberg’ types, Fuck you!

Comments

I had been itching to go on a motorbike roadtrip to Kerala. Sitting in the back of the car isn’t exactly my idea of a fun and fulfilling roadtrip.

Therefore from Oct 2 – 10, I was on my motorbike riding through some diverse terrain and landscapes that included arid countrysides, coastal plains, villages, forests, hill stations and plantations of cardamom, sandalwood, rubber and tea.

The 2118 odd kilometers was done on my little 150cc Yamaha FZ16 laden with saddle bags and supplies. Given a chance, I’d gladly re-do the same roadtrip again on a more powerful machine.

My itinerary for the trip was as follows

  • Oct 2, Sat: Home – Salem – Avinashi – Coonoor

  • Oct 3, Sun: Coonoor – crash in the mountains – Ooty – Gudalur – Sultan Bathery (Wayanad)

  • Oct 4, Mon: Sultan Bathery – Kalpetta – Calicut

  • Oct 5, Tue: Calicut – Thrissur – Chalakudi – Athirappally/Vazhachal falls

  • Oct 6, Wed: Athirapally – Unknown shortcut through rubber plantations – Kaladi – Muvattupuzha (Rendezvous with my friends here and was no longer alone) – Munnar

  • Oct 7, Thur: Munnar – Marayoor – Chinnar – Offroading at Anaimudi – Munnar

  • Oct 8, Fri: Munnar – Idukki – Elapara (with lots of detours taking us to awesome spots)

  • Oct 9, Sat: Elapara – Vagamon – Parunthumpara – Pambanar (Goodbyes over a heavy lunch and was all alone again) – VandiPeriyar – Kumily – Theni – Madurai

  • Oct 10, Sun: Madurai – Trichy – Home

It was a long, wet weekend with rains lashing through Kerala rather heavily. Nevertheless, I was having lots of fun except for the crash in the mountains near Ooty. That was not fun AT ALL. Detailed logs to follow soon.

Comments

I like simple things. Anything more complex more than ‘simple’ is tough to deal with. Therefore it comes as no surprise that I love JSON. Heck, the entire grammar fits in a business card.

If you take a closer look at the spec above, you will notice that the keys for a JSON ‘dictionary’ should be strings. I have a feeling that programmers like me whose language-of-mass-destruction is python are likely to overlook this minor gotcha.

This is where it gets interesting. Python’s json module tries to do something smart when you try to encode a python dictionary into a JSON string. In this case, all the keys are python ints.

1
2
In [3]: json.dumps({ 1 : 'Foo', 3: 'Baz'})
Out[3]: '{"1": "Foo", "3": "Baz"}'

When I decode it back to a python object…

1
2
In [4]: json.loads(json.dumps({ 1 : 'Foo', 3: 'Baz'}))
Out[4]: {u'1': u'Foo', u'3': u'Baz'}

BAM! The json module silently converts all my integer keys to strings. I, for one, would have preferred an Exception to be raised instead.

Something like this, for example.

1
2
3
4
5
6
In [19]: class F: pass
...
In [20]: f = F()
In [21]: json.loads(json.dumps({ f : 'Foo', 3: 'Baz'}))
... snip errors ...
TypeError: key <__main__.F instance at 0x92b4b2c> is not a string

In this case, I get the desired behaviour where a ‘TypeError’ is raised. Stupid example, but you get the idea.

If I am missing something obvious here please do comment. This particular cheekiness of the json module caught me unawares recently. Or maybe I was wrong in expecting the decode operation to return something that is identical to the source.

Interestingly, the json support modules that ship with TurboGears error out if you try to return a dictionary having non-string keys from your controller methods.

Comments

India, is a wonderful place for touring on a motorbike. With terrains ranging from high mountainous North, North Eastern India to the Coastal plains and lush Ghats down South, we sure have a huge load of places to see and experience. Motorbike touring can also be risky since a disproportionate rate of road accidents involve two-wheelers. Therefore it is absolutely necessary for the rider to protect himself on the road with proper riding gears.

The ideal mode of getting riding gear would be to look for clearance sales outside our country and ask the relatives or friends to ship it down to India for us. For people like me, whom the relatives hate to be related to, there are local players like Cramster and DSG who provide gear that are priced competitively. I already have a nice helmet but the lack of a proper armoured touring jacket was preventing me from getting adventurous enough to go out on long road trips.

Requirements

I wanted a jacket that that could satisfy all the following requirements.

  • Should be made of a fabric that doesn’t tear easily protecting me against scraping injuries.

  • Armor in the joints and some padding in the back for protection against hard falls.

  • Since Chennai is not blessed with a good weather, the Jacket shouldn’t boil me alive when I am wearing it. Should be bearable in hot weather atleast when the bike is in motion.

  • Extra brownie points for usability in the rains.

Alpinestars are great but they are simply too expensive for me. DSG distributes them in India in case you have saved enough moola to buy one. Be wary of fake imitation Alpinestars gear that are sold here in Chennai for 5 – 6k. They look genuine but they are, at the end of the day; fake.

Narrowing down the choices:

Taking into account all these and reading user posts from xBHP (in addition to rabid googling), I shortlisted DSG Maze and the Cramster Breezer 2.0. Earlier, I had almost decided to order Maze online, but after seeing the Cramster in action during the Vedanthangal xBHP G2G, I noticed that the Cramster Breezer 2.0 qualified as a worthy competition to the more expensive Maze, both of which met my requirements except for the usability in the rains. Also the presence of Leather shoulders and cuffs in Maze was putting me off. They are damn cool and sexy, but leather doesn’t go well with rain. To add to the confusion of choices, I learnt that Cramster had released a new all black Breezer 3.0 phasing out the 2nd revision.

The presence of a removable waterproof inner liner was the killer feature for me, which was not present in Breezer 2.0 and Maze (Correct me if I am wrong). Finally, I made the decision and took my little FZ on a road trip to Cramster’s Bangalore office yesterday to get the damn jacket. (also some balaclavas for myself and friends). I chose to ride to Bangalore instead of ordering it online since it would give me a chance to test the jacket on my way back ;) (no nagging confusion about choosing the right size as well)

Sorry for the soddy pics.

The back

The Jacket is heavy in the hands but fits snuggly when I wear it. I had to wear the inner lining in Bangalore because of the windchill in the early hours of dawn when I was leaving the city. Once the sun came out, I removed it and all was well. I am quite happy with the finish and the quality of materials that have gone into this jacket. Like most other jackets, it comes with the Cordura fabric that doesn’t tear and 3M reflectors for added visibility to other motorists for spotting you in the dark.

Verdict:

Unfortunately, I have no means to compare it with others and offer a shootout of sorts since I haven’t really tried any other jacket before. I would love to hear from the users of other jackets. If you are not a fan of an all-black jacket, DSG Maze comes in red in addition to the all-black version.

Ride hard and ride safe!

P.S: Thanks to Sudarsan (no, not me) and Pradeep for allowing me to camp at their place for the weekend.

P.P.S: Thanks to my boss for buying my LCD monitor!

Comments

Made an unplanned roadtrip to Pondicherry on my FZ yesterday. Driving on the ECR with the sunset on your right is pure bliss. The weather was good with occasional chilly bursts of sea breeze. Cruised the entire stretch at a comfortable 80km/hr.

Although not as long as my earlier Yelagiri trip, it was fun nevertheless. The former French colony seems to be at its best charm when it rains :D.

It is amazing how your senses become tuned to the road after riding for an hour or two. Hopefully, I will be doing far more longer trips this winter.

(Sorry for the poor image quality)

Comments

4 years ago, I joined a college which had the highest mediocrity rating among the mediocre colleges in TN. To be honest, I didn’t have good academics in my high school, so I must say I was quite fortunate to get an undergrad ‘seat’ for a CS Engineering degree there. Luckily, on the very 2nd day of college, I had enough brains to come to a conclusion that my next 4 years would be spent in an Orwellian Dystopian Parallel Universe where students wore lab coats for CS Labs. (It still beats me, the purpose of a fucking labcoat in a Theoretical Computer Science Lab).

Engineering education in TN is as fucked up as it gets. The fact that Yours Truly will be attending his Convocation ceremony next month and getting a degree certificate is proof enough that its fucked up beyond all recognition.

And did I mention, there will be 50 more new colleges this year in TN alone! Fucking Pathetic…

Lastly,

[youtube=http://www.youtube.com/watch?v=jpDQ66r1f9M]

Thanks to Krish Ashok for making a joke out of us poor zombies..

Comments

Last week, 24camp started out as a means for people to get together and work on interesting projects/ideas.

Serendio will be hosting one this weekend, 13th February. We have place for about 20 – 25 in our office premises. More information can be found here.

You can also participate virtually by logging on to #24camp IRC channel on the Freenode servers. If you want to start a local, group of your own add your group in the wiki page mentioned above.

Comments

I have been a lurker in the forums of xbhp, just gaping in awe as these guys do road trips to far off places complete with triplogs. I knew I wanted to do something like this and was itching to take my FZ for a ride in the great outdoors. The farthest I had been was the trip to A R Rehman’s concert at Swarnabhoomi a couple of months ago.

A road trip was imminent and rallied two of my friends for a trip to Yelagiri, A small hill station retreat near Jolarpet. Nothing fancy like the Ooty or Kodai. Just a group of hills with the tallest point close to 1100m. Middle of December with cool weather was just so irresistible.

Alas, my friends couldn’t make it and I had to go solo, without any company. The tripmeter at the end of the day read 484.5. Also, logged part of the return trip with TangoGPS in my Freerunner. I have uploaded the traces to OSM.

I have written a fairly detailed triplog at the xbhp forums. Do read it :D

I really love Twitter and it didn’t make any sense to me to shell out a rupee for every tweet sent through my Airtel Mobile. Moreover, I am on one of those monthly booster packs which allows you to send 22000 text messages for free. I simply had to exploit this by setting up my own little ‘OC’ twitter forwarder written in python. (I know of smstweet.in service but I am still charged 1.50 for every tweet I send)

Its insanely simple to write such a ‘forwarder’ in python using the services provided by the FSO (freesmartphone.org) Framework,

  1. Send messages to your old/unused number whose SIM is in the Freerunner (or any other device supported by the FSO framework)

  2. Handle the incoming messages and use python-twitter API (or) raw urllib2 to post updates. Of course, the device should be connected to the internet, you can tether this device to an old unused computer. Simply put, the Freerunner should be able to access the internet.

I know this is dumb given cheap GPRS and all, but what the heck; Sundays are reserved for dumb things and I wanted to show off how easy it is to develop and conjure up simple but powerful scripts using open hackable hardware like the Freerunner. So take off your pedantic hats ;)

Here is the actual python code,

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env python
# Written By Sudharshan S, http://sudharsh.wordpress.com

import dbus
import time
import logging
import twitter

import gobject
from gobject import MainLoop

from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop (set_as_default = True)

# Use OAUTH?
USERNAME = "username"
PASSWORD = "password"

log = logging.getLogger("TweetForwarder")

class TweetForwarder:

   """Process Incoming messages and update twitter status
      if the message startswith 'tweet'
   """

   def __init__(self, username, password):
       log.warning("Starting up....")
       self.twitter_api = twitter.Api(username=username, password=password)

       # Get proxies and add signal handlers
       bus = dbus.SystemBus()
       _usage = bus.get_object("org.freesmartphone.ousaged",
                               "/org/freesmartphone/Usage")
       _proxy = bus.get_object("org.freesmartphone.ogsmd", \
                               "/org/freesmartphone/GSM/Device")
       self.usage_iface = dbus.Interface(_usage, "org.freesmartphone.Usage")
       self.usage_iface.RequestResource('GSM')
       self.sms_iface = dbus.Interface (_proxy, "org.freesmartphone.GSM.SMS")
       self.sms_iface.connect_to_signal ("IncomingMessage", self.onIncomingMessage)

   def onIncomingMessage(self, sender, message, kwargs):
       log.warning("Received SMS from %s:%s" % (sender, message))
       # We don't ALL messages to this number to be tweeted
       if message.strip().startswith("tweet "):
           log.warning("Trying to update status : %s" % message[6:].strip())
           self.twitter_api.PostUpdate(message[6:])
           log.warning("Updated Status")

   def run(self):
       loop = MainLoop()
       loop.run()

if __name__ == "__main__":
    logging.basicConfig()
    server = TweetForwarder(USERNAME, PASSWORD)
    server.run()

Make sure you have python-netclient and python-json installed on your Freerunner. These can be installed using the ‘opkg install’ command.

The script and the accompanying dependency can be downloaded from here. Just change the USERNAME and PASSWORD accordingly after scp’ing the tarball to your device.

Some useful links,