Apps : The fading relevance of the Windows Phone

I love windows !….there you go..I said it out loud. I love Microsoft products as well. In fact, I rely on Microsoft for my daily bread and butter. I would not hesitate to going as far as saying that MS products helped me learn programming faster.

I have sincerely tried to start using the Windows version of a mobile phone ever since I could afford it.

Palm Treo 800 (WP 6):

Palm Treo 700w Smartphone interesting phone…And quite frankly did not use it for anything more than playing “Bubble Breaker”, making phone calls, checking emails, and yeah…some not too amazing but bearable pictures.

Samsung Focus (WP 7):

Not a bad phone at all. Worked just fine. But no apps. And this was probably 2 years  ago….around 2011. At that time, I gave Windows the benefit of doubt, and let go simply because it was new. When WP8 was about to be released, I was excited as usual, however, MS decided to change specs on me. Which basically meant …. my WP7 phone was going to be useless if I wanted to upgrade. Hmm…ended up selling it off to get myself an iPhone 4. And yeah..not many apps.  At that time, there was no Facebook app, no Bank Of America app, nothing.

Nokia Lumia 1020 (WP8):

Fast forward to Q4 2013… enter the Nokia Lumia 1020..what more could I ask for.  Amazing camera, good size, great look, some more nice software updates from MS…..but NO @#$@#$ APPS even now. Some of the fundamental apps that people have come to love are still not available for WP8. Unfortunately, even with the awesomely unique Metro/Modern design, and the live tiles, Windows is losing its relevance in the phone area simple because of lack of apps. What good is all the infrastructure, if there is no one to use it. I got the Lumia 1020, used it for a week, and found it lacking. Most of my life is around dropbox, and windows does not support dropbox…rather, there is no authentic app for it yet. No instagram either.  Inspite of the lack of apps, I have to admit the simple fact… the apps that do exist are awesome. While I am not a big fan of the form factor, it is just a matter of getting used to. Sparing that, everything else about the WP8 hardware is amazing. Oh yeah, the camera grip kicks ass. Makes it a bit bulky, but hey…it has an additional power source there too.

So, lets see…considering my history, it looks like I am going to give Windows Phone one more chance when the next big OS push comes around…WP9 I hope. Hopefully, there will be enough good apps then. Hopefully, I shall stick to it.

Because, honestly the iPhone has lost its charm. There is nothing amazing about it anymore.

Independence from what ?

Today is the 15th of August …supposedly India’s independence day…after fighting the idea of being ruled by someone else, we decided to become independent. It has been 60+ years, and coming to think of it very carefully, somewhere along they way … we forgot what independence really means , and we landed in the same spot now … of being ruled by someone with none of our interests at heart… without actually realizing it.

Every week, there is a rape case in some city…..and just when that was becoming almost daily news, raping children….are you frikin serious.
– Men in India are getting desperate….and the whole “advancement” in culture and the imbalance in population growth is putting an unwanted strain on everyone.
– Kids….seriously…kids… desperate you really have become to stoop that low…to rape kids in a train bathroom.

Indian flag
Indian national flag

And did I fail to mention, people turning a blind eye to such things….just to keep out of trouble. We can call ourselves independent when
– we can roam about the streets at any time without fear
– we can help a stranger on the road

Until then…we are better off calling the British or even the people from Antarctica to rule over us. Either way it does not make a difference. At least with someone ruling us before, we as a country found our balls and spine in alignment to stand as one.

As a human, I don’t expect a crime free society….but let there be some dignity in the the crimes you commit.


My FitBit scare

I took the first bold step of trying to keep track of my daily activities. Not more for “Oh my God, I have to loose weight”, but just for curiosity, and more for motivation. Having said that, after a few days (not hours) of research and flip-flopping on what device I wanted to buy (Fitbit, Nike Fuel band, Jawbone Up), I took the leap of faith and went to Fitbit.

PRN6-JAWBONE-UP-BANDS-1yHigh.jpg (2700×1862)

Set up was a breeze, and everything was working beautifully, until exactly after 1 week of usage, the syncing feature stopped working. Needless to say, I tried to check on community forums at, but no use. Their help section was equally sucky. I emailed them, no response either. Damn…their customer service sucks. I decided to wear my engineer hat, and try to figure out a solution myself.

Step 1: Check out forums. Result : No use

Step 2: Contact support again. Result : Useless

Step 3: Go for the oldest trick in the book….RESTART the damn thing. Now how do I restart something with just one button. Keep it pressed….what happens…..a stop watch starts. This apparently is to track my sleep. After trying and trying for a bit, here was my EUREKA moment.

– Connect the tracker to the charger

– Plug the charger to a USB port somewhere

– Now, press that ONE button for almost 15-30 seconds. And now the screen will turn OFF. Phew. Turn it back ON again . Try syncing with either the dongle or your smartphone….and TADA… works. Silly thing put me through 3 days of misery.

SQL Server 20XX : Unable to modify table…

After 3+ years of not touching SQL Server, I managed to get my hands on SQL Server 2012.  After creating two tables, and deciding to modify the first table schema, I get my first error message….

“Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created….yada..yada…yada.”

So, sound coding methodologies suggest we analyze the change properly, and use caution while doing this. However, if you are starting off with a new project, there is always an option in the tools menu.

Tools > Options > Designers > Uncheck “Prevent saving changes that require table re-creation


Lessons Learned

I have worked for a third of my age as of this post. And most of my career has been at a single company…say 8+ years with smaller gigs elsewhere. I shall not argue with the school of people who consider that to be a insignificant period of time (career wise), but however, I have been blessed to work at a start-up when I joined the company, and had the privilege to see it go through its ups and downs.Here are the lessons I learnt and the wisdom I have collected over the years.

Presentation is KING

You could have an amazing idea, but if you cannot present it well, the sales/marketing team can do squat about it. This is the perfect recipe for disaster. Start ups are always cash strapped, and that is completely understandable. But, it is oh so important to be able to make a first impression to the client. It certainly goes a long way. Also, you as an individual would be more motivated to work on something that first of all looks good. Always ask yourself the question….”If I had all the money in the world, and I was in the market to buy a similar product, would I buy this?

Invest in a toolkit

I cannot emphasize enough how important this is to start ups, and yet a very few actually realize this. So, you have an amazing idea, and you are did invest in a kick ass UI/UX designer. The UI/UX designer gave you a 7048_workstation_repair_tool_kit.jpg (400×382)blue print of how to make a first impression. For the sake of argument, lets say, we are trying to develop a web application. If you think very carefully, every web application ever built has a similar set of controls, i.e., grid, file upload, reports, charts, etc. One could always argue about engineering being smart enough to build every single component from scratch, but the fact of the matter, engineering goes overboard, and is more expensive if you have to develop all the components from scratch. Also, when you are a start up , the most important thing is time to market…how quickly can you put something in front of the end user. So, that begs the question, are you willing to waste a few developers for a year (minimum) to come up with your component set, while you can invest $1000 per developer and have it all for good. The math does not add up when it comes to building it in house. Companies need to be smart about build vs. buy.

First, go deep into one vertical…not broad and shallow

One of the things I noticed is the urgency to expand your offerings. So a client signs a contract, and the management is excited about the prospects. They suddenly get so carried away that they start thinking about “WHAT ELSE” can we sell and make money on, instead of “DID WE DO A GOOD JOB DELIVERING WHAT WE PROMISED ?” This leads to the conflicting priorities to the people who actually do the work. While the excitement is contagious in the beginning, it starts getting nasty when reality bites….because…things never settle down. In a few cases, the diversion becomes a hit, but it is a one hit wonder. People fall into the notion that if it worked this time, we are doing something right, and try to repeat it over and over again, which leads to sudden explosion of the teams, working on too many different things, and suddenly everyone is lost.

Do not over hire

This follows from the previous paragraph of trying too hard to expand. Over-hiring is the biggest side effect, and it is a bad one. I have seen people sitting and browsing all day simply because they did not have anything else to do. I have seen managers keep hitting the “Send/Receive” button on Outlook all day. Keep in mind, all these resources are not cheap. I am not going to get into the discussion about hiring full-time vs. contractors, but its very important that see how many hats one can wear before it becomes too heavy.

Have a product team in place

Developers write code, not products. Its not their job to design the product, so do not make it their job. Once it goes to them, it never leaves them. A product team’s primary responsibility is to ensure we are building the right product, and to guide engineering in a methodical way. Engineers are like to feel important. Yes, they are the actual workers, but treat them well, they will bend backwards to make things happen. Treat them like shit, they will return the favor, and leave. Its imperative the company sets the right expectations on who develops the product, and who owns the product, and who owns the success of the product. Once developers are held responsible for owning and developing the product, it becomes their baby, and they will never let it go without a fight. If it stays with them, they will build engineering marvels with no practical use, because they don’t have the time to understand the market, analyze the competition, and prioritize……and develop at the same time.

Hire great talent

talent mgmt today-resized-600.jpg (600×600)Most of my previous product development projects, I had developers assigned to me. I did not have a say in whom I want until later. Thankfully, I had a lot of smart developers assigned to me. So, when it came to hiring talent, I made it very important that I hire someone who is really smart. I was so stringent in my interviews, that my acceptance rate was less than 3%. But every single candidate I approved/hired was nothing short of amazing. It is hard to get good talent, and even harder to retain them.

Do not become top-heavy

topheavy2-570x380.png (570×380)There was a time when there were more Directors, VP, EVP, SVP’s than developers. All this in a company not making any profit. Hmm…..enough said.

Walk the Talk

There are people who can talk, and those who walk. Very few people have a healthy combination of both.With people who can do both, there is at least one inherent flaw….either they are bad managers, or something else.    

Power & Responsibility

