That Thing about DSP. January 30th, 2016


Mandatory Cliched Introduction



I don't know if you had felt this before , but imagine you are doing some activity, something along the lines of walking on  a crowded street with  music over your ears and the street is quite busy with shopkeepers and people who are bargaining for groceries. Amidst such chaos , you seem to be lost somewhere, somewhere that is clearly not the present. The reason being  you remember something, something that is funny and  you let out a chuckle , your otherwise serious boring face acquires a smile , an honest one which doesn't care about whether it is photogenic or not. The people who are walking opposite to you see the sudden transition in the face and thinks you are a weirdo, the biker who had just honked in front of you let out an unapologetic curse word. You walk away from the trouble and move away to the reality of present with much more optimism and a secret chant to yourself "Life is Good".


The awesomeness of being Me :P



Let me set the context right. Context is a word that I use on a great deal these day. Whenever someone asks a tricky question whose answer I clearly don't know, I usually speak something totally incomprehensible and end it with 

"Well , At the end of the day - Everything depends on the context. Right?"

 And who can disagree with that?  :D

So it is the 6th Semester of college and the year is 2011 I suppose. I was a guy who entered into college with the thought process that I am going to ace the shit out of this thing. But after 5 semesters of engineering curriculum I found myself not in sync with the aspirations of the guy who took up Computer Science with awe and wonder & (other synonyms). The priorities have changed, drastically to the point that Ace ing / doing well w.r.t  marks didn't even figure in "Top 10 things to do this semester". Even things like watching 'IMDB Top 250'  had a significant higher priority in my silly mind at that point of time than when compared to something  less sophisticated like studying. This was a strange transition for me . Before college , I had found great joy in mugging up the facts and writing these facts in paper and getting good marks. Good marks in a progress report was a significant dopamine triggering event for me back then. 

I even used to thing that this was probably the only thing I am good at , write exams -> Score good marks -> Make parents happy. So the realization that midway in my path to become the greatest CompSci Engineer to have surfaced the planet , path to become yet another engineer --- that I am no more good at something which I was particularly good before was strange. What was even more strange was how i felt about this transition . The fact is  I didn't feel sad or anxious about this, the truth is I had stopped caring about my academics at that point of time. It was as if I had crossed a bridge that took me to somewhere and somehow the bridge was burned to ashes with no way for me to go back and be the guy who I used to be. "Carelessly Carefree", I told to a friend once as how i would describe myself without even knowing what that actually meant.


Orikkal Rajumon ennodu Chodichu DSP enthaanu ennu



DSP over the years have earned many names such as Digital Supplementary Paper , Double Supply Paper et cetra et cetra. Jury is still  not out on what exactly it should be called as but what we have consensus on is the fact that it is  one of the most difficult subjects in the engineering curriculum. And it is placed aptly in a semester where students are looking for reasons to bunk the class. 

6th semester for a typical engineering student is a coming of age period where you have been handled the golden keys to college. The golden key , a metaphorical one gives the students the opportunity to exercise their fine talents in organzing college events as well as gives them ample opportunity to shape up their ego and fighting skills to survive the real world outside. All of us walked with a bit more air in our strides, our imagined self importance outweighed that of others and we celebrated it through laughters, pranks and everything imaginable to show that we are more hipper slash cooler than others. The Limelight of coolness falls on people for different reasons. For people like me it happened by virtue of my incredible laziness. 


The Laziness revolution that was spanwning up and DSP couldn't exist peacefully in my humble mind and naturally I was gravitating more towards you know what. In my defence I did try initially to show some interest in the subject. I knew from the stories of seniors that this is one subject that i probably shouldn't mess around with. So I made extra efforts to come out of my laziness comfort zone and take notes and all that. The first and last notebook that i bought in S6 was for DSP. Yes it did become the notebook for other 5 subjects too , but you must understand that in the front page of the book  were written DSP in capital. I didn't even write my name in the notebook to avoid any future embarassment, but i made it a point to write DSP as big as i can in that front page.Just goes to show you that I had all the intentions of studying this particular subject.


Until some diagrams and Fourier Transform arrived.


Magic Number Theory


Magic Number Theory is a mathematical equation that explains how engineering students especially the ones who have been fortunate to be inducted by CUSAT can find a stable state of entropy with minimum expenditure of effort. 

"45 + 30 = 75"

