Faruk At.eş


Archive for 2009

  1. January 6
  2. February 11
  3. March 5
  4. April 9
  5. May 4
  6. June 2
  7. July 6
  8. August 29
  9. September 10
  10. October 14
  11. November 11
  12. December 15

Showing 6 posts from

The Conquest That Wasn't

I was reading John Gruber's piece this morning entitled Microsoft's Long, Slow Decline, when a remark of his stood out to me [emphasis mine]:

If Microsoft were a healthy, functional, competitive company willing and able to honestly assess its own shortcomings — like the Microsoft of the ’90s that conquered the entire industry — their goal would have been to make something not just better than Vista, but better than anything else on the market, including Mac OS X.

It stood out to me because I actually quite disagree with the emphasized part, that Microsoft "conquered the entire industry". I'll break this down a little.

Clearly, Microsoft has dominated the industry with its massive peak of 92% market share in an industry they helped create. But the word "conquered" implies a glorious victory reminiscent of historic figures like Julius Caesar or Genghis Khan—names which I simply cannot compare Microsoft (or Gates & Ballmer) to.

So it's the word "conquered" specifically I disagree with. Not because I have such high esteem of the meaning of the word itself, but because I consider Microsoft to have not so much conquered the PC industry as they have simply stumbled upon owning it, reminiscent more of the way Inspector Clouseau successfully solved mysteries.

What I'm saying is that Microsoft's success is less to do with their great business savvy or ability to create good products, and more to do with how the market they created and sold to didn't know what it was getting. To explain this further, I'm not going to dive into market numbers, statistics and analysis reports—too many of such reports have been written already over the past decades. Instead, what I'm going to do is look at the the people themselves that became Microsoft's customers.

The psychological angle

Curiously, no market analyst ever seemed to have taken into account the psychological reasons behind why people bought Windows PCs by the truckloads in the '90s. They have explored it, to some extent, by analyzing the boom of the PC industry as a whole and looking at its origins, then rehashing the usual spiel: During the (late) '80s and early '90s, computers became very powerful tools in doing a lot of tasks that previously were done with pen and paper, snail mail and much mucking about and waiting patiently for things to happen. The computer revolution changed that, and by proxy it changed households by introducing a computer into each and every one of them.

But needing a computer at home to do work on is not a psychological reason, nor one that explains why they'd choose a Windows PC. It only explains why they bought a computer, of whatever kind it was. And that's where the psychological analysis seems to have stopped, crucially ignoring why so many people wound up with a Windows PC instead of a Mac.

Microsoft's best trick was how they made their business deals. During the early '90s, if you walked into a computer store there was a very high probability that you would be greeted with a lot of computers by a lot of vendors, but all of them ran either MS DOS, Windows 3.11 or Windows '95, depending on the year. It wasn't so much a matter of them having a larger market share, but their business tactic in selling their Operating Systems to all hardware vendors meant that they completely dominated the mindshare market.

Unless you already knew enough about the Mac, Linux or NeXT platforms, you were most likely going to have a Microsoft-made OS on your computer. It wasn't even a question, in most cases. The questions you'd be asked then by store clerks were predominantly along the lines of budget, hardware-specific needs and whether you liked brown, grey or black better for your casing.

So what does this have to do with psychology and the computer buyers themselves? Well, it's all about understanding. Back in those days, most people buying a computer were buying their very first computer, ever. They had little or no understanding of computers, of User Interfaces or usability. Most of them didn't even know how to use or hold a mouse, and typing was commonly done with two index fingers and a lot of hand movements.

They were much simpler times.

What that also meant was that quality and usability of the Operating System would not typically be a consideration people had when buying a PC. Why not? Because they wouldn't have been able to distinguish between them, or tell you why one OS was better than the other. Compare it to this similar but purely hypothetical example:

Take a Nikon Coolpix P90 camera, which sells for roughly $400, and a Nikon D700 that sells for about $3000. Now find someone—preferably in a less technology-dominated area or country—who has never used a photo camera in their life and ask them which they would buy if they wanted to take pictures of things. You are not fronting or giving them money, and it's not an "if you were rich and could afford anything you want" kind of scenario. Simply a real potential customer who has never used a camera before, and now has to spend their own hard-earned money to buy one.

