Programming

Simple Javascript inheritance that works

Computer

Javascript is a prototype-based language which has some slightly unusual semantics if you are used to languages like Java and C#. Classical OO inheritance isn’t trivial in Javascript – at least not conceptually. There are many webpages out there out there offering various solutions. Many of them propose complicated and strange answers to the problem, when actually it’s pretty simple.

Sun SPOTs

Sun SPOT

Sun have finally started selling the Sun SPOT to US customers. I worked on this project until mid-2006 and I must admit I’m proud others will have a chance to use these devices. I’d like to highlight some of the great features of these devices, and some of the best things about being on this project.

Xbots - Robocode for Extreme Programmers

Robot

In 2002 Paul Simmons and I put together the “Robocode workshop” (we changed the name later to Xbots) for XPDay 2.

It gives programmers a chance to try out their teamworking and continuous integration skills in a competition. The competition makes it a good environment for learning how to stay on process under pressure.

How good are your automated tests?

A patchy test suite is a common occurrence on projects. The application is often only as good as its weakest area (though it may be weak in an area that is seldom used). The weakest area is likely to be worst tested.

Begin at the beginning

For years I’ve been talking about “working from beginning to end”. It’s a common pattern in systems I see that developers begin to code functionality from somewhere other than the entry point to a system (e.g. the GUI). This approach increases integration difficulties. If the programmers keep saying things are done when they don’t actually work, this may be what’s going wrong.

Fine-grained objects and Inflection Point Testing

Computer

I’m starting to move away from Law-of-Demeter-esque TDD unit testing, and towards Michael-Feathers-style inflection-point testing (regardless of whether it’s legacy code or not). And why? My work on very fine-grained objects in Kew has prompted some changes in my thinking.

Constructing objects: Chicken and egg

Computer

I recently had a tip from Nat Pryce about a weird control construct from HScheme: call-with-result. It passes into a function an argument which is its own result. Erm, okay. Let’s just think about that for a second. It solves the “chicken and egg” problem of creating mutual references between objects - something you’re normally forced to use setters for. We can use something like this to get better encapsulation.

Syndicate content