Monday, January 4, 2016

North-East earthquake experience on Jan 4, 2016 : The need for the practical education of disaster management

Ah, the second earthquake of my lifetime that I felt. And this one was powerful.

A few facts beforehand, I study in Silchar, and the epicenter of the 6.7 magnitude earthquake was just around 200 km away. That's why, as I said, it was powerful.

I was sleeping in my dorm room, but suddenly my eyes opened. I could feel myself shaking on the bed quite heavily. A distant light also seemed to be moving a lot. Microseconds later, I noticed voice of Pranav, my roomie, shouting of the earthquake, and so was the other roomie.

And I, without any sleepers and coat in this winter time hopelessly ran for the main gate. But is it all?!

No, that's not why I wrote this blog. I wrote it because I chose the worst possible path to escape the building. Had the building fallen, I was certainly going to be badly injured, in worst case, I won't be alive to write all my stupidity.

So, I ran thorough the narrow corridor of atleast 100 meters before reaching the main gate. And that was really too much, plus I didn't even consider that the building might fall.

What I could have done?! Well, firstly I should have waited beneath the table or bed till the earthquake stopped. I rather chose to run, as soon as I got to know it was an earthquake. That was the first stupidity.

Secondly, I ran more than 100 meters to reach the main gate. Guess what?! I have a balcony attached to my room, and my room is on ground floor. The safe zone was at most few meters away from me, but I rather foolishly chose the distant one, and that too this much.

All this made me accept that I am stupid, and foolish, and seriously a hell lot of foolish. But I feel it is good to accept all this and not to repeat the same hurried actions again, rather than repeat all this.

Remember, luck favors the bold !

Further, I noticed after the incident, that most of the students were just like me, stupid and ignorant, whether they accept it or not. This brings to attention the need to provide practical education of disaster management, to one and all.

We, as students, only learned the theory for this, and that too as a secondary subject. Not much importance is given to this subject, mainly to the practical aspects, in India. People sitting in the education ministry should take note of this, and I say all this with the Indian education in primary focus.

Till the next earthquake or any such natural disaster hits me, I would love to know more of what to do before, during and after such events, and I am surely going to know that, learn that, and be prepared, so that even if the luck choose to go against me the next time, I have my knowledge to keep me alive !




Sunday, January 3, 2016

UVA 11340 : Newspaper

 Ah, this question led me to learn new things, strangely.

It is pretty easy to implement this one, but I was getting WA. And then when I went on uDebug, I found this link : http://www.redgreencode.com/solving-uva-11340-in-java/  and I thought may be character encoding/decoding would be the reason I am stuck.

So, I read this article followed by another good article : http://www.joelonsoftware.com/articles/Unicode.html. I really enjoyed reading both of these articles. It's always great to learn something you don't know of, and I certainly didn't knew of unicode and all the stuff.

But alas, I still got a WA even after doing all the implementation corrections as mentioned in the articles. Later, I found out that the reason I am getting WA is because after finding the answer in cents, I was doing something as I have shown in the code uva11340-wrongway.cpp

You see the stupidity I was doing?! Well I was mixing up the strings with floating point values, and that's why all those WAs.

Simply the following has had to be done, as shown in the code uva11340-rightway.cpp!!


See if you have done some silly mistake like that, it was a big lesson that I learned today.


Friday, January 1, 2016

Resolution 2016

I always think of writing my resolution at the start of the year, but never really write it. May be that can be one resolution to do what you want to do.

But no, my resolution is something different. It's not related to what I want to become or anything of that sort, but rather what I want to do.

It's very simple.

I just want to wake up everyday from now on early in the morning, and go for a walk or run, and also not to sleep more than 7 hours on any given day.

Simple, isn't it?!

The adventure is in the next part. To be consistent. Don't miss the "everyday" that I mentioned in my resolution.

That's it. Yeah.

And yes, that's the only resolution I make this time. All the best.

