Tuesday, July 7, 2015

What did I do in my Eklavya summer internship at IITB ?

Right now, I am in the train, having befriended one ma'am who happen to be a lyricist and a script-writer. Can you imagine she knows seven different languages, and guess what? This is after leaving behind English and Hindi. Well, after this I was thinking how many languages do I know. Zero, damn sure. Okay, I also know other a lot of other languages. The only difference is I write code in them.

And yeah I am finally going back to home. So, I woke up this morning, and couldn't think of anything better than writing this post which is an answer to a question that I have been asking myself for quite a few days now that whether my choice to join the Eklavya internship at IITB was right.

I don't know. I have no answer. Or may be I do have a lot of answers, or bits of those answers. I would like to collect and freeze those bits here and now forever.

First question : Did I really learn something in IITB ?
Well, the answer depends on what is your definition of learning. If you are like me, having spent quite a few years now solving logical questions on paper, then I must agree that many a times I did feel what a bullshit and mundane sort of work I was doing. Many a times. Once I even thought of leaving my internship midway. But I didn't. I don't know why.

But now I will say I did learn many a things, some about others and a lot about me at each of physical, mental and spiritual level, as James Altucher always puts it.

So, breaking all the suspense surrounding the title, let's talk from the start.

When I first came here, there were presentations regarding various projects, and I took the project named "Big Data and Analytics". Later I will tell you whether my decision to take such a project with sucha big name was good or not.

But after the project selection, we spent the next week in the lab tying to learn these things, because we were told that later there will be a test in the weekend on topics of Python, Java, MySQL, Django, and Javascript.

Alas, I knew only one thing there : Python.

Okay, no lies. I knew Java and MySQL too, but not that much.

So, I spent that week learning Django from their own documentation. And I was kind of feeling great because I was playing around with web frameworks for the first time, although I had no idea what I was doing.

Finally arrived the day of the test. And guess what I got around 60 percent. Actually 59.57. Otherwise they wouldn't have asked me for a retest. And yeah, I failed in Javascript. I got around 10 percent, I guess. But no shame. I was not alone there. Plus, you couldn't expect from me to learn all this in a week.

But I did complete my Django tutorials there. It felt good.

Then the project that I chose, I hope you do remember "Big ..", there were subprojects within it. I chose "Study and Integration of edx Insights". So, was it a good choice ? There is no right answer here, but yeah, we got to interact with Phatak sir more than any other group. Actually most of the other groups didn't get to interact with him other than on initial and final days. It was always inspiring to listen to him, when he used to tell us what are his thoughts on different things, or when he would share a story of his life with us. It was always great to listen to him, and everyone would want to listen more from him. At least I did. Don't get jealous now.

But pausing here for a moment, I would say that one important thing that I learnt here is how one should select their project based on presentations only. Why so ? Because I made judgemental errors, not once but many a times. May be one learns from their mistakes only.

Then, in one of our interactions with Phatak sir, he gave us the assignment to find out the necessary code changes to get a particular feature in the edx. Ah, the problem was that the code was 250,000 lines or more. I never counted. Everyone just says this number.

So, the next week, I remember, 15 students none of whom ever looked at this amount of code, spent their time trying to figure out how to get this feature. And finally we did find it out. At least we thought so. We never tested it. Who was going to install edx on his local machine. But it was a proud feeling to tell Phatak sir that we had completed the assignment, and our efforts were appreciated.

No other group got to study this much amount of code, other than the LTI group.

Then we started on with our real project. It's then I realised that my project was not of writing code, but there is code already there, actually four different pieces of them doing different jobs. Our task was to study it and then integrate them so as to make them work together. I got to realise that it's not all about writing code but also there are many many other aspects related to a product development.

But I didn't know what to do. It's then when we started with hadoop and hdfs. I remember one of my friends doing such things in college only. I couldn't understand what he was doing then. I do understand it now. Although I did only basic tasks with Hadoop and MapReduce, it has given me enough confidence and excitement to continue playing around with it. I did played a little bit there, and I will continue with it for sure.

One more thing I did learn or should I say relearn here is to stick with the one thing that you are doing. You will benefit. Actually there has been a lot of changes in my learning patterns in the last few years. And one thing I am learning now is this. Stick around and play with one thing, and complete whatever you have decided before moving on to the other thing.

