Adobe Thinks Flash is Open

I almost laughed when I read this article by Adrian Ludwig on the Flash Platform Blog.

Apparently, Adobe, or one of its developers at least, thinks that the argument “Flash technology isn’t open” is not valid for the following reason:

The Flash file format specifications are open and unrestricted, so Apple can build their own Flash Player if they want. If Apple wants the source code to the Flash Player, we’re happy to provide it, just as we have to many other device manufacturers.

First of all, the Flash file format specifications are open and unrestricted, yes, so they get that. But a specification only goes a certain way and it’s often used as a lame excuse to pass by as “standard” or “open source”, which clearly it isn’t. Microsoft does the same with the OOXML format for Office, amongst other things, but in reality it’s just an excuse for making Office less proprietary than it already is. What’s good if the rest of the software is proprietary…

Apple can build their own Flash player, yes, indeed. And so does the open source community with projects that have miserably failed to achieve real compatible Flash engines because the format wasn’t truly open yet. It is now, but Flash Player itself isn’t.

What’s funny is Adobe says “If Apple wants the source code to the Flash Player, we’re happy to provide it, just as we have to many other device manufacturers”. Does this mean you don’t provide the Flash player source code to the community, because all reports show it’s not open source. That’s yet some other BS to pass by as an open project.

And about that “openness”, it really isn’t because the specification belongs to Adobe. Real open projects don’t just get to have open source implementations, they get to allow everyone to participate in developing it. That’s not what Flash is; Flash is a closed ecosystem where the only entity who get’s a choice at what you can do with it is Adobe.

This also goes for OOXML and Silverlight. It’s not open, it just tries to hide under an open umbrella. Java, on the other hand, for example, is truly open. The JCP, or Java Community Process, allows anyone to participate in the spec, so Java is a public decision matter, and Oracle has recently voiced itself as dedicated to pushing the JCP process beyond what Sun did (Oracle recently bought Sun) to make it even more accessible to smaller contributors, making Java technology a real open standard effort.

Open technology needs to belong to the public for the greater good, not to a company. Make no mistake, the Adobe Flash Platform is not open.

New Google Search Design?

Probably the most bizarre thing to happen to me recently was this, a mind-blogging re-design of Google which popped up on Google.com (not country-level domains) only on Firefox, only on my computer (within a classroom network) and for only 5 minutes, just enough to show puzzled friends. Unfortunately by the time I though about taking a screen-shot of the search results, which is quite the shocking experience, it had already been took off.

You can actually see more of this on related blogs like this one: http://www.toprankblog.com/2009/11/all-new-google-com/, which for some weird reason refers to the horrible design that weirdly makes Windows XP look like the future Chrome OS as “awesome”.

Actually, after doing some more research, I discovered you can enable the new design with a cookie. Last time Google did this (with the fading menu), they eventually forced seemingly random users and most likely Gmail users who beta things like me to use it and eventually made it a Google-wide feature. Looks like this new design is going to be very real, whether you like it or not. Hit the link for the JavaScript code to make it live.

In any cases, I’m really starting to wonder where the engineers have gone at Google. They used to decide colors based on white-box testing techniques and efficiency; the two latest “innovations”, the fade bar and the new design, really look like newbie mistakes a designer would make so that Google looks “cool”.

iPad, Chrome OS and the Plugin Agnostic Web

If you saw the keynote, or at least read stuff on Engadget, you know that the iPad doesn’t support Flash.

The fact that the iPad does not support Flash goes hand in hand with the iPhone and the iPod Touch, which both never supported and still don’t support Flash. In fact, it might just be part of Apple’s strategy; that is replacing the number one Flash application which is video playback with native support, a.k.a. HTML 5 video, and leaving all the extra power to the development of iPad/iPhone/iTouch apps.

Although only a rumored strategy, it’s clear that it’s what they’re doing, and the iPad goes a long way in proving it on top of what the iPhone already did.

One of the big markets for the App Store is video games, and video games can be programmed in Flash. In fact, Adobe is testing touch functionality for its latest Flash 10.1 release which is in beta as of this writing, clearly a threat to Apple’s ecosystem of apps if they were to support Flash. Instead of having to go through the App Store and everything that’s bad with it, developers would simply have to use Flash to put their apps to market, which incidentally would also make those available to everyone and not just on the iPad, clearly something Apple wants to avoid.