Tuesday, December 22, 2015

Started with my first "real" django project

Django. I first saw it and used it when I went for my internship at IITB in the summer of 2015. I started with it, and learn pieces of info regarding web frameworks, and django. But I couldn't understand much, and after a while the internship came to an end.

Next time I used it when building a basic chat application, but it was too high a level for me, and I miserably failed in that too.

This time I have started with http://www.tangowithdjango.com and I would be making the web application with the design described on the site. This would surely make me sound with django.

So, that's the task at hand. Get, set , go.

Friday, November 27, 2015

Tamasha!!

What a great timing it was! My last end-sem exam ended at 12 at noon, and 2 hours later, I was watching Tamasha ~ 1st day, 2nd show. From the time, I guess 20 days ago or so, that I listened to the songs of the movie, especially "Agar Tum Saath Ho", and watched the movie trailer, I decided that I am going to watch this movie in theater. I was already addicted to a few songs by the time I went to watch the movie.

Although I missed first 2 minutes or so, thanks to the traffic, I enjoyed the movie. And I mean it. I really enjoyed the movie. By the time the movie ended, I guess it was asking its audience what do they want in their life, will they change a little bit after they step outside the hall, would they still continue in a race they don't know anything about, or would they now do what they want to do?

Asking all these questions myself made me uncomfortable for a moment, I should say, but they were worth asking. And no, it was more that a love story, and this statement of mine goes to all the morons who came out of the hall with the words on their lips like ~ "not that a bad was the love story". I wanted to take them back to the theater and make them watch it again.

The movie talks of some deep issues of life that we simply choose to ignore. One that I also mentioned above is our auto-pilot mode. We are just running, running to somewhere, for something, but just that. No idea of why, where, anything!!

Secondly, the movie talks of this ever-demanding society. Everyone wants you to work their way. Behave like they want. Talk like they want. Study like they want. But in this "like they want", we miss ourselves. We miss what we want.

And then as the years pass on, we lose ourselves at some point behind all the masks that we keep wearing. But what when someone comes, and touches the deeper you? You panic, you react in abnormal ways. Because after all, you have forgotten  yourself. Yeah, that's the base theme of the movie.

But after all this, this dialogue of Ranbir Kapoor is to the point ~ "Kahaani to apni hai na, badal dete hai" ( It's our story afterall, let's change it )

And yes, that's what we should do, and that's what the movie ends with. We are running wanting other people to tell our story. But why? Ask yourself what you want your story to be like, and then make that story come true!!

It was a great movie, I loved watching it, and would recommend it to people of all ages.

Tuesday, November 3, 2015

What's so exciting about "The Martian"?

Wait. I am not writing anything of the movie. I haven't watched yet. How can I? Stupid you. This post regarding the book, after facing all the stormy nights, may finally see the light of the day. No, seriously. I delayed it for a month. How more should I? Actually, I guess there is a reason how I ended up reading this book, though I warn you not to laugh.

I was watching the trailer of the movie "The Martian" before my last mid-semester exam. ( Yeah, I do these sort of things only before the exams, the result of which is then reflected in marks ) Anyways, I got so excited or obsessed with it, you can say whatever you want, that I searched all over the torrents for a good quality link of the movie. But couldn't find one. Fatefully, then I came to know that the novel on which this movie is based, is very popular and it has astronomically high ratings. There was no doubt that I was not going to read it.

So, I decided to study smart and hard for my last exam, and read the novel after that. Result? Well, I screwed up that exam in all possible ways. Maybe I didn't really go for the "hard" part. But then as always, I do what I want to. So, I gave myself the excuse that I need some time to relax after such hard times with the exams. Actually, I needed that!!

And guess what, I finished it in no time. I would say that even if you have watched the movie, you should definitely read this. I was laughing, I was kind of thinking of what would happen to me I ever be so alone, and I was putting my brain in all the science stuff in there. I really enjoyed that.

