ScribeFire Rocks!

Well, I had been well and truly blogstipated for a while. Most of the past few months were spent being held hostage behind my corporate firewall, Windows Live Writer Installation crapping out permanently, and procrastinating.

Thanks to ScribeFire, I now have a blog writer that actually installs!

Now that all that is out of the way, I am back. I will start posting about:

  • patterns
  • anti-patterns
  • organisational malarchy
  • empires and feudal warlords
  • idiosyncrasies of software development
  • dumbing down of workforce

It might be interesting!

Windows Communication Foundation (WCF) - Putting it All Together

 

After doing some basic Google searches, I realised that there weren’t enough samples out there that would demonstrate WCF how-does-it-hang-together conceptually. Therefore, I decided to put together one such sample.

Hardly production / best practices compliant, the aim of this article and adjoining sample is to familiarise readers with the key classes and semantics involved in:

  • Creating WCF web services
  • Hosting WCF web services within IIS
  • Hosting WCF web services within a custom server application
  • Creating WCF web service clients

Read more »

So, what exactly do you mean?

How many times have we heard the phrases, such as:

Oh, I did not really mean that…
You should understand what I really mean…
I said that, but, how can I mean such a mean thing?

So many times at work and in relationships I have seen people say things that they either do not mean, or at least do not mean to say.

All time classic was when a colleague at work told another one: “But, that’s because you are so fat”. Then followed it up with I-eat-my-words: “I mean, I don’t really mean that…”

The point I am trying to make here is that it is perfectly okay to take your time, evaluate, articulate, and then say what you really want to say. 

You’d probably give the benefit-of-doubt to someone impaired by language.  But in general, rambling away at 110 KM/h does not help in getting the message across.

If you do not say what you mean, then the world is never going to ‘know’ what you really meant to say. 

What’s the rush, Jameson? Take your time!

Me and My Mind

The human mind is probably the most complex biological machine in the world. Millions of chemical synapses form neural circuits that enable interconnectivity with the central nervous system.  The central nervous system in turn is responsible for, umm, everything!

You certainly do not want your mind playing shenanigans! I fall into the category of people who believe in judicious use of available resources. Lest they run out! 

Obviously I use the brains sparingly!

What are you Today?

“Accept that some days you are the pigeon and some days the statue!”-Dilbert

One can go from being a statue to a pigeon to a statue again in matter of minutes! I suppose that’s life…

Taxes, Interest Rate Rises and Passing…

Apparently, these are the only three absolute certainties of life. Ironically, we dread them all!

A few days ago somebody asked me: Who do you work for? I replied, A bank. In same breath I said, so do you! If you are currently paying off a mortgage, then my friend, you also quite literally work for a bank!

There are a few things that fall into our “Circle of Influence”. Things that we can truly change. And then, there’s a whole load of things that we cannot change. They fall under our “Circle of Concern”. So why worry about them?

Just, Keep Walking!

When Little Was More… (An Observation)

This dates back to the years when everything seemed to come in limited quantities. This was before the world was hit with so called Affluenza. When little was more. Or at least, enough.

In the lane outside our home, mum used to light the charcoal clay cooker (angeethi) early in the morning. Often, my brother and I would sit next to her and lazily watch the smoke twirl upwards and the angeethi slowly come into its own. The soulful fragrance of the burning coal and clay still evokes memories that I can relate with only one thing.  Simplicity. 

As kids, we hardly understood money [not that I do now]. All we knew was that it came in limited quantity. We had money. It might have been little, but, was more than enough. We went to great schools, had material possessions, holidays, monthly allowances, toys, the works. We never seemed to need more…

Today people seem busier. Working hard. Out to prove a point or two. Nothing wrong with that. Sometimes, though, at certain costs.

Just the other day when my toddler son was throwing a tantrum, I asked him: Where will you get your favourite toy you just tossed? Sheepishly, he said: From the mall…

Young people in today’s world are a lot smarter. They seem to be on the ball all the time. Their negotiating skills are often as good as that of a management graduate. They are just as competitive as their senior counterparts.

Although, the dynamics have somewhat changed. What you know matters little. What you have matters more. It’s: My iPod is better than yours! As opposed to: I can solve that problem in two steps less than you!

Seemingly, today:

Little is Very Little. And More, Isn’t Enough…

The Namesake (What’s in a name, anyway?)

I have had to deal with the case of mistaken identity for as far back as I can remember. I am in fact, the John Smith of India. Okay, more the John. For some reason Amit is probably the most common name in India. Especially, among the males born in the seventies.  I disagree that it has something to do with the rise of a certain film actor.

There was a time when you’d shout Amit to a group of boys and four of them would turn towards you. I’ve known about five or six in each year through school and university. It was as tough we were part of a sub-culture. We’d recognise each other from a distance, nod, and then move on. There was also an unspoken protocol: “Always fully-qualify your name”, “Amits are awesome people”, “An Amit always helps another Amit”, “We are all part of a team”. It was a rare example of camaraderie stemming from a name. I just happened to be living it.

