Thursday, February 06, 2014

A year with Modern.IE

For a little over a year I've been working with Microsoft on the modern.IE site. This week the site is celebrating having saved developers one million hours in browser testing. Some of the savings come from the free pre-configured VMs with real copies of the different IE browser versions. Just about all the popular VM software is supported on several different platforms. There is no substitute for using the real browser when it comes to compatibility testing, and these VMs are one way to do just that with minimal hassle.

Further time saving comes from Browserstack. It provides convenient in-browser testing of just about any type of browser or device. Modern.IE offers a free three-month membership to Browserstack for IE versions. There are Chrome and Firefox plugins that make it really easy to quickly try out your latest designs on any version of IE, even if they're served off your local computer. Very slick.

Most of my work on the project was done for the online compatibility scan, available directly off the home page but also downloadable for local use. It scans the HTML, CSS, and JavaScript of the site to see if there are things that may work in one browser but not in another. This includes things like outdated JavaScript libraries, missing CSS prefixes, browser sniffing, missing doctype, or use of ActiveX controls. It also suggests features that might improve the experience for Windows 8 users, such as high-quality favicons.

The scanner project is open source, written in node.js, and hosted on GitHub. This tool is meant to be useful to your web development diagnosis and debugging, so open an issue in the repo if you find problems or have suggestions.

For even more information, you can run your site through Compat Inspector via Sauce Labs to find code specific to older versions of IE that might cause things to break with modern IE versions. To use this feature, just click the "Scan for code no longer supported in modern IE" tab once the initial scan is done. On that same results page you can also get screen shots of how the page appears in various browsers, as another quick check that the layout is functioning properly.

Quite often I'll hear developers say, "All these versions of IE are a pain and make my job harder! Why are there so many versions and why can't I just run this on a Mac where I do my development?" There are so many versions of browsers, not just IE, and yes that is the burden of the web developer. The Android 2.3 browser is just as much of a pain to today's web developers as older versions of IE, and that will get worse before it gets better. New phones are still shipping with that ancient Android browser, but at least the market share of older IE is shrinking.

As for why you can't run IE on your Mac, let's turn that around and ask why Windows-based web developers can't run Safari to do testing. Apple doesn't make VMs available to do that the way Microsoft does here. Fortunately, Browserstack does support many versions of Safari. Perhaps Apple will make free Browserstack testing available for Safari. No matter what, though, responsible web developers should test on every browser they expect the audience to use. Microsoft has done what they can to make that easy.

Wednesday, January 22, 2014

Haters Gonna Hate

@jeresig on Twitter: Whenever I come across people who really hate me and my work it takes every ounce of energy to try and ignore them and move on. So hard.
I was saddened to come across this tweet by John Resig a few days ago. I know at least one of the people who has made--and continues to make--the attacks he speaks about. This person seems to have held deep hatred for John and jQuery for years. It's really unfortunate, because the attacker seems to be a smart and technically astute person. But he's also a bully.

This bully's attacks tend to focus on two things: the quality of jQuery's code, and the quality of jQuery users. On the first point, it's telling that early in the project's life this bully created some tests that showed problems with jQuery. John asked whether we could use that code in jQuery's unit tests, and the answer was NO WAY. He leaves his own vitriolic form of jQuery "code reviews" around the Internet, but never makes constructive comments that might actually help jQuery improve. Helping people get productive things done does not seem to be his goal at all.

Anyone can find problems with jQuery and things that could be improved. The jQuery team has lists of issues in our GitHub repositories if you are short of them. Since the jQuery Foundation is powered primarily by volunteers, we'd love to have more people who are willing to help fix things and improve the documentation, for example. That would be a productive and constructive way to make jQuery better for everyone.

When the bully turns to jQuery's users, it's all about what horrible programmers they are and how bad their code is. He'd probably be happier if jQuery was an obtuse library that was unusable without a four-year degree in programming. Instead, jQuery is easy enough to use that many non-programmers can get something going after a short time. That's a bad thing? Everyone has to start somewhere. Don't blame jQuery if some people decide that their amateur efforts are good enough--and perhaps they are. If not, they can learn and get better over time.

From the very start, jQuery's design and philosophy was pragmatic. It made hard things easy. It fixed browser bugs. It provided a plugin architecture for people to share their code. It coexisted with the libraries that already existed, so people could try jQuery without having to abandon what they'd already done. It continues to do all of those things that John Resig envisioned eight years ago, and more. The bullies who attack John and jQuery are just harvesting a bumper crop of sour grapes.

So John, let me tell you this: There's no reason to let anyone make you feel like your work on jQuery was bad. Take a look at the Internet today. jQuery is everywhere, people choose it of their own free will as the best thing out there. The lessons jQuery taught are helping to drive the next generation of web standards, and it's a foundation component for many higher-level frameworks. Many of the people who you recruited to join that little jQuery mailing list in 2006, me included, are still working to ensure that jQuery keeps serving developer needs for years to come. You did good.