75 is the magic number that is necessary for moving on to the next level. The most productive way of acquiring this number is by scoring 30 marks for the Internal and 45 marks for the external exams. If you fail to secure the magic number then you would have to go through the ordeal of playing the same level again which is definitely not pleasant. By the time S6 started, I was a firm believer of the magic number theory. I could connect with it more than any other theories that were explained in great detail elsewhere. And also if your internal sinked below 30 then everyone , even people who never talk to you usually will come upto you and will tell you "You are under man"  as if something terrible had just happened to you. Yes something terrible indeed, this means that you would have to make a visit to the Staff Room to meet the same person whom you have been trying to escape from the entire semester.


Sambavaami Hugo Hugo


Scoring 30 marks in internal is not that difficult. A student would only have to do the following things.

[1] Get your attendance marked - This requires one to be inside classroom unfortunately.

[2] Submit Assignments - Copy  passages of gibberish text and images from large textbooks to A4 sheets.

[3] Get something more than single digit mark for series exams - Self Explanatory.

[4] Be nice to the teacher.

What happened to me was that i didn't do any of these things. I really wanted to do #4 , but for doing that the teacher should actually get to see the student in class which din't happen most of the time in my case. So it was a total disaster. 

I received my first sign that a disaster was awaiting me when we were chit chatting with friends and the conversation gradually slipped into internals. Dasan was claiming  that he had figured out the way by which internal marks are calculated and he can accurately predict everyone's internal mark. He often claims to be the expert on many things and i don't believe all of them but this time I was certainly hooked. I wanted him to predict the internal mark that i will receive for DSP. He asked me questions such as  how many classes i had bunked, how many assignments i had submitted and what my series exam marks were.

After thoughtful calculation  Dasan blurted out "16".

"No . That can't happen ", I said to myself.

16 marks for internal is a bad state to be in for any subject. But when the subject is DSP and you have no clue of what it is all about, you are mostly in a Do or Die situation. Since the Laziness revolution was in full swing the odds of me doing something was pretty less. I just hoped that Dasan got his calculation wrong and internal will be definitely better even if i haven't done anything per say for it. Wishful Thinking at its best.


Reality Strikes


When someone told that Internal marks sheet is published for DSP, my heart did skip a beat. I think I must have went with Dennis to go and check it. There was this feeling of something bad going to happen even at that moment. When I found Roll No 23 in the Internal marksheet of DSP, I swear at that moment the only thought that went through my head is "My pursuit for Happiness becoming an engineer ends here". There was nothing beautiful or interesting about the number 11. I have failed big time in following the magic number theory. 

To secure a pass, i would have to score 64 marks in External exam. I have fucked up big time and there is no way I can get out of this. DSP was not the only subject where I was under in 6th semester, there was this other subject called Operating System for which I would have to put some extra effort to secure a pass mark. But I wasn't worried about OS, it is a paper that i can easily bullshit my way through by writing long passages about the complicated and intricate manner in which an Operating System worked purely based on fiction and intution. But DSP is another beast all together - There are diagrams , formulas , problems that actually need to be solved with an expected final result that the teacher's eyes will be searching for. My usual schemes of "transforming the goat to dog" won't work here.


An offer You can't Refuse



As countless other engineering students in my situation have done before , I decided to take the pluge and join my friends in visiting the faculty room and beg for some improvement in internal marks. Initially my pride prevented me from doing this, I am a huge fan of   Mission Impossible scenarios and Napolean's famous quote "Impossible is not a word in my dictionary". However when i measured the facts that were stacked against me, I decided that Mission Impossible is best left for Tom Cruise and probably Napolean needed a better dictionary. 

Me, Dennis and Dasan decided to visit the faculty room to meet our DSP teacher. I will never forget the setting of this moment in life. There were many things that we had in common , but the one thing that connected us more at that moment was the fact that we were all 'under' and had this hope against hope that somehow our teacher would increase the internal marks despite the fact that we were not deserving of such a raise in marks. 

Our DSP Sir was playing Chess on a small board when we reached his desk. He was playing against himself and there weren't much of pieces left on the board. For a moment there I imagined myself as a pawn in that chess game, blocked from any possible moves forward and at the mercy of a bishop who can take me down or not just based on whim. 

Dasan being the most courageous, presented our case. 

Having grown up watching and loving films of Mohanlal, the one thing I could make out clearly was where this talk was going. He was doing an emotional enactment of the scene from Chitram where Mohanalal requests Soman "Enne kollathirunnu koode". Here it was more like 

"B.Tech pass akaan ulla agraham kondu chodikkuva, 

Njangale kollathirunnu koode. 

Onnu mark kooti tharumo."

Dasan's emotional talk certainly did some good. Sir was atleast considering doing something for us. Dennis IIRC had the highest internal marks among three of us and he got the first offer. The offer was that Sir will do a suprise test the very next day and if Dennis does well on it, sir will change the internal marks to 30. Hearing this, Dennis got very excited and asked 

