Pages - Menu

12.10.2014

Google App Engine vs Google Compute Engine

In my company, I have been working on Cloud Environment. We were porting a Web Application from the AWS Windows Server to the Google Cloud.

The Problem we faced was, whether to use Google App Engine, or Google Compute Engine. It took me some time to figure out what was the difference between the both.

After a bit of Research, I found that the difference was very simple.

Google App Engine is a PAAS and Google Cloud Engine is a IAAS.

PAAS - Platform-as-a-Service : 
In such Service, we just have to deploy the code, the server, database and all are managed by the provider (in this case Google). We need not take care of the load, and other stuff like updating the softwares, all are taken care by the provider itself. In case the load increases, it is balanced by creating different instances of the App and the load balancing is done by the provider itself.

IAAs - Infrastructure-as-a-Service : 
Here, the provider gives us more freedom, and headache. We can create our own Virtual Server based on the OS which we require and prefer. Databases and other software can be installed based on our requirements. But, in this case, we have to take care of all the headache like maintaining the softwares, language versions, scaling, load management and stuff.


10.28.2014

Shell Scripting : "let not found" solved

I was recently scripting in UNIX and bumped across one problem.

I had used the following code in my script.

let "result=no1+no2"

And I got the error - "let not found"

But the solution is simple.

It seems that the shell is using dash, instead of bash. Hence, reconfigure the dash.
sudo dpkg-reconfigure dash
<password>

Then, when the option to reconfigure comes up, select "No", ie do not make dash the default shell.

PROBLEM SOLVED!!!   

8.16.2013

Badminton boom in India, 2 in top-10, 5 in top - 25

India's good performance continues, in the world of  Badminton. With the latest rankings in, India has 5 players in the top 25 of the world rankings. India also has 2 in the top 10.


P V Sindhu, the new star of Indian Badminton, broke into the top 10 of
P V Sindhu
the BWF Rankings, after the Bronze medal finish at the World Championships held in August. She is ranked No. 10, in the current rankings. Her performance in toppling the former world champion and no.1 Chinese player, and the medal fetched her points to shoot into the top 10 rankings.




Saina Nehwal
 Saina Nehwal, the lady who changed the fate of Indian Badminton, still continues to be at the No. 4 position, being the highest ranked Indian player. Her quarter final exit at the World Championships saw a fall in her rankings from No.3 to No.4, but still remains the Indian hotshot in Badminton.

P Kashyap
   Paruppalli Kashyap, is the highest ranked Indian player in BWF rankings. His wonderful quarter-final finish at the World Championship, fetched him points to rise 3 rankings to be ranked No. 14 in the world. 


Gurusaidutt
Ajay Jayaram
 RMV Gurusaidutt, and Ajay Jayaram, are the other 2 players in the top-25 of the BWF World rankings. 

The best thing about the players and Indian contingent is that, all the players are aged between 20 and 22, and has a lot more to go. The fact that India is becoming a super-power in Badminton, under the coaching of former player Pullela Gopichand (National Coach, India), and that young blood is flowing into the sport is a soothing for any sports lover.

Indian Badminton League news coming up.

7.11.2013

No More Criminals to Indian Parliaments

Supreme Court has striked out a crucial section 8(4) of  Representation of People's Act ; of the Indian constitution which allows the MPs/ MLAs to hold their post even when convicted for any criminal case.

Earlier Situation:
As per 8(4) of the RP Act, the MP/ MLA who have been convicted for a criminal case need not step out of his/her office, if he had given an appeal within three months of the verdict. This of course, helped the MP/ MLA to be in power till the higher court verdict came.

Now:
The situation has now changed that the MP/ MLA has to step out of his office, at the same day of the verdict, claiming him as a convict.
Also, the ruling makes it clear that the same person cannot participate in the elections, till 6 years post his release.

Why this Ruling?

  • This ruling comes in when the nation was schocked to see Kanimozhi - one of the perpetrators of the 2G Scam - the second largest scam, India has ever seen; being supported to the Rajya Sabha by the ruling party, for the sake of getting the support of one more party in the upcoming 2014 Lok Sabha elections.
  • This ruling comes in when the reports of Indian Election Watch and Association of Democratic Rights states that 30% of the parliamentarians are criminals and 14% of them are accused in serious criminal cases.
  • This ruling comes in a situation where the 48% of Kerala parliamentarians (including MPs and MLAs) are criminals and 9% are accused in serious criminal offences.

Important and Astonishing Figures:
  • MPs = 543 ; Criminals = 163 : 30%
  • Rajyasabha members = 232 ; Criminals = 40 : 17%
  • Total MLAs = 4032 ; Criminals = 1258 : 31%
  • Highest MLA Criminals in a State : Jharkhand 55/74 MLAs, ie 74% Criminals, followed by Bihar - 58%, UP - 47%
  • Lowest : Manipur : 0% 
  • Highest MLA Criminals in a Party who are selected : Jharkhand Mukthi Morcha - 82%, followed by RJD 64% and Samajwadi 48%
Congrats to Supreme Court for such a decision as we see how MPs and MLAs cling onto their position when indulged in serious scams and criminal cases.
Congrats to the Supreme Court because these criminals will be disqualified from competing in the elections for 6 years after being released.
Congrats to the Supreme Court because the criminals cannot add a sub-section to the constitution as supreme court has mentioned the Parliaments inability to do so, by the sections 101(3)(a), 190(3)(a), 102(1)(e), 191(1)(e).

