Thursday, 16 July 2009

Are you too tall?

I feel compelled to add my voice to the growing number of people who are unhappy with the relationship between the Police Forces and photographers in the UK. A number of stories have cropped up over the past few months describing how police constables and community support officers have been harassing photographers, using laws intending combat terrorism (for example, this and this).

The most recent of which is this incident reported by The Register, where a photographer was arrested during being questioned by a Kent WPC. The individual had been stopped in order to explain why he was taking pictures of the area. Apparently, during these questions, he took the WPC's picture. This, combined with his height, was found to be threatening and led to his arrest.

It almost feels like that Met has an ongoing war on photographers. Recent publicity campaigns involved ads designed to induce fear of photography. For example:



The reasoning behind the police's apparent distrust of photographers is unclear. There has been no evidence that photography was involved in the September 11th or July 7th acts, and I am unaware of photography having been linked to any major terrorist plots. What is clear is that the adversarial stance that has been taken by the police is causing an increasing number of problems. It prompted the recent publication of these guidelines:

http://www.met.police.uk/about/photography.htm

However, these guidelines do little to define what can be classified as suspicious behaviour, to the point where justifications of being of an intimidating size could be considered enough to be stopped and have your images searched.

It is important to remember that despite the attempts that the Police Forces might be making to clamp down on journalists and amateur photographers, it is very important that photographers' rights are defended. Not only does photography play a crucial role in journalism, but in cases such as Ian Tomlinson's death, it illustrates how photographs from members of the public are key in matters of public justice, particularly in cases involving members of the Police Forces.

Monday, 6 July 2009

Company Away Day Time Lapse

It's rare when my hobby of photography and my job in software development coincide, but recently the company I work for had an Away Day and one of my colleagues put together a team of people to record a time lapse video of the event. I was part of the team, and this is what we made:



It was definitely a lot of fun to do and hopefully we'll be able to do something similar again next year.

Friday, 3 July 2009

Don't use Java primitives

Java syntax evolved from C's and as a result has the primitives:

byte short int long float double boolean char

These primitives can be considered to be the building blocks for all other value objects within Java and allow users to hold data as fields and variables. However, I would argue that they are not useful and a good rule of thumb is to not use them at all. Instead Java provides the classes:

Byte Short Integer Long Float Double Boolean Character

These are classes for fully fledged, immutable, value objects which can be used in much the same way as the basic primitives, but offer the following advantages:

1. They can be used in generics. This is possible:

new ArrayList<Integer>();

But this is not:

new ArrayList<int>();

2. They can still be passed into library functions that demand primitives. Auto boxing means that a method signature with int can still be called with an Integer objects transparently. Likewise, a function returning an int can be assigned to an Integer.

3. They offer all the expected methods for use in debugging and collection handling, such as toString, equals and hashcode.

4. They can be null. While there is a lot of discussion as to whether applications should be passing null around, it is still sensible to ask the question what should be returned from a method such as getIdIfPresent if there is no ID. With primitives, you'd be forced to return a value that represented a nonexistent result, such as -1. WIth real objects, you have the option of returning null.

5. Primitives in java are passed by value, whereas objects in java are passed by reference. This may not have a huge impact on how you would handle Integer vs int, however. This is because the objects that represent the primitive types are immutable, and therefore you cannot change the value of any of the parameters passed. Despite this, I would recommend using objects over primitives, simply because it means you don't have two kinds of behaviour represented in your code.