Thursday, 23 June 2005

Mean Machine

It's here! The delivery man, who was lost, eventually managed to find where I live and delivered my new computer. I am currently writing this using it. The install wasn't completely painless though so I shall tell the tale: the first day of a Mac newbie with his new machine.

Boxes and wires

Unpacking the beast was easy: open the box and pull it out. Considering the size of it, it's quite light. Of course, being a geek, the second thing I did was open it. And admire it. The only other computers I've seen that are as well and elegantly designed inside than they are outside are Sun workstations. The Mac is definitely in the same category in terms of hardware quality.

Once it was unpacked, I plugged in everything:

  • The AirPort antenna, to make sure I have good reception.
  • The Bluetooth antenna, ditto.
  • The screen, which is an old 19" CRT.
  • The mains.

That's it. I got the wireless keyboard and mouse as I wanted to minimise cables. So before I went further, I put the batteries inside both.


Having read the manual so far, I switched the mouse and keyboard on before switching the computer on. The install was a breeze. It recognised both keyboard and mouse instantly and was up and running in no time at all. It even managed to connect to my BT Voyager 2100 wireless ADSL router. Or so I thought.

Internet, take 1

Having connected to the wireless router, I thought I would be surfing the net in no time. I started Safari and... nothing happened. I tried a few addresses that should really work, such as Apple's web site. Nothing. I plugged in my work laptop in the router via an Ethernet cable and realised that it wasn't behaving that much better with the laptop, even though said laptop had worked absolutely fine all day with that router. Strange. After a few attempts ate re-starting the router, re-setting the firmware defaults and a number of other things I decided to do something else altogether.

Application install from CD

Being very frustrated with my Internet connection, I decided I'd install iWork, considering I had ordered a copy at the same time. I took the CD out of the box, looked for the button that would open the CD drive... and didn't find it. I thought, this being a Mac, it must work a bit like Solaris and there must be an option somewhere on the desktop to open the CD tray. I looked and looked again, and again... and screamed in frustration! Until I decided to read those parts of the manual I hadn't read yet. And lo and behold, here was the answer! There is a special eject key on the keyboard: the key I originally thought was a number lock. That might sound dead obvious for someone who has used a Mac before but for anybody else, it isn't.

Having solved the mystery of the CD tray, I put the iWork CD in it and clicked on the install icon. The installer then told me in a very nice way that I already had the application installed on my machine so I really didn't need to do it again. Nevermind, at least that got me to find out how to open the CD tray.

Bluetooth devices

After playing a bit with iWork, I decided to see if I could connect other Bluetooth devices to this computer, namely my phone and my PDA. Both got recognised immediately. But I didn't manage to do anything useful with them. The file browser doesn't work with either of them. iSync, once I had found where it was, which was a challenge in itself, said that the phone was not supported and didn't even see the PDA. Not that I have very unusual stuff: the phone is a standard Nokia 6230 and the PDA is a standard Palm tungsten T3.


Having taken pictures of the machine earlier, I decided to check if I could upload them from the camera, an Olympus Camedia C50. I found the USB cable, plugged it in and I had the images on the computer in a couple of minutes. No hassle, extremely fast and much more user friendly than the Windows equivalent. Just what you need.


I also bought an AirPort Express base station. I was supposed to be able to just plug it in the mains, connect it to the stereo and iTune would magically be able to use it as a networked set of speakers. I did just that and it worked first time. Now that is cool! I am listening to music with iTune and if I'd rather listen to it in the living room, I select the AirPort station as the output rather than the computer and suddenly the music comes out of the stereo! Well, assuming the stereo is on and using the auxiliary source.


I have a Minolta Dimage negative scanner. That was one of the reasons for buying the Mac in the first place, as it is only supported on Windows and OS-X so if I didn't want Windows, I had little other choice. I plugged it in, installed the software and it worked first time, even though it alledgedly only runs on OS 10.1 and 10.2, not 10.4 (ah yes, did I mention the computer came pre-loaded with Tiger?)

Internet, take 2

Having a fairly useless wireless router in the room, I decided to move it out to the living room and try to connect it to the AirPort station via Ethernet to see if it would behave better. The logic behind this was that I thought it was getting confused with the wireless. So that's what I did and it didn't work: same as before, so still no Internet.


Being a bit bored by then, I decided to explore what was installed on the Mac. I have to say, the amount of software that comes pre-installed is impressive. I will probably never use everything and it will take me a long time to explore the things that could be useful to me. If you compare what come pre-installed on a Mac compared to what is pre-installed on a Windows PC, it's like night and day. Not only is there tons of things but most of them are great pieces of software: stuff to do movies, animations, take notes smartly, etc. And finally, I found the best application of all: the UNIX terminal. Ah, having a UNIX command line available! That's when you realise you're using a real operating system, rather than a bloated GUI that pretends to be an operating system.

Internet, take 3

Having now access to a UNIX command line, I decided tom investigate my network problems. Fairly quickly, I realised that the real problem was that, for some reason, the computer didn't have any DNS information, even though the DHCP server in the wireless router should have provided that information. Fiddling with different things, it appears that the BT router is a bit crap at answering the DHCP request that comes from the G5 or the AirPort Express station. It works if the router is started after the base station though. As a consequence, if the station reboots due to a change in configuration, I then need to reboot the router. Go figure... Anyway, it's now working. I'll have to check if there's an update for the router's firmware though. If would also be nice if the web enabled admin application was developed in a way that wasn't Internet Explorer specific. It's a fantastic example of how stupidly you can code such an application: everything works fine on Firefox or Safari, except the form input fields. It wouldn't take much to make it cross-browser but the way it's broken means you can only really use it on IE.


This is a superb machine. It was a breeze to install. I didn't manage to do everything I wanted but I didn't miss much. I just have to find a way to store the multiple boxes lying around now.


I called TNT this morning to ask them if my computer was indeed meant to be delivered today. They said it had left the Heathrow depot and was on my way, that it'd be with me before 6pm tonight and to call back if I still hadn't received it by 3:30 to check where it was. I haven't called back yet because they left a message on my answerphone saying they thought they had the wrong address and could I please send them an email confirming said address. So I did. How is that possible though? I originally entered it through the Apple website and verified it twice before clicking the send button. On the Apple confirmation it is correct. So surely, TNT must have received it electronically so that there could be no mistake in transmission? If I have no news by 4pm, I'll call back.

Wednesday, 22 June 2005

Shipping Detour

The route that Apple is taking to ship my G5 is even more interesting than I originally thought it was. After going from Cork to Luxembourg by plane, the computer has apparently been shipped by road to Amsterdam. There, it has apparently made the acquaintance of the rest of my order, an Airport Express base station and a copy of iWork, and they will apparently all happily make their way together to the UK. There must be some logic in all this but it escapes me. What also escapes me is that by taking this roundabout route, it is physically impossible for Apple to deliver the goods in the advertised 3 to 4 business days. In fact, today is the 6th business day since the order alledgedly shipped. So after a useless shop, that's the second annoyance from Apple in my attempt to buy something from them. That's the best way to make me a happy new customer.

No Coffee

It's 6:30 am. I am in the office because we have a conference call with people in Australia at 7. I've never taken the tube that early in my life, apart from when I was taking it back from a party so I'm not quite awake yet. But the worst part is we've run out of coffee. I went round the block to try to find some. Everything is either closed, has no ground coffee to sell or only decaf. Apart from Starbucks but the girl there would not serve me because they were not officially open yet.

Monday, 20 June 2005

Newham more dangerous than Baghdad?

The Evening Standard has this article tonight saying that DHL doesn't deliver to some neighbourhoods of London, including parts of Newham, because it is considered too dangerous. Residents of these neighbourhoods are kindly requested to pick up their deliveries from the nearest DHL depot. They will deliver anywhere in Iraq or Cambodia though. In their defense, DHL day that this is because different security arrangements are in place depending on countries so Iraq for instance has more serious security arrangements that the UK. To the point where the UK arrangements are unable to deal with gangs of hooded teenagers.

Flickr Fiddling

As you might have noticed, I discovered Flickr. Or rather, I knew Flickr existed but had never given it a go so I decided to take the tour and give it a try. What really sold me was Flickr Uploadr, the automated upload tool that enables you to send a large batch of images in one go. Considering I have lots of CDs full of pictures I'd love to upload online, it was ideal for me. As a result, I reached my monthly quota 2 days afer opening the account, upgraded to a pro account the same day and have managed to upload more than 500 photos in less than a week. And I've only just started: I've got piles of CDs waiting to receive the same treatment. Don't hesitate to go have a look and comment on the photos.

Sunday, 19 June 2005

Shipping Route

The PowerMac G5 I ordered a couple of weeks ago has shipped. Hooray! It left Cork at the beginning of the week and arrived in Luxembourg on Friday apparently. Hopefully, it will be in London (and under my desk) soon! However, I am left wondering why it went via Luxembourg? Surely to go from Cork, in Ireland to London, in the UK, there are more direct routes? On the other hand, I should count myself lucky, it could have gone via Alaska...

Thursday, 16 June 2005

Wednesday, 15 June 2005

Badminton Statistics

I played badminton with a few colleagues last night. I am not good. I am not awfully bad either but I am definitely not good. There is one thing I can't understand though: I hit the shuttlecock with the frame of the racquet a lot. How is that possible? If you consider the inside area of the racquet compared to the frame's area, hitting the shuttlecock with the frame should be a really rare occurrence. You should either hit it properly or miss it completely (well, yes I do that as well quite often). There is probably some complex statistical explanation somewhere but I haven't found it.

Anyway, the important thing is it was great fun!

Vegetarian? What's that about?

I am French and the French can find it difficult to understand the concept of being a vegetarian. A lot of them (or rather us) equate vegetarian with someone who doesn't eat red meat. The problem is it's very difficult to convince people from a country where every region has a number of meat based traditional dishes, such as choucroute in Alsace or foie gras in Dordogne, that there are people who don't eat meat at all; and that it's a choice that they made rather than a strange illness they have.

So this article about 100% vegan sneakers on SimpleBits reminded me of an hilarious incident that happened a few years ago.

My company had decided to have a kick off event in France, in the small resort town of Le Touquet, in Normandy. Normandy is known for D-Day, hearty dishes, full fat cream and butter, camembert cheese, calvados, William the Conqueror and the amazing ability of its inhabitants to ingest vast quantities of alcohol. The people there are extremely welcoming, of the type who enjoy a good meal and a good party immensely and are suspicious of people who don't. Knowing this, we made sure to tell them we had 3 vegetarians in our party. One evening, we are ready to enjoy yet another great meal. We all get our dishes and the vegetarians amongst us as well. I can't remember what the meat eating option was but the vegetarian one was a quiche: the traditional type with cheese and bacon in it. Sensing that something was amiss, one of the guys called the waiter over:

‘Excuse me! Is this the vegetarian meal?’

‘Yes it is,’ answers the waiter.

‘But it's a quiche.’


‘It's got bacon in it.’


‘So it can't be vegetarian.’

‘Yes, it is vegetarian.’

‘But it's got bacon! Bacon is meat. If it's vegetarian, it can't have meat in it so it can't be vegetarian!’

‘Yes, it is vegetarian.’

And so on for a few minutes, until the waiter exclaims:

‘But it's only small pieces of bacon!’

We didn't try to explain the concept behind the word vegan.

Tuesday, 14 June 2005

Favourite UNIX Tool

