Wednesday, September 30, 2015

Test pyramid


The test pyramid is one of the efficient approaches to test a complex system. Recently I had opportunity to work on a banking system and found the test pyramid of great value in testing the system. The banking system is based on event based architecture.


In a test pyramid, we draw a pyramid with horizontal slices. Each slice represents a type of testing. The bottom part would be Units tests, followed by functional tests, Integration tests (within system), contract tests (system interacting with third party system), external integration tests (system and other third party systems) and UI tests.


The unit test can be normal unit tests, or mock mvc. Functional tests can be covered using Axon functional tests. Integration tests (user journey tests) would be in groovy. The performance tests could be in scala.  The contract tests (cross functional domains) would be in java.  UI tests could be completely in javascript, like jasmine framework.




Thursday, January 29, 2015

Never missing your friends birthdays

I always had this problem of missing my friends birthdays. I would remember it a day afterwards or sometimes ( worst scenario), they would call me up and remind me. I would be engrossed in my work and I would lose myself in time. And this is the only reason. I really cared a lot for my near and dear ones.

The following post is an attempt to solve the issue of not remembering birthdays on time.

Facebook had a list of all the birthdays of my friends. Brilliant!

Sometime back, I had downloaded all the birthdays from Facebook in Excel format.

Google search revealed 123greetings and AmericanGreetings.

And my work is in progress...

Tuesday, January 27, 2015

Studying C# - process vs thread


Process is a virtual address space.


They execute code. They can be considered as a path of execution through a single process. This means they follow a path of execution through an exe and probably many dll's in the process space.

Threads usually have access to all the code within a process space. But in .Net managed code, the accessible of the threads are limited to the app domain.

In windows, when all the the threads have exited from a process space, windows calls the "tear down" method of the process to destroy the process.

Multi threading advantages

1. Can utilize multi-cores in multi-core machines
2. Can give a more responsive UI by increasing the priority for the UI thread.
3. Perform CPU bound operations while I/O operations are waiting to complete.


In a single thread CPU, it will take more time.


This is due to the extra time for scheduler to stop a thread and assign the remaining part of the work to the next thread.

Friday, January 23, 2015

Finding a rented flat in a new city (Pune) in four days - and understanding about business relationships!

Last week, I joined TW and relocated to Pune. And I had to find a flat as quickly as possible. How do I approach this problem? What are the choices?
I was able to do it in a record 4 days, and here is my experience of the same.

Fortunately, I was able to narrow down a few choices.

  1. Send an email to my colleagues in my company, Thoughtworks.
  2. Talk to as many people as I can. Finding the right timing is important, since most of the people are busy in projects and asking a question like " I am looking for a flat..blah..blah" during a business meeting is not good for relationship building. 
  3. Look for a portal where colleagues publish information about rented houses. The contributors could be owners or brokers. And if the owners are from TW's , then nothing like it.
  4. Find out about the online sites which cater to users looking for a rented flat in Pune.
  5. Meet the brokers - professionals who earn their livelihood by taking one month's rent and providing you a wide variety of flats to choose from.
  6. Use Just dial to find brokers in the areas I liked.
  7. Talk to my friends/relatives and find out which is the best place to live, the advantages and disadvantages of each area etc.


1. Sending an email to the TW group, Pune_Noise did not provide any results initially. I got only one lead, which led to a house already let out.
2. I found sites like 99acres, magic bricks which gave really useful information. I also found sites unknown to me so far like etc which were suggestions from friends who replied to my earlier email #1.
3. I met the brokers and this is the most important part => Instead of restricting myself - as I did in all previous cases (Bangalore, Hyderabad), I contacted as many brokers as I could find. By interacting with a large number of brokers, I could find a few gems in them. The majority did include people who are in for a quick buck, brokers who don't understand your requirements and some people who have gone virtually crazy by hearing stories about others making money and want to try it themselves. Remember the startups? Even people like auto and car drivers were "virtual" brokers, asking you about your requirements if you give them a chance.

