Sunday, October 16, 2016

Waiting!


I really enjoyed watching this movie Waiting last night. It has something in it which most of us ignore.

If I am asked to summarize the message of this movie in a few sentences, it would go on something like this. Anything can happen in your life at any point of time. You might not accept it, but there is a good chance that someday something very bad will happen. You will be helpless. You will curse others for they have not felt your situation. But life moves on, and so should you!

If you ever face a situation where things are not in your hands, say just like in the movie, a very near one of you has met with an accident, crying doesn't help. Ofcourse, I agree it is easier said that done! But Naseeruddin Shah coveys it concisely - "However bad the situation may be, three things should never stop - eating, sleeping and bathing."

The movie also touches upon the issue of quality of life. And the opinion varies greatly, both in the movie and in real life. I am of the opinion that no one except the victim should have the right to decide what quality of life he wants to live.

But what if the affected person himself is depressed? I guess the doctor in charge should take over the rights. But how come we decide when shouold this be done. What if the quality of life for that person has really gone downhill just like it was depicted in Guzaarish? Conflicting!

I would love to hear your opinions in the comments!

..

While writing all this, two people and their quotes did cross my mind. And I guess quoting those down would be better than attempting to put it down in my own words.

Stephen Hawking has this great line in the end of the movie The Theory of Everything - "There should be no boundaries to human endeavor. We are all different. However bad life may seem, there is always something you can do, and succeed at. While there's life, there is hope."

This person has always been my inspiration. You ask, why? Read the lines in the previous para again. If this person whose quality of life worsened so much, could show this level of optimism, there should and must never be any point in my life where I should be sad or depressed about something bad going on with me!

Saturday, October 15, 2016

Lakes in Berland : Why coding your solution is a good idea?


I write about my solutions to the coding competition problems only for myself. For the problems that stretched my mind a little more. To bring myself a clarity of thought of what i did in the code. To understand my mistakes. Do not read it unless you have really nothing else to do in this awesome universe!

The question : Lakes in Berland. As simple as it could it be. I guess it didn't take me more than 10 minutes to figure out how to solve it. But there awaits the demon. The one everyone talks of. The implementation.

There is a reason why great programmers ask to code your solution. Because just knowing the solution isn't enough! And that is what happened in my case.

It took me quite a good long time, almost a day to get to a working solution! And no, it wasn't anything hard to code. It just reflects my weakness in implementing a solution.

..

While coding the solution, I was noting down all the mistakes that I did, due to which my test cases failed. Here they are in a proper format just to make myself realize my fallacies, and why I need to think a little more before submitting my solution all over again.

MIstake #0 : It took a lot of time to implement the dfs, and the lines of code that I wrote was way more than for the accepted code in C++; always a red signal.

Mistake #2 : I made a very big mistake as my code was allowing the non-starting vertices to be on the border, had to refactor my code to find the connected components!

Wednesday, October 12, 2016

Polycarp At The Radio - Importance of maths in programming!

Many people argue among themselves whether maths is important or not, when it comes to programming. I don't indulge in these arguments, neither this post is going to do anything similar.

But recently I tried to solve a problem which made me realize the importance of mathematical intuition when it comes to programming.

I started to solve this problem on Codeforces, Polycarp At the Radio, and hit sort of a dead end for more than a day.  But something got me hooked to this question. There was nothing special about it. No difficult algorithm tags. And still I was finding it difficult to code.

But I went on to code what I thought to be a good enough code to pass all the test cases. And no, I just didn't start monkey-typing on my keyboard. Yet the end result was around 200 lines of python code, with a lot of comments and debugging statements hidden within it.

And it doesn't stop there. My code still failed on a test case I knew of, I wasn't sure if there still exist other test cases it might fail upon, and just when things seemed to make sense, I realized I had no idea in hell or heaven how to change my code to pass this particular test case.

..

Finally, I gave up, and read the tutorial given for the same. And I just couldn't express how beautiful the solution is. So simple, so intuitive. I can't even say it to be mathematical. But something definitely mathematically intuitive.

And the code was just 40 lines long, with complete surety that it will work for all the test cases, whatever it may be! And this is why, my boy, mathematical intuition is important in programming.

