Thursday, 7 June 2012

Why we will never have a revolution against corruption in Bangladesh – a naive view


Set A: Ruling Party – Reap benefits in current state when their party is in government
Set B: Government loyalists – Reap benefits all year round, working for government
Set C: Paid Political workers – Reap benefits all year round, working for or against government
Set D: Dormant – have become immune and more concerned with bringing food to the table
Set E: Revolutionary Nationalist – active protesters against any government
Set F: Opposition Party – Invest in opposing current government to reap benefits in future

From my naive understanding, in order to have revolution similar to the Arab Spring, set E i.e. the Revolutionary Nationalist has to significantly inflate. The practical options are:

a.    Employ set C i.e. political workers – this can only be done through incurring huge costs, funded by Set F, i.e. opposition party. This usually never works out, as the original agenda of Set E is lost in the process.

b.    Employ set D i.e. dormant population – although the more appropriate approach, this can be achieved only through substantial length of oppression under the same party to build enough hatred and anger with the presence of a new revolutionary leader. Trouble is, this is highly unlikely given we have a memory refresh every 5 years. Also faint chance of this happening is immediately leveraged by Set F, the opposition party, therefore again, original agenda lost in the process.

c.    Under the most unlikely event of a new party forming within set D&E, all other sets ensure it is neutralized to secure the investments they have made as incumbents – therefore the revolution becomes too costly for the dormant population to continue.

The main culprits from my point of view are the Political Workers – they have neither love for the nation, nor ethics behind the cause they fight for. Yet – they have played a pivotal role during each election in the last 20 years.

The dormant population has led itself into its own fate – we wait in traffic for 4 hours, watch the meter increase and complain on social media through our phones, instead of abandoning the rented vehicle and joining in a 30 minute march back home.

Tuesday, 22 May 2012

Architecture Snaps

 

Stone Animals on the Natural History Museum, London, UK

 Panoramic View of Leeds Castle, Leeds, UK
 Liverpool Eye & Echo Arena, Liverpool, UK
 The Liver Building, Liverpool UK
 Windsor Castle, Windsor, UK
Westminster Abbey, London, UK
St. Pancras, London, UK
 Wollaton Hall, Nottingham, UK

Thursday, 9 February 2012

Basic SQL for Data Reconciliation


Excel’s VLOOKUP Function is probably the most used one for basic Data Analysis in a spreadsheet environment. Below are some SQL code snippets that do what VLOOKUP does in theory, but can be used when the data is in SQL Database for any reason.

The following tables will be used to describe on some very common scenarios. Let’s assume we have two independent data stores which are not integrated hence require regular reconciliation. Table A contains the Products Inventory. Table B contains the Online Catalog of those products. Table C is a mapping table across the two platforms. Table C contains sales figures made Online.


Product_ID
ProductName
Price
Category
OnlineCode
TotalSale
ZJU897JHG
JB Raincoat
110.00
Clothing
NULL
 NULL
JOK23MK30
Autograph Luxury Col
180.00
Clothing
NULL
 NULL
UIO0-SDNK
Animal Leather Wallet
20.00
Clothing
NULL
 NULL
PO0IKJU-90
Austin Reed B/W Shirt
60.00
Clothing
NULL
 NULL
78H-09-POI
Nike Sports Jacket
80.00
Clothing
NULL
 NULL
Table A: ProductDetails

OnlineCode
CreationDate
Stock
OL-FAS-002
12.03.2011
5
OL-FOD-091
23.06.2011
25
EX-COM-09
13.05.2011
60
OL-EXC-178
30.11.2011
14
EX-FAS-450
05.10.2011
10
Table B: OnlineProductCatalog

Product_ID
OnlineCode
ZJU897JHG
OL-FAS-002
II9080JM77
OL-FOD-091
JOK23MK30
OL-EXC-178
UIO0-SDNK
EX-FAS-450
Table C: ProductOnlineMapping

OnlineCode
Date
Qty
OL-FAS-002
14.03.2011
3
OL-FAS-002
15.03.2011
6
OL-FOD-091
23.06.2011
12
OL-FOD-091
25.06.2011
9
EX-COM-09
13.05.2011
20
EX-COM-09
13.05.2011
13
OL-EXC-178
30.11.2011
5
OL-EXC-178
30.11.2011
5
OL-EXC-178
30.11.2011
3
EX-FAS-450
05.10.2011
2
EX-FAS-450
05.10.2011
7
Table D: OnlineSales




