Journey From 28 Seconds to 1 Second

Let me set it out the beginning of this story:

You must be wondering what the hell  28sec and 1 second. But don’t worry you will get to know everything.

I started my new journey in Kuliza from 28th January and soon I was fully involved in product team. But Suddenly one day, I vividly remember that was on 15th February,  my manager told me that we’ve got one Matlab project and they just want to convert the Matlab code to Python. When I heard that, I burst out laughing :D. Convert  Matlab code to python.

Thats how I kicked off this project.

So I went through the Matlab code and believe me all the time i was thinking what the hell it was. It was really hard to make something out from that code. I was thinking dude first you have to understand this code and have to rewrite in python.

I started looking python library that my manager suggested. After putting my almost 4 days, I was able to run Matlab code into Python and guess what that python code was taking 28 seconds to run.

So I was very excited because I converted into python and getting output similar to matlab code. I sent a mail out to my team. Next day I told to my manager and he was very happy after hearing that news. I thought my task is done in this project but that was just the beginning and after few hours my manager said, that we need to optimize this code, it’s taking really too much time.

I said to myself, OMG. For optimizing the code you need to understand each and every line of that code. I thought it’s time to show your talent. I tried all ways,  posted my problem on stackoverflow, read couple of Numpy related blogs but initially didn’t get any good success :(. but finally I came across one blog that gave  some couple of tips to optimize Python code by using Numpy library. I tried all those things and guess what I was able to run that code in 12 seconds :).

I said to myself dude, you nailed it. I was so engrossed at that time that forgot to see the time. You know  that was the sunday midnight. I was very excited and wanted to share with someone but time was not good to wake someone up. So I tweeted on twitter. 😛 that was my first tweet in last six months. :).

 When I came to office next day, I told my story to my manager. Everyone seemed to be very happy, my manager and even client too. So here you must be wondering that story ends here. If you are thinking that way then just wait, I have something more to tell. Here comes very pivotal part of this story.

After that I moved to one another 100 Million project. Though I moved to another project but believe me I was not happy with that output and always thinking how could, code take that much time to run, I tried so many things but reached to only 10 seconds.

So while working in 100 Million projects, I came across one powerful language NodeJS. A language “jiski jitni bhi tarif karo vo kam hai”.

 There were few hurdles came while writing code into nodeJS like getting library similar to Matlab functions etc. but I came through all of them. After writing complete code, when I ran it first time in nodeJS, Guess what, It turned out really damn cool.

I was blown away when I saw output in one second. I was completely thrilled and jumped from my bed. You might be thinking bed in office ;). ( Actually, these interesting stuff, I  do during weekends and at home :)).

So finally I created API in nodeJS and now we are hitting these apis from Django server. So all computations are being done in nodeJS and Djanog is taking care of all UI rendering stuffs.

So this is all about a beautiful journey from 28 seconds to 1 second. I enjoyed a lot while working in this project and I hope you have enjoyed reading this too.


About learningtechstuffs

I'm Ansu Jain. I have 1.5 years of experience in iPhone development and 1.5 years of experience in web technology. I have worked on a number of web framework including Drupal, Django, Moodle, Pinax, NodeJs. This blog is dedicated to things I feel that each developer must know.
Gallery | This entry was posted in Uncategorized. Bookmark the permalink.

8 Responses to Journey From 28 Seconds to 1 Second

  1. Piyush says:

    Thts really awsm bro ! ! Congrats ! ! U r really doing vry hard work !!

  2. shishir says:

    Nice one dude

  3. Anindya Kundu says:

    Great post! 🙂 Interesting stuff to know…

  4. Anand says:

    Great story. Being able to apply concepts from one thing to another is the essence of creativity.

  5. Neha jain says:

    beautiful journey from 28 seconds to 1 second.. great!!!

  6. Maneesh Mittal says:

    Good job dear, good narration too. Keep it up

  7. Bhooma says:

    Wonderful stuff Buddy… !!! Keep it up .. 🙂

  8. yashesh says:

    great effort.

    in here ‘I came across one powerful language NodeJS’
    Just one neat. Node.js is a framework and Javascript is the language for Node.js.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s