Archived entries for Development

Ubuntu and Java development

After three and a half years my work desktop was badly in need of a rebuild. It was slow and unresponsive, probably due to the fact that I had very little hard drive space available . I decided to move from Windows to Linux, specifically the latest Ubuntu 9.10.

After backing up the install was pretty straight forward apart from problems with dual screens and my old video card which was resolved by a new graphics card. I was up and running including Spotify in about 2 hours.

The one reservation I had about the switch was with Microsoft Exchange integration but I decided that using Thunderbird 3 with lightning would be enough and if I needed to schedule meetings I could use Outlook webmail.

What I hadn’t expected were the problems I had setting up my Java development environment.

First up JDK 5 can not be installed using apt-get out of the box as JDK 5 went end of life on the 30th of October and 9.10 was release on the 29th. I realise that the EOL transition period began on the 8th of April but we have some applications which are in maintenance mode and will probably live in some form until the end of 2010.

We are developing a new platform using JDK 6 to replace these applications on new hardware but 3 days after the switch I had to do an emergency fix. It’s pretty straight forward to solve add the jaunty multiverse sources and apt-get install sun-java5-jdk. Which is easier and quicker than rebuilding the applications with 6 and updating the Java version on each box.

This is a good post showing how to switch between Java versions .

Next I had problems with empty Swing dialog boxes in Netbeans and Intellij this was down to an issue with Java 6 and compiz windowing.

The last issue I had was a problem with the SVN plugin for Intellij 7 as described in this jira ticket.

Overall I’m very impressed. I now have more responsive development box.

Flickr and jquery

We recently got the professional photos of our wedding back and we wanted to post them online. The big issue for us was we wanted to keep to the theme and the colour scheme of the wedding but we also wanted the solution to be easy to use. By this I mean easy to upload photos, easy to organize photos, and it shouldn’t take more than an evening to set up.

For ease of use nothing beats Flickr but it fails because the Flickr brand doesn’t fit our theme. We already had a domain used by the rsvp web app we built so I thought about seting up a wordpress blog, which would allow us to style as we liked but this solution fails as I couldn’t find a Wordpress plugin that would allow us to upload and organize the photos easily.

Enter jQuery and the brilliant gallery plugin called galleriffic, my original plan was to use a json feed of the wedding photoset on Flickr but feeds are limited to 20 entries and we had 300 so back to the drawing board. Flickr’s api has a call that returns the image details for a photoset so one new api key later and we were in business with a site that follows the theme, with all the images sorted and uploaded with the work completed on a Sunday evening. You can see the finished work here

Trials

A trial is your opportunity to show what you can do. Be it an internal prototype, or a 30 day trial of a software product, someone is giving you the chance to prove what you can do so give it your full attention.

An example from the real world, I’m getting married in a few weeks and my fiancé booked a trial with the local hair stylist. On the day she was fobbed off with the apprentice, who did a very bad job. This wasn’t her fault she didn’t have the experience to do the job. When my fiancé complained that this wasn’t what she asked for and what would happen next, she had to wait an hour and half for the head stylist to come and speak to her.

What did she say “it won’t be like this on the day”.

This morning my fiancé called to cancel her six appointments for the wedding. The owner asked “is there any we can do to fix this?”

Too late you already had the chance to prove what you and your team could do and you blew it.

This is a good rule for life in general when presented with the chance to shine, make the most of it.

Now widely recycled

I’ve recently read Nudge by Richard H Thaler and Cass R Sunstein. Since I finished it, I’ve been thinking about how nudges apply to software development. The obvious answer is in UI development as nudging users can make a huge difference to their behaviour, a well thought out registration process can greatly increase sign up.

But consider how the following nudge works, at the weekend I washed out a carton of Convent Garden soup to put in the recycling, when I noticed on the bottom of the carton it read “Now widely recycled”. To me this is a very powerful nudge as it adds a social pressure, everyone else is recycling so you should be too.

This applies to software development as well. If you work to ensure a high standard of quality in your code the people you work with will feel the social and professional pressure to do the same but for every small dirty hack you add and every corner you cut to make something work you are saying it is ok for everyone else to do the same.

Dave Allen in his column in UK Wired How to reap what you sow touches on a similar topic, in a US theme park it is grounds for dismissal for any employee to pass a piece of litter without picking it. Its easier to keep a clean theme park clean so it follows it’s easier to keep clean code clean.

Readable Regexp

Ever found a regexp in code and had to spend time trying to understand what it meant.

I just read an great article from Martin Fowler on how to make your regexps easy to read. It’s a really simple and elegant solution, spilt your regexp into individual tokens with understandable names. Read it here

Hidden costs of Tortoise

I’ve recently noticed a slow down in the performance of my PC. When I looked into it I saw a lot of I/O activity, it turns out that Tortoise cache will scan your entire hard drive for updates so it can add the svn icons to folders and files. If you dont limit the paths it searches for changes it will scan your entire hard disk. For details on how to do this read Paraesthesia’s blog post

Little’s law

I’m currently involved in a large redevelopment project in my day job, a question has come up. How long will a message spend in our messaging layer (but it could be applied to the system as a whole)? This is an excellent question. We can determine this using Little’s law, (Thanks Eamonn).

Little’s law states that

The long-term average number of customers in a stable system L (known as the Offered load), is equal to the long-term average arrival rate, λ, multiplied by the long-term average time a customer spends in the system, W, or: L = λW

If we know that at our peak we will be recieving 200 messages a second and the backlog in the messaging layer is 20. Then we know that at peak a message will spend 100 milliseconds in the messaging layer. The trick here is to find the correct average figures.



Copyright © 2004–2009. All rights reserved. RSS Feed RSS