Updated BBC iPlayer on PS3

The BBC yesterday launched an updated iPlayer for the PS3 platform and having quickly tried it last night I can say it finally offers a compelling user experience and a valid combination for catching up with those programs you may have missed on the big screen. Whilst it’s still built on a combination of HTML and Javascript, it’s presented as a much richer interface and will be, I suspect, much easier to find the content you’re interested in.

The other major benefit is that whilst the old version was functional for simple playing programs, it didn’t work well at all with the Blu-ray Remote Control. In the old version, once you managed to get the picture into full-screen mode, touching any key would cause it to jump back to a small embedded window within the overall page. With the new version, my initial impression is that all the major control buttons on the remote control now work logically. The default is for programs to start in full-screen, albeit with an initial top-and-bottom gray information bar (letterbox format), this disappears after a few moments to leave the picture in all it’s full screen glory. If you find you want to pause a program to make that all important cup of hot beverage then just press the pause button and ‘hey presto’ the picture is frozen, ready to resume when you’re refueled. Scanning backwards and forwards works, of a sort, but with a delay and with large incremental backwards/forwards jumps; this seems to make it difficult to accurately rewind or fast-forward in any meaningful way but it might be better than restarting the program once again.

Whilst it may not be perfect, it’s a big improvement over the old player.

http://www.bbc.co.uk/blogs/bbcinternet/2011/08/bbc_iplayer_connected_tv.html

A Network Attached Preamble

A consequence of re-ripping my CD collection to Apple Lossless (to support my Sonos habit) is that I recently ran out of network accessible disk space. The disk space being used to this point was an adopted second hand 250GB disk which was unlovingly housed in my 13-year old Dell Pentium II ‘server’ machine.

As a slight aside, with the advent of multi-core processors, it’s good to know that a relic of a chip such as this can still be put into useful service; until a year or so ago, this machine was still handling most of my email and web proxy traffic.

A decision had to be made; to continue hobbling along on this (somewhat) archaic setup or to invest in some new hardware. The case housing my old server didn’t have any additional drive slots, it was after all a desktop machine circa 1998 and I didn’t really want to invest in bigger IDE disks at this stage anyway although admittedly I could have investigated a PCI SATA controller card (this wouldn’t have got away from the lack of space in the case though). I needed new storage and the question was should I buy or build a new server or look to a dedicated Network Attached Storage (NAS) device.

The longer I thought about it, the more requirements came out of the woodwork:

  • Reliable fault-tolerant network attached disk storage
  • Easy to backup/restore if necessary
  • Low Power Consumption
  • Extensible – for future expansion
  • Low hassle-quotient
  • Be able to handle:
    • Sonos (lossless) and iPod (lossy) music storage
    • Video – PS3 Streaming
    • Photos – PS3 Streaming
    • Possible future Apple TV support
    • Network Time Machine backup – currently one iMac but possibly additional wireless laptops as family needs dictate
    • Other unknowns – I ‘ideally’ would be able to support a local ‘pseudo-development’ server for DB2 and as a Jazz server. This is much lower priority as I’m also looking at whether Amazon EC2 could be used to provision occasional development facilities.

Throughout this process my head said ‘buy’, my heart said ‘build’…..

Macro errors working in offline documents within RequisitePro

When working in offline documents and RequisitePro you may experience macro errors relating to security when using the context-sensitive (right-click) menu and working with requirements. These may occur when selecting the ‘Requirement Properties’ or ‘New Requirement’ options from the context-sensitve menu after clicking on a requirements.

This is apparently caused by corruption within the normal.dot template and should be fixed by removing all instances of this from the computer and causing this to be regenerated. The following technote describes this

http://www-1.ibm.com/support/docview.wss?rs=997&context=SSSHCT&context=SSCGQ7B&q1=requirement+properties&q2=offline&uid=swg21128968&loc=en_US&cs=utf-8&lang=en

Once this has been done these menu options should no longer appear on the context menu.


The above was resurrected from an old local Drupal instance and was written back in 2007.

Grabbing Screenshots in Mac OS X

Until today my favoured mechanism for grabbing a screenshot in Mac OS X was to navigate to the Applications->Utilities folder and fire up the ‘Grab’ utility, very nifty it is too. However when reporting a problem with facebook tonight, I noticed a help page they host which has an alternative and quicker mechanism of doing this:

In Mac OS X

  1. Simultaneously hold down the ⌘-Shift-4 keys.
  2. Press the spacebar.
  3. Click the open window that you wish to take a screen shot of. The screen shot should appear as a file on the desktop labeled “Picture 1.”
    Please note that in Mac OS X 10.6, the file is “Screen shot [date] at [time].”

http://www.facebook.com/help/?page=971

That Use Case ate my credit card

Another example of someone not reviewing the use case.

