The slides and video of my talk at AsyncJS on Thursday are now online. The video is pretty murky, but the sound has come out fine and you can see enough of the slides to be able to follow along at home. The talk focuses on ways to bring useful software engineering patterns to JavaScript, patterns that will be increasingly important as JavaScript applications become larger and more complex.
Thanks to Prem for inviting me to talk and to everyone who came along to the Async session for the fascinating discussion.
Jamie has just uploaded the movie of my talk “The Why and How of Automated Testing with Python and Django” which I gave at BrightonPy a week ago (and this time it really is a movie, clocking in at a feature length 1 hr and 35 minutes). The audio on the video is fine (and arguably the laptop-eye-view video is improved by chopping my head off for large parts of the talk), but it’s tricky to see the slides on the video, so I’ve uploaded them to slideshare.
The talk rambles a bit in places and there are a couple of things that betray my static language roots for example you can’t actually use unit tests to discover dependencies as easily in python as you can in C++. I’m also already evolving the JS testing stack I talk about here: moving from qunit, qmock and Selenium to jsmockito and possibly JsTestDriver. Overall I think it’s a pretty good overview of how an agile software engineering process can be screwed together.
Many thanks to @garethr for donating his Fabric scripts, Spike for his database migration cameo, Si for recommending Hudson, Dave for hooking me on automated testing and j4mie for organising the night and wrangling the video. If you’d like me to help your organisation improve its agile engineering process, please get in touch.
A few weeks ago at JAOO I felt insanely jealous while watching Erik Doernenburg demo Mockito: I wanted dynamic mock objects in C++. It turns out that it’s really hard. However, after a few days hacking around I found that it’s not completely impossible. The results of my hacking are now available under a BSD license here. m0cxx0r lets you write tests like this in C++:
typedef m0cxx0r::Mock<ProductionClass> MockClass;
MockClass* mock = MockClass::create();
mock->expect("foo", &ProductionClass::foo);
mock->expect("bar", &ProductionClass::bar, 42);
mock->expect("baz", &ProductionClass::baz);
mock->foo();
mock->bar(3);
mock->verify();
MockClass::destroy(&mock);
Most importantly you don’t need to hand code a test double for ProductionClass: m0cxx0r generates it for you. The code needs lots of love: it’s all in a single file and the interface will need iterating a few times, but I think it’s a good start. Please download it, have a play and let me know what you come up with. I’ve only tested it on gcc version 4.0.1 on darwin, so I’d be interested to know if it works on other platforms as it uses some code layout assumptions that might not be portable. I’ll write some blog posts over the next few days that explain how it all works.