An amateur’s views on politics

It’s the election season here in India. A few states have already voted and the others would be voting soon. For the past few months there has been a heavy political atmosphere around!  It’d be hard to find a news story which isn’t centered on politics. Obviously this is a good thing , with people getting enough information about the various political parties and their agendas, they can make an all round decision about whom they should vote for.  And then, who can deny the so called “Modi wave” ?! Most of the hype around politics and elections has been centered on Modi. If you happen to watch a debate on some news channel, chances are, the topic is Modi-centric. The PR team of BJP/Modi has indeed done a really good job of projecting him as India’s savior,a person who will tackle all persistent issues like economic development, bureaucratic/political corruption and the likes.

 

I really haven’t been that into the issue of politics. Sure , I’m aware of  most of the things happening around , because I read the newspapers and articles/opinions on the internet. But I don’t staunchly support any political organization/personality, because I haven’t really pinned my hopes on any of them. A few months back, during the India Against Corruption campaign, I did feel good about the issues being raised . When AAP was formed , it did signify some hope. The party seemed to be successful in shifting people’s attention to the fundamental issues and signaled a new form of politics, a clean one. Similar sentiments were probably  being echoed in a lot of people’s minds(especially urban youth?) and this was confirmed when AAP had a surprising victory at the Delhi state elections. But then, the events after that, when Kejriwal was in power were really disappointing right up till he resigned , and all that drama in between.

So yeah, that’s that. I’ve been a passive observer of the political scene, without really being active in anything. And this is the first time, I’m voicing my opinion on anything political.  I never really felt a strong urge to voice it, because there are so many other issues in life (coding , academics , college being on the top of the list) that have a higher priority for me.

 

So anyway, yesterday I happened to watch the debate, ‘We The People’ on NDTV. It was about the communal politics of the BJP/Modi,  the sensitive history behind Modi , the threat to secularism and various such issues. Half of the panelists were of the opinion that the violent past should be forgotten and the country must move on, and concentrate on more real issues like development. And the other half felt that a person, like Modi, with such right-wing views and a bloody past, was a threat to the country and the democratic ideals upon which it is based. You cannot just forget the deaths and the massacre of so many people that happened when this man was in power in Gujurat, and focus on development. The development factor itself has been controversial, with a lot of people claiming that Modi hasn’t been extraordinary at that. Other states like Maharashtra have seen similar or better development. But the development issue was secondary yesterday, it was mostly about secularism/communal-ism. The major points were that , Modi in power, would mean heightened censorship ,  less freedom of thought, and especially no protection of the minority (Muslims) against communal forces.  And is it morally right for us to elect a man as PM, when he has been involved in such a carnage?

 

The points raised were important and they needed to be thought upon. So yesterday , after the show, I decided to  look up  the 2002 Godhra violence in more detail and fill in gaps in my knowledge about the event. One of the panelists in yesterday’s debate was Nandita Das, a renowned actress and social activist. She has directed a film ‘Firaaq’ , set a month after the violent event. I saw it on Youtube , and saw another documentary titled ‘Final Solution‘ examining in detail the atrocities committed during the riots, and the factors behind it. I read a few articles on various websites too. I also read up about the origins of RSS ( Modi was in the RSS before joining the BJP) and all of this led me in succession to reading about Gandhiji’s death and the assassin’s views on why he did it. Here is a detailed article , which are actually Godse’s actual court transcripts explaining his philosophy and the motives behind the action. Godse himself was an RSS member, and a strong crusader for the Hindu cause.

According to what I’ve read, hear is what I’ve gauged from all of this. I urge everyone to look up this matter, as a lot of information is available on the web. Quite a lot of it seems biased, and there’s really no shade of black and white here. There is no good/bad side . Its just dirty politics played on the issues of religion by everyone involved. Reading second hand accounts about everything, there is a possibility that my views too are unintentionally biased. So obviously, don’t agree to everything that I’ve said, think for yourself.

The main issue that started all of this, was the Godhra train burning . This was a train returning from Ayodhya(the site of the Ram temple/Babri Masjid conflict), with most of the travelers being Hindu pilgrims. This led to widespread outrage and sparked communal feelings. The RSS , VHP, BJP and other saffron parties claimed that this was an attack by the Muslims on the Hindu religion(the train had a lot of RSS members inside)  and called for avenging the lives of the people that died. This was the start of the horrible carnage that killed thousands of people(most of them Muslim, 790 is the official figure). The carnage went on for weeks, and it is believed that the government(Modi was the CM of Gujurat during this event) didn’t do enough to stop it. A lot of people rather say that the administrative machinery was an active part of this, and actually helped the rioters. There was widespread violence, rape, grave crimes(butchering of bodies in inhumane ways) committed, by both sides. One side did something , the other retaliated. But Hindu’s being the majority in Gujurat, the minorities suffered more. There is one incident about the killing of Congress MP, Ehsan Jafri . It happened in an area called the Gulbarg society, which was mostly filled with Muslim population . A large mob gathered  here with swords, knives, petrol cans and other weapons to kill everyone present here. The community, scared of the happenings, gathered at the MP’s house thinking that his house would be spared as he’d have contacts in the higher departments. Jafri made several calls to various people , including Modi, and top Congress leaders but to no avail. No one could do anything, and no help arrived from the police(in-spite of police assurances earlier that day). The whole area was burned, men killed and woman raped in horrifying ways. Jafri was taken outside the house, and hacked to death by the mob. And this is just one incident, out of the thousands.

Yes, maybe this man wasn’t clean and sacred. Maybe , I’m just looking at one side of the story and there’s more to it. But reading all these events just scares you! Such uncontrolled violence is just unthinkable by anyone, be it of any religion. And its the government’s responsibility to stop such misshapennings , right after they originate and help contain the violence before it erupts and the mob mentality spreads all over!

