Mac OS includes Apache and PHP, which is a bit handy for us developers. We all need a local environment and it helps if the local environment looks and feels a bit like the terminal ssh session we use to manage our production server. Configuration can be a little tricky however, and things change from …
Category Archives: Code
Java: Pass by Value
Ever since I started coding in Java I’ve been regularly obliged to participate in conversations debating whether Java is a pass-by-value or pass-by-reference language. I’ve never been particularly hazy on the matter; Java is strictly a pass-by-value language and the values which are passed are pointers (to a memory location representing the data you are …
Battling with Django Inheritance: Subclass Casting
For a day or so now I’ve been battling with Django’s model inheritance, which has a particularly frustrating approach to dynamic polymorphism. The problem is that when one is implementing a group of related models using multi-table inheritance and you attempt to iterate over the bog standard QuerySet for the parent class, we see an …
Continue reading “Battling with Django Inheritance: Subclass Casting”