December 10, 2013 at 5:31 PMMichele Mottini

Selected HTML5 technologies:

  • Canvas (2D drawing) – like Windows GDI
  • WebGL (3D drawing) – like Windows OpenGL
  • WebSocket – like Windows Winsock
  • Indexed Database – like Windows MSDE
  • Offline Web applications – like Windows normal applications
  • File API – line Windows NTFS
  • Font support – like Windows GDI font handling
  • Video/audio support – like Windows Media Player and associated APIs
  • Web Workers – like Windows threads

So we are re-developing all this stuff (and more) in various browsers running on different platforms – and then develop (or re-develop) applications on top of it.

Tell me again, why are we doing all this? Wouldn’t have been simpler just to stick with Windows?

Posted in: Programming | Opinion


Udacity HTML5 game development course

April 18, 2013 at 6:13 PMMichele Mottini

…I dropped it after completing five of the eight units.

I kept reading about these new free on-line courses. I want to improve my JavaScript / HTML5 / canvas skills. I saw that Udacity was offering a new  HTML5 Game Development course. It seemed perfect – and is free! – so I  gave it a try.

The course is organized as a walk-through of the development of the GRITS video game – a technology demonstration by Google. Good idea: better to work on something specific instead than explaining things in general.

The course is split in eight units, each on a specific subject: use of the canvas, atlases, handling input and so on. Good as well.

Each unit is composed of short videos – and when I say short I mean it: never longer than 3 minutes, and often under a minute. Here is the first problem: it is difficult (impossible?) to explain anything of real substance in such a short time, so what you get are small snippet of information without much real meat.

The second problem is that there are not that many videos – the total time of all the videos for an entire unit is in the order of 10-15 minutes. This means that in the entire course you are getting something like a total of a couple hours (at most) of lessons.

Then there are the quizzes! After almost every video you have to complete a quiz. Most of the quiz involve writing some JavaScript code, that is then automatically tested. You write the code directly in the browser.

Writing code in the browser as part of a fairly large project is not that easy, so they ‘dumbed down’ the tests a lot: often you have to write no more that 10 lines of code following comments placed in the code itself (‘Write a loop that does such and such. Insert your code here’). On top of this the automatic tests use fairly simplistic test cases. The result is that the quizzes are an exercise of writing syntactically correct small JavaScript snippets; they do not test if you really understand (or not) what you are supposed to be learning. Finally, often the quiz code does not match the instructions – or even the comments inside the code itself – so you have to guess what is being asked.

A couple of other things (and then I stop, promise):

There is no explanation of the overall structure of the program, you look at the various pieces in isolation. Makes everything more difficult to follow – and it would have been an interesting subject in its own right.

The code itself look a bit weird, for example there are methods of a class that has a global instance that access directly the global instance instead than the current one:

var TILEDMapClass = Class.extend({
    currMapData: null,

    parseMapJSON: function (mapJSON) {
        gMap.currMapData = JSON.parse(mapJSON)


var gMap = new TILEDMapClass();

No explanation given – but surely looks wrong to me.

As I wrote at the beginning: I stuck with it for some weeks, but in the end I dropped out.

Posted in: Opinion | Programming

Tags: , ,