Monday, April 1, 2013

Deploying on Amazon Web Services

AWS EC2 Cloud Computing Amazon Web Services
These are some of the hot new trends, and never mind the leader Node.js



So this is my experince on how I installed, Cyclos, a Bank Management System onto the Amazon Web Services.

Before starting let me say something about Cloud Computing.

Saala har koi aaj kal use kar raha
WE ARE NOW ON CLOUD

Cloud Computing:
I define it is as infinite, imagine you need a resource, how much do you need ?
do you know in advance ?
can you estimate it ?
what if you need more than what you estimated ?
what if you used less than what you estimated ? Are the excess resources go waste ?

Instead of buying your own resource, go and buy resource from existing cloud resource providers like Amazon Web Services

Then you can scale your resources as needed.
Need more resources just create new instances.
Need to cut down resources then just terminate instances.

Amazon is leader in provinding Cloud Services. Most popular of them is EC2 - Elastic Compute Cloud and S3.

EC2 instance.
These are just like separate computers. You can create any number of instance as per your need. Each instance has a configuration like RAM, HD, type of operating system.We can acces each instance by sshing (telneting ) into them and install our own software, packages, setup the system.AmazonEC2 Provides readymade linux images that can directly copied and the os can be started. One of the

First I registered an account with AWS. AWS provides free tier for a period of 12 Months, that we can use it. There are so many services that are provided by Amazon,  The service that I have used is EC2

Creating an EC2 instance is all that easy. Go to the Management Console.and select launch instance. First you need to select AMI and if you need a 32-bit or a 64-bit instance. I have chsoen a 64-bit instance with Amazon linux in it. It is a pretty good linux, with latest up to date repos. Then the specifications of the instance. There are various configurations catering to different needs. Since this being an initial deployment, I have chosen a Micro Instance that comes under Free Usage Tier. Then you need to create a Key Pair to be able to access the instance. Specify a name and the wizard creates Key. Secure it in some place, because this key file acts as a password when connecting with the instance. Then you need to create a Security Policy specifying the inbound access to the instance. Since we are creating a Tomcat Server, we need ports 8080 open or HTTP Port 80 Open. For testing sake I have opened both the ports open by specifying allow access to 0.0.0.0/0.

To check if the Security policy has been implemented you need the global url which is of form
instance-id.region.compute.amazonaws.com
ec2-xx-xxx-xx-xx.us-west-2.compute.amazonaws.com

To check if the ports are open, you can use ping.eu and port check tool.
Once the instance is up and running, and accessible, we need to install the required software in the instance. All the instance have high speed internet not to worry about that. The AMI Package Manager was very awesome. All we need to do to install MySQL, Tomcat6 was use YUM Commands.

We needed a Mysql Server 5.5 or greater. Just installed MySql using the command

yum install mysql-server

and RPM took care of all the dependencies, and installed it all neat and made it ready. I had to start the service using simple unix command

sudo service mysqld start

Followed the manual http://www.cyclos.org/wiki/index.php and made basic sql configurations.

The AMI was preloaded with Java, so all that I needed to install was tomcat6. Again using YUM

sudo yum install tomcat6

Started the Server using

sudo service tomcat6 start

So Now I need to test the server, but there was no preloaded tomcat manager or any sample apps deployed in tomcat to test them. So I found and downloaded a sample application to test your tomcat server, that is available at
http://tomcat.apache.org/tomcat-6.0-doc/appdev/sample/



The tomcat server was running on port 8080, so to access that url, we need to use
http//url:8080/

That was done, the server up and running.
Then download the cyclos onto the instance. You can use curl to download files.
curl url > filename.

Unzip the contents of the file, copy the web folder into tomcat6 webapps at
/usr/share/tomcat6/webapps

Then follow the manual and edit the cyclos.properties, enter the username and password for the cyclos to access the database.


Tada Done. Now you can access the instanc at the url/cyclos. The Application is up and running.
Deoploying application onto cloud was an awesome experience, and Amazon made it much user. It has some awesome user guid, and getting started guide.

Thursday, January 10, 2013

Microsoft Phone Interview




After having completed coding round at KMIT, Hyderabad. We have been very much waiting for the results. And after about 1 and half month I received an email from Recruitment Consultant of Microsoft, that I have made it to the next round, and someone from their team would contact me within 24hrs, to take the possible dates for Scheduling Phone Interview.

For 24 hrs. I waited, but haven't received any call, so I started becoming nervous. Then Icame to know from friends that the Microsoft Recruitent Team themselves are scheduling the dates of interview, and informing one day before the interview. The Interviews were expected to be completed from Jan 3rd to Jan 10th.

