India’s Jugaad Philosophy – Why I am not a big fan of it

In the last few years a lot attention has been given to the word ‘jugaad’. So much attention that I have seen it being mentioned by authors of reputable news sites, blogs, etc. Some guys even wrote a book on it (no, I haven’t read it). But really, it makes you think that this newly discovered ‘jugaad’ must be some sort of a magic spell to set things straight when in tight situations, right?

Before I go ahead and give you a download on why I am not a big fan of it, lets define ‘jugaad’ first. For that lets look to Wikipedia

“Jugaad is a colloquial Hindi word that can mean an innovative fix or a simple work-around,[1] sometimes pejoratively used for solutions that bend rules, or a resource that can be used as such, or a person who can solve a complicated issue. It is used as much to describe enterprising street mechanics as for political fixers. This meaning is often used to signify creativity to make existing things work or to create new things with meagre resources.”

Sounds sexy, doesn’t it? Maybe even makes us Indians proud for our ability to work in tight situations.

Firstly (and here’s where I get flames from some of you), innovation within meager means is not an exclusive Indian phenomenon… it’s the same world over. Everything audacious had to start with meager means at some point because most people really didn’t support such ideas. But anyway, that’s not important. The second point is however.

Secondly, jugaad is a quick fix in the name of innovation. Jugaad is at times (I would argue most of the time) a product of lack of planning. I have never seen a project implementation plan with a section dedicated to jugaads. They happen when there are leaks, mostly out of desperation or no choice. Don’t get me wrong, I am not saying quick fixes are bad. In fact, at times, its the quick fix that helps us deliver the last mile.

So, what’s bothering me? Hmmm… let me see if I can explain that. If I were to say “quick fix” = “innovation”, would you frown? I wager most of you would. Even if quick fix is innovative? I guessed so. The difference between jugaad and innovation is its life span and impact on overall quality in the long term. Innovation is strategic, jugaad is tactical. Innovation is part of a fixed plan… jugaad is the fix in the plan. Innovation is long term, jugaad is short term.

Finally, you also need to consider the long term impact of short term solutions. Universe has a way of balancing these things. Easy fixes to problems disappear as quickly as they come. Jugaad is a transaction where you maybe buying time by paying with quality. Trust me, you don’t want to be in that place.

So the next time you think of jugaad, think long term and think quality and then focus on the solution. That’s when you will have… “jugnovation” 🙂


Understanding the “software developer” in the other guy

Time and again, the newspapers in India run stories about the talent gap in the new recruits saying that most of them are unemployable. In my experience of being in position where I have to recruit along with leading and mentoring people, I must say, that’s unfortunately… true.

I have had a lot of young guys come to me for a job as software developers after having passed out of their college. It seems that they believe the IT industry to be a sun shine industry where the pay is good, the perks are high and you seem to get a sense of achievement when you work. Well, that’s true to some extent. However, what most job seekers don’t stop to look at is… themselves.

The first question I ask a person who comes to be for a job is why they want to become a software programmer. If the answer circulates around invention / innovation then I am happy to take them to the next step. If they answer anything else, I am not too keen anymore. Why? Because programming is all about invention and innovation. If you don’t like solving logical riddles, chances are you are not going to end up being a good programmer. In fact, you are more likely to quit or stagnate pretty soon in your career as a programmer.

You see, programming is an art of visualising what’s abstract and/or can’t be seen. It has to be perceived and understood logically. You are going to see cause and effect and it will be your job (as a developer) to figure out the process in between. Not only that, you will also need to cross-verify your hypothesis at every stage. If learning doesn’t excite you, its probably best to stay away from this field. You need to have a keen sense of observation.

People like to believe that they have it in themselves… and a lot of people probably do. However, there are easier ways of figuring that out than getting a job and spending a a few months / years.

So you may well ask, “I like programming but find it difficult to do so… what do I do?” Valid question. What can you do. There are number of complementing fields to programming that use a lot of capabilities that an adept programmer may have. For example: requirement analysis, testing and quality assurance, database designing, etc. You could try your hands at any of these in case programming isn’t cutting it for you.

A good programmer is always non-assuming. In the back of his mind, he always knows that there could be something he may have missed and therefore always alert and ready to understand.

Delphi Datasnap – Memory Leak and it’s workaround.

Datasnap – Fetching data using SQL from the server…. WITHOUT crashing the server!


