Wednesday, January 27, 2010

From Benzene Structure to Data Structures

What happens with Formaldehyde during Cannizaro’s Reaction?

 

 This would seem like a really easy one for a student preparing for Engineering Entrance Exams. Well, most of you would have had a “gosh… I knew that " moment. My cousin had actually asked me that very question and I had no answers to that. One important thing that B.Tech has taught me is how well to answer questions that you have no clue about. I did a reasonable job to avoid embarrassment.

But then as it always happens, I could never get over that question. I turned to Google for the answer and Google once again seemed infallible. I tried the same trick on few of my friends back in college; they were more or less at the same level as me. I was happy but not enthralled since we have all forgotten what he had studied in the first place to be there.

Starts can be deceptive

 

I am not playing a 3 Idiots thing on anyone with that start. Well, starts can be deceptive.
The reason I couldn’t answer it dates back to nearly two years ago when the third semester had begun. I had enrolled for B.Tech in Chemical Engineering for a number of reasons (actually only reason): Screwing my AIEEE exams and getting four times as much as my JEE Rank, (just a little bragging, I had qualified for Counselling in JEE ;)) and that is it. The rest were just after effects of the only reason. I had to opt for courses like Chemical and Mechanical. College was kind enough to grant few deserving students an option to change the branches depending on the CGPA at the end of first year and of course availability of seats in that Branch aka “Sliding”. My seniors wanted me to opt for Mechanical as companies visiting college for placements preferred Mechanical students. But, one of my batch mates was lucky enough to get through JEE on the second attempt and made sure that one seat in Electronics was made available for sliding. As luck would have it, one more student who had opted for Sliding from my State had the same CGPA and we had made a pact before going inside that she would take Electronics, as she had prior background and interest in it while I would opt for IT which would fall vacant upon her sliding. Things went smooth and I had made a decision which I never thought would have such a big effect on everything I did in college after that.

Benzene Structure to Data Structures

 

I had taken preliminary Computer Science (CS) vocational subjects during Junior College days so the transition from Chemical to CS was smooth.

I got interested in the subjects that my new course taught me. I got involved with Programming Contests and it felt good solving them, each AC or ACcepted solution made me feel confident and better. Two Semesters passed like a breeze after that.

During the third year, one Software Company visiting college for placements felt that I was ok enough to be offered an Intern position the following summer. I knew I had to work harder and prepare before hand. But all that was in vain, as the amateurish preparation at college never really worked there. Now, the next thing that college life teaches you is to adapt to any kind of environment ranging from corporate lifestyle to Mumbai local trains.10 weeks flew by and I was back in College.

Now, after over two years since the day I took that decision, I cannot still decipher what I had learnt from all this or what the real impact was but one thing I am sure of is I am not ashamed that I don’t know about Benzene Structure or Cannizaro’s Reaction but rather proud of the fact that I have a relatively better knowledge about Algorithms, Data Structures, Databases, Software Engineering which matters most from now on.

Life is like a box of chocolates 

 

I know some of you might think what is the point of sharing this experience which could be labeled: Dull and Common in anyone’s life but the point is I had no thoughts in my mind when I was in that board room signing up the form and taking a decision which was against what my peers and seniors had suggested. It struck me when I was watching the movie Forrest Gump in which Tom Hanks says "Life is like a box of chocolates". Then I had this feeling of Déjà vu (no pun intended) and I , of course, continued to enjoy my box full of real good chocolates.

Thursday, October 15, 2009

Real World Code


Well,This Post is about a Contest that is to start off from 19th October and ends on 25th October.The Contest is named "Real World Code" and rightly so since it would involve a Functional Specification or FS Provided and the Participants have to come up with the Code following all Processes and Standards so mentioned in the FS.

The Coolest part is that you get to work on FS Developed and designed by SDE's who themselves work as per the same standards following the processes.Not to forget about the Prize Money .. 5 Grands up for grabs.. so Hurry up and Participate.


PS: Contest is open only to students of my College.Do register in the Mail-Id provided with the Poster Image.

Thursday, July 23, 2009

Life is like Recursion

Spoiler Alert: This Post is a tad philosophical and uses a concept called Recursion which is a pre-requisite.

