IE8 compatibility mode, UserAgent, wrong CSS.. you got my point huh!

I am running IE8 on my Windows XP machine. I am building a website for one my clients, the project is going really well. I am working on adding browser specific CSS to my site using the Request.Browser class in ASP.NET. Things are looking absolutely beautiful in Firefox, Safari, Chrome ….. you name it. Opened IE8.. wonderful as usual. Clicked compatibility mode in IE8, so running IE7 technically, looks good again. Closed the IE8 instance, opened IE8 just to make sure things were ok, YAIEEEEEEEEEEEEEEEEEEE KARAMBAAAAAAAAAAAAA!!! Someone unleashed hell on my webpage. What happened!

They way I added browser specific CSS is in my code, detect the browser name and version and add css reference in the Head tag of the page. Now there is a situation where IE8 is in compatibility mode, but the UserAgent still has browser version of 8.0 in it, due to which in my case, the IE8 css was added in an IE7 scenario. The problem with my approach was I was trying to do everything on the server side. It happens so that to detect if a user has turned on Compatibility mode, we have to have some kind of client side scripting done. The magic property is document.documentMode, this value is probably only available in IE8 browser. For IE8, the value is “8”, for compatibility mode it is “7”. So one way would be to disable to IE8 css which is already added and add the IE7 css when the browser is in compatibility mode, like so,

 $(document).ready(function() {
if(document.documentMode == "7")
{
var head = document.getElementById('pageHead');
var linktg = document.createElement('link');
linktg.type = 'text/css';
linktg.rel = 'stylesheet';
linktg.href = 'MyStyle-IE7.css';
linktg.media = 'all';
head.appendChild(linktg);
$("link[href='MyStyle-IE8.css']").attr('disabled','true');
}
}

I read an article somewhere about “Letting Internet Explorer 6 die down for the Web to move on” or something like that. I wonder why not kill this whole Internet Explorer thing once in for all?

Happy Programming!

Do you get paid right?

Salary is always a slightly weird if not uncomfortable topic to talk about during HR interviews at least for me. What should I say, would it be so much that I might be taken as a R-tard, or so less that I might be laughed at. Well believe it or not, very few folks know how much they should get paid depending on their experience, location, interview performance and other factors. When I was a fresher, it was pretty much a category in which all of us were put in when hired by a big firm. Everyone had the same amount on their paychecks. But as experience level rises, we get smarter and bolder (at least that is how it is supposed to be), we start thinking about our salary more seriously. I am yet to find a tool/website which would honestly provide a figure that would be very close to what I can ask for in an offer. Services like PayScale, Salary.com seem to be bullshitting us for quite long. Every time I checked my worth on these sites with my experience and other factors, I used to get a figure way less than my colleagues were getting. May be that could be a business tactics used by these services to entice us in getting their paid service to provide more information and get a better salary figure. 

Recently a famous job site in India Naukri.com launched a service called PayCheck. This service basically gives a graphical representation of where you stand among other people with similar profile as yours. A little bit of digging into this and you would realize that the data these guys are using is from the salaries reported by active profiles on Naukri.com. The problem here? Well, if we are talking about folks who have their current salary on Naukri, and are actively searching for new openings, there is a high probability that the salary they have posted is less than what they expect. Using such figures for calculating our expected salary seems a little dubious. Nevertheless, not all are searching for just a better pay, so there is some amount of good data which has helped in this analysis. I wish Naukri ties up with some kind of parallel service wherein they allow anonymous users to post their salaries alongside the companies and their satisfaction rates, something on the lines of Glassdoor, mouthshut etc. This way we really have a better dataset to calculate our expected salary.

An interview with Synechron

Its been about 3 weeks I had been in a “job search” mode here in Pune, India. I got a call from Synechron asking me about scheduling an interview with me for a .NET position. Well, the company looked good to me, honestly the only thing we have to hang on to is the website. A quick search in the cloud did return some results about the reviews for this company. They were not show stoppers really. So I decided, heck why not, lets do this! Basically it is going to be the same thing all over, some US based clients, an offshore development center in India, and rest of the story goes on and on…(I know I sound really bored of this profession :))).

So how was the interview, 2 technical rounds, 2 HR rounds and then the offer! (No free lunch, dammit).

1st interview

The manager certainly was heavily technical and knew what he was talking. I really felt good about that, since I have been interviewed by retards before. The questions pretty much summed up like these –:

- C# programming language features

- .NET underlying working.

- Garbage collection working

- Dispose method usage

- Lots of OOPS questions like abstract classes, interfaces, inheritance, composition etc.

- SQL queries, WITH NO LOCK usage, nested transactions.

Done.

2nd interview

This guy asked my about things that were discussed with the earlier guy so that things do not get mixed. Questions were pretty tricky in some cases so it was fun,

- use of usercontrols, CauseValidation usage in ASP.NET

- DataRelation object in ADO.NET

- Optimize an SQL query for better performance

- Dispose vs Finalize method

- Polymorphism and some other basic OOPS concepts.

- Casting vs Unboxing.

Done.

Then were 2 HR rounds which, for some, are mere formalities in India. I take these interviews very seriously, probably due to my stint in US. I think HR interviews are meant for a smartness check and overall personality of an individual, good companies certainly reject candidates if these interviews do not go as per their standards. Well.. I do think in India most of the HR interviews are just a formality :(. I do not know if you guys would be interested in knowing what we discussed in these interviews, but let me know if you need some hints on these as well.

Anyways, I got an offer from them,uummmm... a decent one, so lets see where things go from here. Best of luck to all you job hunters!

Happy Programming!

iPhone Developer jobs in India

Howdy guys! Its been less than 2 weeks I started looking for a new job as a developer here in India. My resume has the usual stuff what a .NET developer (sensible one!) might have. One extra thing was added by me regarding my personal projects, iPhone sdk. Since the last 2 weeks, guess what kind of requirements I saw the most, from several companies here. Yup, iPhone development. iPhone is being considered as The Mobile Platform of the future and every company, whether a gallactico or a minion, are hiring iPhone developers.

So, you job hunters, if you intend to switch for a iPhone developer position, there cannot be a better time than this. Post your resume with your iPhone projects and see requirements flooding your mailbox.

Happy Programming!