While we were doing this, one day a meeting was called and Phatak sir told us that for the next 10 days or so, our project has been changed and we will working on making SRS as well as user documentation for the blended MOOCs. It was a fun time doing that, learning about hierarchical database design. Since I still didn't have the database design course, it was all new for me, and I enjoyed it.

Once it was completed, we were back to our project. But then one day our mentors came and told us that a new group is being formed for the blended MOOCs development, and asked us whether we would like to shift to this another group.

This is where I feel that I made a mistake. I should have moved to that new group. I realised this once the work started in that group. It's not like I didn't work in my group. But there work was more of development, and I do agree for once I did feel bad. They did learn Django development. It's not like I didn't. I also did, and I continue to do. But the difference may be they did learn it while working on a real project.

But still it's okay. Sometimes you do make bad decisions. It's part of life. It makes you understand how to make better decisions. How to better analyse a situation. I feel I got better at this thing too.

A few days after that we got to know that our group mentor has been changed. There I think that those mentors related with Eklavya internship should decide their projects clearly beforehand. I guess it was a lot of mess, and not just for me, but for many other groups.

So earlier we were working with Tushar sir, Mitali ma'am, and Aditi ma'am. It was nice working with them. But then we moved to the group of Shukla Nag ma'am. Our first task was to convert their data cleaning code written as Java Servlets to python scripts. Huh, I can't tell you what a boring task it was.

I would like to add one more thing here that I was really lucky to get friends who were very good. I can tell you with the example of Sagar. It's because of him that the two of us could complete the code conversion. Had I been alone, forget that it would have been completed.

So, this internship was not just about learning from doing the project. It was learning from your friends too. I can say I learnt a lot from them. I learnt about UNIX, and at least I have got a start there. Plus, I did learn about completing things while learning on the way only.

So, the code conversion thing. We were talking about that. Yeah, it would seem boring to you, and it was in fact. But it made me, once again, read a large amount of code, and understand it thanks to the lack of documentation of this code. I learnt about JSON, and how to use it with python, something otherwise I only heard of, or read about on Quora.

Then I did wrote a few R scripts for visualisation purposes. Yeah, I did that too. It was fun doing that. And I also learnt a fair amount of R while doing it. But then, I didn't stay doing this for long.

I was moved again for the testing of the python scripts that we have written. I would say that I now prefer using a debugger, rather than writing a lot of print statements cluttering around in my code. So, I still don't know how to call R scripts with python, but I will learn that too. It should not be that hard, given that I got the opportunity to read that code and play around.

And while doing all this, I never realised that I was in the last week of my internship. It was time to go home, but I guess there was more to happen. So, then everyone was assigned to do their part of documentation and while doing so, I did learn a little bit of LaTex too. Hurray, I am going to make my CV in that only.

It should have ended then only with the documentation ready. But the last day before the presentation, ma'am said that she wanted the dashboard to be similar to that of insights, but it was not. She wanted someone to work on the required jQuery and JavaScript. Remember I failed in this only. And so I along with two of my friends was trying to do something that I had no idea of how to do.

Initially I felt like better to leave, but by the time it was midnight, I was enjoying doing this too. By the time it was 5 in the morning, I wanted to complete this and didn't want to leave, although we had reached halfway only till then, and the presentation was that day only.

So, we left and went for the sleep. So, do I know JavaScript now ? No, not at all. I will still fail on an exam like that. It's just that I have never used it before, but since now I did and I enjoyed doing this, I may later go on to play around with it. I guess that's how we start with anything. When I had basketball in my hands for the first time, I played too bad, but two years after that, I was playing fair enough, if not good enough. Same thing with chess, or the code that I wrote for the first time in my life in BASIC, or the my very first PowerPoint presentation.

But since I enjoyed my time while doing these things, I became better and then sometimes good enough. The same may happen with JavaScript too. Who knows, I don't.

But that day later in the noon, the presentation went well. And came to an end the internship.

So, was it good? I don't know. I felt good after writing this. What do you feel like after reading this? That may be your answer.


Saturday, June 27, 2015

Saturday, January 10, 2015

the half-open door..

Awakened from his deep sleep
lied on the bed, on the ball;
with eyelids shut, body still
dwelled in his soul, invisible to all
an impression, a face,
a face now gone!

This unknown and newborn absence
punching him
as if waves hitting the rocks,
wide opened those sad eyes;