To this day, it has not been found , who actually sparked the fires on the train. There have been various committee’s examining and inquiring it and all of them have given different verdicts. Many experts too have studied the incident, and views have been conflicting. Some believe , it was the saffron elements themselves(RSS/VHP/BJP) who burned the train to create the entire issue. Some say , it was the Muslims who did it. And some say , the train fire was an accident caused by no one in particular. There have been numerous arrests made, but no straight conclusions.

Whatever caused the fire, the Hindu parties claimed it was the Muslims, and added oil to the flames of the extremely sensitive issue. It was a perfect issue to communalise and it formed the BJP’s election campaign(or it probably was based on it from the start, and this just helped strengthen it)! The BJP , which includes the RSS/VHP/Bajrang Dal and other saffron parties, have Hinduism as their main agenda. Their main responsibility is to strengthen the Hindu voice, and prevent its downfall. To spread Hinduism as far as possible. If anyone tries to harm the Hindu religion in anyway possible, they will face harmful repercussions. There’s a lot more to this philosophy and I don’t claim to know the least bit of it. And on the outset, there’s no reason to condemn these principles . Some people love their religion and are willing to to support such organizations, some are religious but don’t support them and some don’t follow the concept of religion(or rather religion-exploitation) .  You are in a democracy and you’re allowed to have your own opinion. But that doesn’t mean you start killing in the name of religion!  Maybe,  such similar crimes have been committed by Muslims on Hindus and hence the retaliation. And after reading about pre-independence years, I certainly think such incidents have happened in large numbers with Muslim perpetrators. That was the reason why right-wing nationalist leaders created organization like the RSS, to protect Hindu interests. Muslim appeasement(Gandhiji agreeing to the partition of India), inspite of violence and atrocities by Muslims, was the major reason why there was hate against Gandhiji and is the reason why he was shot. The politics of Gandhiji, his principles, and his place in the Indian freedom struggle is a huge debatable issue in itself , that I cannot talk about here. But it is closely related to the formation of Saffron organizations, and the Hindi-Muslim dispute. It was all started then, by the divide-and-rule policy of the British, that was just fodder for malevolent forces inside both communities to feed on. Right wing organizations like RSS are an answer to the violence of the  extremist Muslim elements. Its all a vicious cycle, one starts an issue on communal grounds, the other retaliates in a harsher way and the vicious cycle goes on. This is probably the major issue that has been haunting India after independence . The exploitation of religion!  The pre-independence riots, formation of Pakistan, the 1992 Ayodhya(Babri Masjid demolition) riots, the Mumbai bomb blasts, the Gujurat riots, and so many of the other events in between these and so many events after these! The issue is still very ripe and does get exploited again and again. The recent UP Muzaffarnagar riots is again, a different form of the same fundamental issues! Indian politics is dirty, its not just BJP, its the other parties too.

What is pathetic in these clashes is that its usually the innocents who have to suffer. People who have no involvement in anything! Because of the wrongdoings of a few, the whole community has got to suffer. This is one of the main reasons why I dislike religion. Religion has probably caused more violence than any other issue in the world.  Rather religion exploitation, or whatever. People blindly follow their faith, and are taught to not question anything. No rational reasoning, whatsoever. With people so devout about anything religious, its so easy to manipulate religious sentiments! That is what these organizations exploit! The weak mindedness(or close mindedness) of the individuals who aren’t capable of reasoning for themselves the effects of the actions that they’re performing! Brainwashing is the word probably. Religion practiced in a clean way isn’t a least bit harmful, but its too easy to exploit religion and cause hatred and enmity among the religions.

 

And this is what most people fear/dislike the most about the BJP, and Narendra Modi. What if such an event occurs again ? What if the people who are supposed to protect the nation, stand still and watch the fire spread over the nation? Worst, what if they themselves organize and spread it? Will the innocent un-involved minorities have to face all that  that has happened before, again, now on a wider scale ?  Or, have the BJP and Modi changed all their fundamental philosophies for the better of the nation?

 

Modi , in spite of being cleared by the Supreme Court of India, still has a lot of evidence against him. Even if one were to believe Modi is not guilty, maybe he could’ve done a lot more for stopping the riots! It can be seen that he still isn’t as accepting of the minorities, and they still fear him. Modi , being raised in the RSS, also has strong opinions of good/bad and of morality/immorality . Will his government, including the leaders from VHP/RSS , who will surely be given some posts , be tolerant of things that are different from their traditions/values?  I don’t want to be scared in the future that I’ve written out my opinions in a blog post that looks at violence / (or other sensitive issues) in a neutral light, and that criticizes some points which I don’t agree with.  That is why freedom of speech matters! I want to express such thoughts when I feel like, in the future too. Be it about anything. I don’t want alcohol to be banned all over India. People must be able to choose, in which things they want to indulge in, and they can choose for themselves as rational thinking adults.

 

If all such issues are tackled by Modi in a positive way, I’d surely support him. Being a strong personality, he would have the ability to bring order in the country about things like corruption. Development  would also be addressed, if his Gujurat model is as successful as the BJP claims it to be. As for me,  I personally do not think that he’s the messiah people make him to be. People have just pinned too many of their hopes on him. Communal claims aside, he seems to be a strong leader, and I’d of course be happy if he does all things right.  But, are others all around me, thinking about all these things before voting for Modi ? Or are they just blindly following the wave around and unquestioningly casting their vote?  Absence of another strong candidate to vote for is another issue which makes things complicated!  We’d choose the lesser of the evils probably.

 

I just hope things stay stable and calm , whoever is in power. As for me, I doubt my life is going to be any different a year later!

 

 

 

Of hating assignments and Breaking the Bad!

