Unit testing JavaScript

Tags:

I’ve recently been looking into some JavaScript unit testing frameworks. There are many alternatives, and while many of them seem good, very few of them actually matched my requirements: Must be able to run tests from the commend-line Tests should be relatively easy to write

Why your mobile site probably sucks

Tags:

Mobile phones of today can handle big sites fine. They can handle JavaScript quite well too. Then why is it that I constantly encounter crappy mobile versions of sites? What is it that makes these sites so bad, even though they were obviously designed with small screens in mind? While making a special layout for small screens is a great …

How to install Palm Pre/webOS SDK on Windows 7 x64?

Tags:

Note: latest versions of webOS SDK should install without problems on Win 7 x64. However you are free to try this if you encounter problems with it. Palm has recently released the Palm Pre webOS SDK to the public. Installing it on Windows 7 64-bit is a bit problematic however. When attempting to install it, the setup runs through fine …

Opera Mobile vs. iPhone Safari Mobile

Tags:

Lately I’ve had the chance to use an iPhone 3G. As I’ve been considering purchasing the new 3G S, this has been a good opportunity to see if I like the thing, but what I think of the phone itself is a matter of another post – Today, let’s look at its browse and compare it to Opera Mobile, which …

Opera Command, JavaScript based Missile Command game

Tags:

Firstly I’d just like to let you know that the lack of posts lately is because I have a new full time job which I’m enjoying quite much so far, but it still means I have less time / motivation to write stuff. The unit testing series and other postings will continue (see how I didn’t say “next week”, but …

Unit testing 5: test-driven development

Tags:

In this post I’ll introduce the methodology known as test-driven development, and how to use it in your projects. The difference between “normal” and test-driven development (TDD) is that when doing TDD, you write unit tests for your new code before writing the code itself. This way you ensure good test coverage for your code, and your code will also …

TankWar Online, my JavaScript based cannons game

Tags:

Back in late 2006 I wrote my most ambitious JavaScript/game project so far: TankWar Online, which as you may guess from the name was about tanks, shooting stuff, and it had a real-time online game mode – as far as I know, the first such ever in a JS based game. Originally the game was made for an older version …

Unit testing 3: Writing tests for existing code

Tags:

Now that you know what unit testing is and how to write and run tests, it’s time to look at writing tests in more depth. Today we’ll take an example class and write tests for it. We’ll also introduce some common testing methodologies.