An iPad without Flash; a complete web platform?

Arguably, a web browser without Flash is far from complete. It wouldn’t even support the most visited web sites like YouTube. Apple solves this problem with the YouTube app, but that was only an obvious fit for an iPhone where most Flash apps wouldn’t even make sense because of the smaller screen.

On the iPad however, you’ve got an entirely different story. Users will be asking for Flash as they see that many web sites are not supported. But the same has already happened with the iPod Touch and the iPhone and has also brought myriad web sites to change their strategies and go away from Flash.

In fact, the current web development trend is to do the most stuff possible without Flash, or any other plugin for that matter. It’s already a dead-end for Silverlight, which still doesn’t have a lot of market share, and it seems Java is losing ground too in an area that’s beginning to reject anything called a plugin.

Possibly even more staggering, browsers like Internet Explorer that fail to support newer HTML capabilities are quickly losing market share. It’s quite simple in a user’s mind; if it doesn’t work, they’ll look elsewhere, and that all starts in the hands of the developers.

Apple is casually riding on this wave and hence, a flash-less iPad makes more and more sense, and whatever Google decides to embed in its future Chrome OS will probably see its way to Safari too, given both are based off the Webkit engine. Given that all three iPhone, iPod Touch and iPad use Safari, they’re very well-placed platforms for the future of the web.

The Chrome OS Strategy

Although clearly Google isn’t in the same camp as Apple, its strategy for Chrome OS seems to be very much plugin agnostic, albeit for different motives on the ground of how apps can be developed for its products; that is it has no intention of profiting from closed systems and trapping developers in them.

Although still an economical game, Google is profiting from the market in a very different way, and thus allowing developers to do anything they want on Chrome OS is not bad for them, which is very different than the situation Apple is in. I don’t expect the Chrome OS not to have Flash, especially since Google is part of Adobe’s Open Screen Project which aims to bring Flash support to every mobile platform in existence. It wouldn’t make sense for them to drop Flash, and although Google still has the time to make YouTube entirely Open Video, I’m not sure they’re quite there yet. In fact, I expect Chrome OS to support all three Flash, Silverlight and Java, much like the current Google Chrome supported Silverlight despite Microsoft not offering any support for it. This is very much in line with Google’s way of doing things, which is simply to make stuff accessible as possible.

A prime, but maybe simply obvious example of this is Google Search and Microsoft Bing. Google Search still works on Internet Explorer 6 while Bing gives out a JScript error and fails to display the background image. Sure, the fading thing on Google is simply absent on IE 6 (who cares really, I still think it’s an annoying feature) but you have to give it something for the fact it doesn’t throw an error at you. That’s Google saying “please use something better” with a little Chrome add everywhere and Microsoft saying “upgrade or just go away, 9 years of support is enough” to 20% or 13% (depending on which sources you refer to) of the Internet population as of this writing, clearly demonstrating Google’s stance on how it serves up the web.

With Google pushing JavaScript where it’s never gone before, introducing a new programming language and buying On2, it looks like Google is aiming for a plugin-less web too, and gladly so is the rest of the world (see the HTML 5 crowd). There is gap in Google’s strategy though, how do they plan on making complex apps possible for the web?

If you were to listen to the way Google apprehends Chrome OS’s goals, they clearly are not gonna promote Linux-based apps development on it. In fact, they might as well disable this possibility, but recent developer talks has negated the disabling possibility by confirming Chrome OS will have an embedded multimedia player that works seamlessly within a Chrome browser tab. In fact, I wouldn’t be surprised if it were made with Go, Google’s new programming language. In my opinion, the Chrome browser will eventually turn out to be a Go virtual machine, allowing complex web apps to be deployed natively directly in the browser, much Java except it would act like JavaScript. There’s also the possibility for Go to be supported across Webkit, which would make Safari also supported, and hence enable the iPad to run the apps. That’s bad for Apple, but good for Google, so guess what’s gonna happen.

Also, talking HTML 5 and all future things non-flash, let’s not forget Google bought On2. On2 is the codec company responsible for VP6, the first video codec supported by Flash. They are now up to VP8, a codec which clearly surpasses H.264, the current codec of choice for both Flash and Silverlight, as well as HTML 5 video on Chrome and Safari. On2 is also responsible for releasing VP3 as open source, which gave birth the Theora and OGG, the current HTML 5 video open codec supported by Chrome and Firefox. It’s no wonder Google bought On2; they’re probably on to open sourcing VP8 and making it an HTML 5 video supported codec. If that goes out, the open source community will obviously jump on it, Mozilla included, so Firefox will surely support it. This also gives a logical rise to the possibility of YouTube eventually running on HTML 5 video, something Theora can’t achieve because of its compression inferiority to H.264.