I have just finished copying the last flowchart of a program for my Programming Lab Journal.  Its the assignment submission time in our college, the time during which we waste about 3 or 4 days gathering data from classmates, photocopying their journals, and then spend hours moving our pens and pencils on paper illogically writing words and drawing patterns like a brain dead zombie. Its an exercise in futility.  Its dull and stupid. Its pathetic enough to be added to the list of reasons that make me feel sad for joining this college. The music helps kill some of the boredom. The teachers would also share the same feelings while correcting them, most of them just ticking through pages and signing at the end of an assignment. Which brings me to the question, why is all this even happening? Its a complete waste of time, and it definitely does not help the student actually learn anything, and the teachers know that. But, tradition demands it, and it will continue. The only beneficiary I can see here is the guy running the printout/Xerox shop. I was so bored yesterday, that I actually had a conspiracy theory that there was some kind of a deal between the University and the local Xerox guys!

I wish the college would rather give us good assignment problems at the end of each week after the practical sessions , and set a deadline, so that the students would actually “think” on their own and come up with solutions rather than just refer to a textbook and copy all the theory for that assignment. Obviously, this isn’t going to happen, perhaps for various reasons which I don’t really want to express right now .

I had to find a way out of this dull task, so yesterday I decided to take a break and complete Breaking Bad. I’d completed Season 5 Part 1 the week before, so there were only 7 or 8 episodes more to watch as this was the last season. And I saw them all yesterday. The show is amazingly addictive. Once you start watching, you can’t stop. I’ve few of these marathons, so I’ve completed the whole show in an amazingly few number of sessions!

Hiesenberg

Breaking Bad is an amazing show. Its unique,for it is dark and completely unpredictable! It does not paint a rosy picture for any character in the show. That is one of the main factors that makes it special. The protagonist goes from being this weak, timid chemistry teacher to this bad-ass, immoral and ruthless meth cook and then again into a caring, loving and rightful guy! The show does not define what is good, and what is bad. It is upto you to decide that. And most of the decisions here cannot be defined by those 2 words, there’s a lot more to it. If you compare the first few episodes and the last few ones(or better, the first few episodes of the last season),  they are completely out of sync! You wouldn’t believe they are the same characters, doing whatever they are doing! Finally, according to me, Breaking Bad was about the love Walt had for his family. He wanted his family to have the best possible life , and during the whole show his end motives were clear. ‘Its all for the family.’  This goes on blinding Walt from everything else, and drags him on to the other side of morality! He becomes ruthless, violent, careless about everyone and everything apart from his family . He justifies every wrong move and goes further into the void.  And in the end, all the dirt he has piled up finally comes down on him. You jump from these different phases as the show progresses: feeling sorry for Walt, enjoying his descent into the dark,  feeling great at him killing the bad guys, realizing his bent vision of morality, despising the extreme turn of events he plans, absolutely hating him for destroying things relentlessly which meant a lot to him, becoming greedy and then in the end, again sympathizing with the character after he gets some of his old self back. In the end, you have these mixed feelings of liking and hating  Walt, because he has done so many terrible and wrong things, but then he only has good intentions in the end, and this powerful sentence that comes to life in the end, takes back most of the hate off him.

Its all for the family. 

The last episode is somewhat unlike the series though, it is not as dark as the series and somewhat predictable. It treads away from the dark path which you’ve so gotten used to. But maybe I would have not liked  the series as much, had Walt died as a bad guy. The last episode reiterates the show’s initial moral ground, which makes it a kinda happy  end. A great show, and definitely the best among the ones I’ve seen. Its got drama, emotions, violence and comedy! It is absolutely hilarious at times, especially Saul Goodman and Jesse Pinkman. Those one liners from Saul :D . ‘Better Call Saul’ is going to be fun to watch :P  Gus was one awesome bad guy! I felt bad for Hank and Mike! Bryan Cranston, Aaron Paul, Saul Goodman and Anna Gunn each surely deserve a few awards for their brilliant acting! And obviously, Vince Gilligan. What a show he’s created!

As Gilligan himself puts it,

In an interview with The New York Times, creator Vince Gilligan said the larger lesson of the series is that “actions have consequences”.He elaborated on the show’s philosophy:

If religion is a reaction of man, and nothing more, it seems to me that it represents a human desire for wrongdoers to be punished. I hate the idea of Idi Amin living in Saudi Arabia for the last 25 years of his life. That galls me to no end. I feel some sort of need for Biblical atonement, or justice, or something. I like to believe there is some comeuppance, that karma kicks in at some point, even if it takes years or decades to happen. My girlfriend says this great thing that’s become my philosophy as well. ‘I want to believe there’s a heaven. But I can’t not believe there’s a hell.

Now I’ll be waiting impatiently for the next seasons of Game of Thrones, and House of Cards. And right now sadly I’m going to need to get back and complete a few more assignments.

The Parking Puzzle

Its been about 2 months since I finished my driving lessons, and I’ve been driving occasionally ever since. So now, I feel quite comfortable driving a car. But ever since my first ride, there has always been this event which puzzles me: Parking the car back into my narrow society parking!

Actually my parking is a rectangular spot squeezed tightly in between obstructions, and this makes it quite hard to get into. So I always need to go a little past the spot, and then reverse the car back into the parking! This figure explains the process(I hope it does explain the point I’m making :| )

Reversing in!

Reversing in!

The society entrance is towards the right, the black outline indicates the road and the blue arrows indicate the direction of movement of the car. So as drawn, I enter from the right, go ahead till the darkened blue dot and then reverse the car into the parking(which is the lower rectangular block) . The blue outline traces the movement of the rear wheels as the car goes back.

Yeah, none of the above seems confusing, right? It isn’t. What I’m puzzled about is, whenever I try to get the car front first into the parking, it just doesn’t fit in. If it does, you need to do a lot of reversing in between. It happens after 5 6 reverse attempts., and its just too tedious.  Reversing is a bit tedious, but very manageable as compared to the other alternative.

But while removing the car out of the parking the next time I drive it, it doesn’t take too many efforts. And that is exactly what puzzles me! If If I can get the car out of the parking perfectly, why can’t I get it in perfectly using the same path? Why do I always have to do a reverse-park?

