Wednesday, February 27, 2013

Path to Test Automation Success

Back in 2006, I first came across a tool Selenium IDE that saved me a lot of time to do manual boring stuff. I slowly starting doing stuff that not just saved some time for me but also saved a lot of time for the whole team and improved the time to market for our products. That also great improved our output quality. Below is a brief presentation that shows the path I took. It doesn't get into a lot of technical details but is really a mix of process and tools.

Selenium with Sikuli

At Squarespace, I had to write automated tests for a css/js heavy website and that couldn't be done using just Selenium. Once I integrated Sikuli with Selenium, I was able to do get the job done. I had best of both worlds. I hosted a meetup at AOL/Huff Post office in NYC to talk about Sikuli and explain its benefits. The presentation is below:

There are 6 reasons to integrate selenium with sikuli. All about that is explained here.

Feedback received from the folks (40ish) in the room. Before and after the presentation:

Wednesday, November 2, 2011

How to Slow the Population Growth Rate

7 Billion and You
By most of us know that our (earthlings) population has just reached 7 billion.  There are a number of discussions going on about the advantages of it and even more about the disadvantages.  With increased population we will have energy shortage, food shortage, water problems and many other problems.  Many people(countries like China) think that by controllng populaton by laws or by birth control education programs ( and some with incentives) we can slowdown the population growth.  I think that by educating people more, we can slow some population growth.
In rural parts of countries such as India, the children are looked as a help at in farmland.  By educating people, the farmland help incentive is gone and people will be producing less children.  In addition to that, educated people tend to get married little late and think about children even later. And by that time the fertility rate will come down and help reduce population.  Educating Women is another important factor.  The above-mentioned reasons apply to women as well and if we have two people with less fertility means even less children.
Urbanization is another imporant way in which population growth can be slowed.  In urban centres people have smaller places to live and that in-turn motivates the parents to produce less number of children.
In conclusion, instead of passing harsh laws(similar to what Sanjeev Gandhi did some years ago or what China does), I think focussing on other ways such as educating men and women is very advantageous.


Saturday, October 29, 2011

How to Choose a Cloud Service Provider?

There are many articles and white-papers on this topic.  I just want to give a brief summary of thought process one has to go through before selecting a Cloud Service Provider.  Also, I will not be explaining what SaaS, PaaS and IaaS or Private Cloud here.  This is based on my hands-on experience, my analysis of the landscape and knowledge gained from numerous articles on the web.

First thing to decide is which cloud model to go for.  If we need to perform a non-core function such as payroll, CRM etc go for SaaS.  Leave that to the experts.  If we are doing an application that needs very high performance and scalability requirements then go for IaaS. Ex:- a payment processing system that has to respond in a second or a high traffic news website.   If your nature of business has to follow some regulatory requirements such as HIPAA, that data has to in Private Cloud(best option, though you could still find some IaaS to do it with a specific SLA).  
Now for the rest it really comes down to architecture of your application and if you have some code already present or not.  If it already has something working and it doesnt use any standards based coding then one has to pick IaaS.  If one is starting form scratch and wants to leverage the platforms developed by the PaaS providers they will choose PaaS.  Even though that will reduce time to market by a large amount, one has to be thinking about the lock-in. Sometimes one maybe locked into the platform.  Using PaaS will give some out of box features you do not have to write code for(like some social networking libraries or mobile platforms).  A new open source standard is just out called cloudfoundry. That will actually help PaaS to move accross vendors easily.  So how important is for one to move between service providers is the last important thing to think about while picking a cloud model.

Another important thing is to check their SLA for their uptime guarantee.  Providers like Amazon EC2 will even give you options of reliability.  If your company is new and not many customers are present, you can choose the cheaper one with slightly less uptime guarantee  

Another factor is the pricing model. Will you be charged per instance or per usage.  If you are a new company, you would prefer  a vendor that charges per usage(pay-as-you-go) and not per instance configured.  That will put the costs low and there would not be any commitment charges.

The next factor to look is Elastic Load balancing availability?  This becomes very important when your application becomes a hit and you have to scale for many users.  PaaS providers normally always have it. For IaaS providers one has to see available options and pricing models.