The UNIX philosophy goes like: 'have a lot of utilities, each of them should do one task but should do it extremely well.' Then, through pipes and other built-in mechanism, it is extremely easy to combine them to produce extremely powerful commands in very few lines.

Having said this, every UNIX user or administrator has is favourite tool. Some only swear by sed or awk, others couldn't do without ps or netstat. It all depends on what task you have to perform more often. My tool of choice is find. Maybe this is because I am not very organised or because, as a Java programmer, I am used to complex directory hierarchies where files can get lost. Anyway, quite often I end up working on one of the Sun Solaris boxes we have at work rather than my windows laptop because I need to do something Windows just cannot do. 9 times out of 10, it involves find.

A typical example occurred today when I needed to find all files in a complex directory hierarchy. Simple shall we say. Except that said directory hierarchy was a working copy of part of our CVS repository. So I needed to prune out all CVS related files. How do you do that with Windows? I don't know. It might be possible but it is not simple. On the Sun workstation, it took one line:

find . -name CVS -prune -o -type f -print

This line can look a bit esoteric but is fairly straightforward when you go through the options one by one:

is the name of the find command
. (dot)
means start searching from the current directory downwards in the hierarchy
-name CVS
find all file with name 'CVS', in effect all CVS specialised directories
prune out all files that matched so far, i.e. discard all CVS directories
logical or with the following filters, i.e. apply the following filters on the set of files left after pruning
-type f
only keep files that are real files, as opposed to directories, soft links, etc.
print the result on screen, usually optional as it is the default behaviour

It took all of 30 seconds and I had the results on screen. That is what UNIX power tools are about. So, what's your favourite UNIX tool?

Monday, 13 June 2005

Negative Margins

Following an article on SimpleBits about negative margins, here is a quick explanation of how the same CSS feature is used on this site to float photographs and figures in the left margin.

Close up of the maple leaf pattern of the fountain

Fountain dedicated to Canadians soldiers who died during WWII, Green Park, London Posted by Hello

To demonstrate the feature, I decided to use this photograph I have of a fountain you can find in Green Park in London and that is dedicated to Canadian soldiers who died during the second World War. This fountain is a beautiful low key water feature located close to the exit to Buckingham Palace but that most tourists miss nonetheless. It consists of a slanted plane with a maple leaf pattern on which water flows slowly. It is surrounded by real maple trees that mix their real leaves to the stylised ones in autumn.


I wanted to be able to insert photographs in the text and have them bleed off the left edge of the page, while having the text flow around the right edge, leaving a decent gap to keep the text clear. In addition, I wanted to be able to add a caption below the photograph that would be completely in the margin but would leave a small gap on the left so as not to be flush against the page's border. It was also essential that the caption be close to the photograph so that it was obvious it belonged with it. Finally, the last requirement was to be able to have several pictures one after the other with no accidental clash between them in terms of positioning.


To make my markup semantically sensible, I decided to have a top level enclosing tag around the image and its associated caption. So it would look something like this:

<div class="figure">
  <img class="body" ... />
  <p class="caption">...</p>

What this would also allow me to do is define styles for the figure as a whole.


Considering the body of the figure (the image) and its caption behaved differently towards the surrounding text, they needed to be floated separately. They also needed different margins.

Calculating margins

To offset the two elements to the left, I needed to calculate negative left margins in such a way that the left edge of the photograph would coincide with the left edge of the window, knowing that my point of reference was the left edge of the main column. What makes the calculation a bit tricky is that this is a liquid layout where the columns are defined in terms of percentages of the body. The main column has a width of 60% of the total body width and a left margin of 15%. So, a negative margin of -15% should do, right? No. It needs to be calculated as a percentage of the width of the main column, not the body. This is because the last element that has been given an explicit width in the hierarchy of the site is the div that defines the main column and it is therefore the reference in all relative horizontal calculations. So I needed to know what 15% of the body width represents as a percentage of the main column width. This is quite easily done: if the body is 100 pixels wide, the main column is 60 pixels wide and the left margin is 15 pixels. 15 pixels is a quarter of 60 or 25%. The left margin for the image therefore needs to be -25%. In addition to this, I decided to apply a margin of 1em on the 3 other edges to leave reasonable white space between the image and the surrounding text.