How people helped - and in unpredictable ways.

Somebody in TW group saw my email and responded that she had seen somebody (xyz) post a requirement for a flat. Since this post was three weeks back, I had not seen it. She forwarded the email to me, and also sent the phone number of the person who had originally posted it. I contact to be told that the particular flat was already taken. Before I kept my phone down, he told me about another flat he had seen sometime back. At that time, he was looking out for a flat for his friend who was going to get married. The flat was really good, but his friend's office was so far away from this flat, that he decided not to take it. Since the flat was really good, he recommended the flat to me and gave me the broker's number.

I contacted the broker, saw the flat and liked it. It was in Kalyani Nagar, 2 kms from office and had Joggers Park nearby. It did not have amenities like swimming pool and jogging tracks ( which I hardly used anyway). It was also near to two of the international schools where I wanted to enrol my daughter. The flat was probably old, but well maintained. More about this broker and the flat... later on.

Here they come - the "PROFESSIONALS".

I was also bombarded with "Professional" brokers with flats in rohan mithila, a residential society in Viman Nagar, Pune. This was also near my office and the buildings were recently constructed. It had all modern amenities like pipe gas, swimming pool, garden etc. You name it and they have it.
The second visit to RM revealed that pipe gas was not there, but would be coming in next two months (hopefully). The broker had cheated us in the first visit when he showed us a flat where the gas connection pipe was soldered to give the impression that residents had already been using it.
The third visit revealed that the pool they showed me was not a swimming pool at all, since I noticed there were no steps leading to the "pool". It was a shallow body of water for decoration and brokers were fooling people by telling them that it was the kid's swimming pool.

I came to know about the loud noise caused by fighter planes at 5.00 am when air force pilots train in the military airport. This was not told to us earlier, but we found out later on, when we talked to some of the residents. We also came to know that there was no corporation water there. Coupled with the air pollution, caused by strong windows and barren land between RM and Airport, we decided to drop the idea of renting a flat in RM.

Hermes was the next option to be checked. Overall ,a good housing society, with no security issues, good drinking water, a very big garden in the middle of the society and 100 m walking distance from the office. But it was a little far from the international schools we were looking for.

Final Decision

Finally, what tilted the decision in favour of the first broker was his genuine attitude of putting all his cards on the table ( he tells about the disadvantages of each flat well in advance along with the advantages), he understands our requirements (and shows us only the flats which suit our requirements and explains why he did not show flats in other societies). If we force him, he shows us other flats too (remember clients forcing us to develop a feature even when we feel in our bones it is absolutely useless to them), but then we realise he was right all along. There is never sarcasm or criticism in his voice even when we are absolutely wrong. We did not believe him initially and through our experience with other brokers, he was always proven right. The mistakes of other brokers (when they were not truthful and later found out) played to his advantage. This enabled him to gain our trust. And even after he received his commission, he still spends days and countless hours to do us a favour, like getting us a gas connection or finding people to clean the flat just before my goods are delivered from Hyderabad. Last but not the least, he buys us cakes and goodies for every occasion.
So are you surprised when I am mention him in my blog?

I still remember his words when i first met him " Every business relationship should be forever. It is not to be used for getting money from the other person as soon as possible. By keeping our attention on trust and relationship building, cash flow will be automatically taken care of ". I am going to take a leaf out of his book and apply it more in my consulting practice. Maybe you could too?

Learning C#

I am planning to revise C#. What better way to learn than learning it from videos hosted at pluralsight?

The best free and Paid Online courses for Software

Free courses

The best free course website would be coursera

It provides courses, assignments from the leading universities of the world and it is is free.

Paid courses

Plural sight provided training on latest software technologies. With bookmark feature for each lesson, and ability to provide training through videos which can be played on any browser, this is a training website you do not want to miss.