Where’s Microsoft

Frankly, I don’t know. Except for the very cool video hardware acceleration for Internet Explorer 9, they’re tests don’t even make it faster than Firefox 3.6 at loading web pages in general. The only possible future for Microsoft would be Silverlight, but if we are to believe how the web is evolving, that’s clearly not where the world is going.

It’s a sad thing because despite being real dogs; that is being extremely slow, developing on Microsoft software is really a breeze in comparison to similar offerings. However, the market has proven the tools are far from being what determines what developers will develop for. If it were so, Microsoft wouldn’t be losing ground.

Adobe Flash vs Developers

Whatever the future of the web, it’s still the future, and the current reality is that the Adobe Flash platform is currently omnipresent. What’s more, the mobile industry only represents a little over 1% of the global web, which while maybe untrue for wares such as Facebook, is very true for the rest of the world. The main browsing activities still happen on full-fledged browsers, even when people are on Netbooks, and not supporting Flash means not supporting YouTube and lots of other web sites.

Because of that, there’s a strong possibility that the full browsing expectations of consumers on the iPad, given its display size, might just backfire at Apple when thousands of consumers discover it doesn’t support their favorite online destinations.

In the end however, it’s really just a fight between Adobe Flash and developers. Firefox has proven that the real people who are pulling the strings behind the web market are the developers, much like Google Android is actively proving the real people pulling the strings behind the apps market on mobile devices are developers. How? By actively pulling away market share from places developers stop supporting and actively giving market share to newer, more developer-friendly mediums. There’s market share, but there’s convictions for a better future.

Firefox is the very proof. Web developers have boycotted Microsoft’s Internet Explorer so much that users are moving away from it at a rapid pace for the simple reason web sites just don’t work on it anymore. Internet Explorer is currently losing market share at the rate of 1% to 2% per month. This means that in approximately 3 to 4 years, if it keeps on dropping, Internet Explorer’s market share will have greatly plummeted at which point it will be a minor browser with its only chance of survival being shear technical prowesses, something it’s currently very bad at.

This gives rise to the fact that if developers decide to drop Flash support and go to something else, Adobe will see its Flash plugin die, putting both Google and Apple in a very good position.

Apple vs The World

If you take a look at the list of partners on Adobe’s Open Screen Project web site, it’s only funny to think the only two major companies in the area not on it are Microsoft and Apple. Microsoft has already voiced its intention of putting Flash on its Windows Mobile phones in the same way OSP partners plan to, but Apple has almost openly declared war against Flash, and one has to think that with all the companies figuring on this list, it’s almost like they just declared standards war against the rest of the world, or did they just ally with the rest of world (sane HTML 5 people who hate Flash for very good reasons) against the rest of the proprietary software companies? Arguably Google’s decision to join the OSP is almost as if they only did so because they wanted to put Flash on their Android so that it would have something to go against the iPhone’s mighty market share.

The Plugin Agnostic Web

All in all, although I think the iPad’s future is questionable, the future is most likely not downloaded apps on the iPad and most likely more Google than the iPad would lead to believe. It’s also plugin agnostic, but unfortunately for those who want to invest skills in developing complex applications that require more than just JavaScript on the web, there’s no real future-stable solution out there, although fortunately only for now.

AJAX is doomed to be replaced, Flash has a very bad reputation and tendency to be rejected, Silverlight is years too late to market and Java on the client web will probably disappear completely shortly after 2010. In other words, for anyone with enough perception to realize this, investing your skills in any of the current client-side technologies seems very bleak.

Fear not however, Chrome OS is scheduled for somewhere in 2010 if I’m not mistaken and with the pace at which companies were moving in 2009 and are moving in 2010 we’re sure to know exactly what’s at stake by the next few months.

In any cases I would be much more excited as a developer to know that I can program something cool that runs native in a browser than to know that I can program something only compatible with Windows, *cough* excuse me, only compatible with the iPad, a.k.a. iPhone OS…

Current Education Systems Impede on Innovation