All that disappeared when I moved to Sydney years ago. For the first time, I started feeling a bit “on my own”.

A few years later I joined a technology company spread over multiple states within Australia. During my first week at work, as I was trolling through the company address-book I saw something that set me back a little. Lo and Behold, there was another “Amit Chawla” on the list!

In time, through a string of Shakespearean-incidents I came to know a little more about my namesake. I would often get emails with surprising sources and subject lines:

- Meeting at 4:00 at the (xyz)
- Please update your sales target for the month
- Shift swap
- Coffee, now?

In a rare bungle, during a particular pay-cycle, I even received his salary! Well, they paid everybody peanuts. But, that’s another story.

Things hit an all-time-high, when one evening, as I was comforting my six month old son, I received a rather frantic phone call from a strange looking phone number. Here’s how the conversation went (roughly):

The Lady: Hi Amit!
Me [Rather perplexed]: Uh, a, hello.

The Lady: Where are you?
Me [a bit concerned and still perplexed]: um, aa, at home… But… 

The Lady [furious]: Are you still home? And I thought that we were supposed to meet at (Some Melbourne suburb). You stood me up!!!
Me [totally freaked out]: I live in Sydney, NSW. And… Do you work for…

In time it became quite obvious that the man in question was really my namesake and not myself, we both had a good laugh.

The wife however, eavesdropping on the conversation, was still a little suspicious.  No serious damage was made though.

This was a little real-life-story from a few years ago. Enough said about me though. What about you? Are you also Amit?

Overriding Functions - JavaScript

 

I have been around in the sysdev scene for a fair bit. However, I have been able to very skillfully steer clear of this beast: JavaScript.

I could take my fair share of middle-tier, cross-platform integration, design patterns, and anything OO in just about any programming environment. However, ask me to write more than a couple of lines of JavaScript and I would cringe and find my way around it. 

Once Bitten, Twice Shy

Maybe because I’ve  been stuck in the late 90s spaghetti-code syndrome. When anyone who could ’spell’ ASP or JSP would most certainly be hired by a blue-chip company in the silicon valley. Anybody who could plagiarize a ‘business-plan’ would get venture capitalists knocking on their door. Cab-drivers [read common man] would ‘advise’ you to buy CISCO or Oracle shares.

We all know the result: Billions of lines of JavaScript code mish-mashed with the server-side technologies. So brittle were these application architectures that a mouse click in the wrong direction could bring them crashing down.

I was so Wrong

The problem was obviously in the abuse of the technology and not the technology itself. A couple of days ago I was faced with a JavaScript problem. Read on if you care…

The Problem

The  ASP.Net 2.0 validation framework contains a whole load of client-side and server-side code that helps with detecting validation errors and rendering error messages on the client.

Our sub-classed ValidationSummary control formats the messages differently. It has a custom header, different list layout and custom screen highlight functionality. Everything works well on the server-side, since we have the overridden Render(HtmlTextWriter). But, if the validators have EnableClientScript = “true”, the formatting breaks. Because, ASP.Net client-side code knows nothing about the funky formatting we have on the server-side.

The Solution

The ASP.Net 2.0 framework contains JavaScript based validation-framework library. This library is an embedded resource within the System.Web.dll. The function, ValidationSummaryOnSubmit(), within this library is run when a validation error occurs. The solution was to override this function with our own:

var original_Function;

original_Function = ValidationSummaryOnSubmit;

ValidationSummaryOnSubmit = ValidationSummaryOnSubmitEx;

function ValidationSummaryOnSubmitEx(validationGroup){

    //Do the HTML DOM stuff

    //Call the original function

    return original_Function(validationGroup);

}

I have since been able to exorcise my daemons.  

PS: I’d like to thank my colleague, Tim Duncan, who helped me put together the solution to the problem.

Blogmania (Amit Chawla’s First Post)

I am now officially part of the community. After owning this domain name for nearly three years and seeing several friends cave into the temptation to join the ‘blog-world’, I have decided to give it a go…

I don’t know what I am going to do here or how long this will last. I would most certainly *not* be changing the world. However, the world in general contains plenty of bemusing, amusing, or interesting things if you looked around hard enough.

As I was re-reading the following sign in a CityRail carriage on an unnaturally long trip home, I realised that there lies more humour than what meets the eye!

CityRail Guards Compartment 

I know for sure that my fellow Sydneysiders will trade a million of these slip-ups with a train service that does not leech as much!

Ladies' Handbagstory burch 2011Christian Louboutin Discountchanel handbags for saleasics onitsuka tigerPrada Handbags 2010leather handbagshermes handbagsnew balance 574new balance outlet