It is a shame for us, to notice that Central Govt has declared to appeal against this ruling. It is a shame that the government itself wants criminals to rule India. They are sure to get backing from other parties as well for the "COMMON CAUSE".

5.30.2013

Better Algorithm for Prime Number Checking

I have been thinking of some of the traditional algorithms which we learn during our Programming Language study. One of the most important one is the Prime Number checking.

The Traditional Algorithm checks if the given number is divisible by numbers ranging from 2 to the square root of that number (or some times to half of the number). This algorithm is fast. But, I have figured out a better one.

My Approach was very simple. I worked on the some of the drawbacks of the algorithm.

  1. If the Number is the square of a Prime Number :  Consider the case when the number is the square of a prime number. Eg. : 121. So, the algorithm has to check the numbers 2,3,4,5,6,7,8,9,10, and finally 11 to know that 121 is not a prime number.
  2. Once we checked with 2, then why check again with even numbers? :  Second thought was, once, we have already checked with the number 2, then you should we again check with other even  numbers?
So, I derived an algorithm for Prime-Number checking. It gives the result in O(1) time, in case of Square of Prime Numbers, and uses half the time, in average cases.

Algorithm:

function isPrime(n):
 1 : check if n is divisible by 2
     1.1 : if yes, return false // n is even
 2 : check if n is divisible by square root of n (integer value)
     2.1 : if yes, return false // n has perfect square root
 3 : set i <- 3
 4 : continue until i < sqrt (n)
     4.1 : check if n divisible by i
           4.1.1 : if yes, return false
     4.2 : increment i by 2; ie. i = i+2 (next odd number)
 5: return true // at this stage, the number will be prime

We can still optimize this algorithm for large numbers, using Dynamic Programming methods. But, I feel this is a better algorithm, to be taught for the beginners.

5.29.2013

Short Cut for Success in UPSC, Bank Test, SSB Test

When I appeared for the Civil Service exam, many people approached me asking for help to skip all the formalities and get the job. All they said is that, I should pay them an amount. The Best Offer is that, I need to pay that only after getting selected.

There was a similar offer made to me, when I appeared for SSB Test at Bhopal. All the offers had a common thing - I need to pay only after I get selected.

So, I wondered, it is a tedious job to study, prepare and work. It would be good enough and easy to get a short-cut. I could pay the amount from the salary I get from the job. The Offer seamed interesting and tempting.

This would be the case with any ordinary person. If he gets selected, then goes to the person and pays him the amount he asked for. But, actually, did he win you the job? Is that job ethical? Can you sleep properly?

When I thought about this, I thought some thing more. This is simply a fraud by the guys. If you get a job, they get money. If you don't, get you don't loose, nor they gain. They actually don't have any hold in the officials of that institution. So, what they have to do is simply meet the person and convince about the Offer. 

Many people contact the candidates, making similar offers. I have only one plead to these candidates, these guys are cheating you. Know these cheaters, because any unethical job you earn, never feeds you properly.

5.23.2013

What Happens when Self Financing and Aided Colleges become Autonomous?

The Govt. of Kerala is planning to give Autonomous Status to selected Engineering Colleges in Kerala. Govt. Colleges, Aided Colleges and Self-Financing colleges can apply for autonomous status.

The Privileges to be given to these colleges include
  • Permission to conduct examinations as they wish
  • Permission to do placements as they wish (Govt. Colleges can't do this)
  • Universities of these colleges will have the only one duty - to issue the certificate
These are the main concerns, that we should think of.

Firstly, what happens when the colleges conduct exams on their own?
The quality of education is already different in different colleges. The only way to unify them is to have a common certification - which is the role of a University. Now, the valuation, question preparation and all works are done by the college itself. It is good that exams will run on-time, and results will be out on-time. But is this "on-time" affecting the quality?
      One - Govt. colleges are well known for their "student-teacher" relationship. The teachers who don't like some students, may be due to their misbehaviour, may be due to their political activities. In effect, the students do fail in their internals (as of now), and will fail their university exams (when the college become autonomous).
     Two - The private and the aided colleges will always try to increase their pass percentage. So, these colleges will always try to help their students to limp past the exams. This, in-turn will degrade the quality of engineers.

Secondly, what happens when the Institutions recruit on their own?
     The quality of education being provided by any college, depends on the quality of the teachers. So far, the recruitment in the aided colleges have been made on merit basis. But colleges like the TKM, NSS and other colleges which are run by religious missionaries, are waiting for this opportunity. Now, the recruitment will not be made on the merit basis, but on the amount they will be paying to the missionary. The people with merit, and who do not have enough amount to pay the "bribe", will be sidelined, and hence, the quality once again comes down.
    Now, when it comes to the government colleges, most of the people with merit will go into self-financing and aided colleges. And, the rest, who are less qualified will be left off for the govt. colleges. It would be ok, if govt. colleges could at least recruit them. But no. The Directorate of Technical Education and the Govt. has to complete all the formalities - which will run upto months and sometimes years to recruit teachers.


So, the government has to answer a simple question? What is your purpose with this move? Do you want to degrade the Quality of Education in Kerala, or you just want to feed the hungry missionary dogs, who keep your government alive?