Thursday, February 4, 2010

Pair Programming again

I saw a local bank advertising a position to promote so called "sustainable software development" practices. These included Pair Programming, TDD, BDD and 100% code coverage.

I have written about Pair Programming before, but it needs re-iterating.

  • The value of pair programming is not constant - it is a function of the problem, people and technologies at hand.

  • If the problem at hand is not new or not complex the value is often significantly reduced.

  • On common information systems / web projects (such as at this company) the problem at hand is often neither new nor complex.

  • Therefore, if there is a project rule stating that all production code is to be paired on, the business value of the project will immediately be sub-optimal.
This is not rocket science. Consider a couple of competent developers pairing on the usual crud/plumbing code that makes up such a large proportion of these kinds of apps. What value is the second person really adding here vs doing something else?

Anecdotally, with skilled developers of reasonable talent and discipline, the pair programming time on these types of projects doesn't need to be above 50%.

Monday, January 11, 2010

Twitter error



One of the many times twitter has barfed on me.

Tuesday, January 5, 2010

Home internet protection

We have a few macs at home and the kids are all in primary school. As they grow up they need to learn about computing and utilise the benefits of the internet. There is also the dark side that comes with internet access. I will continue to educate them about that, but at this early stage they also need protection and as they mature, I can reduce that.

OpenDNS
Content filtering requires registering our public IP address with OpenDNS. Our WAN router IP is dynamic and so I would need to update OpenDNS whenever we are assigned a different IP by our ISP. They have a windows and mac client to do this, but it should really be done on the router. My router doesn't support it, so OpenDNS is not suitable.

Mac parental controls
Apple has built in an option to try and restrict access to "adult" content automatically. I was pleasantly surprised to find that this worked with both Firefox and Safari.

I would have preferred a centralised option such as OpenDNS so I didn't have to configure each machine. However, I will try the inbuilt mac parental controls to start with and will investigateDansGuardian should it fail.

Monday, December 7, 2009

MATLAB findpeaks function

The findpeaks function in the MATLAB (verion 7.6.0.324) Signal Processing Toolbox finds local maxima or peaks in a vector.

>> v = [0 3 0 0 3 2];

>> [pks, locs] = findpeaks(v)
pks =
3 3

locs =
2 5
locs contains the locations or indices of the peaks in v (MATLAB indexing starts at 1).

For each column of a 256 x 5188 matrix we were calculating a simple moving average (smooth function) and then finding the peaks and it was taking a long time, approximately 19.6 seconds. We whipped up our own findpeaks function based on the following two lines:

>> s=v(2:end)-v(1:end-1);
>> loc=find((s(1:end-1)>0) & (s(2:end)<0)) + 1
loc =
2 5
This calculates the pairwise differences between elements, i.e. the slopes and then looks for an up slope immediately followed by a down slope. Pretty simple and now the 5188 matrix columns are processed in approximately 1.3 seconds.

Sunday, November 15, 2009

Upgraded to Velocity Gold, not

I received an email from Velocity rewards notifying me of a free upgrade to Gold membership. It was quickly followed up by another email containing the following.



Was it a human data input error or programming error?

Friday, November 13, 2009

Just say No!

Most software projects produce a mess and are a mess to manage. Projects that make it to production generally go on to a have a lifetime measured in years. While they are alive new projects are started, accumulating more mess. If the internal IT budget/group increases there is capacity to create an even bigger mess.

An obvious way to reduce the total mess, is for each project to be less messy. Unfortunately, there is little hope to do this at present due to the inherent nature of (current) organisations and the immaturity of software development in general. Another way is to do less software projects and make those smaller.

The business orientated technical managers I know seem to understand this at some level and are dealing with it by purchasing more off-the-shelf or outsourcing. This makes some of the costs of the mess more visible and attributable to (hopeful) benefits. However, it doesn't really address how poor we are at actually figuring out requirements, transforming them into usable, executable software and adapting to new requirements over time. With outsourcing, the mess is now less visible, but as a business relies on the systems and data, it will still experience similar effects from the mess over time.

From a purely technical perspective, does the world really need another bloated Java, Spring, Hibernate, Oracle, JUnit abomination application? Feel free to substitute other languages and libraries, such as Ruby and Rails, Groovy, etc.

Reduce the software mess. Do less software projects. Just say no!

Saturday, October 17, 2009

Mac Flickr client

I am looking for a native mac application that provides an easy interface to my Flickr account. Requirements:

  • Uploading - need to easily filter out the good photos from the camera, upload and add metadata.

  • Browse photos in photostream, or by sets, tags, etc

  • Edit metadata

  • Save photos locally

From what I have briefly read, iPhoto 09 integration with Flickr is very limited. I use Flickr as the primary repository for my photos and iPhoto isn't intended to be a passive Flickr client. I found the following other candidates:
  • Photonic Really nice app. Demo is free but expires after 14 days. Registration is US$25. Can browse photostream and sets, no coverflow view. Can search by tags, but you need to know the tag names. Double-click a photo to view a larger version. Doesn't show descriptions and no metadata editing or slideshow. However, there is a convenient link to a photo's Flickr page to do these. Apart from assistance with tags, the other major missing feature is the ability to download a photo or set for use as a desktop background or with the screen saver.

  • FlickrEdit Java app that looks horrible with a clunky UI. However you can backup and download photos and sets. Apparently it saves some metadata in the IPTC header of downloaded files, but I can't see it with the mdls command.

  • DeskLickr Set the Desktop background to a Flickr photo. You can point it to your own account, but it only uses your public photos.

  • Cooliris Firefox add-on A 3D wall for viewing images. Works with Flickr, so if you open it on the first page of your photostream or on a Set page, you can view all those photos. My head is spinning from the animation, so it would be nice to turn that right down. More keyboard keyboard control (photo selection and paging) would make this really good.

  • Picture Sync Essentially just an uploader. Didn't seem very intuitive to me.

  • FotoViewr Webapp that provides 3D viewing of Flickr photos (like coverflow). Only works with public photos.

  • Fotobounce Windows only now, with a mac version due this year.

  • 1001 Didn't try this out.

  • Flickr Finder A very simple Finder-like column view. Content layout seems to be broken on Snow Leopard.

  • Photo Grabbr Didn't try it. Suspect it is public photos only.

None of the apps did uploading really well. I am using the standard mac Image Capture application to get photos off the camera. Finder Quick Look in Snow Leopard provides an easy way to look through photos and delete unwanted ones. The Flickr web site uploader and metadata editing work well enough.

Photonic is the easy winner for viewing photos. If it had better tag support and desktop/screensaver integration or the ability to download original images, then the license fee would be more easily justified.

I have made a Flickr set of my favourite photos for use in my screen saver. FlickrEdit is clunky, but I can use it to quickly download the whole set. This is all I use it for. It also includes an incremental backup feature (I need a backup solution too), but I haven't investigated that yet.