Students of modern education systems today are forced to use the tools the education centers attributed to them. The problem lies within the generality of the programs offered and the inability for students of all genres to choose where such programs will bring them through appropriate choices of tools. Because the available tools to develop projects in high education institutions depend on teacher expertise for evaluation, which is a model based on a hundreds of years old education system, modern technology students keep seeing their talent and choices impeded by these limitations, which ultimately impedes on innovation.

For example, when developing a browser-based game project, several solutions exist today. The most common that comes in mind would be the Adobe Flash Platform, which itself is divided in the Flash Professional authoring tool and the Flex framework. Next up are various solutions, like Microsoft Silverlight or Java Applets and JavaFX, which all offer compelling solutions, some even open source, that can go beyond what is possible on the Flash Platform. Arguably, this all depends on your target market, but for a student aiming to work at a company where Java is the primary language of development, being obligated to program in ActionScript on the Flash Platform impedes on his personal development and his ability to attain his goals, which is in fact counter-educative.

In more extreme cases, you could potentially count tools such as HTML 5 technologies and JavaScript as valuable market options that could prove an extremely good thing to learn for the future of the web. However, the primary source of expertise, graduating students, fails to give track to such nascent technologies and hence slows down technological evolution because the educational institutions they come from refuse to adapt and reform around newer technologies, which is ironic because the same teachers that fail to learn the new technologies often remember the students about how on the market place you have to keep learning new technologies to stay on top. One has to wonder why educational institutions don’t do the same.

Of course, it goes without saying the problem isn’t only restricted to the case of in-browser video games or Internet video streaming technologies. It applies to almost any environment. For example, more design students will be forced to use the Apple Mac platform, while most networking students will be forced to learn Microsoft Windows networking technologies, even if a considerable bulk of the market uses open alternatives like BSD and Linux distributions.

These limitations also have a major impact on the flourishing of open systems like Linux, which end up never getting into educational institutions despite being free and offering the ability for these institutions to lower their cost and in turn lower the amount of taxes paid as well as making education more accessible by lowering tuition fees.

In other words, educational systems should change and become more open to various technologies and guide the students towards choosing the ideal solution for their own career paths. In my opinion at least, this is the way of the Information Age.

Toshiba Qosmio X500 Fails
Promo Video Prooves its Monitor Sucks

While the Qosmio X500 might appear a beautiful beast on this screen,

Toshiba fails miserably at hiding the horrible effects imposed by the poor view angles here:

Ah, sad laptop world…

It’s also ironic that Toshiba prooves at the same time that they don’t have enough money/expertise to host their own video. I don’t know for you, but for me YouTube doesn’t equal hip on a web site, it equals poor independant blogger or something less-than-cool like that.

What’s the ideal video quality for Theora?

I’ve made a few tests on –videoquality encoding with Theora via ffmpeg2theora which I think is the best way to encode OGV media. Earlier tests conducted with ffmpeg2theora 0.25 reveal that 2-pass Target Bitrate encoding with Theora is less efficient than videoquality encoding, which is a one pass constant quality variable bitrate encode.

This might be surprising if you come from an H.264 encoding background, where quality-based encoders are almost nonexistent, but it’s quite the buzz with Theora. I could get the best quality encode possible on a somewhat motion-intensive animation with only 4.4 Mb/s.

Here’s the result of an intensive scene taken from an AMV that will appear in February at the G-AMV 2010 contest made by AMV-Canada. I’m the president of AMV-Canada and I do pretty much all of the grunt work of web encoding for the moment, so I was testing OGV encoding for our HTML 5 Open Video technology.

This scene is a very intensive scene which goes up to 7 Mb/s in VQ 10 . What you have to look for is discrepancies in the screenshots from VQ 9 down to VQ 0 comparatively to VQ 10. The video is a 740 x 410 pixels, which is a close approximate of what you can expect for an average SD video.

Benchmark

VQ 10

Size 99.03 MiB
Average Bitrate 4499 kb/s

VQ 9

Size 78.35 MiB
Average Bitrate 3589 kb/s

VQ 8

Size 61.41 MiB
Average Bitrate 2770 kb/s

VQ 7

Size 48.91 MiB
Average Bitrate 2255 kb/s

VQ 6

Size 39.79 MiB
Average Bitrate 1800 kb/s

VQ 5

Size 31.43 MiB
Average Bitrate 1415 kb/s