all around, desolate and bereft
with just memories left;
was peeking into the room, the daylight
permeating the dark dearth
through that door, the half-open door!

the door left in this state,
may be in some hurry
but to him, a mark, a token
supplementing the bitter fact, in vain!

Standing tall, remorseful
for not waving a good bye,
realized that gone with his friend
are those scolding and surprises
that he got attached with;

Reaching for the door,
remembered the friend,
who edified him to an extent
no one ever did before
in his long past, coming to the fore;

hard to accept the exclusion,
harder to bear the exclusion
for more was to be done,
for more could have been done!

But time was gone, like always
splashing cold water on his face
but putting him in unusual case
awakening him to his mistake

as if shouting to its loudest
as if whispering to the deepest
"Beat your hard luck
with harder work"

ever, he might not meet
his friend, his roomie,
the rav boosting him
with some magical, infinite fuel,
the stimulus being his imagination

driving inside him,
a regard, a high esteem,
for those soft and harsh ways,
for that smart and amazing sense,
for those mesmerizing and funny acts

with this vista and with a vow,
a vow to meet that face somehow
in some cold morning, somewhere
in some city, from nowhere;

to manifest the image,
not that of a douchebag again
but that of a mind inquisitive;
left the room, did he
through that door, the half-open door!

Tuesday, November 25, 2014

Code to generate all possible combinations of balanced parentheses (equal to Catalan number) using recursion

Earlier, I thought that Catalan numbers were limited to my CS lab assignment only, but when I searched for it and looked for further details of it on wiki, I was fascinated by its applications in mathematics. I would write about it later when I understand those concepts to make it clear for others.

But right now, I am writing this post because I got an assignment in my DS lab and they wanted me to do this : given a number n,  print all the possible combinations of balanced parentheses, the total number of which would be ( for now, let us assume mysteriously ) equal to  the Catalan number, and yeah that too using recursion.

Here, n represents pairs of parentheses.
For example, n=1  =>  ()
                       n=2  =>  () ()

I hope this makes the question a bit clear before going for the code part.


I searched for the program on the net after spending a few hours on it, but to no rescue. Every single code here was using an explicit stack. So, I decided that I would post once I code it, and see here I am. I would like to explain the code, and would surely do it someday. But, for now I am just pasting the code so that, if in any confusion or problem, you can have a look at it, and if someone is truly interested, can also understand it. I would update it with the explanation part in the near future. Till then, have fun time breaking the code and building your own!!


                                           

#include<stdio.h>
#include<string.h>
int flag=0;    // I needed this, you will understand this if you go through the program

int balanced(char *a, int n, int i, int count1, int count2);
void catalan(char *a, int n, int i, char ch);

int main()
{
printf("how many pair of parentheses do you want : ");
int n;
scanf("%d",&n);
n=n*2;

char a[n];

catalan(a,n,0,'(');       // calling the Catalan function
return 0;
}


int balanced(char *a, int n, int i, int count1, int count2)
{
       // in this function, I am checking whether the generated pair is balanced or not
      //i assigned -1 to '(' and +1 to ')'
   
      if(i<n)
      { 
          if(*(a+i)=='(')
          {
               count1++;
               return  -1 + balanced(a,n,++i,count1,count2);
          }
else if(*(a+i)==')')
{
count2++;
               // if closing braces are more, it can never be balanced, and there we need a global variable
if(count2>count1)   flag=1;
   return 1 + balanced(a,n,++i,count1,count2);
}}
       else
           return 0;
}


void catalan(char *a, int n, int i, char ch)
{
static int k=0;             // needed it, see below
if(i<n)
{
*(a+i)=ch;
catalan(a,n,(i+1),'(');
catalan(a,n,(i+1),')');
}
k++;
           // if the below condition for k is not taken, we will get duplicates for every pair
           // reason -> have a look at the recursive conditions, the answer lies there
if(i==n && k%2!=0)      
{
flag=0;
int result=balanced(a,n,0,0,0);

if(result==0 && flag==0)
{
int j=0;
while(j<n)
{ printf("%c",*(a+j));
j++;
}
printf("\n");
}
}
return;
 }


Wednesday, November 19, 2014

My bill in the Youth parliament session "Educated India Enable India - Quality Education for All" organised in my college

