If you are writing unit tests in Django 1.6 or later, and using assertQuerysetEqual, you may get the following error message:
ValueError: Trying to compare non-ordered queryset against more than one ordered values
If you are writing unit tests in Django 1.6 or later, and using assertQuerysetEqual, you may get the following error message:
ValueError: Trying to compare non-ordered queryset against more than one ordered values
There was a 10K race taking place in London yesterday. Like the London Marathon and other road races, they close the streets to traffic and erect barriers down the side of the road. I was in town for other reasons and I ended up having to cross the route in a couple of places. It can be very tricky, because the flow of runners never stops and there don’t tend to be big gaps between runners. You really don’t want to get in the way of the runners as you cross! In some places you’re not allowed to cross at all, and you have to walk along the route until a gap opens up in the barriers. These kinds of events do pose a problem for pedestrians getting around the city. While traffic gets diverted, there aren’t usually any special provisions made for those on foot.
This is probably one of those “solution looking for a problem” ideas. I seem to have a lot of those! Anyway, here’s the idea. This tool would allow you to set up a sequence of timed events. Each event has a title, a duration, and a sound to play when the event starts. You can also set the text and background colours for the events. All the events are played in sequence from start to finish. You’d create a timer sequence by dragging new events onto a kind of timeline, and you could drag them around to rearrange them, and edit their properties.
In my last post, I mentioned that I’m implementing my current project with some new (to me) technologies, namely Python and Django. I do often seem to find myself doing each new project while simultaneously learning some new language or framework. There’s something very appealing about learning new things. All technology stacks have faults and idiosyncracies and you come to know these as you become familar with them. Unknown tools have the promise (never actually fulfilled) of being perfect. Perhaps there’s also a bit of self-protection involved. If this is “just a learning project” then it doesn’t matter how good it turns out to be. If you’re using technology you already know well, you have to face up to how good your work actually is. Using new tools can also make the experience more challenging and varied. Grunt work is less boring if you’ve never done that particular type of grunt work before.
For most of my career as a software developer I’ve worked with the Microsoft development stack, starting with Visual Basic and then moving to C# when .NET came out, and using ASP.NET and MVC for web projects. But for my own projects, I tend to be drawn to other languages and technologies. I’ve built a couple of things with PHP, have dabbled in Ruby and I’m currently working through SICP using Scheme.
My current project is BusyFlag, based on the idea I posted a few weeks ago. I’ve decided to implement this in yet another new (to me) language: Python, using Django as the web framework. I feel like I’m pretty late to the Python party! It was first released in 1991, and I first heard about it around 2000 (and completely ignored it until now!)
Over the weekend I helped my dad to build a new shed for his garden. The old one was made of wood and had started to rot so he bought a new one, made of metal. Building it was pretty much a case of following the instructions to put all the bits in the right places in the right order.
The instructions were…OK. They were not all that clear in some places, with some careful figuring out needed to make sure we were doing things right. Sometimes we got them wrong and had to backtrack, taking off some pieces so we could put the correct piece on first. I’ve built a fair bit of self-assembly furniture in my time, and this kind of thing often seems to happen there too. I call it ‘the crisis’: that moment when you realise you’ve gone wrong and you’re going to have to undo the last few steps to get back on track.