Home

Advertisement

Customize

Nov. 8th, 2009


[info]tariquesani

Twitter Weekly Updates for 2009-11-08

  • @ramki_bangalore hey which time zone you are in ?;-) in reply to ramki_bangalore #
  • Good morning tweeps – waiting for the sun, wondering if I should go out to click a few winter migrants… #
  • @runita Good morning – may your entire day be just as great :-) in reply to runita #
  • RT @fossdotin: And it is sad just how many submitters believe that hackers break into computers/networks. Get an education, people! #
  • @runita It is a holiday here too but we are working. Thankfully appears that I will clear my ToDo in morning – rest of the day I can code in reply to runita #
  • Divorce is sanity – but that is a maddening state to be in ;-) RT @ashokbanker: Marriage is temporary insanity curable by divorce.

    Read the rest of this entry »

    Originally published at http://tariquesani.net/blog/. Please leave any comments there.

Nov. 6th, 2009

[info]subtle_blues

Gin Soaked Boy

Every morning between 5 am and 6 am was 'Juke Box' time on Channel V (or was it MTV? Don't remember now). A whole hour of DJ(anchor)-free music, and great music too. This was 6 years ago. That was also the time when I had the hostel common room television all to myself. Imagine how powerful and invincible I felt holding that remote control in my hand and playing Western music with high volume amidst those four walls which never saw or heard anything but Tamil soaps and movies. There was no one yelling for a channel change, no one accusing me of being a pretentious, culture-less, outer-state poser. It was my moment of personal bliss. Anyone who, by mistake, walked into that room during that time would be treated to dirty looks and an 'if you want to stay, sit quietly and keep off the remote' attitude. I was the absolute queen! There are very few worthwhile memories of my hostel life. This is one I will cherish forever. Although it doesn't seem like a big victory when you are really just sneaking under the 'regional radar'(as opposed to fighting it), the freedom, the joy and the pride I experienced during those early hours is as yet unmatchable.

One song, that I was listening to earlier today, that reminds me of those days is Divine Comedy's 'Gin Soaked Boy'. Oh how loudly I sang 'ba-pa ba-pa-ra-la-raa' and no one knew :-)

[info]bohemebelle

(no subject)

When I was small , I wanted to marry a fenny drinking goan man , have a house/ shack by the beach , eat pork and fish and have atleast 5 to 6 children. I think that was the funniest thing I ever wanted.

I always thought if I married a goan (christian )I would be able to wear frocks all my life and would never have to throw the clothes I loved so much. It amazes me how psyched I could have been as a child , the things I possibly could want.

I also wanted to marry Amir Khan and Anil Kapoor , at different points of time of course. Then I gave up on men , and decided that I wanted to live on the beach .

Nov. 4th, 2009


[info]locks

Book, Script, Film

200px-Eng-patient-mov-poster 200px-The_Namesake

So I have a thing for reading film scripts online. I have read the scripts of The Namesake, The English Patient, Notting Hill, My Best Friend's Wedding, Sideways, Alfie, etc. In case of The Namesake and The English Patient, there is an interesting twist. I watched The Namesake and then read the script. In case of The English Patient, I first read the script and then read the book. Haven't watched the film yet.

It is an interesting exercise for the mind. I like the act of reading film scripts because it allows my imagination to take flight, add colors and sounds, and really make the film in my head. Afterwards, when I watch the film, there is an exercise of comparison and it is amazing how much richer the imagination is when it comes to bestowing life to characters on paper. Obviously, not many films can do justice in such an elaborate fashion. I am yet to watch The English Patient and do that comparison exercise.

Most scripts are fairly boring in that they don't have a very rich narrative. But The English Patient had such a beautifully written script - the film came alive in my head in a way that it probably may not be able to on screen. Plus, I have heard such dismal reviews about the film that it puzzled me at the beginning. How can such a lovely script culminate in such a *boring* film?

A film that I enjoyed incredibly is The Curious Case of Benjamin Button. I loved the concept of two people meeting midway in their lives - as one ages forward and backward in the strangest way possible and the other goes on to meet her natural decline - yet Life conspires for these two characters to meet at their respective primes - and light up the lives of each other. I wonder how the script will play out... hmmm.

[info]suku

Not so dreamy...

I wouldn’t call them unpleasant but some of my dreams are so unacceptably bizarre. I just don’t want to see them. They mess with my head because they feel so real. Sometimes wiping out traces of something that never happened can be tougher than reality.

[info]tariquesani

Do I know that smell?!?

I know that smell!! Explored.

Tiger in Flehmen pose

Tigers to identify his territory, the male marks trees by spraying of urine and anal gland secretions, as well as marking trails with scat. Males show what is called called the Flehmen response. In the Flehmen response, animals draw back their lips in a manner that makes them appear to be “grimacing”. The action, which is adopted when examining scents left by other animals either of the same species or of prey, helps expose the vomeronasal organ and draws scent molecules back toward it. This behavior allows animals to detect scents, for example from urine, of other members of their species or clues to the presence of prey. Flehming allows the animals to determine several factors, including the presence or absence of estrus, the physiological state of the animal, and how long ago the animal passed by.

Read more in the embedded book Amur Tiger

Originally published at http://tariquesani.net/blog/. Please leave any comments there.


[info]vaguelyalive

(no subject)

Which is your favourite (classic) Disney film?

Also, which male or female lead did you have a crush on as a kid? Don't try and deny, we all know you did.

My answers. )