It was like that guy, Andy Weir, was making me laugh with his style of writing. All the puns and jokes of Mark Wattney, even in those difficult times, is something that I am going to relish forever.

This post is more of what I learned from that book, and here are those :


  1. "Things won't go as you plan them to". This is the one thing that happened throughout the novel. And that's what happens in real life too. Mark made a lot of plans on how to survive, NASA made a lot of plans to save Mark, but their plans failed; they failed when no one was expecting them to, they failed in ways that can make one hopeless.

    I think there is a lesson out here, that we will plan of things, that we will plan your life, but at many points in life, things fall apart when we won't be expecting them to. And those are moments that test our character, and define us.

    I won't say stop making plans; make them and implement them with all the energy that you have got but also be prepared if they fail. Don't lose hope, rather look out to find what can be done at the moment just like Mark Wattney did.
  2. The character of Mark Wattney, there is hell of a lot to learn from this guy. His words that make you laugh to death ( watch out for "Iron Man" when reading the book ) , his plan to proceed with things, his determination to be back on his planet, all his sol entries make you fall in love with the character.
  3. Rethinking education, again!!
    While reading this book, I realized that I had more interest reading of hydrazine here than back in my class. Which leads me to the other point, what if we get rid of those old boring useless ( you can fit many more adjectives here ) practicals, and better have things like in the book. I get it the "hydrazine" one was really dangerous, but there were many more examples there in the book, be it finding the direction of dust storm, or making different equipment work, or growing food "where nothing grows", or mathematically estimating things that his life depended on. On mistake here and there, and he was done.

    This all, at least for me, points to one thing. That things taught to us should me more of situation based. It would have been more interesting if my teacher taught how to get hydrogen of hydrazine, and most importantly the risks involved, rather than writing a grand formula on the board with hydrogen as the "residual product".

    I wouldn't have survived there. But why would be I on Mars on the first place. I don't know. Maybe someday I just be there.
  4. Don't stop working on what you believe in. Period.
    When the character of Rich was introduced, I thought how careless this guy is. But who knew that 100 some pages forward, this guy would come as a savior and a few more pages forward, this guy would come as one of the heroes.

    This guy was doing a small side-project when the whole of NASA was working this hard with a single aim to complete the project in hand to save the other guy 140 million miles away.

    Often, we too get busy with the tasks given to us that we think that's the only thing what matters right now. Imagine what if Rich also thought that way. Mark would have been dead.

    I guess it will be against the conventional philosophy when I say that it's not a good idea to give 100 percent to a single thing. Save some 5 percent of yours which you can use to come up with alternatives, or work on the alternatives. Alternatives aren't that bad.

    And yeah, if you have the gut feeling for your solution, go for it. People around you might need it soon.

    But I am not telling you why I called this guy a hero; you better read the book or watch the movie for that, lazy guy!!
  5. An ocean of amazing, practical things yet to learn.
    Oh no, I can't count on my fingers how many of the things I have decided to learn or learnt after reading this novel. I know nothing, I must say and that's very bad when you happen to be a science student.

    But it's okay not to know something. It's far worse to not even try to learn after knowing this fact. One of the many examples would be this: Wattney was moving around Mars from place to place by just calculating the latitude and longitude along the way, and that too in a totally mechanical way, no electronic devices used. And here I am, forget about how would I go on to calculate all this with no device in hand, even my theoretical knowledge of these basic terms were blurry when I came across them reading the novel. And that's the reason learning this is at number one on my list.

    Do you know how to make a bomb? One addition. With a can and sugar and some electricity. I was dumbstruck when they did it, and I was like "seriously"!! Guess what, I am planning to do the same in my dorm room. Don't worry, I will do it in an unmanned way just like they did it in the novel.

    Or do you know how to make two systems that can communicate at a 1 cm distance. Okay, I am not saying that Mark Wattney built a system that can communicate from Mars to Earth. But can you make the system I told you to. I can't. And it's very hard, and kind of sucks to accept that when you happen to be an engineer. So, that makes it top the chart of things I have to learn!!
  6. Engineering hacks are cool.
    Every time I come across any engineering hack, and too related to computers, I am like "I am going to do that". There were many moments like that in the novel. Be it when an image was sent to the crew which was in reality had code embedded it in. Or when Johanssen decoded it by looking at assembly code of the file. Or when the guys at NASA configured a device on Mars (I am yet to get it completely). Guess what, I would be doing these things soon enough!!
  7. Before Mark made any contact with NASA, it felt how lonely it would be. But after he made the contact, and then suddenly lost it, it felt lonelier.

    People matter. I might brag that I am an introvert, that I don't like meeting too many people. But still they matter. A lot. It's with them that we enjoy our moments, learn things, and do things that impact all of us.
  8. People matter. Yeah again. But now I am talking of distributed genius. What all of humanity has built, it has been possible because there were so many enthusiastic people involved who cared about all this.

    Just think how many people at NASA were working day and night just to save one person, Mark Wattney. Countless. And same is the case with everything, every machine that we have built, or every voyage that we have taken in space or on earth for that matter, all the scientific innovations that we read of, all the creativity that entertain us, all of this has been built upon the works of countless number of people.

    So, next time when this thought creeps in your mind that what you are doing, or what you are building wouldn't matter in this world. Grin, and continue with your work. Because it matters now, and it will matter in the future. That's the power of distributed genius, my friend!!
  9. Finally, a point regarding the writer himself. How can someone write such a great, awesome and amazing novel? How?! He did communicate science in a very simple yet fingers-crossed way. And he has further strengthened my belief that it's possible to make science engaging, and he just provided a unique way. Thanks, Andy Weir.  
  10. Last point. Problems come. But so do the solutions if we have the patience and determination, the zeal to find them. 

    Wattney came across a lot, and I mean a hell lot of problems. So, did NASA, and the crew members of the spaceship. But they came up with a solution.

    And when that guy can live on Mars, where it's impossible to live; when that crew can face all adversities that might have left Wattney dead, and still save him; who am I to cry and shout that I can't solve my problems.

    Next time, when I think of something stupid like that, I am going to think of that. And I want you to think of that too!! 