VQ 4

Size 24.52 MiB
Average Bitrate 1117 kb/s

VQ 3

Size 19.12 MiB
Average Bitrate 859 kb/s

VQ 2

Size 15.19 MiB
Average Bitrate 682 kb/s

VQ 1

Size 11.40 MiB
Average Bitrate 512 kb/s

VQ 0

Size 8.86 MiB
Average Bitrate 398 kb/s

Analysis

What you can observe is that the codec, in general, doesn’t start to drop in perceptible quality until VQ 8, and it’s still very subtle. VQ 8 is ideal for high quality encoding with minimal space.

VQ 7 starts to have noticeable blocking going on which often plague Theora videos. It’s very particular and while not exactly in your face, it’s always sort of there in lower quality Theora videos. VQ 7 might be more adapted to high quality web streaming.

VQ 6 and VQ 5 on the other hand fit perfectly in what the average H.264 encode looks like in terms of bitrate. While of substantially lower quality than H.264 at the same bitrate, both choices remain watchable and ideal for the web.

From VQ 4 and down, the codec starts to lose its ability to define straight lines and makes text increasingly hard to read. VQ 1 and VQ 2 then lose any ability to define detail and text becomes unreadable in most cases.

You can also enable –optimize in ffmpeg2theora, which makes encoding slightly slower and increases quality a bit. There’s definitely less blocking, but the difference is so minimal that with side-by-side comparison it’s often hard telling which is actually better. So while this might be a must when encoding, it’s definitely not worth re-encoding your whole library for it.

The potential for more computing power; Google Chrome OS and Native Languages

However you look at it, today’s major operating systems take a lot of resources. We run high performance applications like video games that could go to such better lengths with our machines had they not have to run on top of operating systems like Windows.

If you have a modern system with 12 GB of RAM, it obviously does not really matter. Most often you will most likely find the majority of applications on your system run perfectly fine while your friend might argue with you they are too slow to work with on older computers.

However, if you have such wares as a netbook, memory usage might be something you want to have an eye out for. Having a netbook is like stepping back 5 or 6 years in computing power and the speed and efficiency of the applications you run become crucial.

For example, Windows 7 on a netbook is already the very limit of what you can run as an operating system. It will eat at least half a gigabyte of RAM and will limit your use of your netbook to applications that can fit in the rest, which is most often less than 50% of your total RAM.

However, take Chrome OS, which will most likely take substantially less memory (it’s just a browser after-all), and you’ve got a different story. Your netbook might gain as much as twice its previous memory capacity for running software.

If Google was ever to enable the development of native applications for Chrome OS, a simple thing to do because it’s Linux based, your netbook’s potential as a browser-only platform will surely change. Any long-time professional software user will tell you that although current-day pro software like Photoshop take a modern computer to run, they used to be able to use Photoshop on the older computers, which were new at that time.

Chrome OS brings the same power back to older computers and most specifically netbooks. High-performance compiled web apps destined to these very netbooks might not be so far-fetched after all.

Opera on Mac gets new makeup; From 9.6 to 10.5

I’m seriously happy about Opera right now. Not only have they succeeded at keeping up with the technical updates, their browser is now finally another proud owner of a native shell on Mac.

This whole native shell movement really makes my eyes happy. Afterall, we did go from 9.6 to 10.5:

From the left to the right, Opera 9.6, Opera 10.1, Opera 10.5 Pre-Alpha for Labs.

10.5 also has a nice addition, smoothly animated tabs à-la-Safari.  We might see additional changes by the time this hits release, but it really makes me want to use Opera more. (Note, Opera 10.5 has other interface change niceties not covered here, but you get the gist of it; more animation and coolness, including for the first time being able to tab through checkboxes on Mac)

A note on speed

Opera Software proved once again that sheer technical expertise can surpass open source communities, as well Google on that note. On my computer, I got 393.2 ms for Opera 10.5 and 428.4 ms for Chrome 4 in the SunSpider JavaScript Benchmark, and it’s apparently even faster on Windows but I didn’t test that yet. Amazing.

HTML and CSS Discrepancies
Working around the W3C Box Model

Many thanks to Parakey for their Firebug Firefox Extension and to Opera Software for their Opera Dragonfly without which this CSS study wouldn’t have been possible.

If you’re an experienced web interface coder like me, the kind of guy who spent several years doing more than just toying around with HTML and CSS, you know that mastering these is pretty close to arcane magic. When using standards-compliant browsers, the CSS box model might not look logical. A lot of times I have faced issues where I thought the specifications were simply screwed up, but they are not. The real issue lies within the default CSS values established as standard.

It’s the real part that’s screwed up, but fortunately it’s easy to fix it and make it work the way it apparently should. The trick is to overwrite the defaults with your CSS style sheet. One marvel of specifying a higher than average amount of CSS rules is that even browsers like Internet Explorer 7 will end up displaying your web site correctly because a major problem in web standards is the default rule set. Hence, we’re essentially going to overwrite these defaults here.

Let’s start by breaking down this sample code:

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>CSS Box Model Test</title>
    <style type="text/css">
      .div01
      {
        width:150px;
        height:150px;
        background-color:blue;
      }

      .div02
      {
        width:150px;
        height:150px;
        background-color:green;
      }
    </style>
  </head>
  <body>
    <div class="div01"></div>
    <div class="div02"></div>
  </body>
</html>

This perfectly valid HTML 5 code will produce a blue and a green square like this:

What’s important to notice here is how the defaults specify a margin of 8px all around the body element. These defaults are what make HTML easy and very much helped its success. It avoids us having to specify tons of display properties. However, simplicity is always at the cost of control. Hence, designing very complex CSS layouts might result in a few headaches linked to surprise default values that weren’t expected. Unlike what we tend to think, most padding and margin values actually don’t default to 0.

To show what I mean, change the div02 to this:

<div class="div02">
  <h1>H1</h1>
</div>

And you get:

Take note here that we did not provide any padding or margin information to any of the squares for them to move down like this. If you see this in one of your complex designs, you might end up searching a complete afternoon for some discrepancies in your div blocks. The margin is actually on neither squares, those default to the expected 0px margin; it’s on the h1.

The problem lies in common mistakes made with the W3C Box Model, which differs quite a lot from the traditional box model older web developers might be used to. Quirksmode.org explains it very well.

Firebug can also give us insight at how the margin affects the result:

This is where it gets tricky though. The width of any text element like our h1 is predefined to fill its parent container from left to right. Our h1’s width is thus 150px. The height of any text element is predefined based on the font. In this case, it’s 36 px. This is shown by the green highlight around the h1. Our h1 also has a predefined top and bottom margin so to make it stand from the rest of the text. This is natural and removing this margin makes your text look cramped, but this margin is exactly where all the problem is.

In the W3C Box Model, there exists three ays to define extra spacing between elements; padding, borders and margins. The padding comes first, and is then followed by any border, and lastly by the margin. All of these elements exist outside the element’s width and height, meaning a 20px padding and a 100px width will equal a total width of 120px.

The border is self-explanatory, but the difference between a padding and a margin is more subtle and difficult to grasp. Layed down on paper though, it’s actually quite simple.

The margin is transparent and lies outside the border of an element. Even if the element has a border of 0px, it is still outside the border. A margin does not acquire the background color of an element.

The padding on the other hand lies between the border and the box of an element, or inside the border if you want. Hence, a lot of people like to call the padding a margin but for the an element’s content instead of the box. A padding acquires the background color of an element because it is part of the content (what’s within the border).

If we base ourself on the previously explained box model, then logically the h1 should be entirely contained within our green box, but it is not so. Why? Because the standards people screwed up. Wait, wait, you’re thinking, is this guy serious? Well yes I am, and all the evidence is there to prove it. In fact, a lot of modifications we can do to the code clearly demonstrate how every single browser manufacturer, probably due to the people who made the ACID tests, communally screwed up on this and manufactured a giant bug.

To understand how this bug works, let’s first look at what the result should look like:

To obtain the following, I replaced the 21px margin with a 21px padding like so:

h1
{
  margin-top:0px;
  padding-top:21px;
}

Doing so does provide a quick fix, but not in the event you’d be using a background for your h1 element. While such an occurence is rare, major web sites like Engadget use this background technique to make their links’ roll-overs. Replacing the margin with a padding would completely screw up their design by incurring a huge extra highlight on the text like so:

The real way to circumvent the problem is to use the box model in a way that doesn’t include the bug. Weirdly enough, this is quite easy and proves that it really is a bug. Simply add any padding or border to the affected box and voila, problem solved:

