alsilog

by Karan Sheth

Random rubbish about front end development, motor cycles and music.

Read this first

KTM Duke 390

On 12th February came home the KTM Duke 390. It is a 373 cc, 43 bhp, street bike capable of the top speed of about 163 km/h.

The Duke 200, i.e. the 200 cc variant of this bike, was launched much earlier than the 390 here in India. It was something I had been mulling over buying for a long time. I had been craving an upgrade for a while. Although faster, the 200 wasn’t that much of an upgrade or even that much faster than what I already owned. i.e. Hero Honda Karizma R.
And then the 390 was announced and I started salivating at the thought of riding/owning/going on trips/becoming a-lone-riding-introspective-unshaven-cool-guy.

About the same time I discovered the Triumph Street Triple as well, which is one of the more affordable high end street bikes available in India. So it was a combined drooling over both the bikes (so much so that my keys started sticking!) The Street Triple is an

Continue reading →


Ride to Coorg.

Coorg

Two weeks into getting the bike, a few colleagues and me headed off to Coorg for a 2 day trip. The troop consisted of 6 vehicles in all. A Yamaha R15 (J), two Duke 200s (B and S), two 390s (me and K, both still in run-in about 250kms in) and a VW Polo. The Polo inevitably became the support car holding all our luggage. Two guys in the car, both riders at one time, also became capable backup riders for when we were tired.

The guys on the 200s were seasoned riders used to gunning it all the time. Thankfully the 390 is fast enough to keep up with the 200 even while running it in and trying to keep sober revs.

The path we took was Bangalore > Mysore > Kushalnagar > Siddapur > Virajpet and Virajpet > Madikeri > Kushalnagar > Mysore > Bangalore.
We tried avoiding Mysore by taking a by pass while going and discovered that the by pass was hardly even a road, dug up and pot holed making

Continue reading →


Project: Become a miser.

This is about a little method/script that I came up with that lets you analyse your expenses. Be it the day to day expenses or specific expenses such as trips, purchases, etc. Be it you alone or a group of people.

Cost Parser is a simple way of keeping track of expenses. It’s aim is to give you a basic overview of how you have been spending your money.

 What does it analyse specifically?

At the moment, it is very simple. It gives you:

  • Total amount spent.
  • Break down by spender.
  • Break down by category.
  • Break down by sub category.
  • Break down by day of the week.

 How does it work?

Step - 1: You pick any editor/note taking application that is easily accessible (preferably across multiple devices). You do this by following the specific format mentioned in the next step. Ideally, you want a device/application that makes copy/pasting easy.

Step - 2: You starting noting down your

Continue reading →


I bit the Apple.

I ended up getting myself a Mac. Specifically a Macbook Pro 13" Retina.

I pride myself on the fact that I’ve always detested Apple and its products. I don’t necessarily think they are bad. I am, honestly, quite impressed with the hardware as a whole. But the obscene pricing (esp. here in India) and their fan base is a source of constant irritation. Not to mention the closed-ness of the entire Apple ecosystem. Forcing you to buy an Apple device to be able to even BEGIN developing/experimenting on their platform? Seems a bit unfair.

I have a few Apple fans for friends. The excessive pride in their Apple products and the boastfulness about how much they’ve spent on them, being dicks basically, is annoying. These are, otherwise, very smart people who I love hanging out with. But everytime Apple comes up, we more or less become enemies for about 20 minutes where I’m visualizing mutilating

Continue reading →


The curious case.

 …of a mysterious bug that seems to resolve itself when you undo 5 minutes worth of code and redo all of it. Slowly.

I get that I could have left accidental keyboard artifacts into the code that cause random syntax errors. But those are easy to identify. So then what?

I was writing some JS which involved Google Maps, HTML5 drag and drop and a few other things. Most of which I don’t have much experience with. I’m experimenting and making it up as I go. It was all working just fine until about 5 minutes ago. I turn around to talk to a colleague and turn back and as compulsive behaviour would have it, I hit Ctrl + R. Page refreshes and BLAM! Everything stops working. I double check code history, check git diffs, everything! Nothing had changed! WTF JAVASCRIPT!

I close-reopen the tab, restart chrome. Nothing.
I start undoing everything slowly. You know… undo, check, undo, check. Till I

Continue reading →


Lesson of the day: Read more code.

Hahahahaha lmao wtf /die. :@

So, you should always read code. I know everyone says, “reading code is the best way to learn and improve your code” or something. But we are lazy. Stuff in code confuses us and we go back to watching House M.D. the 30th time.

Its fun reading about code. Its fun reading about people who write code. Its fun reading about their opinions. What is NOT fun is reinventing the wheel.

Let me explain. I wrote an event delegation method for my framework. It should’ve been straight forward and simple but I tried doing it like jQuery. Except, I didn’t bother looking at jQuery’s code too well. I just wanted to have the same method signature.
event.on(el, type, selector, callback)

Now, to be able to handle proper CSS selectors for the Selector parameter I wrote my own parser. The whole ID, Class, everything. Now I needed a loop that traverses from event.target to the

Continue reading →


A beginning.

I’ve been meaning to start writing for a while now. I just never got around to it considering I can hardly ever think of anything to write about. But I DO want to write. It is satisfying… or so people say.

I almost always end up hating what I’ve written after sometime, labeling it childish/lame/nobody-cares/etc. All which is probably true. But I have this domain and I have this server and I’m going to make use of it, dammit! I’ve been paying for it for too damn long without actually doing anything with it.

What I hope to write is mostly techie stuff, as a way of journalling how I’m coming along over time. Working at ZopNow entails a lot of interesting challenges and obviously more responsibilities, which lets me explore various new code-y things. Fun.

Here goes nothing.

Continue reading →