It should not be hard to imagine that almost everyone would go for the far cheaper Nikon Coolpix P90. To them, both cameras simply "take pictures" and they wouldn't be able to tell you much difference in the results of each camera's photos either. These aren't people who have a firm grasp of photo quality or camera usability. These are people who are simply presented with two devices that take photos, and one of them costs over seven times as much as the other.

Furthermore—and this is a very important detail—these are people whose lives do not revolve much at all around whichever camera they wind up getting, so the choice of product is of small significance to them. It is simply a tool to get something done with, but they are—obviously—not photographers whose lives revolve around a camera.

The same scenario has played out in the PC industry, where people buying a computer had no grasp of what Usability means, and the consideration for an Operating System was nowhere near as significant as the consideration over spending a lot of money on some brand new piece of technology. Back then, the value of a computer in a household was hard to measure because most people had never had one at home before, but the value of money itself was something they're all too familiar with.

Change arrived long before Obama did

In the early 2000s, the nature of the PC industry finally began to change. People were now buying their second or even third computer, and they had become much more comfortable with a computer than they were before. In addition to that, the computer now also started to play a bigger and bigger role in their everyday lives and its perceived value as a piece of technology was much more significant than it was five to ten years earlier. People were no longer simply writing letters or balancing their checkbooks on the computer; instead, they were using it to surf the Web, play games, use a variety of productivity applications and even dabble with a digital lifestyle—photos, music and video all on the computer.

As things changed for customers, so, too, did the customers change themselves. Slowly but surely, people started to understand why certain things about their computer were frustrating them or causing them stress, and that understanding led to a perceptible awareness of usability.

In the years following, "post-PC" devices like digital cameras and MP3 players became more widely used and where things worked, life was great—but on Windows, more often than not life was not so great. The multitude of problems people had with printers and printer drivers, with cameras and music players that all had their own crappy software with confusing UI, all started to add up to a very conscious amount of unhappiness.

And then you used your friend's iPod.

Or something similar, of course, but I'm going for dramatic effect here. Apple's masterful execution of the iPod and paired iTunes software, cultivating into a harmonizing user experience so elegant it had rarely ever been seen before, changed the game forever. Be it one's first introduction to or experience with Mac OS X, the first iPod or even a number of software products on the Windows platform that were actually quite good, people were suddenly confronted with someone that wasn't just new, but that they could actually tell was better. More importantly, they could explain why it was better, although they may not have been particularly articulate in doing so.

The seed of change was planted and in this new world, customers were actually able to distinguish between a good user experience and a bad one. And suddenly, Microsoft's Windows didn't really look all that appealing anymore.

Nevertheless, many people stuck around on the Windows platform, but now the reasons were no longer as simple as a mere comparison of price. One big reason that kept (and is keeping) people on Windows is the comfort zone rationale.

Comfort zone

For most people, stepping out of your own comfort zone is a scary thing to do. We typically like the things we're familiar with, we like how things are because when we don't, we'll consider changing them until we like them again. Stepping out of this comfort zone means stepping into the unknown, taking a leap of faith. This can be and is typically perceived—prior to the actual event—as a discomforting experience. It's scary! So let's not do it.

However, a comfort zone is built not just on your own habits, preferences and feelings, but also on your environment: the people you surround yourself with. And it is through these people that change begot more change.

If, among your friends and family, you are the first to step outside that comfort zone and do something different than before, it's scary and takes a lot of courage and conviction. But, and this may negatively imply certain things about human beings, if you're the twentieth person to do so, that leap of faith is a lot less intimidating. And slowly but surely, with the increasing popularity of the iPod and Mac and "it just works better" becoming a very common phrase in discussions about technology and computing, more and more people started switching to the Mac, away from Windows.

Stepping outside of a comfort zone therefore became increasingly less dramatic for people, and once they encountered a better user experience, one that they could coherently explain to be a better user experience, the new world quickly became the new comfort zone. A crucial detail, though: the new comfort zone was one of much greater satisfaction. Less frustrations, less headaches, and simply the act of having chosen something different and liking it all amounted to much greater happiness.

Microsoft, for their part, didn't seem to understand in the slightest what was going on for all of these years in the minds of their customers. Apple, on the other hand, figured it out well enough to turn it into their advantage, and the longer Microsoft fails to understand this, the greater Apple's advantage will become.

Money is blinding