In addition to that, one has to see if the service provider is providing tools to monitor the health and also be able to control/diagnose them. Some vendors have automation features and they are very useful. Ex:- If CPU utilization % is greater than some configured value, you could be able to fire up another instance etc.  Some vendors provide only tools to monitor and configure but not diagnose in case of issues.  Some even have mobile apps to control and manage the services on the road.  We have to understand our needs before checking that factor. 

One need to be able to pick a vendor from which you can always migrate to a different vendor very easily.  One can also have two instances running on two different vendors and one can act as a spare. So if anything happens to one vendor resulting in downtime for the application,  shifting to other vendor is very easy. Spare becomes relevant only if we choose a not so popular/reliable vendors to save some money.

Some Vendors provide Linux or Windows instances and some provide you direct virtual machine instances.  If it is direct virtual machines you might have more flexibility in choosing your application's building blocks. In addition to that, you also have more freedom in moving between vendors is straightforward. All one has to do is pick a vendor in the list of vCloud partners.

Last but not the least  is Security.  One can ask the vendor a list of questions such as, who has access to servers, database and what are their disaster recovery procedures etc.  If a vendor is not ready to provide the security and access logs, then their overall quality becomes questionable.

I hope that for someone looking to pick a cloud vendor for their business or startup this write-up will set the mindset in the right direction.

Wednesday, May 11, 2011

More Speed or More Cores?

This is a common question for everyone about to buy new computer hardware.  From a regular Joe to a multi national corporation, everyone has to think about it.  I would like to give my take on this topic from both point of views and also on why this topic is more relevant than ever.

Nowadays we have very fast processors clocked most commonly at 2.2-2.4 GHz range but can even go to 3.46 GHz (i7 extreme).  With turbo boost you might even reach  3.73GHz.  The math is simple here. The more faster your CPU clock runs, the more instructions it can run and hence your video is converted much faster.  Same is the case with your mp3 conversion or any other operation one is trying to do.   But that generates more heat and consumes more power which is very bad for computers in general and laptops in specific.   If this is happening in a data center, the cooling costs increase by even large amount (As the relation between temperature increase and energy needed to cool it is not linear).

The advent of the multi-core processors, solves just that issue.  That is one can process data more faster without increasing the clock speed.  However a dual core 1.5GHz is not equal to a single core 3GHz.  Only of the operations are done in parallel one can achieve better performance using multi core processor. By having dual core some sets of operations can be done faster. i.e. If they are very independent tasks and the data fits in the L1 cache and do not need to load L2 and L3 cache from memory very frequently.  This will happen only if the applications and the operating system are designed with that in mind.  ex: An audio encoding application might have two threads, one reading the data in format 1 from a CD and the second thread is converting in memory data form format 1 to format 2.

Not all applications are designed to suit multi-core as doing that is more complicated and hence is costly.  With apple's Grand Central Dispatch (GCD) some of that responsibility is being shifted from the application to the OS.  That is a welcome change.  Applications that make use of GCD perform better better.  I hope other platforms do something like that soon.

Today this more speed vs more cores discussion is even more relevant due to the advent of smartphones and mobile devices. The iPhones, iPads  and the numerous androids out there are doing a lot more processing that mobile phones 3 years ago.  If they have to perform much better they need more CPU speed. But of that is increased too much, the battery life will go down and the device gets too hot.  Recently devices like iPad 2 and Motorola XOOM started having dual cores.  It is a welcome change.  I am not sure how many applications currently make use of the dual cores but I can see that one day 'hopefully' soon everyone will make applications with that in mind.

So by now it must be clear that all we need is more cores and just we have to make sure that the OS and the applications are made to use them.  When someone is building their own data center they would have already taken care of it.  A normal consumer just has to pick the OS that has built in support for that.
This is yet another way to Go Green!

So what will we have future? Maybe in the next 5 years or so we will have a multi-processor system (not just a multi-core) and the OS (ex:- Haiku) would be able to handle more than one processor very easily.


Please leave a line if this helps!