I am linking a github gist here, containing both the buggy and the correct codes, to show how complex a program can get because of the lack of simple mathematical intuition.

Just give this puzzle a try before you hop on to another post of someone else! :)



Sunday, August 7, 2016

Sunday Times : Finally watched "The Intern"


Another week flew by, although this one would have its own place in my memory lane for a good long time. Reason? The week started off with me getting placed in a super-dream company. Yes, I am placed, and yes, it's hard for me too to believe that. It's hard to believe that I have a full year with me, with the chance to do whatever, seriously whatever I want to do with it.

To be honest, when I was sitting for this company, I wasn't even serious, because I didn't believe I could qualify their requirements. But with every step, I got lucky, and at the end, I was one of those who were selected by the company. Want to hear something better? I am just one of 5 who have been selected for this company, including Pranav and Sourav.

The next two days then just passed by, in celebration. I am in still in disbelief, really!

And finally, by the time Sunday arrived, I was thankfully once again clear with my head, and with what I want to do in the next few weeks. And yes, although I am not used to enjoy an entire day doing things I love, I would be certainly doing this more boldly from the next time.

And this is an irony. I can easily go on to waste the entire days of mine, but it's hard to enjoy the same. But one thing that I have realised with time is it's very important to find time for yourself, and I chose Sundays for the same.


----------


And finally, I watched the movie "The Intern" on the Sunday evening. This movie was on my wait list from the time it arrived in October last year, and finally it felt really great to watch it.

Ben was a real inspiration in the movie. So old, and yet so energetic. Definitely, I would be someone like him. It takes lifetime experience to become a person like him. But the truth is most of us are like Jules. Confused of our abilities, short on time, and trying our best to manage work-life balance.

The movie has many learning embedded in it including but not limited to "believe in yourself", "the importance of real-life conversations", and "take time for yourself". The last one is something I talked of, a few paragraphs above.

It also talks of one thing that I haven't said till yet, and that is the importance of senior people in our life. However advanced we get in technology, we will always be short of experience that they have. And I am not saying we should take all their advice, but what I am trying to say is we shouldn't just simply ignore them. They have a value of their own.

And yes, nothing beats real-life conversations. It's your way out to everything. To create bonds, to maintain them. Maybe we are getting away from this as our world is getting digitized and we race for everything, but we still have time to get on track. Hope that some of us do, including me!

But the core of the movie is to believe in oneself. In the words of Ben, if you can start a company on your own and grow it from 40 employees or so, to 250 something, you can also go on to manage the same. So, just believe, that you can.

And yeah, now I also know why men should carry handkerchief.

I would end this post with a very motivating quote I read today - "If you don't prioritize your life, someone else will".

Goodbye. See you all next week!

Wednesday, June 29, 2016

Learning the open source way at dgplug!


I still remember a first-year college student who, in 2014, somehow got to know of dgplug through Quora, and just jumped on the ship.

I still have that post that I wrote that time just like this one! https://thisisashwanipandey.blogspot.in/2014/07/my-experience-with-dgplug-summer.html

But I couldn't attend more than 5-6 sessions as I had to go to college then, and I was using chatzilla, and I got stuck with proxy problems. And that was a very big problem for that kid. I tried it a few times, but by then a lot had already happened in the training sessions. I have to leave it then!

Fast forward 2 years, and here you see the same boy writing this post while determined enough to not leave in between this time whatsoever!  And yes, to learn a lot more this time.

..

Regarding the current session going on, I got to have a virtual session with one core python developer, and I got to know about rst, bash and sphinx. I already was a little bit familiar with rst, but sphinx and bash are totally new and cool things for me. I would be reading and learning more about them as many related things are not yet clear to me!

Many other things did happen too in the sessions, and you can read about them at the link that I gave at the very starting.

..

I am really excited to see and learn the upcoming things in the training session. If all this excite you too, do join us at dglpug. And a big thanks to the dgplug team, who take out their precious time to teach others all this exciting stuff.



Sunday, June 19, 2016

No more Quora for the rest of the rest of the year, and a few more stuff !