Case 1:   Identify products that are not available in the Online Store
SQL Code A:          Nested queries:

SELECT DISTINCT Product_ID
FROM ProductDetails
WHERE Product_ID NOT IN
                (
SELECT DISTINCT Product_ID
FROM ProductOnlineMapping
                )

SQL Code B:          LEFT JOIN
SELECT DISTINCT P.Product_ID
FROM ProductDetails P     LEFT JOIN ProductOnlineMapping PM ON P.Product_ID = PM. Product_ID
                                                LEFT JOIN OnlineProductCatalog OC ON PM. OnlineCode = OC. OnlineCode
WHERE OC.OnlineCode IS NULL


Case 2:   Update Product Details table so it contains each item’s Online Code
SQL Code :             UPDATE script with INNER JOIN

UPDATE ProductDetails
SET OnlineCode = PM. OnlineCode
FROM ProductDetails P INNER JOIN ProductOnlineMapping PM
ON P.Product_ID = PM. Product_ID


Case 3:   Update ProductDetails table so it contains total online sale per item
SQL Code:             

-- Declare a temporary table / view to store results of the aggregate function
DECLARE @ProductTotalSale table(
   
Product_ID varchar(20),
    TotalSale int    );
 

-- Store results of the aggregate function
INSERT INTO  @ProductTotalSale
SELECT P.
Product_ID, SUM(OS.Qty)
from @ProductDetails P INNER JOIN @
ProductOnlineMapping PO ON P.Product_ID = PO.Product_ID
INNER JOIN @OnlineSales OS ON PO.OnlineCode = OS.OnlineCode
GROUP BY P.Product_ID


-- Update Products table using the stored values
UPDATE @
ProductDetails SET TotalSale= PTS.TotalSale
FROM @
ProductDetails P INNER JOIN @ProductTotalSale PTS ON P.Product_ID = PTS.Product_ID

Feel free to leave a comment if you have suggestions / queries.

Sunday, 25 December 2011

Selling the sizzle, not the Steak



(Jump to 3rd paragraph if you don’t want to know me or why I wrote this)


People who know me very well will agree I’ve always been an antagonist of style over substance. When I buy something, I never pay a premium for brand – I need things to be functional, reliable and fit the contemporary need. This behaviour is exhibited in my profession too. As an IT consultant, I am often required to answer the ‘Why’, ‘What’, & ‘How’ behind a solution. Being the minimalist I am, you might have noted I have missed out ‘Who’, ‘Where’, ‘When’ simply because I don’t consider them too relevant for the client. Nevertheless, I tend to focus on answering the ‘How’. In brief, I am always concerned about the content rather then the packaging – I’d like to know end-to-end how a product works and whether it ticks the all of the boxes in the client’s minimalistic list of requirements.

When I joined one of the largest and most successful Global Technology Consultancies, it took me over a year to fit in to the culture. Every successful manager I spoke to seemed to very well spoken in strategy, vision, thought leadership but never bother speaking about the underlying technology, how it all works etc – it made very little sense to me. Some of the most frequently used phrases were ‘high level’, ‘overall landscape’ and ‘big picture’. It seemed as though a techno-phobic corporate culture that avoids getting their hands dirty cannot possibly sustain in a competitive market filled with IT slaves. I then stumbled upon one of our core approach-to-market values: “Sell the sizzle, not the steak”. It struck me as if the style over substance phenomenon that I always avoided was characteristic & reputational to my company. Only then did I learn this is in fact a very old sales technique that plays with human psychology.      

Selling the sizzle not the steak is an old sales technique that focuses on the overall experience by promoting the factors that excites your senses, emotion etc over the entire need. The following is something I found really interesting from Marketing Comet:

When we go out to eat (for steak or whatever) it's not for the food itself. Sure, I may be hungry, but really I have a lot of choices to satisfy my hunger. I choose a restaurant because it gives me the kind of experience I want and solves my hunger problem. Taste, smell, ambiance, location, service are just a few of the reasons I might choose a particular restaurant. And these things speak to my emotions through my senses.” 

One of my personal examples is buying handhelds – for me, no matter how many times I have read reviews, watched un-boxing videos and memorized the bundle and technical specifications, I always choose the one which is ergonomically compatible. At the end of the day its overall experience which true salesmen recognize is a humanistic element.