Using another psychological analysis, it's fairly easy to see why Microsoft's executives just don't get it: they're sitting on a gigantic pile of money that's, to this date, growing by the second. Self-criticism, honest and indiscriminate self-criticism, is difficult for anyone. You can try this on your own: how eager are you to tell yourself about all your shortcomings and then very thoroughly convince yourself that they are faults or mistakes? I'm willing to bet that it's not easy for you, either. Now imagine that you're among the richest people in the world, sitting on products that keep making you a lot of money, and running a company that has tremendous influence on an entire industry, if only through the fact that its products are used so pervasively that it's hard to see them being replaced all around the world anytime soon.

Now try telling yourself you're not doing it right.

But there's still more to it than that. Let's not forget that Microsoft, for all their business genius, never actually understood why people were buying their OS instead of any other option. They understood that cheaper is more appealing, but it never occurred to them that millions of customers were only getting a PC with Windows because they didn't know any better.

Aside of apparently having accepted that Switchers—people who have abandoned the Windows platform and switched to the Mac—are not likely to come back, the upper echelons of Microsoft still seem unaware of why they got to the level of success that they did. Because, let's face it: almost every effort of theirs has been painfully unsuccessful in capturing consumer's hearts or minds. The Xbox 360, despite its serious problems, is one of the very few consumer products in Microsoft's very long line-up that actually has a loyal, happy and sizable customer base. Of course, they first had to throw almost $6 Billion dollars at it to get to that point, but who's counting? Their investors—the ones they still have—certainly don't seem too concerned by that reckless spending.

So here we are. It's 2009 and for the first time in forever, Microsoft's revenue is in decline, having fallen short one full Billion dollars of projections. Another year of such revenue declines, and costly products like the Xbox 360 become a much more serious gamble for the behemoth. They're still sitting on a huge pile of cash, of course, but it's something that any smart investor should take into consideration nonetheless.

Revenue and profits aside, Microsoft is soon coming out with Windows 7, the new version of their OS that is currently sparking a lot of debate about this very issue. Already, though, there are signs that Microsoft still doesn't really get it. Will Windows 7 buck the trend (of Microsoft's line of Operating Systems)? Will it stop the masses from switching to the Mac? I don't know. I've not used it yet myself, so I'm disinclined to make any strong predictions either way.

All I do know is that the last time I used a Microsoft product that gave me a happy and exciting user experience, I had never even seen a Mac.

Modernizr: Discoveries Made During Development

Two days ago, I launched Modernizr—a small JavaScript toolkit that uses feature detection techniques to determine what CSS3 and HTML5 features the current browser supports—and in doing so I mentioned that I would elaborate on some of the discoveries made while developing the toolkit; discoveries about browsers and their behaviors that certainly opened my eyes in new ways.

For CSS3 properties, the primary method that Modernizr uses to determine support in the browser is by setting the style property in JavaScript with the feature being tested, and then immediately retrieving the style. Ordinarily, if you can retrieve it again it means the browser understood the instruction and implemented it, and then it'll still have it on the style property for retrieval. If the browser doesn't understand the instruction, it will disappear into the abyss.

(pause for dramatic effect)

Ahem. This approach is a safe way of doing feature detection, but it unfortunately comes with a couple of caveats. For instance, most of the shorthand properties (border, margin, padding etc.) are not implemented for retrieval in most browsers. Whether they should be or not is debatable, of course, but it's certainly easy to expect the browser to support it. For reliability purposes, Modernizr avoids shorthands (with one exception I'll explain below).

Another thing is that browsers lie. A lot. A sample:

  1. Firefox, up until the just-now-released 3.5, has claimed to have text-shadow support built in and will behave like a browser that has it implemented. It does not, however, render any text shadow (until 3.5 which finally does).
  2. Chrome 1.x, which uses WebKit as its engine but has its own graphics engine, claims to support many things but doesn't actually render them on screen: text-shadow, box-shadow, @font-face fonts, and so forth. The Chrome 2.x series has fortunately caught up in this regard, so let's hope for quick adoption of it.
  3. Opera merrily reads @font-face settings and claims it understands them, but it does not render them. (Chrome 1.x is the same in that regard)
  4. Internet Explorer (up to and including 8) will accept almost any nonsense you throw at the style property, whether it supports it or not. It is the only browser to do such a thing, fortunately.

