What Does Software Development Cost
by justin on Jan. 7, 2012, 10:21 a.m.Lately I've found myself frustrated by some of the requests and business decisions at work. I understand where they're coming from and why they are made but I don't know how to explain that they probably aren't worth the cost to implement.
This has always been a problem for software development and IT in general. In some companies IT/dev makes all of the technical decisions and that's what the users get. My old job had a major product within the company developed this way and it ws certainly troublesome because the end users felt ...
Partial Indexes With Django
by justin on Nov. 7, 2011, 11:12 p.m.My previous post about extending Django's model validation led to a new requirement, partial unique indexes. The extended validation works, but there's still a race condition between validation and saving, so you can validate that the current values don't violate the unique constraint and then another object can come in and get saved before your current object. To keep this from causing a problem, the uniqueness needs to also be enforced at the database level.
Fortunately, Postgresql has partial indexes and partial unique indexes, specifically, which solve this problem if you're using postgres. Unfortunately, Django does ...
Extending Django's Model Validation
by justin on Nov. 5, 2011, 12:47 a.m.Today I found myself in need of extending the way Django does model validation. What I needed was a partial unique index. Unfortunately Django doesn't have support for that built in. What I ended up doing was overriding my model's validate_unique() method. This wasn't terribly difficult, but did have some complications due to a bug in django.core.exceptions.ValidationError or unclear documentation. The examples in the documentation only show ValidationError being raised with a string passed into it.
The problem that with this is that part of the code for ValidationError assumes that you did not ...
Comparison Of mod_wsgi And mod_fastcgi
by justin on Oct. 7, 2011, 11:46 p.m.I've recently been trying to improve my Django setup to make it more stable and easier to maintain. Part of this has been experimenting with protocols and modules for Django to interface with Apache.
For awhile I've been running Django using FastCGI with Apache's mod_fastcgi. There are several good things about using mod_fastcgi and one annoying disadvantage. What I really like is how easy it is to go this route while using virtualenv. You just activate your virtualenv and then start up the Django FastCGI server with manage.py runfcgi port=<yourport> pidfile=django.pid and away ...
#OccupyWallStreet
by justin on Oct. 6, 2011, 11:42 p.m.I don't intend to normally talk about politics here, just tech stuff, but I'm making an exception here. I've been watching news about Occupy Wall Street and have a tab permanently open on twitter.com watching #occupywallstreet and #occupywallst tagged tweets.
I think this is a great thing and very important. It's something that I expected would come eventually, but certainly did not expect it to happen now. Many people are complaining that it's pointless because no one has an actual solution, that people who support Occupy Wall Street just want everything given to them ...