Fast forward 20 years, the man child in me was stoked to see the trailers for Jurassic World, the fourth installment in the franchise. This time around, I decided to get the Jurassic Park book by Michael Crichton, because why the hell not! It has Dinosaurs.
The book is racy and easy to read and I ended up finishing it in two sittings. However,
Never have I been so pissed off by a fictional little girl in a book than the annoying little irritating piece of shit, Lex.
In the book, the boy is the elder one; a dinosaur nerd savvy with computers although having his parade pissed on by his younger brat of a sister all the time. The little girl is of no help, whines constantly and is always hungry without any human emotion.
If Satan was a little girl, it would have been Lex.
Looking back, it has made me appreciate Spielberg’s direction by having both the kids do something. The sister in the movie was the elder one, was a ‘hacker of the unixes’ but atleast she had something for us to root for. Always on the lookout and cautious of Dinosaurs. Added to that she bails her brother out in the scary kitchen scene.
Lex in the movie was of some help and has her moments.
However, Lex from the book has only made me think of imaginative ways to kill her off.
My favorite, Dr. Grant using her as a distraction to escape from the T-Rex. The big rex gets her snack and everyone is happy that no one is whining anymore!
]]>The timing was perfect as I got that motivation (or atleast I thought I did) in the form of a very thoughtful gift from someone very special to me.
Unfortunately, my Laziness has been trouncing my Motivation without any hint of mercy whatsoever.
That said, I absolutely adore this little bugger of a gadget that has seamlessly merged into my daily routine.
Has a long battery life, is hackable, has customizable faces, syncs with my phone and has a rather nice app ecosystem.
However, if you are like me and somehow think that splurging money on a smart wearable with sensors is going to make you wake up in the morning and go do that run that you had been procastinating all along, please! Don’t kid yourself.
No gadget with any fancy wizardry is going to solve the vice of Laziness. This is a challenge at a more human level.
A challenge that millions including me, face every morning at 6.
]]>I happened to get hold of a Classic 500 Desert Storm for a short ride to Wayanad recently. I have to admit I started the ride with a very unfair negative bias towards the machine. I hated the handling, the brakes, the vibrations and even the turd-sandwich colour. But as the miles were being munched, it grew on me and I was actually enjoying myself.
This bike had this knack of preventing me from pushing my limits. Instead it was demanding me to take it slow, relax and soak myself into the environment. As the milestones whizzed past me, I found myself not really caring about the vibrations or the uninspiring brakes or the boat-like handling; things that I felt were big deal-breakers for me in the beginning.
Towards the end of the ride, I realised it’s not the machines I was having a problem with. But the RE fans who always seem to fall into these two polarising buckets.
You could argue there are fanatics for any brand, motorcycles or otherwise, out there. But the thing is, nowhere have I seen this much of a stark contrast in a fanbase before, where I despise one set of the populace and have complete respect for the other. (I am guilty of being in the first category myself when it comes to Apple notebooks :D)
I like Royal Enfields now. I love its iconic thump and the styling that remains faithful to its roots. I love the posture and the sheer road presence that these machines ooze out. I enjoyed being respected on the road a lot more than the other bikes of seemingly lesser pedigree. Heck! I even love their classy promotional videos,
However, for the love of all things holy, Dear RE owners, please stop pretending it’s the best motorcycle out there. It’s not!
]]>I had been trying to use Evernote, Wunderlist and org-mode
to help solve this. No god damn luck. Only org-mode
worked for me in the beginning but I found myself slowly starting to worry about how to format my fricking lists instead.
My brain had started to bikeshed with itself!
For me, these tools turned out to be hard to focus with. And lo! I fell back to using a Pen and a Notebook instead.
Writing down todo lists feels much more satisfying than typing them. The contents somehow ‘sticks’ to my head and I don’t need reminders on my phone anymore (which I mostly used to ignore anyways).
Of course, there are a lot of productivity problems solved successfully by software but I have come to a conclusion that simple personal todo lists is NOT one of them.
Pen and Paper beats the Computer in this case.
]]>My next project was a simple Jenkins build monitor, very popular amongst the Arduino beginners out there who write code.
Here is my version of this hack. In addition to the usual ‘traffic light’, I also plonked on a 16x2 LCD to the circuit which displays the build number along with the status. Scroll down to the end of this post to see this in action.
I used Fritzing to draw this schema and I know it’s a little bit ugly.
Anyway, successful builds turn on the Green LED; Unstable builds, yellow; Failed builds, red and my favorite of all, builds in progress makes the LEDs turn into KITT from Knight Rider :P.
The code is pretty simple. There is a Python script that uses the Jenkins REST API to get the latest build and its status for a given a job. This is translated into a crude command for the Arduino board to pick up using the Serial interface.
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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
|
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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
|
Here it is in action. As you can see, the LCD displays the Job, the last build number and its state. The wiring is a huge mess, but hey, it works! :)
Next step, maybe build a bigger housing for the entire system.
]]>1 2 3 4 5 6 |
|
Of course, fails horribly with an NullPointerException
if the interface is not present :)
In my previous Flask projects, Jinja was my templating engine of choice. The DRY flow in Jinja templates consists of setting up a base.html
with a common layout markup. The ‘children’ would then ‘inherit’ and optionally override those blocks in their own templates.
However, In the world of Clojure (and therefore Hiccup), functions (duh!) are used to modularize templates. For example,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
In the above example, there is a chance of repetitiveness of functions like get-page
as the number of routes increases. In most cases, there is one (or few) container div
that changes across the templates. To avoid this, I have found using multimethods
to be a great way of dispatching templates at runtime.
For instance,
1 2 3 4 5 6 7 8 9 10 11 |
|
Now that I have a group of ‘container’ divs, I can invoke them from get-page
like so,
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Meanwhile, my routes
will end up looking something like this,
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
As you can see, get-page
is the point of entry for my templates and the container div
is injected according to the dispatched function. In fact, by abusing using compojure’s route destructuring, we can have true runtime dispatching of templates!
1 2 3 4 5 |
|
get-page
function isn’t going to change much and I can mix and match templates as much as I want.
I must admit that I am super new to Clojure. Therefore I am not sure if this approach is idiomatic enough in the Clojure world. Would love to hear suggestions on how it is usually done.
]]>I started working on Cloudcraft as a toy project over the weekend. It aims to be an end-to-end toolbelt for managing minecraft servers on EC2. As of now it’s very Alpha quality but it can spawn instances and setup minecraft servers automatically with just a couple of commands. For example in the screenshot below, cloudcraft started the minecraft server on a spawned EC2 instance and reported the address needed for a multiplayer game.
Autoscaling instances, plugin management, automatic updates are some of the things that are in the pipeline.
The project is on github and as usual, suggestions, bug reports, bug fixes are welcome.
]]>Doesn’t matter if its due to some fucked up illness like Alzheimer’s or a freak accident from sheer bad luck. It is very possible that I won’t be me one day.
The only bright side is that at least parts of my identity will live on as memories in people close to me if that happens. Coming to think of it, things won’t be that bad after all :). As they say,
]]>Like many others I love Shawshank Redemption. The scene where Brooks is out of prison and is unable to catch up with the world is just plain sad. One of my favorite all time movie scenes that gives me the chills every time.
I keep hoping Brooks found his Freedom.
]]>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!
]]>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!
]]>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.
]]>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 |
|
When I decode it back to a python object…
1 2 |
|
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 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.
]]>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.
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.
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 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.
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!
]]>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)
]]>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..
]]>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.
]]>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
]]>Its insanely simple to write such a ‘forwarder’ in python using the services provided by the FSO (freesmartphone.org) Framework,
Send messages to your old/unused number whose SIM is in the Freerunner (or any other device supported by the FSO framework)
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 |
|
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,
]]>