Then there are interesting little behaviors that many of you may already be aware of, but I wasn't. Another list:

  1. Opera, as far as I could tell, does not actually make use of their own -o- prefix for any of the features Modernizr tests against. On the plus side, it means I had to ensure I wouldn't forget to testfor non-prefixed versions of all the CSS properties as well. On the downside, it kind of defeats the purpose of the prefixes. Opera eventually said that they planned on implementing CSS3 Borders and Backgrounds in version 10 of their browser without vendor prefix, but as appealing as that may sound to some, it puts the onus entirely on them for all of the testing. Personally, I don't think that's a good idea.
  2. Mozilla uses a capital M for its DOM property names for experimental properties, e.g. MozBorderImage, which goes against typical DOM conventions. WebKit, curiously, allows for the capital W as well the lowercase w, but does not support the capital K even though the formal name is WebKit. Their own behavior follows the standard, though: webkitBorderImage.
  3. WebKit has proposed the CSS Masks specification, but this turns out to overlap with the (existing) CSS SVG Masks spec. The W3C also has not (yet?) formalized CSS Masks and I don't expect it to at this point.
  4. While the W3C has not adopted the Webkit team's CSS Gradients proposal, I've included it as a part of Modernizr nonetheless. The simple reason is that CSS Gradients are quite possibly the coolest, most powerful and most useful new development in the world of CSS in the past 5 years. Along with CSS Transitions, which has become an official CSS3 Module.

Translations

Browsers accept multiple formats for certain properties—like how you can write a HEX color value as both #FFF and #FFFFFF, as well as with the English word "white"—and in testing against newer values in CSS3, I unearthed some more of this behavior.

For example, both Mozilla and WebKit support the rgba() and hsla() color inputs, which are simply colors with an alpha channel. However, when you specify something in hsla(), it will be internally translated to its respective rgba() values. WebKit also translates all regular (non-alpha) color values to their rgb() equivalent, which Mozilla does not. Opera, on the other hand, translates every color to its HEX value, which they'll obviously need to change to support rgba().

WebKit's CSS Transforms are all translated into their respective matrix() values in the DOM. This is a useful way to get more familiar with matrix translations, if that's your thing. Similarly, the CSS Transition Timing Functions (ease, ease-in, ease-out, etc.) are all translated to their respective cubic-bezier() curve values.

Multiple backgrounds

One of the biggest challenges turned out to do accurate detection for multiple background support. An absolute, non-permissible requirement for Modernizr was that it only used standards-compliant detection methods, no hacky workarounds or anything like that.

Unfortunately, as mentioned above, Internet Explorer tends to just accept any bogus input for a real CSS property and returns it as-is. This can be problematic in a variety of ways, but for multiple backgrounds it meant I had to figure out a workaround that was still completely standards-compliant.

What I ended up discovering is that IE will not just regurgitate your input if you do this:

background: url(foo.png), url(foo.png), #000 url(foo.png);

The key being the small hex color setting, which the spec dictates can only be set once, as part of the last background layer declaration. None of the browsers that don't support multiple backgrounds correctly, IE included, understand what to do with this input and as a result, it meant that I could accurately use the output as a way to detect multiple backgrounds support.

Interestingly, it ended up being a shorthand property that solved this problem.

Incomplete testing and support

As Modernizr.com already explains with footnotes, the CSS Columns and CANVAS tests are very rudimentary at this stage. One problem is that some browsers (or versions of browsers) have certain features implemented, but don't expose their API yet.

An example is Safari 3.2.1 and window.CanvasRenderingContext2D, which works if you use it but the API claims it doesn't exist. Things like that make those tests a little less reliable, but for the 1.0 release I plan to do more thorough testing and, perhaps, offer a setting for outputting "partial-canvas" as a classname if only parts of the spec are implemented.

All things considered, Modernizr was as exciting to work on for the functionality it would offer people in building much more amazing websites, as it was to discover all these things about the ways browsers work (or break, as it may). And this is only the start: I can't wait to see what kind of strange behaviors we'll uncover as we start using Modernizr to progressively enhance our sites and start taking advantage of these fantastic CSS3 features.

XHTML2 Is Dead. In Similar News, Water Is Wet, Fire Is Hot.

Yesterday, the big news on the Web broke that the XHTML 2 Working Group will cease work on XHTML 2 by the end of 2009.

This is exciting news for two significant reasons: first, it means all attention and energy will now be focused on HTML5, ensuring that spec gets both the support and the (constructive) criticism it deserves. Second, it shows that pragmatic approaches prevail over completely purist ideology.