Path for going out!

Path for going out!

The blue outline now indicates the direction of movement of the front wheels. The black arrow explains my puzzle graphically, if going out is possible why isn’t going in plausible? Notice that I’ve written ‘indicates direction of movement of wheels’ above and avoided ‘indicates direction of movement of car’. Why have I done this? You’ll know ahead. If you’re able to answer that you will know the explanation to this puzzle!

Today being a Sunday and the only free day of the week (only people from PICT will know the insane/absurd attendance requirements here) I had lots of free time. So after having breakfast and spending an hour reading the newspaper, I was browsing Quora. It always helps me pass time and not feel guilty about it. You can always console yourself by saying “These hours I spent browsing Quora, they wern’t a waste of time. I learned loads of things!”(Is that true? Idk. :s) As I was navigating through the content, I stumbled upon this amazing answer on Quora. And thus the puzzle had again come back to life!  I decided that I had to find the reason today. So after spending hours reading about differentials, steering, Steering Geometry and a lot more, I finally managed to decrypt the puzzle :D

I’ll try to explain it in the simplest way possible. Try to read that Quora link above, the animation in that answer reveals a lot of things. Here is  the crux of everything I read today :

All 4 wheels of the car rotate at different speeds and at different angles while turning

Think on this for a while. Visualize navigating a turn. The inner wheels navigate a shorter path than the outer wheels.

This means that the inner wheels move at a slower speed than the outer ones, as in the same time they need to cover a shorter distance. This is the reason we have the differential on the axle of the wheels! The main purpose of the differential is to distribute the engine torque suitably so as to move the outer wheel at a faster rate as compared to the inner one!

What is surprising though is that the front wheels and the rear wheels do not follow the same path on turns! And this is the reason why I’ve used ‘denotes direction of movement of wheels’ above. Because the movement of the car is not important, the paths of the rear and front wheels is important!

This is the animation that cleared things for me:

Moving in a circle!

You can observe that the radius of the circlular ring of the front wheels will always be bigger than that of the rear wheels!

Which brings us to the answer of the puzzle:

The parking Puzzle decoded

The parking Puzzle decoded

In the above figure, I’ve drawn the movement of the car as it moves out of the parking. The 4 dark dots denote the 4 wheels, and the dotted rectangle is the outline of the car. The initial position of the car is inside the lower rectangular block which is the parking. As I just mentioned above, the front and rear wheels travel different circles. The blue ring is the extended path of the rear wheels and the black ring is the extended path of the front wheels. The point ‘O’ denotes the center of that circular turn. It is visible from the diagram that the black ring is bigger in area than the blue ring.

Observe the second dotted position of the car. This is where the car will move out of its prior circular path and will be steered to the left , indicated by the 2nd darkened arrow.

Now, if we wanted to drive in through the same path,  we would need to somehow place the front wheels on the black ring and rear wheels on the blue ring! But while coming into the society it will be difficult to find such a spot which places the wheels on the appropriate rings. Diagrammatically, it seems possible that such a spot exists just before entering the parking.  But its hard to say where exactly it lies, as the figure is a rough free-hand approximation. Even if it’s there, finding it would be really hard when actually driving! This basically means that the path for going in and out is not symmetric as the circles have to match perfectly for that!  Which is the reason why reverse-parking is way less tedious!

I don’t know if I’ve managed to explain things properly, that’s the best I could come up with. It feels good to analyze this successfully and finally know the reason! It was not at all intuitive!

If you find anything wrong with my concept and/or explanation, feel free to comment below.

Looking back at my first year at Pune Institute of Computer Technology

Last week, I officially cleared my first year of engineering with a distinction.  Seeing the incoming FE batch in college, we knew our results were near. Not that I was waiting eagerly for them, I just needed an assurance that I’ve cleared all my semester 2 subjects. I was especially fearful of my Electronics(BXE) marks, for which I had literally borrowed the book from a senior 3 or 4 days before the exam, and my Basic Mechanical Engineering(BME) marks. I just hated BME, it was way too theoretical apart from the unit on Thermodynamics. Types of levers, pulleys, cranks and what not! It was like Chemistry was back to trouble me,  just in a different form. All you needed to do was to rote the local text book and you’re done(No offense to the guys who liked BME , but the first few units were just rote. Actually that can be generalized for nearly all Pune University subjects).

And my semester was further worsened by the fact that I spent the last 1 and a half month preparing for BITSAT. Yeah, I thought I would crack BITSAT in under a month. I managed to gather this whole lot of motivation, and I got all my JEE preparation books out. All those fat dreaded books. Looking back, its seriously an achievement that I even managed to work my ass off seriously for a month. The motivation actually came after I cleared the JEE Mains(yeah I’d enrolled for a whole lot of exams) without studying anything! It was quite motivational, that moment when I saw I’d cleared the exam. But frankly it was too late, just a month before BITSAT. Even then, I decided to give it a go. I seriously solved almost 60-70% of AIEEE topic-wise past year problems, read loads of topics from HCV 1,2. Made notes of about 7 or 8 chemistry topics. I’d never made these many chem notes last year. All this gave me some hope. A faint hope that I might just clear BITSAT. After nearly a year of no contact with those topics and books, I managed to cover quite a lot in this time frame. I feel pretty good about it actually. Maybe someday it could help motivate me.

Anyway, during my university exam, I had to go to Goa as I got BITS Goa as my BITSAT center. Eventually , I managed to score a few more marks at BITSAT than last year(near about 250) and that got me nowhere. I was quite disappointed, but then I avoided feeling depressed by being happy about scoring better than last year in so less time. I have no idea(not exactly, but lets ignore chemistry for now) how I managed to royally screw up last year’s BITSAT so much, that I managed to beat that score with just 1 month of preparation. So anyway, the conclusion: I probably just wasted these one and a half months. I don’t say wasted because I feel bad about not studying for my university. That wouldn’t have happened anyway. But I did lose 2 months which I would have better used for coding. Before preparation of BITSAT, it was coding , the whole time. Coding is way too addictive.

