Tuesday 30 August 2011

I guess it just wasn't meant to be

Back in August 2010 I decided to leave my job to find a more satisfying role while I still had a reasonable amount of time left on my visa.

A few weeks later I received an unsolicited approach from someone who I had never met, but who now worked at Autoquake and had liked the look of my LinkedIn profile.  I had interviewed with Autoquake before and had actually been offered a position, but hadn't liked the fact that they were still a start-up.

This time around there would be fresh faces from a team that had previously worked together on highly successful well-known web applications etc. etc.  So I agreed to another interview.

I was a bit rusty in the interview process, and unsurprisingly was not able to come up with a brilliant solution to a problem that had taken them quite some time to solve with 5 minutes at the whiteboard.

I wasn't entirely surprised not to hear back from any of the people who had interviewed me that time around, though it wasn't particularly courteous or professional of them.

Today I came across something which reminded me of the company, so I tried some Googling, only to find that they no longer exist:
http://www.which.co.uk/news/2011/03/massive-online-used-car-retailer-autoquake-folds-248918/

It's just as well I didn't place much value on the stock options they included in their package offer first time around.

Thursday 25 August 2011

Communication - it's not meant to be a one way thing

I don't know about you, but if I send an email asking a specific question, then I expect a response within a day or so - even if it's just to say, "We'll have to get back to you at the end of the week".

If this lack of responsiveness was from a massive busy government department with an anonymous email address on their website I might understand, but for a commercial organisation that is paying for my services it really doesn't make sense.

Perhaps it's a hangover from the 20th century when some businesses provided their employees limited access to a shared computer for such high tech communication?

Monday 22 August 2011

Making sure that more isn't really less

During a recent code review I came across a slightly naive approach to speeding up a group of HTTP requests - by allocating a thread to each request and setting them all to run at once.

Given that I have some responsibility for and control over the servers that these threads will be connecting to, I wasn't looking forward to each client potentially attempting to establish 20+ connections at a time.

To gain some control over the number of possible concurrent connections I have introduced a sort of connectivity manager that can be configured to permit a limited number of connections, queuing others.

I have only applied this approach for one of the several dozen operations that are exposed so far, but can already see this as being a potential area to reduce some duplication which has accumulated as a result of proof of concept code being adopted into the main project without refactoring.

Thursday 18 August 2011

Stagnating open source

I noticed some unusual behaviour in an application yesterday so I took a dive into the source code to see whether it might be something obvious.

In amongst some business logic for cache refreshing I found a call to CollectionUtils.removeAll.  I hadn't personally used this CollectionUtils class before, so I decided to see what functionality it offered and how it worked.  The Javadoc looked okay, but the implementation was clearly broken - delegating to a method called retainAll which is very different to what was intended.

Since this CollectionUtils class is part of the Apache commons Collections component I went looking for whether this was a known issue, and whether it had been fixed in a later version.

According to the Apache Jira system the problem was recognised and fixed 5 years ago: https://issues.apache.org/jira/browse/COLLECTIONS-219

Unfortunately it would appear that there has not been a new release in those 5 years.

I suppose that there would not be many applications using the broken removeAll method, as it was only introduced in the last released version.

Perhaps Commons Collections should be moved into the Dormant projects section of Apache?

A productive week so far

One of my colleagues has been on leave this week so I have had a little more freedom to try out changes to the current project without worrying about potential conflicts when checking the changes into the version control system.

One of the changes that I had been contemplating for a while involved introducing Spring Flex so that our main integration point between BlazeDS and our Java web application can make use of the same dependency injection as the rest of the application.

As usual, the documentation was quite thorough, but due to my lack of familiarity with Flex I found some blog posts more useful.

Now that Spring had responsibility for dealing with the MessageBroker and creating the Java object that it communicates with, I was able to do away with a few dozen lines of context.getBean("someBeanName") - inversion of control is our friend :)

Running the application seemed fine, so I moved on to some memory usage profiling.

jvisualvm is a very useful tool for observing what is really going on in the memory and CPU usage of a Java application.  Over the course of an afternoon I detected that there were three instances of something that should have been a singleton, and at least one case of a new Thread being created each time a particular screen was visited - without terminating the previous Thread.

Wednesday 17 August 2011

Killing your competitor's killer app

Up until last week I was blissfully ignorant of the popularity of Blackberry devices to young people.  I was stuck in the mindset that business users and Obama were the main fans of the technology because of its email capabilities.

The mainstream media have been heavily publicizing the use of Blackberry's other messaging capabilities and how it was applied by naughty people to coordinate disorder.

I wonder if sales of Blackberry devices will be negatively effected by the discussions about giving police powers to shutdown services in times of unrest etc.

I see Apple have managed to arrange for Samsung's new tablet to be temporarily embargoed from sale in most of the EU.

It would make a terrible movie plot to link these events.