.div02
{
  width:150px;
  height:150px;
  background-color:green;
  padding-top:1px;
}

But just for the sake of it, I’ve made another example that demonstrates how this can only be a bug.

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>CSS Box Model Test</title>
    <style type="text/css">
      .div01
      {
        width:150px;
        height:150px;
        background-color:blue;
      }

      .div02
      {
        width:150px;
        height:150px;
        background-color:green;
        color:white;
      }

      .div03
      {
        width:150px;
        height:150px;
        background-color:red;
      }

      .div04
      {
        width:100px;
        height:100px;
        background-color:yellow;
      }

      .div05
      {
        width:150px;
        height:150px;
        background-color:black;
      }

      .div06
      {
        width:100px;
        height:100px;
        background-color:yellow;
        position:relative;
        top:16px;
      }

      .div07
      {
        width:150px;
        height:150px;
        background-color:blue;
      }

      .div08
      {
        width:150px;
        height:150px;
        background-color:green;
        color:white;
        margin-top:20px;
      }

      .div09
      {
        width:300px;
        height:400px;
        background-color:red;
      }

      .div10
      {
        width:200px;
        height:140px;
        background-color:yellow;
      }
    </style>
  </head>
  <body>
    <div></div>
    <div>
      <p>Paragraphs are also affected</p>
    </div>

    <div>
      <div><p>This…</p></div>
    </div>

    <div>
      <div><p style="margin-top:0px;">should technically do this.</p></div>
    </div>

    <div></div>
    <div>Any block following another block with a margin is affected. This text doesn't have any margin.<br>
    The box does.</div>

    <div>
      <div><p>The first block remains intact or influences the one on the previous level if it exists as it is in this scenario.</p></div>
      <div><p>The second block follows the bug partern.</p></div>
    </div>
  </body>
</html>

Since it is possible to reproduce this bug at all times under specific conditions, it is clear this is a manufactured bug that has been hidden away as standard. If someone believes this is not a bug and that there is a logical explanation to this behavior, please post a comment and explain! (One from Håkon Wium Lie would be appreciated)

A Google Phone doesn’t have to be the death of Android

Micheal Gartenberg has had a bit of fun saying the Google Phone could be the death of Android. The rumored Google Phone is a would-be carrier-free (unlocked) phone built by HTC and sold directly through Google.

As Micheal points out: “Until someone can give me a ten-word answer to how Mountain View can manage to build an ecosystem while trying to compete with it, I will remain skeptical that the Google Phone ever comes to market”, it’s going to be hard selling that phone on the market without killing the Android ecosystem.

But as much as I’d like to believe Micheal’s great insight, my own insight says something quite different.

First of all, what ecosystem? The Android platform is just hot on paper right now. Its market share pales in comparison to the iPhone and is playing catch-up with BlackBerry. Sure, it’s quite obvious Android will be rivaling the iPhone in two years, but in two years.

Secondly, why can’t Google sell its own device? “Apple’s tried this [...] with the Newton” and failed, says Micheal. But it’s as if he was ignoring the fact that Apple did try again with the iPhone and clearly didn’t fail. The premise on which Google would kill the Android for selling a better Android phone is just plain stupid. I don’t even have to explain why it would work. Google has always worked that way; if you can’t do it as we wish, we’ll do it for you and steal your market in the process.

I’m pretty sure Google doesn’t care about Motorola, and clearly this is going to benefit the like only other major Android phone maker, HTC, because hey, they do manufacture the phone in question! Think about it, that’s HTC selling its own device without having to provide any kind of software support whatsoever. That doesn’t sound like killing a partner in my opinion, but more like giving heaven to them.

Google has long shown that the Microsoft way of thinking “don’t compete with your own market” only impedes on innovation and eventually market success. Google constantly competes with itself, making the life of everyone easier at its own cost, a very good example being the ability to use Gmail as a Pop3 client. But they don’t care, because that does only one thing: bring more people into Google and eventually give Google more money because it builds into their ultimate advertising ecosystem.

In other words, I can’t see the Google Phone as anything else than a tremendous success. And besides, the Android platform will still remain open and liked of everyone. Whether Google conquests the smart-phone market with an array of half-working crap devices from every manufacturer in the world or its own very good phone doesn’t quite make the world different; in the end, Android is taking over, and open source technologies are too at the same time, making everyone happy, except Microsoft, Apple, RIM and Nokia.