So how does selling technology fit in to this picture? Let’s say the client requires the bog-standard data migration or systems integration program – this is the steak. And let’s face it; every service provider can deliver this, same way every restaurant can prepare a steak. So how do you sustain as the premium rate service provider – how do you sell the steak at the highest rate? Answer – you don’t focus on selling the steak, you sell the sizzle. You build relations of trust and reliability with the client so they know it’s not just a walk-in and walk-out assignment for you. You engage with strategy and vision so the client finds a technology partner in you – not just operational support. Instead of focusing on how you deploy the program i.e. which technology you will go for, invest time in focusing on the why the program is being delivered, or what your benefits will be. In short, recognize, appreciate and tap into the human element behind the client and not the technology they are asking for.

Ten points for realizing that only the last 3 or 4 lines actually describe how to practice this sales technique in technology consulting - the rest is selling the sizzle ;)

Wednesday, 3 November 2010

Devil Behind the Clouds


The photo was taken during an eclipse as the sun was partly covered by the moon. The rest of the arc was covered by the cloud. Making it look like devils horns and the characteristic red is simply stunning.

Now the metaphoric - The photo captures a church in front. Satan hides to cause the damage despite having God in the light. OR - although the devil may seem obvious, look carefully and you will find God.

Monday, 1 November 2010

East vs West - User Experience

I've decided to write some articles on how the west and east are different in areas that I am most familiar with. This one is about a common GUI feature - Graphic User Interfaces and user experiences in particular. I should warn you that I am notorious for stereotyping.

Ok, so let's start (I say start cos I intend to add to this series).

Creating Entities on Web based systems

In the past, online systems would gather all your data and then create an entity. Say for e.g. if you were placing an order, you would have to complete a form and then hit submit. The website's program would gather all your info, create a new entry on the database.

Later things started getting complex, for e.g. with shopping baskets, and thus the forms started getting bulkier which meant you'd have to spend over 10 minutes just filling up stuff before you can have your order created.

Hence, the standard was to create the order first, and then update this. Here is where the difference comes:

In the west, UK for example, a database entry is created and the Order ID is passed to the interface from the order database. This is like a placeholder, that the user is unaware of. This is not displayed on the screen untill the form is completed. When the form is complete, the record is updated. The user does not see any of the complicated token system. The reason the 'hidden token' is practiced, is because it allows the site to monitor orders that were initiated but not placed. Also, it allows queueing when orders are processed. But main motivation is to make life easy for the users or first time visitors.

In the east however, India for example, all this is exposed to the front end. The user has to first create a 'blank' order. Then the user has to open the blank order and add details to it by using an update option. Technically this is very robust - the user can keep a record of the 'blank' order created. Also, the user gets to understand how the site works (not sure how this helps really)

However, the problems with the later method is it's not user friendly - the user will need to understand two streams of operations on the site
a. Order Create
b. Order Update

I think it boils down to assumption of the audience's intelligence.
Programmers in India find it hard to appreciate how naive some of their western users can be. It also relates back to how we treat people - in the west, there is a general appreciation for other's time and energy. People in the west (in general) are caring and friendly when it comes to customer care. Back home however .. let's just say it's a different story.

My Favourite Lines from Merchant of Venice

SALARINO:
Why, I am sure, if he forfeit, thou wilt not take his flesh: what's that good for?

SHYLOCK:
To bait fish withal: if it will feed nothing else, it will feed my revenge.

He has disgraced me, and hindered me half a million;
laughed at my losses,
mocked at my gains,
scorned my nation,
thwarted my bargains,
cooled my friends, heated mine enemies;

and what's his reason? I am a Jew.
Hath not a Jew eyes?
hath not a Jew hands,
organs, dimensions, senses, affections, passions?

fed with the same food,
hurt with the same weapons,
subject to the same diseases,
healed by the same means,
warmed and cooled by the same winter and summer, as a Christian is?

If you prick us, do we not bleed?
if you tickle us, do we not laugh?
if you poison us, do we not die?
and if you wrong us, shall we not revenge?

If we are like you in the rest, we will resemble you in that.
If a Jew wrong a Christian, what is his humility? Revenge.
If a Christian wrong a Jew, what should his sufferance be by Christian example? Why, revenge.

The villany you teach me, I will execute, and it shall go hard but I will better the instruction.