Could Anything Make You Use IE9?

There’s been a fair amount of publicity lately about Microsoft bringing Internet Explorer much more in-line with modern rendering engines with the upcoming release of Internet Explorer 9.0 which they plan to unveil at Mix10. There’s talk of strong HTML5 support, improved CSS compliance and even some support for CSS3. Everything we’re hearing is that 9.0 will do what some (naively) hoped IE 7.0 would do: bring IE in line with the “better” browsers of the world so we could earnestly look forward to the day we could stop saying, “I’ll do that when it’s supported in IE.” All of it got me thinking: as someone who hasn’t used any version of IE as my daily browser since Firefox was called Phoenix, is there anything Microsoft can do today that would make me want to use Internet Explorer?

Disregarding for the moment that my primary work and home computers are both Macs, would any version of IE be able to erase years of near torment the earlier versions have caused myself and other developers? I tweeted this question earlier today but I wanted to open it up to even broader discussion.

Suppose IE 9.0 really is all that and a bag of chips. Suppose that it’s rendering engine passes Acid 1, 2, and 3 with flying colors and in the same time as Webkit and Gecko. Suppose that the Javascript engine runs circles around V8. Suppose the same set of HTML5 elements are supported out of box. Basically: suppose that IE 9.0, by every measure that we routinely use the demonstrate IE’s inferiority, ranks ahead of the competition in all of these areas.

Would you use it?

Asking myself this question honestly, I don’t know that MS can do anything with IE to make me forget the connotation that the previously harmless two letters have in my eyes. Even when used under different context, I can’t help but cringe when I hear the letters “I and E” put together.  There are some out there that would view IE’s closed-source nature as a serious hindrance and refuse to use it on ethical grounds alone. I’m far more interested in the web development community as a whole: would you really use IE if it were *gulp* better?

I hope it doesn’t matter.

I truly hope that the answer to this question is moot; it will mean we’ve finally reached a day where users have real choice in browsers As developers, we’d no longer have to fear the extra work that will be caused by users who choose to use the default.

  

Pass that Interview 2: Understanding Recursion

Recursion is one of the most misunderstood concepts in software development. Truthfully, in modern software development it has been almost completely replaced by iterative control structures (loops). In front-end UI-layer development, it is very rarely used. However, it’s very common that you’ll be asked questions about recursion during an interview. Why? I compare it to airlines hiring Air Force and Navy fighter pilots. No, they’re never going to need to barrel roll a commercial jet-liner but the fact that they understand and know how to do it makes them more complete pilots. Similarly, understanding concepts such as recursion opens up new ways of thinking for engineers.

In its most simple terms, a recursive function is a function which returns a call to itself. Naturally, one has to be careful with this type of construct as it’s easy to create an infinite loop. A typical recursive pattern involves breaking a problem into smaller pieces (such as searching a large data set) rather than performing a process multiple times as in iteration.

A common interview question may involve implementing a factorial function using recursion. Let’s take a quick look at how we could do this:

function fact(x) {
    if(x > 1) {
        return x * fact(x-1);
    } else {
        return 1;
    }
}

By including a call to itself in the return, the program builds up and subsequently tears down a call stack. Rather than looping over an operation, we’re breaking the problem into smaller pieces until it’s simply returnin the value we passed in.

Drawbacks of Recursion

Now that we have an understanding of how to create a basic recursive function, we need to be able to discuss the drawbacks of this approach. First, in most programming language, the loop control structures (for, while, etc.) are optimized for speed and will (in the vast majority of cases) be faster.

Second, the memory overhead for allocating all of those functions can grow massively; especially in dynamic languages like Javascript. In our above example, if a user called fact(200) we would incur the overhead of creating 200 function instances in memory. You can see that for large operations this will get very heavy.

Stand Out

For the most part in front-end development, you won’t be delving deeply into recursion; but armed with this basic understanding of the topic, you’ll stand out from other candidates who aren’t familiar with a wide array of software engineering concepts.