Okay, bye. Finally, the long post has come to an end. Thankfully. Time to go on a new journey!!

Saturday, October 17, 2015

Log Entry : 17/10/2015

Okay, I decided writing logs a few days back but I am starting now. I guess it's much better than tweeting all day around; although I still like tweeting a lot.

So, today I slept a few extra hours, but it was amazing so to see so many dreams. I mean I felt good after I woke up, actually someone else woke me up. I had started playing a game of basketball, and a throw from one of my teammate was there, and I missed it. And then I woke up. But I am going to play basketball in the coming days for it's all holidays around. Atleast I am thinking of that.

Yesterday, I spent most of my time, actually all of it, trying to implement  closest pair of points problem. Right now I suck at implementing C++, note to myself to improve on that. But hey, it felt great after I got my answer for the first time. I played music and sang for the next half an hour. Crazy me!! Although I ma yet to know why the algorithm takes 7 as its limit. I will open up and hopefully close this mystery today only.

Also, I have come up, accidentally only, with a very very great idea to make me remember that I need to do competitive programming. No, I am not going to disclose it unless it becomes successful. But remember Sandeep Maheshwari, he told that to eat less, he made a cut in his plate that said "32". I just did something like that. I also changed the wallpaper of my lappy to the file where I wrote what I need to do today. I am thinking of doing it everyday. Keeps me away from all the hassle of thinking of things that I won't be doing right now, and hindering me in doing things that I am indulged in at the moment.

Other than that, I was just waiting for a meeting. Got delayed by about half an hour. So, I thought why not write my first log entry. Yeah, and here it is.