RSS

Inception Meets Programmer

20 Jul

”Dreams feel real while we’re in them. It’s only when we wake up that we realize something was actually strange.”

Inception is different like The Matrix, but different. It has programming concept, idea of functional programming, elaborated.

A software program which can have many methods, and methods within methods, nested methods. Main() program calls all these methods internally, and comes out of each method. Finally fall back to normal.

When you replace methods with dreams you understand Inception movie story.

Brain which can run multiple dreams, you can feel one dream at given time, you can be in only one dream. CPU can have one method executed at one cycle, while others in queue state

Methods share variable, take different type of parameters, are alive when in execution and dies when return statement is called. Calling methods will be return to active mode and thus leaving behind called methods.

Dreams shared by people, more than one guy i.e. Cobb, and with team. He, his team recruits person/character to share the dream.

Methods which call methods need to remember point of return to resume calling function.

So in “Inception”, each team member left behind on each level is protecting the rest of the team.

Every now and then Cobb is disrupted by Mal, his wife just like some random unconditional jump/GOTO statements.😛

Limbo is like run time error with infinite loop running on it, a state where its difficult to come back to real.

At a given point of time only one method is active, all others are in sleep mode, are in stack. One by one methods pop out from stack when return statement is called from method, as if nothing happened but achieving what methods supposed to do.

Cobb and his team comes out of dream from all levels and its exit();

Yes, I debugged Inception yesterday. Its geek movie just like all other Nolan movies🙂

It has gravity defying antics and twists all combine in a sort of signature movie of Nolan.

Highly recommended and it deserves second view🙂

 

Tags: , , ,

10 responses to “Inception Meets Programmer

  1. Sudheer

    July 21, 2010 at 5:18 am

    cool.. analysis🙂

     
  2. Abhay

    August 6, 2010 at 3:58 am

    Appreciable dude..thanks for the analogy! BTW while the movie concept is dramatic, many sub-concepts in the movie are impossible to achieve with the current technology unlike in programming…

     
    • Pramod

      August 6, 2010 at 4:03 am

      Yep. I agree that. I want to quote some one else quote “Thinking about idea is awesome, not expanding it”🙂
      Movie is great. period.

       
      • Abhay

        August 6, 2010 at 4:07 am

        EXACTLY CORRECT..🙂 at the end do u take that he was dreaming still ?

         
      • Pramod

        August 6, 2010 at 4:12 am

        No I’m taking it as back to reality, as we see his children faces and totem begins to wobble. But it deserves second watch🙂

         
  3. Abhay

    August 6, 2010 at 4:21 am

    There is the point! If seeing is believing then I take it as his dream coz it wobbled but didn’t fall before they cut the scene🙂 Yes the movie is worth watching again but I weighed Shutter Island a little higher than Inception. I know it is not good to compare different concepts but there is something in shutter island which made me say “WTF! reality is illusioned”🙂
    May be you like Inception more as I can see your geek way of analyzing the movie🙂

     
    • Pramod

      August 6, 2010 at 5:50 am

      I see your point. If you watch Inception and Shutter Island in a row you will be “Caprio De” d😛. Epic

       
  4. malathi S

    October 26, 2010 at 11:23 am

    Hello!!
    the cartoon at the bottom is good.
    wrt Inception i fell asleep in the first 10 minutes. My girls though watched it twice. They want me to make a sincere attempt and try watching it. may be i will for all my friends want me to watch it too!!🙂
    thanks for peeking into my blog!! r u from teerthahalli??🙂
    ms

     
    • Pramod

      October 26, 2010 at 11:59 am

      Thank you madam. Movie is little tough to watch as it requires 100% attention which is tough for anybody.

       
  5. asnblogger

    January 25, 2011 at 12:42 pm

    A great visual and cerebral treat!!!🙂

     

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

 
%d bloggers like this: