Testing in Django

I’ve been working with a team of developers on the BOS2 project, a new version of our successful Bristol Online Surveys (BOS) service. This completely new codebase is written from the ground up using a variety of tools and technologies many of  which are new to the developers on the project. For myself, I’ve not had any experience of Cassandra before, and aside from some light-touch Plone work in the past this is my first real Python (Django) project that I’ve worked on.

While I’m enjoying the experience, with a background in Java I’ve come to rely on an excellent testing ecosystem which is one of the areas where I feel Django falls short. It’s not that you can’t do what you want with the Django testing framework but (as this blog post shows) it makes you work harder to get there and it’s often easy to fall into traps as you build your tests. I don’t feel we’ve achieved nirvana with our test framework but we’re getting there. Continue reading

(Re)Programming

I have recently started a new project at work on which I’m both the only architect & developer. This project is an extension of an existing one but rewritten from the ground up. I’m taking this opportunity to look back at my past work and select things that have worked for me, as well as drop those that didn’t. I also have the chance to check out the latest technologies on offer to the Java web programmer of today. Continue reading

Writing Effective Javascript Code (or How I Learned to Stop Worrying and Love the Unit Test)

Like most programmers I feel there are always ways of improve my coding skills. Whether it’s the perennial ‘write more documentation’, gain a better understanding of my current programming language or even just adopt a good programming style. Recently our company had a staff development week and I took this opportunity to pursue some of these interests. My main focus was on Unit Testing and after a week spent delving into this world I emerged with a new found enthusiasm for testing techniques, better confidence in my own skills (thanks to the tests I wrote) and a desire to spread the word.

The following entry is from a presentation I gave to my fellow ILRT programmers which covers some of the javascript tips and tricks I discovered on the web to help me (and others) become a better programmer. I conclude with some information on testing javascript applications using JSUnit and Selenium Core.

(I appologise for the layout but after several hours spent fighting with WordPress I’ve given up nicely trying to format everything)
Continue reading