So after reading that description, you must have got an idea as to why I dreaded semester 2 subjects like those two I mentioned. Memory_based_subjects + No_study == Horrible_Combo. So eagerly opening up the .pdf document from the web, I quickly found myself in the ‘ALL CLEAR’ list. That was a HUGE relief! Later we got our marks, BXE I scored 65/100 and BME 44/100. I passed BME with a margin of 4 marks . And I’d fared pretty good in the other subjects , so I did manage a 70% average of both semesters. Nothing great, but considering the circumstances, I’m way too happy. Its making me feel less bad about wasting those 2 months. I would probably have scored 80%(if I’d studied, that is). Frankly I don’t really think a 70 or 80 does a difference, you get a distinction anyway!

Looking back at the year, it went pretty good actually. I got introduced to programming exactly a year back, and I’m quite passionate about it. Apart from college hours, which were sometimes horrible due to the compulsory attendance thing , the first year seemed pretty chilled out. The difficulty of the exams was not at all hard. Managing a distinction studying a week before exams is easily manageable(Provided your 11th 12th concepts are clear). And you can do this even after having fun. I did things that I hadn’t done till now( were they illegal? Lets not get into that) .  A lot of new experiences.

Oh, and I managed to do a lot of coding. A lot! A year back I did not know even a single syntax of C or C++ or Java or any programming language other than VB taught in school before the 10th grade. And today, I’m probably better than most, if not all students in my department. A strong passion really helps big time. You can go hours doing a thing without even realizing how time has passed. You can forget food, television, mobile , even sleep. And practice makes you better, the more you do it.  So its not that you need some kind of genius to get awesome at coding, you just need practice and passion. You get better eventually.

So in a way, the lower difficulty of FE actually helped a lot. You have an opportunity to use all of that free time for things that you’re gonna learn ahead!(or you could use ALL of that time to chill out, smoke up, party, watch movies and/or sitcoms all day,etc. its your choice and you’re gonna face the consequences someday! I say ALL in bold because I used some of my time for some of those things too. Maybe 10% in quantitative terms. But most of that free time was put to good use. ) The current programming subjects in college feel really easy. Where people have difficulty understanding a simple syntax in class, I manage to dry run the entire program in my mind.  Actually , more than 95% of my batch mates struggle with programming. 60 – 70 % have an extremely hard time. The main reason, in my opinion for this is their lack of passion in the field itself. And without giving effort, you just cannot program well. And to give effort, you need to concentrate a lot. Programming is not something you can learn by rote. Its a whole lot like mathematics,there are just a few rules and its all about arranging and manipulating those rules according to the situation. That’s what I love about Computer Science, its pure logic. You either understand it, or you don’t. Learning huge chunks of code would just not help. The codes are way too huge and too many.

And what do I have to say about my college? Way too strict, even more than my school. Compulsory attendance is just a stupid concept that does no good whatsoever. Half of the teachers cannot teach. In the second year, more than half of the teachers cannot teach. University of Pune exams are way too shitty. Local books are shitty too, but they get full retard during the Second Year. Never go full retard. I’m yet to face my first exam in the second year, but I’m sincerely hoping that the professors don’t expect the answers from the local books. I might just fail then. Most students are not interested about their field. Most don’t care about things being taught. Few are quite interested and they get along well. Our Fundamentals of Data Structures professor is quite awesome. Our Discrete Structures prof. is also good. I think we deserve more of such faculty. But 80%+ of the class doesn’t take interest even in these lectures, so sometimes I feel I’m at the wrong place.  I really hope more passionate people take CS/IT in the coming years at PICT.

So what do I plan to do ahead, by the end of this year? Loads of things. Actually I’ve barely scratched the surface of this field. I’m assuming passionate people from IIIT/IIT or other premier institutions who’ve had exposure to programming in their 11th/12th , must be way ahead. In my college itself there are a couple of immediate seniors who are way more experienced. That actually helps,  you get a bit of motivation to do more!  The things I plan to do before I write a similar post next year:

  1. Complete a couple of courses on Coursera. I’m currently in my fourth week on the Stanford Course “Introduction to Algorithms”. I really want to complete this course with a distinction grade.
  2. Understand all of Discrete Math and Computer Organization properly. Try completing the reference books. I’m really inclined towards these subjects apart from Programming.
  3. Learn more of C. Be familiar with every chapter of Kernighan and Ritchie C Programming Book. Get exposed and acquainted with all major algorithms.
  4. Contribute to open source projects that use C by the end of this year. This kinda leads to the next point.
  5. Try getting into Google Summer Of Code ’14. This is like one of the major targets.
  6. Learn Python in detail.
  7. Get back to Competitive Programming. Prepare for ACM ICPC ’14. I need to find time for this, at the moment I’m way too occupied.
  8. Know Linux in detail.
  9. This is somewhat optional,  score a distinction in the second year exams.
  10. Learn front-end + back-end web development.
  11. Try finding my main area of interest(for further studies and or research/job opportunities possibly?)
  12. Complete season 3, 4, 5, 6 of Mad Men. Mad Men is  way way way too awesome. Start Season 1 of Breaking Bad.
  13. If there’s any time left, learn to play the guitar.

That list is way too long , and I hope I manage at least 10 of those things. I’ll maybe check this blog post often to keep a tab on these. And to anyone reading this, who’s from a Tier-2 university(read local college) , please stop depending on the local books/notes and study the reference books properly. Else you’re not gonna remember any of the learnt stuff after your sem end exams!

Enough of rant about the past year. All in all, I’m pretty satisfied with 2012-13. Lets hope I’m even more satisfied with 2013-14.