With great power, comes great responsibility. One of the biggest flaws in a new/small software company is the abundance of know-it-all’s. They come in, talk their way to higher management, and think they know it all about management and technology, with no formal training in either. Such people are a perfect recipe for disaster in the long run, and shall certainly take the company down with them. They achieve immediate success by hiring some smarter people, or letting them report to them. But once the smart hire(s) realize what is going on, and believes he/she can do a better job, that’s when the politics start. Some of them confront, ignore while others lick ass and get onto their good side.

The importance of hierarchy

While picking a hierarchy, you have to pick people with considerable experience and education to lead. On the contrary, just because someone is very qualified does not make his worthy to lead. Let his past define his present. If you don’t and you have more qualified people reporting to someone with less experience and education, its just a matter of time before the more qualified one realizes this and jumps ship. It should become a rule for people in Senior Management to have a Masters degree in the country they serve. If they don’t have a Master’s degree, at least they should have double the experience in managing people in the same country.

Invest in your employees

The strength of a start up is in its employees (all departments). If you cannot buy in the loyalty of your employees (with no strings attached), what makes you think you are destined for success. Investing in employees gives them a sense of feeling wanted…let’s be fair…everyone wants to feel wanted.

Career path

296382-52414-58.jpg (350×263)Finally, you cannot make everyone happy all the time. But ensure you have a career path for every employee in the company. This at least takes half the burden of addressing non-planned issues, and it sets expectations with all employees, giving them an ideal/goal to work towards. An employee without a career path defined for him/her is like a project without a plan.

Interview Question: Static class vs. Singleton pattern.

Question : Where would you choose a Singleton over a Static class?

I always expect two words to answer this question

  1. State : Static objects are not well-suited for good state management (think scalability).
  2. Weight : Don’t want too many heavy static objects floating in memory (think performance).

That would basically answer this question, but to be more fair and give a good explanation, I found a good article here [Link].

Including script files in masterpages (ASP.NET)

One of the issues I have faced with including site-wide JS files while developing web-applications is the simple fact that I was developing in Windows XP and IIS 5. And IIS puts in each of my websites as virtual-directories. So , I always have trouble including references to js files from the master-pages.

One alternative was to have a virtual directory outside the project structure and point it to the js folder, and my references would work properly. But there are other nicer ways to do the same.

1. Include the script tag as a server side tag, and give the reference to the file with a “~”

 <script language="javascript" src="~/App_Common/Scripts/tablecloth.js" runat="server"></script>

2. Add some code to your masterpage’s load event that would register the file after resolving the client url.

 protected void Page_Load(object sender, EventArgs e) { this.Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "tableCloth", this.ResolveClientUrl("~/App_Common/Scripts/tablecloth.js")); } 

The above two approaches completely avoid having to create a virtual directory of any kind, and work all the time … so long as the path is correct.

[HowTo] Generate a dummy table for binding to a tabular structure.

While designing grids and related styles, I always found the need to bind some dummy data to the grid to see how the grid looks. So, rather than making a database call to get a really organized table, I decided to get one of my own.

The following method generates and returns a data-table to be bound to any tabular structure.

 1: public DataTable GetDummyData(int columnCount, int rowCount, bool useNumeric, int rowLength, int minNumber, int maxNumber)
 2: {
 3: DataTable dt = new DataTable();
 4: dt.Columns.Add(new DataColumn(" ", typeof(string)));
 6: for (int c = 0; c < columnCount; c++)
 7: {
 8: string columnName = RandomString(rowLength, false);
 9: if (useNumeric == true)
 10: {
 11: dt.Columns.Add(new DataColumn(columnName, typeof(Int32)));
 12: }
 13: else
 14: {
 15: dt.Columns.Add(new DataColumn(columnName, typeof(string)));
 16: }
 17: }
 18: for (int j = 1; j <= rowCount; j++)
 19: {
 20: DataRow dr = dt.NewRow();
 21: dr[0] = RandomString(4, false);
 22: for (int k = 1; k <= columnCount; k++)
 23: {
 24: if (useNumeric == true)
 25: {
 26: dr[k] = RandomNumber(minNumber, maxNumber);
 27: }
 28: else
 29: {
 30: dr[k] = RandomString(rowLength, true);
 31: }
 32: }
 33: dt.Rows.Add(dr);
 34: }

 35: return dt;
 36: }

Disclaimer : Don’t use it for production. This is just to test on your local machines.

Interview Question: Class vs. Structure

As a part of my job, I interview potential candidates for jobs, and one of the standard questions I ask is ‘What is the difference between a class and a structure?’, and I sometimes am surprised with the kind of answers I get.

So, I decided, I should get some of these proper QnA’s for interview questions, and post them as a series.

  Class Structure
Type Reference Value
Performance Slower Faster
Storage Stack Heap (requires cleanup by GC)
Optimal size > 16 bytes < 16 bytes
Default protection level Private Public
Default Constructor Present Absent
Is Immutable No Yes

Misc references :