For the past few weeks, I had been noticing a snag in my application that kep coming up randomly. This was to do with calling the a particular function that was responsible for taking an Sql as a string and return a DatasetProvider name so that the data could be accessed on the client side’s client dataset.


The function was written something like this on the Datasnap server


function GetDataForClient(SQL: string): stirng;


qryNew: TADOQuery;

dspNew: TDatasetProvider;


qryNew := TADOQuery.Create(nil);

qryNew.Connection := SomeADOConnectionObject;

qryNew.SQL.Text := SQL;

qryNew.Name := ‘qry’+IntToStr(UniqueID);


dspNew := TDatasetProvider.Create(nil);

dspNew.Name := ‘dsp’+IntToStr(UniqueID);

dspNew.Dataset := qryNew;




Result := dspNew.Name;



So, basically, as you may have already figured out, the function is meant to be called on the client side as follows (assuming all other properties were set correctly and DS server is running):


procedure ClientFetchData;


ClientDataset.ProviderName := DatasnapServerMethods.GetDataForClient(‘select * from employees;’);





The above code worked quite well for… until sometime… as the application scaled and the function kept being calling more often. Randomly, the application would throw an exception of invalid memory.


I tried several things after that, such as releasing the object after the data was fetched at the client side, running the query in a thread and then freeing the thread’s objects and the thread itself. But for some reason, the error wouldn’t go away, though the occurrence of it had reduced to only once or twice a day compared to the previous occurrence of every other hour.


Anyhow, this wasn’t something I could ignore for a long time so I decided to rough it out and finally, I found a work around that worked beautifully…. Dataset Pool!


What I did was create a pool of 20 queries objects and it’s dataset providers when the DS server session was created and destroy them when the session was destroyed. I also maintained the last accessed query/provider pair so as to redirect the next call to the next object in the pool. The moment I reached the last object, I reset the count to access the first object of the pool.


The basic reason to do that was to ensure that I am not creating any objects dynamically on the call of the function (as mentioned in GetDataForClient).


Here’s the implementation of the functionaility.


TDataPair = class


Query: TADOQuery;

Provider: TDataSetProvider;



The basic class that holds the pair of query/dataset.


TServerMethods2 = class(TDSServerModule)

cnt1: TADOConnection;

procedure DSServerModuleCreate(Sender: TObject);

procedure DSServerModuleDestroy(Sender: TObject);


{ Private declarations }

FPoolSize: Integer; // the pool size

FDataPool: TStringList; // the stirng list object that which acts as the pool

FLastObjIndex: Integer; // var that maintains the last accessed object from the pool


{ Public declarations }

function GetData(SQL: string): Integer;



procedure TServerMethods2.DSServerModuleCreate(Sender: TObject);


I: Integer;

DP: TDataPair;


FLastObjIndex := -1;

FPoolSize := 20;

FDataPool := TStringList.Create;

for I := 0 to FPoolSize – 1 do


DP := TDataPair.Create;


DP.Query := TADOQuery.Create(Self);

DP.Query.Name := ‘qry’+IntToStr(I);

DP.Query.ConnectionString := ‘<<some valid connection string>>’;


DP.Provider := TDataSetProvider.Create(Self);

DP.Provider.Name := ‘dsp’+IntToStr(I);

DP.Provider.DataSet := DP.Query;


FDataPool.AddObject(IntToStr(I), DP);





procedure TServerMethods2.DSServerModuleDestroy(Sender: TObject);


I: Integer;

DP: TDataPair;


for I := 0 to FPoolSize – 1 do


DP := (FDataPool.Objects[I] as TDataPair);









function TServerMethods2.GetData(SQL: string): Integer;


DP: TDataPair;


if FLastObjIndex = 19 then

FLastObjIndex := 0




DP := (FDataPool.Objects[FLastObjIndex] as TDataPair);


DP.Query.SQL.Text := SQL;



Result := FLastObjIndex;




On the client side, this would what the call would look like:


procedure TForm7.btn1Click(Sender: TObject);



cds1.ProviderName := ‘dsp’ + IntToStr(Server.GetData(‘select * from employees;’));




The above implementation does exactly what the GetDataForClient function did earlier except that it doesn’t create any new objects on the server. Plus, it resolved the access violation exception.



Happy coding!

MIS to SFS….. Huh?! SFS?? What’s that?!

Management Information System is a overrated. Here’s a new perspective… I call it Staff Feedback System.

Yeah, I know… not every creative with the term ( S-F-S )… but I coined this one myself! 😉

