Decorators!
Decorators can be quite confusing when you first meet them. The best way to learn is by writing some! Here's a couple of simple examples for you to try out.
This is my book about Test-Driven-Development for web programming, published by the excellent O'Reilly Media.
There are a few ways you can read and support this book:
Obviously these are my favourite options! O'Reilly have been great, they deserve your support, and although I only get a small amount in royalties (about a dollar per sale if you're curious), it still pays for the occasional dinner out every month which I appreciate. Plus, real physical books are nice...
TIP: I don't recommend you use Google Play Books, or at least not their PDF version, it's horrible
Alternatively, or in the meantime, help yourself here! It's all free and CC-licenced (thanks O'Reilly!). I see this as a "try-before-you-buy" scheme, and I hope that if you enjoy it you'll buy a copy -- if not for yourself, then perhaps for a friend!
And do get in touch with comments, suggestions, corrections etc! [email protected]
Decorators can be quite confusing when you first meet them. The best way to learn is by writing some! Here's a couple of simple examples for you to try out.
We've been experimenting with Docker and py.test with integrated tests. Is there any sense of writing unit tests here?
Getting Selenium to wait until the next page has fully loaded after you click on a link seems like it should be easy, but it's actually very hard to do reliably, but I think we may have cracked it. Read on!
My copy of the print book arrived! So it's official, you can now buy the real, physical object thing
As part of the #isTDDDead discussions, Kent Beck had a pithy reflection on what the limits of TDD might be.
I've just completed the process of upgrading the whole book to the Django 1.7 beta release. Migrations were the biggest change. They've meant a slight increase to the learning curve for chapters 5 & 6, but on the other hand I was able to drop the dedicated migrations chapter altogether!
Django logging can be a little baffling. Here's an answer to the "how do I make django log all exceptions to the console?" question, which isn't necessarily obvious.
tl;dr: I found myself going through increasing contortions trying to TDD some JavaScript code with Ajax in. Once I started using sinon.js, all the pain went away. Folks, don’t try to roll your own JavaScript mocks.
I’ve been playing around with Mozilla Persona as an authentication ...
This blog post is a first rough draft of a planned appendix to my book. It follows on from Chapter 9, which is all about forms and validation. You can take a look at it here
If you want to check out the code to have a play with the ...
Should we unit test deployment scripts? If so, how?
The book is available both for free and for money. It's all about TDD and Web programming. Read it here!
"Hands down the best teaching book I've ever read" — "Even the first 4 chapters were worth the money" — "Oh my gosh! This book is outstanding" — "The testing goat is my new friend" — Read more...
A selection of links and videos about TDD, not necessarily all mine, eg this tutorial at PyCon 2013, how to motivate coworkers to write unit tests, thoughts on Django's test tools, London-style TDD and more.
This is my old TDD tutorial, which follows along with the official Django tutorial, but with full TDD. It badly needs updating. Read the book instead!
The campaign page, preserved for history, which led to the glorious presence of the Testing Goat on the front of the book.