The Game of Life in HTML5

Conway’s Game of Life is a pretty sweet game. Well, it’s more like a set of rules that, when run, can result in some pretty awesome patterns.

Simply put, you start with a grid of boxes. The boxes are in either of two states: alive or dead. To play the game, you start by turning some boxes alive, and running these rules over and over:

  • A living cell with 0 or 1 neighbours dies, by underpopulation
  • A living cell with 4 or more neighbours dies, by overpopulation
  • A living cell with 2 or 3 neighbours survives
  • A dead cell with 3 or more neighbours becomes alive, by reproduction

I’m not sure why, but we learned about the Game of Life in one of my computer science classes a few semesters ago. I thought it was interesting at the time, but it (sort of) came in handy when I interned at Microsoft. Every year the company puts on “Puzzle Day” which is a program-wide competition between teams that are solving puzzles all day. One of the puzzles was just a wide grid with seemingly random boxes colored black. It came with some clue about “life”, and I figured that it was simply Conway’s Game. Little did I know that there were custom rules that we had to figure out to solve what the boxes revealed… Sadly, this wasn’t one of the puzzles we solved, but we came close, right?

Conway’s Game of Life in HTML5

Apple’s new wall of exclusion: a demo of HTML5 and open standards

wait, I thought Firefox, Chrome, and Opera supported HTML5 too...

Apple has been catching a lot of flack for it’s HTML5 Showcase page it recently put up on its website. And for good reason! The problem with the site is that it purports to be a page intended to

show how the latest version of Apple’s Safari web browser, new Macs, and new Apple mobile devices all support the capabilities of HTML5, CSS3, and JavaScript.

So what’s the problem? You can only view the demos with Safari. If you’re using Firefox, Chrome, or Opera – all modern browsers that support HTML5 – you get the error message shown in the image above. The fact that Apple is browser sniffing and excluding products that are all capable of displaying the content on those demo pages is troublesome.

Christopher Blizzard of Mozilla summarizes the issue and what’s really important in this way,

The most important aspect of HTML5 isn’t the new stuff like video and canvas (which Safari and Firefox have both been shipping for years) it’s actually the honest-to-god promise of interoperability. Even stodgy old Microsoft, who has been doing their best to hold back the web for nearly a decade, understands this and you’ll see it throughout their marketing for IE9. (Their marketing phrase is “same markup” – watch for it and you’ll see it everywhere in their messaging.) The idea that the same markup, even with mistakes, will be rendered exactly the same. HTML5 represents the chance for browsers to work together and find common ground.

It really sucks that Apple thinks it can push the market around like this, but it’s great to see that people aren’t going to take it.

intellectual honesty and html5 -Christopher Blizzard

Apple is to HTML5 as Google is to Flash

the battle of Apple with HTML5 and the iPad vs Google with Flash and Chrome

OK, I completely understand the insane generalization I just made with the title of this post, but when it comes to online video adoption, I think it holds true. Apple has made it very clear from the launch of the iPhone that it really isn’t interested in working with Flash anymore. And as of the past couple weeks, Google has made it very obvious that it really isn’t interested in always doing what Apple wants.

Everyone knows that the iPhone doesn’t support Flash, and most people know that iPad arriving on Saturday won’t support it either. For a while, it looked like Adobe and Apple were making headway in cleaning up Flash so that it could run on Apple’s mobile devices without eating through battery life on the already life-strained devices. All that changed with the iPad. It’s become apparent that Apple has no interest in Flash and would much rather everyone move on to HTML5’s video tag.

As usual, when Apple says, “Jump,” there’s plenty of parties lining up asking, “How high?” In the past week, we’ve seen plenty companies announce that they’ve readied their “iPad compatable” sites that are devoid of Flash and HTML5 rich. The biggest of these announcement comes from Brightcove which lists customers like the New York Times, NPR, and the Wall Street Journal.

In opposition to this, and further feeding rumors of bad blood between the two, Google has fully integrated Flash into its Chrome browser and operating system. While the vast majority of users have already installed the Flash Player plug-in, it’s interesting that Flash is comes prewrapped in Chrome because 1) it flies directly in the face of Google’s public support of the HTML5 standard and 2) it shows Google’s dedication to Adobe’s Open Screen Project. Essentially, Google’s sending mixed signals to the tech world. Are we supposed to completely support the new open web standards including HTML5, or can exceptions be made when a company (like Adobe) throws their proprietary technology in the mix saying it’s needed to build a ubiquitous platform for developers?

My vote? I say go with HTML5. I think HTML5 has great potential, and new projects like SublimeVideo and RGraph are perfect examples of this. Flash has had its 15 minutes, and it’s due time for us to dump it in favor of open standards.