*Note: Please ignore grammatical errors, my English isn’t all that awesome.

The Road Leading to Google Code Jam 2013

I’m blogging after a long time today. Actually, life hasn’t been anything out of the ordinary for me,to write something about it(at least apart from the personal things in life, which I wouldn’t like to share).  The annual Google coding competition, Google Code Jam , took place last week and I had planned on participating, for the first time. So this post is going to be a gist of the significant events, since I started coding up to this point.

So, let me first explain what exactly Code Jam is all about.  According to wiki,

Google Code Jam is an international programming competition hosted and administered by Google. The competition began in 2003 as a means to identify top engineering talent for potential employment at Google. The competition consists of a set of algorithmic problems which must be solved in a fixed amount of time.

Who’s eligible?

This Contest is open to individuals who are 18 years of age or older as of August 8, 2013.

Which means, I just fit in. Now, lets examine the actual details of the contest.

Image

Code Jam is divided into different rounds, and in each round there are eliminations, based on your rank and/or the points you’ve scored. The round which took place last week, was the Qualification Round.  This round consisted of a set of 4 problems, each of which had 2/3 data sets(think of a problem with partial marking, the small dataset is an easier subset of the main problem and the big dataset is a harder subset).  The small dataset gave you 10 points for a correct submission, while the large one gave you 35/45/60 points, based on the problem you’re solving. The round was on for 24 hours. A score of 35+ is needed to qualify for the next round. There are a total of about 4 rounds(the next one is the first round, this was kinda the 0th round) and if you achieve a rank < 1000, in the 2nd round,you get a t-shirt from Google and some bigger prizes depending on your rank. The top rankers get huge cash prizes(1st rank = 15000 $)

Since this was my first ever serious coding competition, the goal I had in mind, was to try my best to score more than 35 points, which means solve 2-3 problems correctly. I’d solved a couple of past year problems before, and they seemed quite hard for a beginner ,especially when it has been less than a year since you wrote a C program for “Hello World!”. 

The contest was to begin at 4:30 am IST. I was up at 3:30 in the morning(I slept at 8 the previous night :P), because I had my college physics prelim exam at 10:30 am,  and I hadn’t even searched for my text book yet. So after brushing ,while sipping coffee I decided to check my mobile for any impending notifications. And there it was, a mail from Google, received the previous night :

Hello Nishad94,

We hope you’re ready: the Qualification Round for Google Code Jam 2013 starts in under 24 hours.

And that pretty much was the end of my search for the Physics text book, and my earlier purpose of studying for my exams. I immediately switched on my laptop, and headed straight to the website. So I was solving my first problem by 5 am. And I was getting it. That was a huge morale boost. In about 45 minutes , I’d coded the solution, and I submitted it to the Google server.  And there was the response, in green, Correct!  I’d gained the first 10 points. And the thing is , there are real time stats on the screen(Observe the left most panel in the screenshot below). So my rank, which was 16k(the competition had just started, so only a few people were in at 5am,overall there were 45k competitors this year) suddenly rose to 8k. My morale went up like crazy.

Image

By 9 am, I’d abandoned the thought of getting up from my PC, let alone going to college and giving the exam :P (I don’t really care about my University results) . By 10:30 , I’d scored 40 points, and I’d qualified :D . Yet, I wanted to see the best I can do, so I continued till late evening. Yeah, evening. The last problem was really hard, and only 329 contestants had got it right. I wanted to crack it. But , I couldn’t. So , having exhausted my mind out of its limits, I stopped with a final score of 85. But I later found out, my 35 point solution to a problem, was slightly wrong. So in the end, the next day , my final score was 50 points, and my rank was 12142. Had my score been 85, my rank would have been < 6000. Nonetheless, I was really happy.

Lets look at the contest analysis by Google for GCJ ’13 :

Google Code Jam 2013 is off and running! We have 17059 advancers out of 21962 people who correctly solved at least one input, and 45754 registrants. All those numbers are records for us!

We started with Tomek’s variation on a game for children , and then quickly delved into the riddles of lawnmowers, palindromes, and pirates. Overall, it was a pretty tough set this year, with problem D in particular being something that could have been a Finals problem.

It was tougher than before, and I’d managed to get through :D . Here at some interesting region wise statistics:  (figures to the right indicate total participants, and the left indicate the people who qualified):

USA              2057     2093                       CHINA    2100   2386                           INDIA      2943    4109

These were the top 3 countries in terms of number of people who participated. And my India rank is around 1732 . And the people I know who’ve qualified are a year elder to me. Knowing that you’re better than most of your peers in such a short span of time, does give you quite an emotional high :P . So overall, GCJ was great, and I exceeded my expectations. The next round is in 10 days, and its going to be of 2 hours and 30 minutes. And its going to be real hard, as hard as the last problem in the qualifiers.

After this nice result, I have been really motivated to practice harder and much more seriously. Let me tell you the story till now:

I’ve always been passionate about computers and mathematics. That is the reason I’m doing engineering. I had dreams of getting into IIIT Hyderabad, last year. I’m in PICT. Needless to say, I screwed up bad in the competitive exams. Thing is I can go on for hours doing a thing I’m interested in, but I just cannot spend even an hour’s worth of time on something I’m utterly uninterested in. And morally I justify that point in my mind, so I can’t even get myself to do things that are easily achievable and which have a huge benefit in certain situations.  Last year, that was chemistry. It is the reason for the whole screw up. Anyway, I’m not going to rant more about it, as doing that won’t change things. So , if we subtract the average time a student spends on chemistry from his total schedule, we get quite a few hours. I had quite a lot of such hours, which I spent doing mathematics. So, I have a pretty good base in math. And, its safe to say , I’m comfortable and confident with it. Its been my favorite subject since chuldhood. Thus , when I entered my engineering course less than a year back, I knew I could handle the mathematics part of computer science well. And , from what I know, most of CS is based  on mathematics. Its very math intense. I have been an active member IEEE member in my college, and have attended loads of seminars, workshops,etc and all of this introduced me to programming. Thus , I immediately began coding, in the 2nd or 3rd week of college. It started with a basic book on C , getting acquainted with the basics of the language. I really liked the problem assignments in the book . And PICT, being a computer institute, had a lot of people who were interested in programming. So there was a lot of discussion, and the motivation and passion to code kept on increasing. After getting comfortable with the basics, after two or three weeks, I parallely started solving problems from Codechef. Its an Indian competitive programming website, with monthly contests.( I recommend anyone who’s interested, to register there and solve those problems) .