Well,let me tell you something, i feel completely randomized when i start off with some work,slowly the randomization increases just as the entropy of a system goes on increasing, till a certain point after which mostly,things start falling into place.Voila, it then clicked to me that Life is like Recursion you start off with many number of recursive calls and don't know what you will end up with,but still you work up all the possible steps but then finally something clicks aka the base case and then things start getting standardized instead of being randomized and then the steps that you thought were straying you off path were in fact leading to bigger things in life.

And the thought doesn't end there, smart people memoize the recursive calls i.e they tend to learn from their mistakes so the next time you take the call,you know the consequences exactly but then there are also people who try to re-invent the wheel and end up having lot of over heads in life not that they fail or jump off the well but then they take their own sweet time to get there or may be never.

There are various schools of thought over this topic and this Post is just a represenation of my thoughts which in no means is meant to influence any of the mortals.

PS : 1) Try Searching "Recursion" @ Google, that page is recursive as well, click on did you mean and then you would know.
2) Witty Line : How does M$ make saints out of Morons? Reply :What are the stats of the conversion Ratio ,must be way better than ours?
3) The Above PS was meant for a specific group/individual.If you don't get the joke, then well, it was intended to be so.

Saturday, July 11, 2009

Notes@Work

Here at work, I never shut down my system since there is something or other that is pending and so the stats are :
"System Up Time: 20 Days, 4 Hours, 54 Minutes, 52 Seconds"

I move my desktop physically a lot hence just 20 days; now that I have found a decent location which is stable.I expect this to be around 40 days till the end of this month.

Sticky Notes do "stick" well. Around 2 months and it is still there on the wall very unlike the one's I had tried to simulate back in college.

Pool.. still pathetic at it, trying to improve but then that will take time and don't expect any Pankaj Advani type play from me though. (I have set highest standards in terms of being a true mediocre).


As a Final Note, @All Final Year's : Final Year here we come.Every year I don't wait for the academic year to start. It seems there is something with 4, maybe all are expecting some kind of a LEAP  :) .


PS:
1) No comments on weekends and rightly so,since i am at work all 7 days a week for last 1.5 months.
2) Too much Final in the Last Para.. what do you think?

Tuesday, July 7, 2009

Witty Kid @ Office

Posting after really long time but this one is a must share.

During a Recent HR Event by my Company which was themed around "Bring your Child to Work Day".

A small kid probably around 4-5 years of age was interacting with all his Father's Directs..(his Dad is a People's Manager with a team of around 6-7 Members) then suddenly one of them questions the kid "what does Dad do at work?".

Kid Replies,"Dad... takes the Lunch Box and Laptop.. then reads mails,attends meetings then goes to lunch with other members and comes back.. "

PS
1)My Verdict : "Yeah I am Loving It!!!!!!! Fun to be a Manager it seems :D.".
2) Kid gave the 101 on Being a Good Manager..

Wednesday, June 17, 2009

Fun Questions

I found this Interesting Questionaire in some blog. I felt I should try answering them too.

1. When you looked at yourself in the mirror today, what was the first thing you thought?
Buck up lazy fella .. loads of work pending ;)

2. How much cash do you have in your wallet right now?
Around 394 odd Rupees.

3. What’s a word that rhymes with DOOR?
More,Bangalore,Floor...

4. Who is the 4th person on your missed call list on your cell phone?
Abhinav Krishnamoorthy.

5. What is your favorite ring tone on your phone?
Always on Silent 24X7.

6. What are you wearing right now?
Jeans and T-shirt.

7. Do you label yourself?
No.I have left that for others ;)

8. Name the brand of the shoes you’re currently own?
Sparx (hardly wear it),Sandals Unbranded.

9.Bright or Dark Room?
Bright.