Day before yesterday, a Youth parliament session was organised in my college and I fortunately got an opportunity to participate in it and I made it to the top among all other students, giving me a chance to visit the Indian Parliament the next summer :D  I would write a post regarding my experience with college parliament session in the near future and would update here with the link.

But today I was asked to give a digital version of my bill along with answers to a few questions so that they can get it published in the newspaper :D  Okay, once published I would surely attach a news pic with this post. But till then, I thought it would be a good idea to post my ideas on the blog as such.



  1. What motivated you to participate in the Youth parliament session “Educated India Enable India - Quality Education for All” ?


Being a student was more than enough to motivate me to attend this session because it’s when you are a part of the system, you not only see but feel the drawbacks of the system. Our education system suffers from a lot of issues like the lack of accessibility of the education to all, the low quality of teaching, or the persistent job oriented mentality of the society.


A dream, a vision of mine to bring about the required changes and reforms, not just on papers but in real life, it’s this thing that motivated me to participate in this session.


  1. Suggest the two most important steps according to you, need to be taken to take Indian Higher Education system to International standards.


First and foremost that I consider is to improve the quality of teaching, which is a must to make the process of learning enjoyable. Today, most of the teachers don’t feel accountable for the performance of their students. The reason is also quite clear, there is no incentive system to motivate the teachers to perform better.
This further leads us to a society whether there is no passion among the youth to pursue a career in teaching. Top performing countries in education across the globe recruit their teachers from top 5-10% of their best universities. But here if you can’t make anything out of your life, you become a teacher.
A change in this mentality has become the need of the time and it can be brought by implementing the incentive system, a new system design to recruit the teachers with the principal focus on quality, and to make the teaching more creative and less robotic, with less focus on a sequence of dull memorised steps and more focus on applications, reason and logic.


Second step that I would recommend is to provide education to the poor kids who are often neglected in this system or considered of very little importance, and yet they have shown time and again that they are equally brilliant as anyone who goes on to take the benefits of our “elite education system”. This poor India has to put up with very poor government schools in the deep interior. Majority of this poor India drops out of school before they get to the 10th grade. If our country could manage to provide them with the same level of education that we get, India would definitely not be at this state of development.  


  1. Propose a bill that you wish to present in the youth parliament.


My bill tries to bring something that almost most of our schools lack and that is encouraging creative and innovative thinking among its students.  I have named my bill “YOUTH ENTREPRENEURSHIP BILL
The bill proposes the integration of entrepreneurship in a creative way in our classrooms so that people can go on to pursue their dreams, to do what they really wanted to do in their life.
The bill provides the steps for the same-
  1. providing more active and vocational courses where education doesn’t look like a burden to them but rather they go on to actively participate even in their least favourite subjects. Taking the example of maths which unfortunately happen to be one of the least liked subject among the students, maths problems should be motivated not just through the sciences, but also through the arts: puzzles, toys, magic, poetry, music- these should all form a key part of the mathematics.
  2. a regular visit to different NGOs to see what all work they are doing and getting some inspiration from them, a visit to different villages to realize that life is not that good what it looks like and to see the facilities that these places lack from, a visit to towns like Firozabad to feel the drawbacks of the present system, and to encourage them to present their views and what all innovative ideas they do have to better such situations, and, motivating and helping them to even implement their ideas to whatever extent it is possible and providing them the thrust to look for even more such ideas and their effective implementations.

The reason for this bill goes on with the theme “Educated India, Enable India”. We do have the people who are educated but most of their education is job-oriented and never let them ponder over the issue of building an “Enable India”. This bill of mine inspires them to think of it, it lets them broaden their vision from merely getting a job to the point of joining hands with each other to develop a stronger, talented and developed India.

Friday, November 7, 2014

What do 5, 13 and 563 have in common?

Well, nowadays it seems like I am getting more interested in number theory with time. I picked this one at random from Numberphile and it felt good to have one more thing in your basket -- this time the wilson's prime and the wilson's theorem. Have a look at them!!

                   



                   


Friday, September 26, 2014

Can entrepreneurship be taught in classrooms?

Yeah, it can be taught. Entrepreneur, in layman's terms, is someone with a vision supplemented with a belief that it can be achieved and a craziness to take risks to achieve that. It's all about being creative in your approach. But is that happening in our classrooms? With what all I have seen so far, it's not the case, atleast in general.