I've sometimes been criticized in my work for being too much of a purist, for caring too much about doing things the absolute best way possible when more pragmatic approaches exist. This is not an example of that; XHTML 2 has been dead in the water almost since its inception. It was mired in unrelenting ideology, whereas HTML 5 has shown enough pragmatism to garner adoption from the industry professionals thatactually build websites with these specs.

Sometimes people seem to forget what and who these specs are actually for in the first place.

Now, all this may sound a little unexpected coming from the very same guy who once wrote The Case for XHTML, but Jeffrey Zeldman captures my view on this perfectly in this one single paragraph:

Designing With Web Standards, I expressed concern with the direction of XHTML and the notion that a more abstract and variable XML was the markup language of everyone’s future. On the other hand, XHTML 1.0 was and is a stable, clean, and logical standard markup language that every browser supports (with the exception of MIME type in IE). At the time of the first and second editions, even with HTML 5 in the wings, XHTML 1.0 still made sense to me as a solid toehold for web development for years to come.

In case anyone is wondering: I've been using the HTML 5 doctype on as many projects as possible almost since it first came around. The theme currently used on this site, not containing any HTML5, is not mine but someone else's Wordpress theme I intended to only have around for a couple months. Sometimes life gets in the way, but very soon now I truly will put my own design in place, and it will be Modernized and made with HTML5.

Proudly Announcing: Modernizr

Have you ever wanted to do if-statements in your CSS and say, "if the browser supports border-image, apply these rules and properties, but if it doesn't then use these other rules and properties instead"?

Have you been eager to start playing around with HTML5's new elements but been held back by the lack of styling control in Internet Explorer?

Well, Modernizr makes it all possible.

Modernizr is a small JavaScript toolkit that uses feature detection techniques to determine whether or not the current browser is capable of any of the following features from CSS3 and HTML5:

  • Canvas
  • rgba()
  • hsla()
  • border-image:
  • border-radius:
  • box-shadow:
  • Multiple backgrounds
  • opacity:
  • CSS Animations
  • CSS Columns
  • CSS Gradients
  • CSS Reflections
  • CSS Transforms
  • CSS Transitions

What makes Modernizr different from a lot of other, existing approaches is that it doesn't use any UserAgent sniffing at all—in fact, Modernizr was partially designed and developed precisely to put an end to UA sniffing. It is a bad, unsafe and unreliable practice so the more alternatives we have to do it right, the better.

When Modernizr runs its course, it will add a series of classes to your document's <body> element and each class will indicate whether or not the current browser has native support for that feature. Does it support CANVAS? A class of "canvas" will be added. No support for it? Then the class "no-canvas" is added to the <body> element.

Using these classes, it then takes just a little bit of clever CSS to create "if rules" for your site. Example:

body.multiplebgs div p {
  /* properties for browsers that
     support multiple backgrounds */
}
body.no-multiplebgs div p {
  /* optional fallback properties
     for browsers that don't */
}

The biggest difference that Modernizr brings to your workflow is control: you maintain a much finer level of control over your site's look and feel in older browsers than you do when simply adding properties to your rules and relying on the browsers not understanding them. After all, what if you want to have a difference between margins or paddings? With Modernizr, you don't have to worry about hacky workarounds or unreliable UserAgent sniffing anymore.

The JavaScript programmers will be pleased to hear that Modernizr also creates a single object, simply named Modernizr, which contains all of the features it detects against as properties. Each property will be set to TRUE or FALSE depending on whether the browser supports it.

Another helpful thing that Modernizr does: when loaded in an IE browser, it runs through the list of HTML5 elements and quickly creates them in nodespace so that you can style them to your heart's content.

I will go more in-depth into the process behind Modernizr and the many, many interesting things I discovered about browsers while developing it, but in subsequent blog posts. For now, I'm going to just excitedly throw it out there and let people explore it.

I want to thank, first and foremost, the amazing Mike Krieger, friend and collaborator on Modernizr. He has built the Django-based back-end that Modernizr.com is using and his insights have helped refine the toolkit and its website to a much higher degree of quality. Big, big thanks go out to Mike.

Additionally, I'd like to thank Dean Jackson, Oliver Hunt, Boris Zbarsky and Robert Marini for helping me understand various things about browsers and their technologies, some of this information played a crucial part in optimizing and fine-tuning Modernizr's codebase to become robust, fast and accurate. Thank you all very much.

With that said, please enjoy Modernizr!


Upcoming talks

Here on My own website

Subscribe to this site

Years

2012

2011

2010

2009

2008