10. What do you think about the person who took this survey before you?
SOB .. didnot tag me :(

11. What does your watch look like?
I don't wear one..

12. What were you doing at midnight last night?
Slept..

13. What did your last text message you received on your cell say?
Airtel AV-Promo Message cannot be displayed

14. What's a word that you say a lot?
I want to Head AS* (Internal Confidential)

15. Who told you he/she loved you last?(please exclude spouse , family, children)
No one since Everybody decides that I am selfish after a while.

16. Last furry thing you touched?
Some Furry Toy on Bring your Child to Work Day @ Office.

17. Favourite age you have been so far?
Present.

18. What was the last thing you said to someone before doing this?
I will send across the details to him and CC you as well.

19.The last song you listened to?
Ana Free : Its Time && Nickelback : Rockstar

20. Where did you live in 1987?
No Idea

21. Are you jealous of anyone?
No one in Particular.

22. Is anyone jealous of you?
I feel so since they so want me dead :P

23. Name three things that you have on you at all times?
Mobile Phone,Wallet and a Pen.(Most of the times).

24. What’s your favourite town/city?
Mumbai.

25. When was the last time you wrote a letter to someone on paper and mailed it?
For some Freakin' Contest 12 years back.

26. Can you change the oil on a car?
No.

27. Your first love/big crush: what is the last thing you heard about him/her?
"Dude.. Change your Desktop. She looks Pathetic each passing day "

28. Does anything hurt on your body right now?
My Hands... I have been typing for a long time since Morning.

29.What is your current desktop picture?
Windows v/s Walls !!! :D

30. Have you been burnt by love?
No.


PS: I tag Ankit Prabhat,Roshan Singh and all other bloggers from my College.

Sunday, May 17, 2009

Department Results

Well, The Results for the Sixth Semester were declared and it has always been a practice for me to sort the results.
So,Here I am again. This Time I am sharing the Code so that People don't think I manually sort them ;).Also, I would like to congratulate all the dept guys/gals who have excelled as always and awaiting a cool Final Year ahead.





#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
struct stud
{
double cgpa;
double sgpa;
int roll;
};
struct sorter
{
bool operator () (const struct stud a, const struct stud b)
{
return a.cgpa>b.cgpa;
}
};
int main()
{
vectorvec;
ofstream out("res.txt");
ifstream in("in.txt");
struct stud a;
while(in>> a.roll >> a.sgpa >> a.cgpa)
vec.push_back(a);
sort(vec.begin(),vec.end(),sorter());
out<< "Roll\tSGPA\tCGPA\n" ;
for(int i=0;i<vec.size();i++){
out << vec[i].roll << "\t" << vec[i].sgpa << "\t" << vec[i].cgpa << endl;
}
out.close();
in.close();
return 0;
}


This Requires an Input File of the form :: Roll\tSGPA\tCGPA
and Output has the same Format which can be changed as well.

I would be coming out with more of code snippets.Till then Enjoy Life.

PS:

The Actual Cpp File is available at this Link :: Here
The Output File::

Roll SGPA CGPA
48 9.12 9.27
61 9.36 9.26
60 9.12 9.09
39 9.36 9.08
26 9.16 8.95
62 9.36 8.89
16 9.28 8.89
2 9.04 8.85
28 9.04 8.81
30 9.36 8.81
46 8.6 8.77
7 8.76 8.67
53 8.52 8.58
37 8.36 8.55
42 9 8.48
3 8.2 8.43
25 8.52 8.42
50 8.6 8.33
10 8.64 8.3
52 8.44 8.23
27 7.84 8.22
14 8.68 8.22
59 8.6 8.21
5 8.84 8.19
43 8.76 8.19
34 8.04 8.18
33 8.2 8.15
11 8.2 8.05
31 7.84 8.05
6 8.36 8.01
23 8.2 7.99
38 7.56 7.99
55 7.84 7.87
9 8.04 7.85
17 7.52 7.8
49 7.52 7.77
35 7.84 7.66
21 7.8 7.61
41 7.52 7.59
63 7.08 7.58
36 7.24 7.52
8 7.24 7.39
40 7.8 7.39
45 7.88 7.37
19 7.4 7.31
51 7.68 7.28
56 6.76 7.28
1 7.32 7.26
24 6.84 7.16
20 7 7.06
18 6.92 7.04
44 7.24 7.01
15 7.36 6.82
54 6.32 6.81
32 6.44 6.75
64 6.96 6.73
13 6.04 6.63
57 6.52 6.59
22 6 6.45
29 6.36 6.37
58 5.44 6.13
12 4.96 6.12
4 0 0
47 0 0