Arrived back at the train station late in the evening following my trip to the Rational Software Development Conference UK 2008. I decided to pay my parking at an automated machine with a new credit card which I had not yet changed the PIN number on. Put the card in the machine and entered what was obviously the incorrect PIN number, tried the same thing a second time (with a slight alteration of the still incorrect PIN number) at which point the machine correctly told me I had one attempt left. Rather than risk getting my card locked out I decided to pay on a card which I thought I did know the PIN number of, duly pressed cancel to get the original card returned, put a different card in and entered yet another incorrect PIN number. You can imagine my surprise when the machine told me the card had been locked (remember this was a different card to which I had only attempted a single incorrect PIN number). Now whilst I have to shoulder some of the blame for putting in the wrong PIN for two different cards. I can’t help but think that someone either didn’t properly detail that use case or failed to test sufficiently!

I ended up paying on a third card…. grrrr

Rational Software Development Conference UK 2008

I have just returned from attending the Rational Software Development Conference UK 2008 held at the Royal College of Physicians in London. This was once again a very interesting two day event with a packed schedule of interesting keynote speeches, presentations and labs tackling various aspects from the IBM Rational products themselves to process, methods and practices (the new buzzword) and a whole slew of other related stuff. I tried to spread myself as thinly as possible (no mean feat these days) to try and attend as many tracks and presentations as possible but mainly focused on those related to the Jazz platform and the new products either already released such as Rational Team Concert (RTC), or those in the pipeline. I will write further about RTC later this week as it is the most exciting product to be released for quite some time!

Amy MacDonald – This Is The Life

Heard this on the Chris Evans show tonight on Radio 2…. quite good really. You don’t tend to come across this kind of thing when listening to ‘Today‘ on Radio 4

iTunes sharing – the highs and not so highs…

Having switched last year from a combination of Debian GNU/Linux as my primary and Windows XP as my secondary operating system on a dual-boot PC to solely using Mac OS X on an 20″ iMac; I can honestly say I have been absolutely delighted with the overall experience. To my mind Mac OS X has the strength and stability of Unix as the underlying core with the advantages of a superb UI built on top.

As part of this transition, I have also ripped all the CDs in my collection to the hard drive and stored these as ‘higher-quality’ AAC (.m4a) files within my iTunes library. This has all been working fine for me and I have been more than happy with the outcome. However when it comes to sharing this media with other members of my family things start to become a little less perfect.

iTunes seems to have the concept of the ‘media’ and the library which references it and these are potentially separate. As this was originally done under my personal account with the default locations the iTunes library is stored under the following folder (where ~ represents the user account path)

~/Music/iTunes/

and the actual media by default is stored under

~/Music/iTunes/iTunes Music

all sorted by Artist and Album. By default this is private to the individual user, to make this accessible to other accounts on the same machine without fiddling with ACLs the recommended way is to either copy this to the default public folder under your account or better still to copy one or more aspects to a shared folder, typically /Users/Shared.

Having done a certain amount of investigation and a fair amount of ‘googling’ on this topic the two recommendations seem to be variations on the above. Either copy both the media and the library to the shared user folder or alternatively copy the media to the shared user folder and then maintain individual libraries to reference this within each individual default location (~/Music/iTunes/).

To my mind both of these approaches have their own drawbacks. My requirements would be (at a very high level obviously) for each user to share the media but for each to possess their own library, in this way each user could have their own individual playlists etc. but reference a common set of media files. However when a user rips a CD and this media is added to the media folder and also their library file, for the other user(s) to automatically ‘detect’ when iTunes next starts that new media is present in the folder and for this to be automatically added to their own library and made accessible.

What seems to happen currently is that if each account owns their own library, whilst this allows them to have their own playlists, if new media is created by another account then this is not detected and this has to be manually added by the other accounts which wish to access this. Not difficult to imagine that in general this would be an unusable situation in the medium term. Alternatively if a common library and media folder is used across accounts then not only is everyones library shared (by definition) and therefore playlists etc. but only one person can access the library at any one time as iTunes insists on gaining a lock on the file.

Hmmmmphh! I wonder who captured the requirements for that one then ?

Architectural Requirements

Within my role, and due to my keen interest in requirements management, I am often asked for advice on what constitutes a non-functional requirement and what these typically contain or define. It seems to me that the art of defining requirements has, in some cases, been lost and people all too easily blur the lines between the problem space and the solution space leading to unnecessarily constrained solutions to problems.

When eliciting the requirements it is imperative that all the stakeholders are identified and not just those who are immediately apparent; additionally those involved in the process maintain a clear separation between the requirements and design aspects.

The following is a good introductory post by a gentleman called Peter Eeles to what he terms ‘Architectural Requirements’ but which to my mind covers functional and non-functional requirements; I believe his classification is due to these being requirements which have a significant bearing on the architecture.

http://www.ibm.com/developerworks/rational/library/4706.html

Whilst these are often ignored early on in the project due to the focus on what are commonly referred to as ‘business requirements’, you do this at your peril as in my experience these can significantly affect the costs of delivering the solution and thus the viability of the overall project.

Avoid duplicate results when using a SQL Self-Join

I’ve spent a fair amount of time today scratching my head trying to work out how to avoid what are ‘logically’ duplicate results being returned when using a self-join in a database query and thought it best to quickly document what my solution was before I forget it.

This is probably case-specific and may not work in other environments depending on the data being used.  It is also going to seem somewhat contrived as I have deliberately tried to keep this as simple as possible and avoided all the supporting tables and also details as to why this is necessary to support the user scenario.

