Archive for June, 2009

Few Notes on Mobile Javacript

Thursday, June 18th, 2009

I’ve been working on a Javascript exercise – well, developing JS library for other users – and finding out that I’m not so good at it. But the only way to become better is to make mistakes. There has been some discussion around mobile devices and Javascript cababilities, performance and other aspects like the famous UX — but the still the documentation could be in better shape.

What I felt nasty is lack of developer tools here. Of course I had both Firebug and Safari 4 developer tools available and they do a good job on desktop. And thus, the code worked fine on the desktop, then I tested it on N97 – still working. But on S60 3.1 – namely N95 and E90, it just crashed. If a read the document right, the Javascript core of these browsers is from early 2007, so in the age of Internet they are rather old.

Thus, I got a bit lost there and started the usual debugging strategies: removing and lines until it started to work. Firstly, I found out that the parser is rather strict on old Nokia devices – my objects had a last comma

o = {

a = ‘a’,

b = ‘b’,

}

which is invalid and thus makes the whole object invalid. So, no comma in the end. The problem for me was, that on desktop browsers it works even with that comma, which makes finding bugs a bit harder. A nice tool here is JSLint, which allows you to check the syntax validity of Javascript code. Otherwise, it’s like hide and seek.

Tiny Scratch exercise

Wednesday, June 3rd, 2009

Nokia wants to be an active part of your local society and we thus have several activities ongoing to provide support. They are called some times Nokia Helping Hands-projects. This Helping Hands thing is an umberella, that allows us to use work time to do something good.

In reality this means a wide range of activities, from cleaning the environment to supporting societies during crises. My contribution this summer was on youth education, giving a nice experience for kids in elementary school. Well, as I’m not so imaginative person, I choose a topic close to me: programming. I didn’t have the guts to show Java, Python or some web technologies, so the choice was Scratch.

Scratch seemed to be easy to learn (and teach) and what’s most important, kids loved it! Some of them even said they might continue learning it at their home… So, a successful event — that pushed me to think these things once again, maybe I should try to contribute more in this field.