Thursday, March 29, 2012

Function(al) Developers

There are only 30 more minutes to end this very important day. Today my son wrote his last exam in his schools life. And the exam was Computer Science. It is this very day I was waiting to start my blog. Apart from this I met with another depressing incident today. I see both are connected.


Last year when I saw my sons text book on Computer Science (OO with C++) i was thrilled and started flipping through the pages. Then I decided that i would not teach him anything related to either OOP or C++ (not that he was interested in earning from me).


The depressing incident was interviewing a fresher (BTech - Information technology) who has a 8+ CGPA. How are these 2 things connected? Well read on!


When ever i visit campuses for recruitment (most of times I do management round which after technical round) I casually ask the students to "Write a function in C which takes 2 integers and returns the sum of those two".


Most of the people would immediately say that they had done C programming long ago! (actually in their first or second year in college) And believe me we will be seeing them in their third year. So, I ask them "Why dont you try it in Java then?". 


Mostly almost 90% of the people after a 5 to 10 minutes persuasion will start writing a "main" function with a "printf" s to prompt followed by a couple of "scanf"s to read values for a and b and calculate "c=a+b;" then print c.


Then I tell them that this is not what i have asked for. And what I have asked for is a function with just one line of code in it. Believe me I have seen only less than 10% of the people doing this after almost 10 minutes of talking and explaining what a function is.


Unfortunately today, the candidate was just refusing to understand what a function is and not even able to identify the function name and return type after i wrote the function myself.


I had a greater challenge when I was training fresh graduates in making them unlearn things.
It is not the old procedural C which is getting this kind of treatment. OOP languages like Java also will come in a different flavor during these interactions. For them

  • Class is a collection of Objects
  • Inheritance helps them to reuse the code
  • Encapsulation is wrapping data and function in a nice gift wrap called class etc.

One student went to her dormitory and fetched the book that taught her "class is a collection of objects" in the middle of the interview.


When it comes to encapsulation, this is not the wholly owned property of OOP. The word came into effect when the first subroutine (todays function or method) was written. 


A well encapsulated function is like a maths problem. When you solve a maths problem before selecting and using a formula you need to find 

  • what is given and
  • what is asked

What ever is given is(are) parameter(s) and what ever is asked is a return value. 


OK, Now coming back to my sons text book. I was horrified (for the first time and terrorized to read rest of the book) to see an example of a function like this.


Calculate the  area of the triangle where base and height measurements are given.



float area (float half, float base, float height)
{ cout << “\nTriangle ..”;
return (half* base*height);
}



We used to have jokes like a science teacher setting a history question paper. I wish  Computer science teacher sets a maths question paper.


I dont know how many of us had really seen this book. Please download a copy and send your feedback.
But more horror stuff is ahead.



Wednesday, March 21, 2012

Why most of the projects rot and smell?

I did not get any negative comments on yesterday's blog. In fact people were sounding relieved. We go to colleges to recruit in larger numbers and it affects the over all education system. But we dont realize that it affects our business also. 
Over the years we have perfected the process of campus recruitment. Or that is what we think. This is similar to any software development process which we think we improve continuously.
We are going to campuses for a very long time now. We learnt a lot and perfected an assembly line process. 
In the beginning when we were with less funds, we were getting the recruits sit in the front of the bicycle we were riding. Like a Girl friend or lover and the relationship was so passionate.
Later when we could afford a little bit more we had a wife in pillion of our scooter, a kid in the front and a smaller kid between us and our wife. There was love, duty and some amount of accommodating ability that we showed them.
Later we were driving a car with few more people and somebody probably who is sitting in the rear kicked our back.
The family grew and we know it all and sudden explosion of growth we are driving huge garbage collection trucks which go around streets with plenty of garbage bins. Now we have our own uniformed people to come with us. We are equipped with machinery like fork lifts and pulverizers.
We come back with a big monolithic chunk of ungraded garbage.
And in the material we supply mixing this to the extent of 40% to 50% gave us a gross margin of more than 30%. 
Who cares?
Our projects rot and smell!
Yes, we need more people to sustain the business but how do we know that we are sourcing it correctly?
At most we donate books, conduct some basic training programs, sponsor and participate at symposiums and give guest lectures. 
Have we ever tried to know or improve what is being taught to all these people?
If we do it we will not be driving garbage trucks but cruising with people in the clouds.
We even shy away from putting good people in to our own quality and training departments, I think I am asking for too much!
It is time to give things back now! Why cant we use a minor portion of the calculated and affordable bench strength to teach some good things to all these poor boys and girls at colleges?
We have spilt colleges into tiers and go for a Guinness record with tier 1. But remember the 50th person there is not going to be anyway superior to a 5th rank holder in a tier 3 college where none of us go for recruitment.
It is not only tiers we also have classifications like software branches (CSc & IT), circuit branches (ECE & EEE) machinery branches (Mech, Production) and we dont even leave civil.
It is not only that our children are not going to get a good school education the future society is going to import civil and mechanical engineers from foreign countries paying a premium.
We need to have a better system in place at least now to safeguard future and our own business.  
Our selfishness must be driving us towards this!



Tuesday, March 20, 2012

Why this blog?

I wanted to start blogging a couple of years ago due to some reasons. Over the past 2 years the reasons grew in number but never had the initiative to start writing. Now it has come to a stage where i cannot hold myself anymore.


Last week, I saw an article in "The Hindu" about most of the first year students in engineering colleges in Tamilnadu failed to clear the fundamentals of Computing paper. As reasons the writer (or who ever expressed their views) quoted 

  • Many students studied in Tamil (local language) medium where as English is the medium of instruction in Engineering colleges
  • Students prepared using a question bank of programs. But questions were not from the bank

In the website of "The Hindu" a dozen of people submitted their comments on the article. And in a nutshell these were the views of the readers

  • Why so many people join engineering colleges with out understanding whether it is manageable for them
  • I did not study Electronics in my school but i did well in my college
  • These things are not excuses

etc.


I also posted a comment but it could not get through moderation I suppose! My comment was on the lines of "Why are they having a written examination where people have to write programs? 
If someone had studied Computer Science in the school final (higher secondary) I can guarantee that they will not do well in Programming assuming college education is better"


Definitely this was not something expected as a comment. The problem is that this is cryptic and if understood cynical. So, I did not worry about not getting this reach people.


Why people are flocking to Engineering colleges today?
Is that because there are thousands of engineering colleges all over India? (There are 500+ engineering colleges in Tamilnadu alone)


Colleges are entering guinness book of world records for getting 600+ candidates selected into a single company!


Job Guarantee is what is driving all these people!


Our dream software companies never looked at Electronics graduates back in 1992 in my final year(College of Engineering Guindy, Anna University). The same companies are recruiting 500+ even if the total of Computer Science and Information technology branches pit together will not reach 150. In reality they recruit even Cvil and Mechanical engineering students (for testing or some other non programming tasks).


This has a cascading (bad) effect in our society.  In the last 15 years we have stopped talented engineers doing masters and PhD and go back to teaching in Engineering colleges.


Now, we are recruiting almost all the people out of engineering colleges (for guinness record) and made a lot of people start engineering colleges. Almost 6 years back itself the total number of seats in engineering colleges were enough to take all people passed out of Higher Secondary with minimal qualification. So, nobody goes to study science subjects these days. So, no good teachers in the school also.


Now itself i have seen some engineering graduates teach computer subjects in the schools.


Future is definitely not going to be good for students and the industry!


Hope i have given a message here.


I started this blog with title "Why this blog?" and I am ending this with a famous question


Why this kolaveri?