Tidbits | July 6, 2010

Investing in Yourself - A review of Django 1.1 Testing and Debugging by Karen M. Tracey

by Frank Wiles

Packt Publishing recently asked me to read and review Django 1.1 Testing and Debugging and I have to admit I really enjoyed reading this book. Often I find myself debating whether or not to purchase a new development book. I'm usually thinking "If I spend $XX.XX on this book, will I really learn anything worth that much?". Especially considering most answers are a few Google searches away. I can happily attest this book is definitely worth the cost.

The book starts off with the usual introduction to testing, discussing both Doctests and Unittest, which is obviously required for a book on this subject. However, this book differs greatly from many in that it walks you through testing and debugging your application as you would when building a real application. Many tech books strive to be a great tutorial, but often fall short of the mark and end up just being some verbiage around a rehashing of the available documentation. They end up being more reference than tutorial. Django 1.1 Testing and Debugging however does a great job of walking you through real world scenarios. For example, it covers topics (and in the proper order in my opinion) like:

  • Test coverage
  • Everything you would ever want to know about the default Django debug page
  • How to debug urls.py issues
  • How debugging differs between the development server and what to do in production
  • Getting ahold of what database queries were actually generated on a given page
  • Using the wonderful Django Debug Toolbar
  • Using logging to help debug your code
  • Effectively using the Python Debugger
  • How to report Django bugs

All of these tools and techniques should be in all of our development arsenals, but this is the first book I've seen that puts them all together in a way that is accessible to Django developers of nearly any skill level. Beginners should read the book, even if they don't understand everything right away, just to know what options they do have at their disposal. However, more advanced developers will likely find a few golden nuggets of wisdom that will pay productivity dividends for years to come.

Hence the title of this post Investing in Yourself. While Packt was nice enough to give me a free copy of the book to review, had I paid full list price the time savings from the few little nuggets of wisdom I either didn't know about or for whatever reason never clicked with me before would have paid for the book many times over in just the first few weeks.

I highly encourage you to pick this up and with it improve your code going forward. You can check out a sample chapter of the book to whet your appetite a bit.

2010-07-06T13:20:05 2018-04-18T16:23:20.221637 2010 programming,python,django