Before going any further, I would remind you of a story which everyone of us has read or listened at some point of time in our life. The story of parent bird pushing its baby out of the nest so that it can learn to fly and more importantly can become independent. The same applies here. The students should be given the chance to become independent, but instead what happens is that most of them remain dependent on their parents till the age of 21 or 22 unlike in other foreign countries. So, when the ripe time comes to give a shape to their ideas, they are just not confident enough of themselves, the reason being that they were never given a chance to make independent decisions. And thus the entrepreneur in them just remains inside and it never comes out.

And the same is true with our classrooms and teachers. An "F" is always discouraged while on the other hand something like "A" or "A+" is appreciated. The sad part is that it is affecting both groups of students. The one who is getting an "A" thinks that he just cannot fail and thus grow up with a mentality that makes sure that he never takes any risk in his life and always chooses a path that has been declared as the road to success by our society. And this is just the opposite of entrepreneurship and thus many bright minds never think of building something of their own. The ones who are getting an "F" might be interested in something else like sports, music, dance or some other form of art that is not regarded as a part of main curriculum. So, when they get such low grades, teachers and parents force them to leave their interests and ask them to focus on their studies instead of seeing what they are interested in and supporting them to follow their dreams. See the point is only when we would change our perspective and come out of the bubble that we live in, we inculcate such creativity in the students. Coming back to what I was discussing, there can be a different thing with the ones who are getting low grades. Maybe they are very good at a subject and perform badly at some others. They are also discouraged in our society which has a tendency to create the average- the ones who can fair well in all, but become good at nothing. Such is the structure of our education system. Generally, teachers don't like students thinking out of the box because they might not be having answers for their questions. Or maybe one need not to think like that and just need to follow the curriculum and the prescribed books just like we do have prescribed medicines. But these students are not sick. They are just thinking what you never tried to ponder over, in short they are trying to be creative and they don't need your medicines. Rather what they need is your support and encouragement to understand the subjects, the things around them in a little bit better way. And while suppressing their quest for knowledge, you are tuning off the creative person - the entrepreneur in him. And what it leads to is that the child stops asking questions so as avoid the embarrassment because of the feeling that starts to dawn on him that all this makes him look like an idiot.

This is what needs to be changed. Instead of burdening them with books of which they understand nothing, let them play with the colors, let them interact with the nature, let them produce something original, something of their own. Instead of making them memorize science facts, let them build some robot of their own, let them practically understand why the density of ice is less than that of water, what causes it and what does it cause, let them practically understand that salt water conducts electricity and what all implications/applications it can have. Instead of making them memorize history dates, tell them why that particular date is important and what all lessons can we learn from that particular historical event, instead of getting stuck at the history of pre-independent India, tell them some history of post-independence too. That's also of some good value.

Oh, wait!! But we were talking of entrepreneurship? What these things have got to do with that?  Well, bear with me for a few more moments and you will get to know what these things have got in common. So why stop at science and history, the same can be said for subjects like value education, environmental education and disaster management, the subjects which are of great value in real sense but somehow have become a kind of joke in our schools seeing the way they are being taught and in fact at many of the schools they are just there for some reason that only God knows and are not being taught at all.
Focusing on the importance of these subjects, only when these little kids, these young minds are given an exposure of what problems our society is facing, what all limitations are there that we need to overcome, what's the disaster management scenario in the country, how badly the environment is getting affected and what all major implications it is having for them and to the whole world, only when they feel these things that they can become interested in a particular domain or find some really cool, creative ideas and possibility does exist that they would become passionate enough to pursue their dreams in the same field. And then you go on to call them "SOCIAL ENTREPRENEURS". But first and foremost, give them the exposure and the chance to do so!!

See what I want to say is that it starts with exposure which leads to interest and then those who are crazy enough go on to change the world. And for that we don't need to give some extra load of one more subject something which our schools would go on to say as "ENTREPRENEURSHIP EDUCATION". No, that would be totally useless considering the case of what happened with other subjects. Rather we need to change our approach towards learning. Let it be "breadth first, depth second" because only then someone can find what he is really interested in. And when they take these baby steps gradually becoming more creative in their approach or if I say "retaining the creativity" that they had as a kid for everything that surrounds them, it would help them not only to become a great entrepreneur but would serve them throughout their life, wherever they go, whatever they do.