The caption's left margin was easy: I decided to leave a small gap between the left edge of the window and the left edge of the caption so applied a left margin of -24%. Similarly, I applied a 1em margin right and bottom to make sure there was decent white space. However, the caption needed to be as close as possible to the image and the image already had a 1em bottom margin. So, to move the caption closer, I applied a top margin of -1em.

Floating and clearing

Floating sounds straightforward. Just float the whole container left? No because in this case, the box model means that the edges of the floated box are dictated by the wider of the two boxes and you end up with a big white space right of the caption. So you have to float both object separately. However, if you do this, the caption ends up colliding with the image so the caption has to also clear left in order to be forced below the image. A final touch is to make the image clear left as well so that you can have several figures in succession without the image of the second figure colliding with the caption of the first one.

So here is the full code:

.figure {
.figure img {
.figure .body {
    margin:1em 1em 1em -25%;
.figure .caption {
    margin:-1em 1em 1em -24%;

You will note that I only used general class selectors, I didn't force the use of div, img or p. This is to give the style more flexibility. For instance, I could then apply the figure and caption classes to span tags rather than div and p thus enabling me to insert a figure in the middle of a paragraph rather than between paragraphs. Similarly, it means the body of the figure can be anything, such as a table or any other complex container.

LINO (Last In, Never Out)

I currently have a LINO stack at home: the stack of books I have bought but not read yet. It is supposed to work like a FIFO queue, where I read the books in the order I buy them. However, it tends to be more like an unordered set where the book that comes out next is rather random depending on the mood of the moment. The only problem is, right now, it all stacks up very quickly because I can't keep away from book shops but nothing comes out of it, to the extent that I had to split the stack in two today for fear of seeing it collapse into... a messy pile.


It's now been two weeks and a bit that I started reading Brick Lane by Monica Ali. I'm only just half way. I find it very boring, even though it is interesting in terms of the human story it tells. But then, that might be the problem: it's the story of a boring existence spent waiting for fate to take charge. On the other hand, it looks like I have now reached the point where the main character decides to stop waiting for fate and take her future in her own hands. At last some action! Not too early after 260 pages.

Saturday, 11 June 2005

@media 2005

I spent Thursday and Friday at the @media 2005 conference near Waterloo. The subject was web standards and accessibility so it was all about standard web technologies: HTML and CSS, but also enabling technologies for disabled people and related subject. The venue was completely full. In fact, the conference had been sold out, showing how many people are interested in this subject. Another interesting fact, it seems that a quarter and the attendees were from abroad: definitely quite a few Germans, Dutch, assorted Scandinavians but also Americans and French.

The keynote was given by Jeffrey Zeldman, one of the most vocal and best known advocates of web standards. The list of speakers included some other well known names such as Molly E. Holzschlag, Joe Clark or Douglas Bowman from Stopdesign.

Every single presentation was of extremely high quality but the best of all was the one given by Robin Christopherson from AbilityNet. The subject was 'Web Accessibility and Disability - A Practical Introduction'. It couldn't have been more practical. Robin is blind and demonstrated some of the technology available to disabled users, in particular screen readers. For someone like me who had never seen a screen reader at work, it really brought home what it means and what sort of problems those users can experience. Awesome!

It simply was the best technical conference I have ever attended and I think I am not the only one in the audience to think this. So thank you to all the speakers and the organisers.

Monday, 6 June 2005

Please Take My Money

I bought the flat I live in three and a half years ago. In practice my flat is one floor of a 3-floor house on a busy street which means the managing agent is more or less responsible for the shared bits. At the time of the purchase, my solicitor looked at who would be the managing agent and said in an ominous voice: 'They are the worst ever.' She was proved right a couple of times since then. I'll pass over the fact that they did nothing to repair the front yard's wall when someone accidentally crashed his Porsche 911 into it (an expensive second of inattention) and that all communication seemed to be limited to asking for the payment of services charges, none of which has ever been visibly invested in improving or even repairing the property.

So when I received a letter telling me I was late in paying my service charges and that I owed them two months worth of it, I was only mildly surprised. I did check that I had a direct debit set up so that they could just debit the amount straight from my account. Then I had a realisation: my managing agent has changed! This is probably why they can't debit my account. you'd think they'd have warned me or sent me a new direct debit form, would you? Well, no. I can't find any trace of any letter of that sort. Mind you, the postman might have mis-delivered it, it's happened before. But still, the old managing agent had all my details, including my mobile phone number so maybe they could have passed this on? Obviously that was way too complicated to do. Nevermind, that's all part of the fun of owning your own flat I suppose.

Sunday, 5 June 2005

Slightly Useless Shop

I went to the Apple store in Regent's Street this afternoon, keen to buy a Power Mac. So I found a guy who could help me spend my money.

‘I'm looking to buy a Power Mac’, I said, ‘what are the options?’

‘Well, it depends what you want to do with it. You have 4 processor options. The bottom two can have up to 4Gb of RAM, the top two can have up to 8Gb. In addition they come with a bigger hard disk.’

‘I don't want a monitor as I've got one already that I want to re-use but what about keyboard and mouse?’

‘It comes with the standard white keyboard and mouse.’

‘What about the wireless keyboard and mouse you have?’

‘We can't provide you with that.’

‘How come?’

‘It needs to be fitted with Bluetooth for that and we can't do it in the shop here, we don't have the ability to fit internal extensions. If you want this, you need to order your machine from the online shop.’

‘So you mean if I want a machine customised in any way, you can't do it here, you can only sell me the basic system as is?’

‘Yes, that's right.’

So I left and ordered online tonight. To be honest, if they actually want to sell the top of the range hardware in that shop, they should be able to customise it, especially the Power Mac. Asking for more memory, a bigger hard disk, Bluetooth or AirPort can't be that unusual. Nevermind, at least it was easy to do in the online store and they were very happy to take my credit card details. I reckon I'll get a call from HSBC Fraud Detection Department tomorrow, asking me about that transaction.

New Home Phone

I went back to the Bang & Olufsen shop in Chiswick yesterday and got this BeoCom 6000 phone I wanted to replace the old BT cordless I had. The difference is amazing:

  • The sound in the BeoCom 6000 is crisp and clear, as if you were in the room next to the person you're speaking to, even when the handset is partially charged; much better than the old BT one even at full charge. It may be the least you can expect from a company that specialises in high quality stereos and entertainment systems but it is great to have the same technology in a phone.
  • The wheel control, iPod style, makes it a breeze to use.
  • A nice touch is that when the warning light flashes on the handset, you can just turn the wheel control and it will give you a list of everything that is wrong, such as the battery is flat or it can't find the base, etc. At last a phone manufacturer that got error reporting right!
  • It has a built-in phone book that will show you the name of the person calling, as well as missed calls, if you have BT caller display enabled. It will also ask you whether you want to save any number for which it doesn't have an entry at the end of the call.

This phone isn't cheap but it is definitely in a different league from anything I've seen before: a very nice toy.

Friday, 3 June 2005

Cash Register Humour

You know how modern electronic tills in trendy places display this message that goes 'Your server is' followed by the name of the person serving you? You find them in all the trendy bars in London. So you can call the person by name and be friendly if you so desire. Well, if you go to Gatwick airport North terminal, there is a juice and bagel bar called Pip. The juices and smoothies are great! And the person who programmed the till has a sense of humour: it says 'Your server is CRAZY'.