I discovered Quora sometime in 2013, and from then till now, I have been highly active on it. Not in the sense of writing many answers, but reading loads of them!

But recently, I didn't really like my feed which was full of life experience related questions. And plus even if I unfollow that topic, I am not really interested in knowing how to learn X, or the resources for something.

For the past few months, the only people whose answers I have reading thoroughly are Balaji Viswanathan and Richard Muller. That's it.

I am not interested in knowing how to get started in open source development or competitive programming, or what life lessons have you learnt, or your most embarrassing moment. Damn, I am not even interested in random facts.

As of now, I am more interested in learning novel facts, and I realised I would get more of it by reading some awesome books. So, the rest of the year would be full of books. The one I am reading right now is "The Little Schemer".

So, does that mean I am going to sacrifice the great articles by Balaji. Not at all. I have started using feedly for the same, to read from time to time, the contents of my favourite blogs.

So, this was all with Quora. See you next year!


...

Now for the second part of the title - "a few more stuff". Basically, this is about my final decision to post all my writings on Blogger only.

In the past few months, I have tried a lot of things, including a blog on Quora, a wordpress blog, one on Medium, and so on.

But it's just not possible to maintain all of them. And since I was able to fix the problem of commenting on Blogger with Disqus, and it happened to be the major problem that forced me to look for other option, I am only going to write here from now on. No more mirrors!

As for the concern of followers, I don't yet write something that anyone would like to follow. And if anyone wants to follow this blog, one can just follow by email as per the option given on the main blog page, or with feedly.

I mainly write for myself. And for people, who might someday land on and like this unknown part of the web! :)

Bye!




Monday, June 13, 2016

Why you should not study CSE at NIT Silchar?


One reason!

Because it's awful when it comes to academics!

Now before the alumni and present students of NITS jump on to post some hateful comment, I just want to make it clear that all I am talking about here is related to academics and the quality of faculty, nothing else.

I do agree that NITS has got pretty good infrastructure, it is getting better every year when it comes to placements, or any other thing you can come up with in favour of NITS.

And if you are going to college just to get a job, or "enjoy your life", I will say that you go anywhere, it doesn't really matter.

But if you are dreaming of learning something in CSE, NITS is really a bad choice to be! You are not going to learn anything.

Only one or two faculty in the CSE department do have Phd, and the rest just go on to take random subjects every semester, and teach first few chapters of the course, and anyone can complete the entire course the night before the exam. Yeah, it sucks that much.

I can surely go on to rant of the professors targeting them one by one, but presently being a student in college, that would do more harm to me than anyone else. But I promise you I will do that once I get out of here.

To those who are attacking me with the argument that same is the case with all the institutes, you are wrong buddy.

If you, the one reading this, happens to be applying to colleges, follow this advice, and you can verify this by talking to some good seniors of yours. So here it is :


  • If you are having the option to select NIT Silchar, I am assuming you have a very good rank in JEE-Mains or AIEEE, whatever you call it, if you are coming from other state.

    Look out for a few private colleges. I mean, seriously. I am not joking. When you are just out of high school, most of us just care about the IIT or NIT tag. Trust me, it doesn't matter even a bit.

    I can't give you a list of all colleges, but colleges like DAIICT, BITS Hyderabad, Thapar University, Anna University are way better than government college like NITS.

    You might not have heard these names, so you might be feeling I am talking shit but I am not. And as I said, you can also talk with some "good" ( focus on the word ) seniors of yours.

  • Don't give too much priority to NITs. A few of them are awesome but the rest of them sucks.
    I have met students from NIT Allahabad, NIT Delhi, NIT trichy, NIT Warrangal, and NIT Surathkal, and all of them were awesome at their domains. I can't say anything about the rest.

    I might have forgotten to name a few good NITs. Ping me if that's the case.

Make your choices wisely. I learnt quite many a things in NITS, but not a single thing from any of the professors ( actually it's a shame to even call them a prof ! ). I learnt mainly from a few friends and seniors of mine, and thankfully "outside-the-classroom" learning opportunities that I got.

But well, one can get these "outside-the-classroom" learning opportunities in other colleges too. Why risk your academics?