So I started my preparation. Researching on internet read lot of good experiences, technical questions, that the coding can be on live meeting. But in our case it was a little lax, it was expected a to be a  behavioural interview, some basic technical concepts, no coding, and lots of questions about projects.

A Phone Interview is just a screening round to see if the candidate is worth enough to be considered for the position. You do not get a job after a Phone Interview, we only get a chance for a face-to-face interview. So our target is not impress them with all you got, but it should be straight that you are an awesome guy, with some strong technical background. We can save all our impressing techniques for the face-to-face interview.

Researching on internet I found lots of help on Phone Interviews. These are some points, that were helpful to me. I am giving it out here so that someone preparing for the interview might find it useful.

Checklist

  • Get Ready: It reflects in your voice how much attentive, energetic and interested you are. Bathing and getting round will give you some freshness.
  • Keep all your Printouts : Get the printout of all the relevant documents, resume, cheat-sheet  to look up for any questions they ask, Make a list of important situations in your life to talk about. Trust me when a question is asked, you may not remember exact situation, so better make list for reference.
  • Resume: Read the resume thoroughly, you need to know what all is in there.
  • Water: Keep a glass water, and don't go running for it, while the call is on hold.
  • Notepad and Pen: To scribble any mathematical figures, or any information the interviewer gives.
  • Mobile Phone: If you are using mobile, then see that it is fully charged, and has enough credits. Better use Land-line, to avoid dropped calls, or signal problems.
  • Turn off Call Waiting: Better Turn Off Call Waiting, to avoid disturbance and allows to be focused.

Interview

  • How are you? : Be Pleasant, Be Good to the interviewer, Have some etiquette.
  • Match their Style : You need to match their style of speaking, so they will start understanding and liking you.
  • No Long Answers : No Monologue. Phone Interviews are different from face-to-face interviews and often people get bored to listen long speeches. The interviewer has a lot of things on his desk to get preoccupied and he will, if you keep on talking.
  • STAR: The Answers for behavioural questions can be answered in STAR technique. Situation, Task, Action and Result. Explain any past situation you were in, what was the the problem, What was the action you have taken (the solution). What was the outcome (the result) and 
  • Brief to the point : The Longest Answer can not be more then 45 seconds. Remember this is just a screening round. You are not going to get a job with this. You will be just getting a face-to-face interview, so just relax, and give straight answers
  • Smile and Body Language : Smile and use Body Language, It all shows in the voice.
  • Focus, listen, and enunciate : Be a Good Listener, Do not interrupt the interviewer.
  • Consider Walking : Wlaking keeps you attentive, and you wont drift into sleep..:p
  • Ask Some Questions: to the interviewer, so he feels, you are truely serious. Research about the Company and prepare a couple of questions, like
    • I am interested to know, what will be the further Process, when can I expect a call from you. 
    • If I get hired, which department I will be working on. 
    • Is there any Web Development Team. (because I am a Web Developer)
  • Thank the interviewer. It doesn't hurt being a little courteous.

Coming to the Questions. I prepared for some of the MS Questions, given by the other interviewees
  • Tell Me About Yourself ?
  • Why do you want to work with us?
  • Why Should we hire you.
  • Strengths and Weakness.
  • Situation where you had a Conflict with Peers and how did you resolve it.
  • Which is your favorite Microsoft product? Why?
  • Would you like to add some features in it?
  • Name the product of Microsoft which you don’t like and would like to improve.
  • Which is your favorite programming language and why?
  • The longest program you had written and for what?
  • What is the most compelling project you did and describe it and your job in project?
  • What is ideal programmer look like grade yourself if ideal one is 10? 
  • Describe a situation where you had to find solution to technically difficult situation.
  • Tell me about your project. 
  • Tell me something from your resume that we haven’t discussed so far.
  • How would you test a keyboard?
  • What were your responsibilities in an XYZ Project?
  • What major challenges and problems did you face? How did you handle them?
  • How would you test  Software.
Interviewees often ask questions but do not prepare for them. For example a question like "Tell me about Yourself" is sure to be asked in every interview, and people often prepare for this. For every company you need to give the answers as suitable. It is better to write the answers and practice it.

So that is all about how I prepared for the interview. Well this may look exaggerated, and others may not do so many things. But there is a fun in being prepared. We may not get job for every interview we take. But we can make the interview experience memorable, by preparing differently for each interview. Hope you find my experience useful.

As of me I am still waiting for the results. Wishing you Luck.