In this example I have a table of name details associated with people which I have created in MySQL 5.0.67 as follows:

DROP TABLE IF EXISTS `schema`.`person`;
CREATE TABLE `schema`.`person` (
`id` int(10) unsigned NOT NULL auto_increment,
`forename` varchar(30) default NULL,
`surname` varchar(30) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

and this is populated with the following five records

1, 'Arthur', 'Dent'
2, 'Albert', 'Einstein'
3, 'Alfred', 'Hitchcock'
4, 'Albus', 'Dumbledore'
5, 'Ethelred', 'The Unready'

If I wish to find all records in this table associated with two people using wildcards (one whose forename begins with ‘A’ and the other whose forename begins with ‘Al’), I ended up using a self-join and two table aliases, e.g. P1 = Person 1 and P2 = Person 2 as follows:

select p1.id, p1.forename, p1.surname, p2.id, p2.forename, p2.surname
from person p1, person p2
where p1.forename like 'A%' and p2.forename like 'Al%';

Now, unfortunately when this is executed this results in all the matching permutations being returned as follows:

1, 'Arthur', 'Dent', 2, 'Albert', 'Einstein'
2, 'Albert', 'Einstein', 2, 'Albert', 'Einstein'
3, 'Alfred', 'Hitchcock', 2, 'Albert', 'Einstein'
4, 'Albus', 'Dumbledore', 2, 'Albert', 'Einstein'
1, 'Arthur', 'Dent', 3, 'Alfred', 'Hitchcock'
2, 'Albert', 'Einstein', 3, 'Alfred', 'Hitchcock'
3, 'Alfred', 'Hitchcock', 3, 'Alfred', 'Hitchcock'
4, 'Albus', 'Dumbledore', 3, 'Alfred', 'Hitchcock'
1, 'Arthur', 'Dent', 4, 'Albus', 'Dumbledore'
2, 'Albert', 'Einstein', 4, 'Albus', 'Dumbledore'
3, 'Alfred', 'Hitchcock', 4, 'Albus', 'Dumbledore'
4, 'Albus', 'Dumbledore', 4, 'Albus', 'Dumbledore'

Not only has this returned duplicates for the individual themselves (e.g. Albert Einstein for both person 1 and person 2) but also the same combinations in a different order (e.g ID 3,2 and 2,3). The first one of these is easy to remove from the result set when an ‘id’ field is present by adding the following criteria in the query

and p1.id != p2.id;

i.e.
select p1.id, p1.forename, p1.surname, p2.id, p2.forename, p2.surname
from person p1, person p2
where p1.forename like 'A%' and p2.forename like 'Al%'
and p1.id != p2.id;

this results in the following result set:

1, 'Arthur', 'Dent', 2, 'Albert', 'Einstein'
3, 'Alfred', 'Hitchcock', 2, 'Albert', 'Einstein'
4, 'Albus', 'Dumbledore', 2, 'Albert', 'Einstein'
1, 'Arthur', 'Dent', 3, 'Alfred', 'Hitchcock'
2, 'Albert', 'Einstein', 3, 'Alfred', 'Hitchcock'
4, 'Albus', 'Dumbledore', 3, 'Alfred', 'Hitchcock'
1, 'Arthur', 'Dent', 4, 'Albus', 'Dumbledore'
2, 'Albert', 'Einstein', 4, 'Albus', 'Dumbledore'
3, 'Alfred', 'Hitchcock', 4, 'Albus', 'Dumbledore'

As can be seen however, this still has the same logical combinations duplicated (order not withstanding). The removal of these records is significantly harder to do. I initially wrongly thought that I would be able to remove this through the addition of a ‘distinct’ keyword to the query but this only operates across all columns in the record and therefore doesn’t deliver the required result.

I resolved this by the inclusion of a combination of the ‘if’ and ‘concat’ functions that I was not aware of in SQL and a ‘group by’ clause (the ‘if’ function may not in fact be part of the ANSI standard yet). The following was the result:

select p1.id, p1.forename, p1.surname, p2.id, p2.forename, p2.surname,
if (p1.id<p2.id,CONCAT(p1.id,p2.id),CONCAT(p2.id,p1.id)) as pid_concat
from person p1, person p2
where p1.forename like 'A%' and p2.forename like 'Al%'
and p1.id != p2.id
group by pid_concat;


1, 'Arthur', 'Dent', 2, 'Albert', 'Einstein', '12'
1, 'Arthur', 'Dent', 3, 'Alfred', 'Hitchcock', '13'
1, 'Arthur', 'Dent', 4, 'Albus', 'Dumbledore', '14'
3, 'Alfred', 'Hitchcock', 2, 'Albert', 'Einstein', '23'
4, 'Albus', 'Dumbledore', 2, 'Albert', 'Einstein', '24'
4, 'Albus', 'Dumbledore', 3, 'Alfred', 'Hitchcock', '34'

Now whilst the ‘if’ function may or may not be widely implemented, it seems from the quick look I had that there is typically an equivalent function in most of the widely used databases in use. I found an Oracle function called ‘decode’ which would seem to deliver the same functionality. Result!