"Okay Sir. Which all portions should i prepare for ?"

The response given by Sir was brilliant and dashed all the excitement Dennis had.

"All the modules in the Syllabus".

All that Dennis could do was say "Ok. sir" and not turn up next day for the suprise test.

I was expecting only more embarassment but sir instead gave me an offer i couldn't refuse. I would have to write answers to 4 previous years question papers and submit that as an assignment. If i do that , sir would improve the marks for me. I rushed back to MH and wrote the fastest assignment i have ever written copying answers from notebooks, textbook and any place i could find them. Sometimes i wrote a previous questions answer again for a question whose answer i didn't knew. I was filling in the pages as fast as I can. I thought back while doing this what if i had done simple things correctly in this semester, the one feeling that was left over was disappointment for this humiliation that i have brought upon myself. 

I entered the faculty room once again, I was alone this time around and sir wasn't playing chess. I gave him my assignment and he glanced through it. I was worried he will find the duplicate answers . Instead he kept the assignment in his palm and tried moved it up and down as if he were weighing it. I was afraid that he will ask me to redo it. He was about to say something and then decided not to.

Sir took a small book , asked my roll number and changed my internal from 11 to 26.

I left the room with mixed emotions of gratitude and sadness.


The Day Before Exam



My real inspiration to do any sort of work in college has been "Last minute panic". Most people were immersed in studies, everyone had a morbid fear of how DSP can screw things up.Finally i got my inspiration kick and  It was only when i decided to study that i realized i don't have a text book or notebook to study from. Someone lent me a copy of an old photostat copy which belonged to a senior whose name i didn't recognize.

Gopi and Pradyoth  had attended tution during the study leave from one of those countless institutes which specializes in teaching subjects like DSP. Having learned some stuff , they were doing the not so typical "overakkal" of being the folks who have studied 2 modules already. I was frustrated and didn't have a clue on  what needs to be done. They called me and taught me something which took me about 2 hours to fully understand. I returned back to  my room  feeling greatful that i had learned atleast something about DSP. My room mate Vinu was panically going through the CUSAT question booklet. On seeing me , he asked me if i have learned anything. I told him that i just learned this particular topic that Pradyoth and Gopi taught me. Vinu stopped me for a moment and he told me he hadn't heard about this particular topic. In a moment of frenzy I searched for the topic in syllabus , i couldn't find it in the syllabus . I think we later found out that the topic was present in the syllabus for ECE and not in CSE.

Bloody AF'ers. 

I didn't want to look up my watch, so much of time has been wasted. I was clueless on what to do and felt uncapable of doing anything. I walked into the room of Aromal and he pointed me to this question which always appears on question paper. It was a question on describing the architecture of some  DSP processor. He adviced me to go and learn about that particular processor. 

I did that and learned some other things too. 


Moral of the Story


I don't believe there are any great insights that we can take away from events in our past. From the point of view of an existentialist , everything is pointless and random. But lessons I wish i learn from these events are

- Don't screw up simple things just because you are lazy.

- Shit Happens. 

- Don't panic when it does.

- Remember they all make interesting and authentic memories which  would make you smile in future.


Sarcastically Yours


Python Meetup and Paul Graham December 23rd, 2014

A kind of momentum is building up , in the sense i get a feeling i am doing lots of different interesting things. It's a good feeling. 


Last Saturday , i gave a lightning talk in Chennai Python user group. The best thing about attending the meetup was that feeling of meeting like minded people and mingling with all of them. It felt  so nice just being there and i am surely going there back again next time.


Here is the link to talk :


I wish i could have presented better, but it was kind of okay . I mean i didn't screw it up and that itself is quite an accomplishment


The next thing i want to talk about is this interview i saw of Paul Graham . I like this guy quite a lot , i have been truly fascinated by his essays - they are just top notch and i think i came across them first when i was in college. This makes me feel like paying a tribute to CEC , it is true that i didn't completely learn any one thing properly while i was there , but i randomly tried out different things just to get a feel how it is and Paul Graham's book 'Hackers and Painters' is i guess one of them. 


The funny thing is I found a hardcover copy again here in a TCS library i think around 1 year back. I started reading , got lazy and pushed it up in the started-not-completed list again. Having seen his interview (shot in 2005) , i feel like reading the book now - I just might complete reading it.


I feel like i have placed all these dots in my life now , these dots are scattered across my past and i am slowly starting to recognize them as my dots and starting to connect , trying to make sense of all that happened and will happen.