Programming resonates perfectly with my interest of mathematics. All that I needed to know, was whether I can code well. Whether I can get as good at it as I’m comfortable with mathematics. And now, I can finally say, yeah I can code at that level. I’m quite at comfort with it.  Now, I need to get perfect at it. What I take an hour to code right now, must happen in under 10 minutes. I need to express code as good as I express English. At the same time, I need to learn a hell lot of mathematics . By mathematics, I mean algorithms. You need to have them at the back of your mind. I should be able to code a quick sort or a merge sort in no time at all, without giving it too much of thought. And this will all take loads of hours of practice. A single algorithm, could take hours to digest. A hard problem, usually requires more than an hour to get right. It can even take 5 or 6 hours. (Which means, I lose out on my college grades. But then, gladly it doesn’t matter to me. Maybe , most people judge you on the basis of your marks, but do you really need to care about the opinion of others?) But the great thing is , I love doing it. Which means, I wont ever get tired and frustrated about it. So obviously, the next thing I have in mind, is to score big in the next ACM-ICPC , that’s the IIT-JEE-equivalent of the programming world . I have a year’s time to do that. Hopefully, I’ll be good at it. Oh, and one more added benefit, and this one is huge, software biggies like Google, Facebook are always on the lookout for this specific set of people. Google specifically started this competition, to hire top talent. (same with Facebook Hacker Cup,another similar competition with the same motive)Thats the big thing , you code for passion, and getting a job out of it would be a by-product of it. It should not be the other way round. Getting a high pay should not be the very reason you code, it won’t get you too far without frustrating the hell out of you. 

Plus, if you’re doing this, the courses in college won’t seem boring and/or hard. You’ll actually be applying practically what you learn. So if you’re passionate about it, and at the time of reading this, you haven’t yet started coding seriously, what are you waiting for? Start now.

Here are a few resources for those who are interested:

Codechef : A good place to practice problems, and compete in contests.

USACO Training Pages: Detailed structured course for training student for the International Informatics Olympiad. I just started it , and it seems pretty good.

Coursera : Loads of courses you can enroll in.

Installing Ubuntu 12.10 and fixing some frustrating startup problems

ubuntu

Decided to use some Linux distro(distro is a Linux-based OS like Ubuntu, Fedora,etc) as we have it in our syllabus right now , as well as for future developement/coding. I chose Ubuntu for the simple reason of it being the most popular Linux distribution, which meant greater probability of a certain OS related problem being solved quicker. So i headed straight to the Ubuntu website to download the OS.

My first problem was that I chose to download the latest Ubuntu 12.10 without thinking about any consequences. If you haven’t installed Ubuntu, please go with Ubuntu 12.04 LTS and NOT the latest version. LTS stands for Long Term Support(usually 5 year cycle) . The Ubuntu version with the LTS tag recieve constant support for 5 years and are considered stable by the community. The latest versions have not been adopted for a long time by a large userbase, hence fall into a lot of problems and huge number of bugs are reported.

I did not know any of this 2 weeks back. Thus I innocently downloaded the iso file from the website. Then I created a Live Linux USB(to get the app for creating this usb, search on google for this term), put the iso on it using an app. A Live USB is a substitute for a traditional Live CD, which is basically a bootable disc from which you install your new OS. After creation of the LiveUSB, you restart your PC, and go into the BIOS. (keep pressing F10 or some other function key[varies for different brands] at startup). Out there, change boot priority to the USB instead of HDD. Then it’ll boot from the USB, and further setup is easy.

After successful installation of the OS, I felt extremely happy as it was a quick installation, a lot faster than Windows.  After a succesfull session(install updates asap), I shut down my laptop. The next day, I started the laptop, chose Ubuntu in the GRUB(bootloader for Ubuntu, the menu where you choose which OS to load) . But then, the purple Ubuntu load screen appeared, flicked a couple of times, and stayed purple. It refused to boot up to the Unity desktop interface(Ubuntu uses Unity 3D interface, there are a lot others available). Luckily I had a seperate laptop, so I started searching the web for solution to the problem.

But the problem was, I did not know what was exactly causing this. So before, I had to know what was happening. After searching for various issues for a week , I tried various unsuccessful and temporary fixes, which did not solve the problem . Today I finally found the solution, and my laptop has booted successfully for the past 4 – 5 sessions.

So if you get a similar problem, here’s the fix that worked for me.

After we choose Ubuntu as the OS to load, the necessary video drivers are loaded by Ubuntu. If the loading of these drivers is unsuccessful for some reason, it results into the OS being stuck on the purple boot screen, also called the Purple Screen of Death(in analogy with the Windows Blue Screen of Death[BSOD]). So the basic problem , is with the video card drivers. To solve this, we need to edit the GRUB config file.

1. To do this temporarily, press ‘e’ at the boot menu(OS loading menu, the GRUB menu). Then erase the words “quiet splash” from the 2nd last line. These words tell the OS to hide the text interface while startup is on, and show the purple splash menu instead. After erasing them, type this there :

set gfxpayload=text

,save and proceed for startup.

The ‘gfxpayload=text’ disables loading of video drivers at the startup screen, and displays plain text instead. After Unity 3D is loaded, the video drivers are loaded.