So, tell me which ones you like, and which films I should watch. I haven't watched a lot of the more classic Disney films. Cinderella, for example. I've never watched the entire thing...should I?

TELL ME PEOPLE.

(Oh, and just to scar you for life, and ruin your childhood- It's sexytime Princes. Yeah.)

Nov. 3rd, 2009


[info]sampada

Looking Back

I always do this -- I go through old entries on this journal and it never fails to overwhelm me. My life has been touched by so many people. I've made so many friends. It's crazy! It's good!

I have lost touch with many of you. I know most of you don't even check your LJs anymore. But I just wanted to tell you, that I still think of all of you. If you ever read this entry, drop me a line, and let me know you're doing well. I'd love to hear from you!
Tags:

Nov. 2nd, 2009


[info]arunshanbhag

Air Meera


Meera just loves to be tossed in the air (of course, never leaving my hands). She is all giggles and never wants me to stop.


One more of Meera!

Nov. 1st, 2009


[info]tariquesani

Twitter Weekly Updates for 2009-11-01


[info]vaguelyalive

DUN DUN DUN

Airtel is driving me up the fucking wall. They're like some bad boyfriend who says he's call me back AND THEN NEVER DOES. Except this is not my boyfriend, but someone I'm paying for a service. Which I'm not getting. Airtel, you are made of complete and utter fail.

I got very angry after hanging up on them this morning, and ranted at my father, who just stood there sadly with this expression of "...I was just making you coffee. Y U MAD?". My Final, Ultimate Threat was "I'm going to write a letter to The Hindu about the appalling service I've received! I'M SERIOUS! I WILL DO IT!" at which point he struggled not to laugh. Oh, Nana.

The moral of the story, I suppose, is this:

Fuck me over, and I shall WRITE A LETTER. A SCATHING one, even. Fear me.

(I'm still scouring their website looking for some sort of address, e-mail or otherwise, to send this Letter to. They're all, "Oh, call our stellar Customer Support!", however. Wankers.)

Oct. 31st, 2009


[info]arunshanbhag

Video: Making Ganna Ras – Sugarcane Juice

Each evening when we take Meera for a walk, we stop by the Poornima Juice Center on Colaba Causeway, for their freshly squeezed ganna ras (sugarcane juice) - see video. At 8 rupees (16 cents, US) a glass, it is a steal! Meera greedily gulps the ganna ras too! As a baby, this was the first juice we gave her.


Enjoy the Video!


[info]aveerah

Gone in the morning...

Jilebi, a few years ago the word made my tongue tingle with anticipation and tummy ready for some delectably warm goodness. Today when it was called 'shiny' with 2 billion calories, it somehow made me scram :-D partly because I am counting calories for I am slightly [stress on slightly] scared of dying of a blocked artery in a strange land :-P, partly because I don't have that big a sweet-tooth, and also because I am self-training in the hope of running a half marathon next year.

No movie today :-(

Oct. 30th, 2009


[info]code_martial

Fixing a "CPU Leak" in Python

This is a classic case of the "GCC is broken" phenomenon. Only this time it was with Thrift.

We have an application that's built on the LAMP stack, except that the A[pache] there is T[hrift] and the P stands for Python, not PHP. The weird thing with this application is that as time passed, the CPU usage continued to grow and grow while the response times from the application kept falling and falling. The really weird thing is that we didn't see a change in memory usage.

While looking for the problem, the first thing I did was to set up profiling for the application. The first profile runs didn't give much clues. The longest running functions were the system calls to socket.accept(), Thread.join(), _mysql.commit(), etc. All network related stuff. I wanted to get a call stack dump so I started going through the documentation for inspect and found this note. Yes, I wasn't explicitly deleting frames. I patched a server with this fix and yes, the CPU profiles suddenly looked so much better. It was two Fridays ago. The weekend was good.

Next Monday, I saw a mail saying that the issue had, in fact, not been fixed. The CPU usage still kept increasing, albeit at a slower rate. The ops team had put a cron to restart the Thrift server every 3 hours. Whoa. Begin two weeks of utter torture, compounded many times by the fact that we didn't really have much time to fix it since we were losing incalculable revenue every day.

For the first two days, we were still thinking it was an issue with call stack inspection and tried removing it altogether. Unfortunately, that didn't work either. It was time to get serious. On wednesday, I wrote thriftbench so that I could do some benchmarking like Real Engineers™.

I had always been skeptical about Thrift's behaviour of keeping a single instance of the application running all the time in a single process. Apache spawns multiple children, each of which dies after serving certain number of requests and it refreshes the entire interpreter runtime for PHP on every request. It's a marvelous architecture built to insulate developers from little stupid issues like we're about to uncover. So as soon as I got hold of thriftbench, I also set up a parallel http_load benchmark for the JSON-HTTP version of our application (yeah, we have both right now but not for long, hopefully).

The difference in results was spectacular. HTTP won on every count -- response times, CPU usage, throughput, network I/O. All except the last were tied to the fact that Thrift was running a leaky application logic. The last one's noteworthy. JSON beat ThriftBinary in terms of serialised data size by ~ 10%. Take note and underline with a red pen. JSON serialisation ROCKS!

Fortunately or unfortunately, switching to JSON-HTTP instead of Thrift was not an acceptable solution. So we trudged on. First we ascertained that it wasn't our usage of funky Python decorators. Then we ascertained it wasn't call stack inspection, really. We also ascertained it wasn't logging, which was shared by all threads in the server. We looked at what Thrift does differently from Apache, and one difference that stood out was that while Thrift kept a long-running process, Apache renewed the application state on every request. I thought I should try creating a new instance of the application on every request in Thrift. The application instance doesn't contain any expensive resources. Just a bunch of config parameters. To my dismay discovered that I was already doing that and it still failed. I was creating a new instance of the application on every request... just like HTTP, I thought.

More painstaking days of debugging happened and I ascertained that absolutely nothing was wrong with our interaction with MySQL. That was necessary since the only difference between our application and all other Thrift applications in the company was that they all use PostgreSQL with a persistent connection (or connection pool) while we renewed connections on each request, as is recommended for MySQL and usually done in LAMP.

The real situation of desperation was created this Wednesday when I ascertained that nothing except our own application logic misbehaved with Thrift. There could be so much stuff in the application to change. Changing the application also meant introducing major risk in functional stability. Yesterday, I took Python's __getattr__ and __call__ to the limits by quickly generating JSON-HTTP wrappers for all of the application API and another wrapper that made Thrift server go to the JSON-HTTP service over localhost. You have to have fall-backs, you see. We'd have been faster with Thrift-over-HTTP than with Thrift alone with a broken application. Earlier in the week, I had also worked on enhancing a WSGI application that can expose any Python module or class as a JSON-HTTP service, which, I'll do my best to open source.

Today I took just the Python application, stripped away from Thrift, mocked away the DB to just get a hard-coded result set and benchmarked it. The CPU leak was observed, as expected. I ran the profiler again on it and this time it showed up.

Essentially, we were increasing the size of a class-static list with every object we were creating (i.e. once per request) and then doing expensive traversals over it. The reasons why it wasn't easily caught were:

1. The object instances always get the right copy of the list since we are removing duplicates that are being added to it, while the copy in the class definition kept increasing

2. The increase in memory size per request is minor compared to the overall memory footprint of the script but the iterations over it are expensive (constructing a set out of the list's elements)

The fix is as simple as making the list an instance attribute instead of a class attribute. The issue can be reproduced and understood by this simple script:

class BaseClass:
    class_attr = ['a', 'b', 'c']
    def update_class_attr(self):
        self.class_attr.extend(['d', 'e', 'f'])
        self.class_attr = ['a', 'b', 'c']

class DerivedClass(BaseClass):
    def __init__(self):
        BaseClass.update_class_attr(self)

def main():
    obj = None
    for i in range(1, 10):
        obj = DerivedClass()

    print obj.class_attr
    print BaseClass.class_attr
    print DerivedClass.class_attr

if __name__ == "__main__":
    main()


Go ahead. Try it out. See if you can explain what's going on here. The irony of the situation is that what I thought would fix the issue turned out to create the issue in the first place! Had we not been creating a new instance of the application on every request, we'd never have seen it in production, ever!

Oct. 29th, 2009


[info]aveerah

Teardrop on a fire...

Tulpan : I am left scavanging for words. It might not be the best cinema ever made but it definitely is one outstanding piece of movie ever :-)  I loved it. Take home lesson - I hope I've the balls to continue doing what I like for the rest of my life.
'Love, love is a verb. Love is a doing word'  :-D can't seem to get the massive attack out of my system, getting pissed off working on fortran :-/ and becoming a matlab junkie.

Oct. 28th, 2009


[info]aveerah

Unbeautiful...

Princess [Danish animation] : Curt, short, sensitively gory, remarkably imaginative and great music :-) more like from Tarantino's school.
Sleep abheera, sleep, sleep,sleep, sleep, sleep........................




Oct. 27th, 2009


[info]tariquesani

Flash: The shoe fits!

She coughed! This was desperate attempt to make the royal messenger notice that there was another in the house. The stepsisters scoffed and sneered but the royal guards intervened and Cinderella finally got her chance. The royal messenger eagerly but with no less pompousness carried the shoe towards Cindy! Last night started flashing past her eyes… Oh! How she had danced and the prince had been so charming… her lips still burned… and then at midnight she had to run! Smart as she was she had left her shoe behind, she dared not do anything more!

So read what happened next!

Originally published at http://tariquesani.net/blog/. Please leave any comments there.

Oct. 26th, 2009


[info]vaguelyalive

(no subject)

I called up Airtel Customer Care because my outgoing calls got randomly disbarred and got told that I am not "eligible" for a post-paid Airtel connection since I don't meet their criteria. Because I'm "middle-class".

LOLWUT.

To be fair, the poor CSR who told me this sounded like he was shitting bricks and crying a bit on the inside while telling me this ("How to explain to you now, medum?"), so I asked for his supervisor.

I am now on the phone with FancyLadyVoice. She's telling me it's because I'm a student and live in a rented house. I think they're afraid I won't pay their bills on time. Or, y'know, at all. Why didn't they just tell me this beforehand? I wouldn't have bothered taking a postpaid connection. Or any sort of connection.

I get that they don't want to give postpaid connections to people who seem unlikely to be able to pay their bills, but be upfront about it. I shouldn't be asked to go down to their Airtel Outlet to see what's up. It's your screw up- you tell me what's up.

Is this standard operating procedure for mobile phone service providers?

Aaaaaand I just got dropped.



ETA:

HAHAHA, so I call back immediately, of course, and ask them what's going on. I get DifferentCSR this time, and he's more chill.

ME: "Yeah, I was just speaking to FancyLadyVoice and I think my call got...dropped?"

HIPCAT: "Oh yeah, Fancy. Hang on." (He was more scripted and polite of course, but I am not writing all that down. Just replace my version with English Language class from 6th standard, and you're good to go)

[PAUSE]

HIPCAT: "Okay, is this regarding your outgoing calls being disbarred?"

ME: "10 points to Hufflepuff."

HIPCAT: "Please! Please give me the opportunity to serve you, please!" (This is almost verbatim. I got super uncomfortable, and was thankful he didn't say "service you", really."

ME: "Sure."

HIPCAT: "Okay, so your name is Baroness Helga Von Pfifflestein?"

ME: "Present."

HIPCAT: "Imma give you back your calls, yo."

ME: "Sweetness."

HIPCAT: "In four hours or so. Verify your address for me?"

ME: "YO MAMA'S PANTS."

HIPCAT: "She said she had a good time, thanks, btw. Oh, and someone will be by to verify that. So when can he (and by he, I mean my mama) contact you?"

ME: "Between 4 and 4:30 p.m. And tell her to be on time. I got a business to run here."

HIPCAT: "Cool. Laterz, dawg."

ME: "Shine on you crazy diamond."

So, I have no idea what all that was about, but I enjoyed being told I was too po' for a mobile phone for a few minutes there.

***

Oh, and since I'm being all chatty and jobless here, I may as well record, for posterity's sake that two random guys texted me and sent me messages on FB, respectively, while I was prostate with a fever, asking to be my frands (the second one specified that he "only" wished to be my "online friend", in fact. I'm very hurt.). I would have ordinarily been more amused, but I think my meds and alternating chills and sweatiness made me go all extra rage-y and so I told them off.

"But I just want to get to know you" they mumbled, albeit with poorer grammar while I sternly reminded them that this was the third time I had expressed my utter lack of interest.

"How will you know me if you won't be my friend?", one asked. While I attempted to explain to them that they had it backwards, I realised that it wasn't doing my fever any good to explain to them the vagaries of social interaction and gave up.

Their last texts/messages were so similar in their wistful, yet defiantly-hopeful-for-a-reply nature ("K....Sorry....Bye....Take Care....Good Luck....Sorry again for any Troubles...."), that I began to wonder if I had imagined it all, but the texts and messages remain as evidence.

Why do the Shridhars and Kalpeshs of the world believe that actions of this fashion will lead to fruition? Have people actually responded to messages such as this? Have relationships grown out of it? Inquiring minds want to know.

[info]tariquesani

Marsh dart damselflies

Damsels in love ;-)

Coromandel Marsh Darts mating

Marsh darts are slender and small damselflies with varied coloration. These non-iridescent damselflies rest with wings closed over their body. The wings are transparent and rounded at the tip. The long and slender abdomen is slightly longer than the hind wing. Some of the smallest damselflies like the Golden Dartlet (Ischnura aurora) is from this family. Marsh Darts are found throughout the world. World over, this family is represented by about 1147 species. Within Indian limits, 65 species are known and in peninsular India 25 species are recorded. The marsh darts breed in a variety of aquatic habitats like ponds, marshes, streams and rivers. Though most of the species are closely associated with aquatic habitats, some species like the Common Marsh Dart (Ceriagrion coromandelianum) can be found far away from any aquatic habitat.

If you are interested you can download the Dragonflies and Damselflies of Peninsular India – A Field Guide. An excellent book which has been released under a Creative Commons license by the Indian Academy of Sciences

P.S. I know about the book because it has some pictures taken by ‘Yours truly’ – including the one depicted above

Originally published at http://tariquesani.net/blog/. Please leave any comments there.

Advertisement

Customize