Okay about the video , Paul speaks quite a bit about 'hackers' , 'startups ' and all . I seem to understand now why an 'Engineer' is probably not the right term for a programmer. I also watched Paul's talk in Airbnb, apparently Airbnb appeared in scene thanks to YCombinator program spear headed by Paul. And then i followed it up with Mark Zuckerberg being interviewed by Paul for startup school. All these were interesting interviews 


That's the first interview :




Interstellar was one of the most anticipated film of the 2014.  The first trailer that came out made me feel that this is going to be Nolan's most defining work, it was so well made that seeing it once a while became a routine of sorts for me. Even after umpteen number of views, the charm never lost - Everything was perfect about it, the Apollo footage shown, the brilliant background score of Zimmer  and that epic shot of Mathew Macconaughey driving which still remains etched in my mind. And the message shown at the end - One year from now. Yes i was hooked, this film with an ensemble cast was my most anticipated film of the year.

One year was too long a period for me to wait, so i went online trying to dig every small little info i could possibly get about this film.  From various online forums i came to know that movie is based on  a 2008 script which was later reworked on, there was no escaping now from reading the script. On an unusual cold night in Chennai , laying on the terrace beneath the ever puzzling space i took a dive into the script. It didn't matter to me that the reading was on mobile, i just kept on wondering about the scale of this film. The script was brilliant, the scope of the film was massive with many challenges like rich world building. I felt at that moment this film  would go beyond Kubrick's space odyssey and usher a new age in Sci-Fi films.


 Lesson 1 : With Great expecations comes great disappointments.

Mathew McConaughey dons the role of Cooper an Ex NASA pilot who has no option left other than becoming a farmer. In the words of the principal of the school where Coop's daughter Murphy goes to study , we see the great tragedy that the humankind is facing - "We don't need engineer's , we need farmers" he says . The apocalypse of the future world comes in the form of crop diseases, most of the crops have been destroyed by blight and other variants. From a statistical point of view, time is a commodity which is fast slipping from the hour glass of human race.  The grim setting of the film  accentuates the fear in everyone's mind that we might soon become an endangered species, there is no where to run or hide for the people, so much so that they have gone collectively into a delusional form of thinking where humankind's greatest achievements are looked upon. Murph's teacher in a parent meeting with Cooper goes on to extent of saying that Apollo mission never happened and mankind had never visited moon. 

In a world where people believe that everything will be alrighty by going back to oldways of agriculture and simple life, Coop is a misfit. His agony is evident when Coop says "We used to look up at the sky and wonder about our place in the stars. Now we just look down at our place in the dirt" , Mathew McConaughey is brilliant in these portions where he exhibits his vulnerability and helplessness. But the good stuff for the engineer is yet to come when Coop discovers a gravitational anomaly that causes his robot harvesters to misbehave and go haywire. In an ensuing scene , Coop discovers that the 'ghost' which Murph seems to be talking about is the result of this same gravitational anomaly. Coop soon deducts that the anomaly is pointing to the cordinates of a location which we later realizes as secret base for NASA after the government has publicly discredited the space program.

Things happen jet paced after reaching NASA where Dr.Brand (performed by the wonderful Micheal Caine) convinces Coop to join the program as the pilot for a mission which might just save the human race. The mission is to find hospitable planets where humans could migrate to (Plan A) or start over from the beginning at a faraway planet and create a human colony (Plan B) . Anything more that i add here might turn out to be a spoiler, so let me just end it at that.


I really thought that the first half of the film was quite good, there were few plot holes here and there but over all i was very happy with what i had been seeing. I had massive expecations for the second half, which is why i was left disappointed after leaving the cinema halls. I was turned off by how much they have cut down from the original script, maybe that being the reason why i got disappointed. I kept on thinking as to how someone like a Peter Jackson or Alfonso Cuaron could have done more justice to script, No offence mean't here but Nolan has this thing going on about how he tries to reduce the CGI and use practical sets whenever possible (Remember the floating scene in Inception ?) . But this was journey into the cosmos and i thought that the special effects were not right up there. I had read this article in wired on how they had achieved a simulation of black hole with great deal of efforts, but honestly none of the geekiness associated with the simulation translated into a 'wow' effect on screen. 

The conclusion is , this is by no means a bad film but if you had high expectations - You might just be disappointed.

Posted in | Comments(0)»

So this is a book which i read a small portion of . I find the content to be very interesting.

And ML being a subject which i am interested in, i should come back to this when i have time.


Now thinking about it , i am prettty convinced that i should be focussing more on python than any other language going forward. 

Posted in Python | Comments(0)»