Any hoo… while I manage a works in the company I have often thought about achieving goals and what’s the best way to get there. This recent thought came to me when I was thinking about the most scientific way measuring success… in this case it was… umm.. ahem.. cough… loosing weight. Yeah… for those of you who have met me know that I could do without a few kilos (roughly 20). So, I got on to my computer and made an excel sheet that had days on the x axis and month of the y axis. I put my current weight in today’s cell…target weight at the end of the month. Divided it by the no. of days in that month… which gave me exactly how much weight I should loose everyday to meet my target. And there’s an actual weight column where I put my actual weight. The spreadsheet shows … on daily basis… if I am on target or off target. Of course, I could also add in the details of what I eat everyday… how much I exercised (new parameters) and set a limit to that too… but that wouldn’t be quite as measurable, would it? While this is the 7th day of the chart’s existence, I have come to realise that like our body, our work also has fitness parameters.

As the CEO / Owner / Manager … whatever of the company, it becomes imperative to measure the fitness levels of each employee’s productivity… AND give that feedback to them on a daily basis so that they can re-align themselves to their daily target. When you have such agile data available, most people will bounce back to align themselves. Those who dont… well.. you know what to do. Sales, revenues, profits are dead data. Why? Because they always come in the END of the quarter and there’s nothing you can do about that quarter anyway… it’s history. So, instead of working on dead data, why not work on living data… that DIRECTLY influence the performance that we measure at the end?

Here’s an example… I started measuring daily in out times of my guys. I am sure most people do that. But instead of giving the details at the end of the month, I started giving them details of their average in time, out time and the average working hours per day EVERY TIME they punch in / out. The result? The late comers came in sooner… the early goers left on time and everyone started clocking the right hours per day. All this without anyone having to tell them anything!


As it is important for the management to have reports, I believe that productivity of the organisation can also be increased by giving employees some sort of a score card. It might be worthwhile investing a bit into that too.

Hope this post was helpful. As always, open to your feedback. 🙂

Lessons from successes (not just failures!)

Everyone seems to think that one only learns a lesson when they fail. Though that is mostly true, I think lessons can be learnt from successes too!
In 2009, I was “forced” (why forced? I will come to that some other time…).. forced to start a tech product company. I had very little time to launch the product so I had to make some hard decision very very quickly.

I remember sitting in one of our brain storming sessions on the features the products need to have on the day of the launch. Lots of ideas were flying around, people saying, “we must have this in it” and other guy saying…”customers wont buy if it doesn’t have that”. The cautious (less innovative) guys said that the product must at least do what the existing products in the market did. Well, you know how it goes from here, don’t you? Before we even wrote first line of code, we had 50 lines of features to include. Now, I don’t know about you, but such long features list have baffled me even as a consumer, let alone being a vendor!

It was clear to me at that instant that we were heading for trouble. Conventional wisdom will not help here. The only way the product would capture market share, I thought to myself, was that it did that one thing that the customer needed and it did it better than anyone else. Suddenly the importance of the list of features disappeared and what emerged was importance of quality of those 2 – 3 features that were dead important to the customer. This had number of benefits. Primararily, we as a team, could focus sharply because the scope was narrowed. Second, we could test immediately since we had fewer features to develop, we could develop them faster, make it easier to use, vaghera… vaghera (etc, etc). Third, it didn’t cost us much money. You all know how good it feels when something doesn’t cost THAT much money, right? 🙂

There was still a problem… question of why would customer want to shift to our product if it did what existing products already did in a better way?… kept nagging me. The answer to that came to me in a two pronged way.

Number one: If the product does something better than any of it’s competitor, it will get some traction. I thought how Google managed to take away email share from Hotmail despite Hotmail being the prime email provider for millions at that time. Gmail simply provided better email experience and people didn’t mind changing their email for that. That’s brought me solace for some reason.

Number two: If there was one feature… just one feature… that no other product had (even if it was a gimmick), there would be a way to attract customer’s attention. And that’s exactly what we did. I could go to the customer and say… “No other product in the market can give you this.” Suddenly, we were perceived better than competition!

Conclusion (this is the part you were waiting for) is that we managed to capture some of the largest customers in Mumbai and company was profitable from year one!


1. If you are launching something new, keep the focus narrow. Choose your feature wisely. Invest more time in testing rather than adding new features.

2. Keep something that makes your product stand out. I am not suggesting that you add something ridiculous. All I am saying is that it must stand out enough to charm the customer.

Hope you could take something away from this. I am open to your feedback!