2. To make these changes in the GRUB config file permenant, we need to do this through the terminal. Type the following in the terminal :

gksudo gedit /etc/default/grub

This opens the GRUB config file in the text editor. In this change this command to :

GRUB_CMDLINE_LINUX_DEFAULT=”set gfxpayload=text”

3. After this , go below this, ans search for grub_gfxmode and change it to your screen resolution. My laptop res is 1366*768. :

#GRUB_GFXMODE=1366×768

Save and exit. Then type:

sudo update-grub

in the terminal and restart. Check to see if the problem has been fixed.

Thus I wasted a huge amount of time and effort trying to solve my boot problem. The way to avoid all this would be to go for the latest LTS release, which at this point is the Ubuntu 12.04 LTS release.

Brain: The Basis of You , Your Sub-conscience and Everything

It is what separates me from you. It is the brain , which gives meaning to the world around you. You are your brain and your brain is you.

We are what we are because of our brains. Each one of us is born with the same brain . What I mean by that is , we all have the same construct of the brain. The billions of neurons inside my brain are similar to the billions of neurons inside yours. So the natural question that arises is, why is everyone so different? Why is everyone unique? Why do I perceive and judge things in a different way compared to others?

I had these and several more such questions troubling me since a long time, so I’ve been reading about psychology and cognitive science and how the brain works. After all this time, I have a simple and basic picture of how our brains work to do certain tasks. So in this post, I’ll try to explain what I’ve come to know, in a simple manner.

To answer these questions at a primary level, we need to look at how our brain functions. Inside the brain, we have billions of neurons. According to Wiki, a neuron is an electrically – excitable cell that processes and transmits information through electrical and chemical signals. A chemical signal occurs via a ‘Synapse’ , which is a connection with another cell. Neurons connect to each other, to form ‘Neural Networks’. Neural Networks are basically pathways for a signal to flow . These neurons and neural networks are the core components of the ‘Nervous System’ .

Whenever any task has to be done, certain neurons are triggered and signals flow out of them. These are what are called synapses. Synapses can either be chemical or electrical. In an electrical synapse, the signal(or pulse) is transferred through voltage differences between the successive neurons , and in this way the pulse is passed from one neuron to another neuron or several other neurons. A chemical synapses is the transfer of signal through actual transplant of chemicals like Calcium ions between neurons. So for a certain task, a specific neural network is activated.

So lets say I touch a hot object, my hands sense this through a change of pressure on the affected part. This leads to a faster heartbeat , and in a certain more complex way this message reaches the nervous system. Then the neuron connected to touch would be activated and trigger a certain neural pathway connecting this neuron to several others. These include the neurons that involve past experiences and prior knowledge of danger and harm . These in turn will activate more neurons that will tell the brain that the hand is actually hurting , and it needs to be moved . So thus a neural pathway involving all sensory organs is activated and I finally move my hand away.

Another interesting thing , is the perception of colour (A discussion with friends got this topic into my head). Colour is not real. It is a construct of our minds. Animals percieve colour in different ways. You and I probably conceive colour in a different way. Colour is basically interpretation of our brain of different wavelengths of light. All this again happens due to trigger of various neurons that eventually builds up a network and we give that pattern a certain name .

Thus everything in our brain is the work of neurons. This helps us to look into our questions. What separates each one of us is not how are brains are created different, but how our pulses or signals flow between neurons. We can think of each one of us, having the same ‘hardware’ but running different ‘software’.

Our thoughts, perceptions, way of thinking, memories , dreams are all different. When we ‘think’, we actually are activating different neurons to form unique ‘pathways’, i.e neural networks. Our way of thinking , is our pattern of activating the neurons to create meaningful  output. This is what makes each of us different. This way of thinking is different for everyone, and as we grow up the pattern takes shape based on past experiences , our memories. When a memory is stored, what basically happens, is the neural pathway for that task is being stored. I know there’s danger in touching a hot object, because sometime before I’ve touched something hot and have got hurt. During this task, a certain neural network had been activated, a certain path for synapses had been created. A memory has been stored. I’ve stored the pathway, and hence whenever I touch a hot object again, this pathway is instantly activated. My brain has told my body to respond in a certain way .

Thus thoughts and perceptions are just patterns of neuron activation. Thoughts are random because everything around us stimulates us and everything makes us trigger different neurons. But a lot of patterns are random and hold no further value and hence are discarded. But certain patterns are interesting or helpful and are stored. Memories are stored patterns.

When we dream, one interpretation is that, memories are being stored. The neural pathways are being ‘hard-wired’ in our sleep. Hence usually dreams are based on what has happened during the day, mixed with certain experiences of the past.

Our ‘way of thinking’, our sub-conscience is our root pattern of neural flow , being enhanced with our daily experiences and insights.

Everyone has been through different experiences since he or she has been born. Thus the patterns that we all have built in our minds , are all different. These patterns separate us as individuals. Based on prior experiences, our minds have been shaped differently . This has given each one us different insights , different interests, different ambitions ,different personalities. This has made us different from each other. This has made each one of us unique in our own way.

What I’ve written here, is meant to be an introduction to how our minds work. The topics of consciousness, thinking, dreams , neural networks and a thousand more sub topics involving our brains and us in general are immensely interesting. They are far from understood and probably will never be understood. But reading about them helps you understand yourself in a better way, and it helps you make sense of why , what is happening, is happening .My interest in all this , has been growing as I dwell deeper into it.

If one day we’re able to understand all of this completely, we may be able to create the smartest , human-like ‘Artificial Intelligence’ systems that are able to create and develop these neural pathways , probably electronic neural networks that work on voltage gradients,  and such an artificial electronic fully developed ‘brain’ would be able to control an ‘electro-mechanical body’ to work like an actual human being.

Such a thing , would take decades or probably never happen because the brain is an enormously complex organ and it will take a huge amount of information processing before we even think of ways of creating such a system and sustaining it.