Having time on my hands at the moment, and no work commitments - that's another story though - I decided to start taking a new look at the robotics stuff I was playing with a year or so ago.
I'd written nearly all of the code to make a six-legged robot - a hexapod - walk with various different gaits and postures - the so-called inverse kinematics. It was in straight C, since I intended it run on a little embedded CPU which had no support for C++, nor floating point for that matter. And I'd built a development environment, including visualisation for the leg movements, using Visual Studio.
Things have moved on since then, though. For one thing I've pretty much switched to Linux for my computing environment. For another, the Roboard has really become the obvious onboard computer - it is now available with Linux, and it offers a full-function x86 including floating point, in a tiny size that will fit in my fairly small hexapod. And since it supports full GCC, I can write the code in C++. The C code is just so cluttered - I can't for the life of me imagine why anyone would prefer to code in C. It's full of irrelevant details that make it hard to read and even harder to get it to work. So, a rewrite is called for.
The only problem, is the GUI that I'd painfully created using the Visual Studio tools. Painful because there are 6 legs, and each has numerous parameters and state variables. I'd created the dialog box from hell. Every tiny change meant nudging numerous components around to get it to look right. What a pain. But it was done, for now anyway.
That was when I thought about Tkinter, which I've never used before. I've become a huge fan of Python in the last couple of years, using it for anything where performance is not a big deal. I also wrote a very powerful Python-based scripting system for my now-defunct employer, using Boost Python. So using Python and Tkinter for the GUI was kind of an obvious thing to do.
Somewhere in the mists of history I acquired Python and Tkinter Programming, which I think is the definitive book on the topic. I skimmed that, and with frequent help from Google - especially this site - started putting my new GUI together.
What a pleasure! Tkinter automatically takes care of making a reasonable layout, given some general guidance through the pack and grid functions. You no longer have to think about the minutiae of positioning, or spend ages getting boxes to line up with each other. I just couldn't help putting together a bit of infrastructure for collections of config variables, so they are now super-easy - just a list of names and default values and Python and Tkinter take care of everything.
In total it has probably taken me about 6 hours to get everything together - but that included learning Tkinter from scratch and writing quite a bit of infrastructure. And now I have everything I need to control my inverse kinematics, and have an animated visualisation of what it's doing.
I'll never do GUIs any other way now. Tkinter is wonderful!
Odd thoughts about flying, aerobatics, software engineering and other things that cross my mind.
Tuesday, 9 August 2011
Sunday, 7 August 2011
Favourite restaurants #3: Pizza Cresci, Cannes
My sister used to buy the Daily Sketch, a now long-forgotten English newspaper, on her way to work every day. This was a long time ago - she married and moved out when I was 11. When she came home I would seize it and read the cartoon on the back page, Peanuts. Among the many incomprehensible cultural references, to a child growing up in England in the 1950s, was the occasional mention of "pizza pie". Pizza was pretty much unknown in England back then - probably there were Italian restaurants in London that served it, but those were hardly the kind of places we could afford to go to. It would be a good few years before I'd find out what it meant.
Now, you can probably get pizza in every country in the world. Really it's amazing how quickly it has spread. Of course it was already commonplace in the US back then, which was why Charlie Brown took it for granted. I've eaten pizza in just about every country I've visited, there are times when you just need a break from the local food no matter how much you like it - as in Japan - and certainly if you don't, as in Korea.
Pizza's introduction to England was courtesy of Pizza Express, a London chain (originally) that made them before your very eyes, and made a very tasty pizza too. They even published a pizza cookbook, which worked surprisingly well considering that a domestic oven doesn't get anywhere near hot enough. Though my own introduction to pizza was at a local restaurant when I worked in Reading, Mama Mia - long since closed I'm afraid.
When we lived in France, we would make the pilgrimage every summer right across the south to the beach town of Hossegor - site of another favourite restaurant. It was a long drive - 8 or 9 hours, especially before the autoroute was finished and you had to dice with death on the three-lane stretch between Salon and Arles. By the time we got home we were exhausted and hungry. We would pile out of the car, leaving it packed to the gills with bags and often cases of wine that we'd stopped off for at Buzet, and cram into Isabelle's tiny Abarth to drive down to Cannes to eat.
Tradition had it that we always went to the same place, Pizza Cresci on the waterfront. Just the location is the stuff of dreams - right across the street from the harbour, packed with millionaires' yachts. Oh, and right next to the Municipal Police, hence easily recognised by the illegally-parked police cars, as you can see in the picture at the top. You might expect that in such a touristy location, the food would be mediocre. You couldn't be more wrong!
Pizza Cresci has, quite simply, the very best pizza I've ever tasted, anywhere in the world. I've been to the original pizza restaurant in Naples, and to some of the most famous ones in the US. They've all been good, but none has been quite as good as Cresci. My special favourite is their Pepperoni. They use a thin crust, crisp around the edges but deliciously soaked in melted cheese and oil in the centre. With a sprinkling of hot oil... just sinfully moist and delicious. Isabelle's favourite is something quite unique, an aubergine (eggplant) pizza, very thin slices of aubergine, a little cheese, and the same yummy thin base.
Of course we went there at other times too - if we were tired and just couldn't be bothered with eating at home, it was so easy. And it's huge (by French standards anyway), so even when it's packed at the height of the tourist season, you never have to wait long. But since moving to California, it's a wee bit less convenient and we hadn't been there for a long time. Then this spring, we visited Sorrento and Naples, then spent the weekend in Nice. Fresh from Napoli, the self-appointed capital of pizza, we decided to have lunch there. It was as wonderful as in our memories! The pepperoni pizza was delicious, the aubergine too (so I'm told), and as always with view of the Cannes waterfront.
Forget all the famous many-starred restaurants in Cannes, head straight for Cresci. It's the place to eat!
Now, you can probably get pizza in every country in the world. Really it's amazing how quickly it has spread. Of course it was already commonplace in the US back then, which was why Charlie Brown took it for granted. I've eaten pizza in just about every country I've visited, there are times when you just need a break from the local food no matter how much you like it - as in Japan - and certainly if you don't, as in Korea.
Pizza's introduction to England was courtesy of Pizza Express, a London chain (originally) that made them before your very eyes, and made a very tasty pizza too. They even published a pizza cookbook, which worked surprisingly well considering that a domestic oven doesn't get anywhere near hot enough. Though my own introduction to pizza was at a local restaurant when I worked in Reading, Mama Mia - long since closed I'm afraid.
When we lived in France, we would make the pilgrimage every summer right across the south to the beach town of Hossegor - site of another favourite restaurant. It was a long drive - 8 or 9 hours, especially before the autoroute was finished and you had to dice with death on the three-lane stretch between Salon and Arles. By the time we got home we were exhausted and hungry. We would pile out of the car, leaving it packed to the gills with bags and often cases of wine that we'd stopped off for at Buzet, and cram into Isabelle's tiny Abarth to drive down to Cannes to eat.
Tradition had it that we always went to the same place, Pizza Cresci on the waterfront. Just the location is the stuff of dreams - right across the street from the harbour, packed with millionaires' yachts. Oh, and right next to the Municipal Police, hence easily recognised by the illegally-parked police cars, as you can see in the picture at the top. You might expect that in such a touristy location, the food would be mediocre. You couldn't be more wrong!
Pizza Cresci has, quite simply, the very best pizza I've ever tasted, anywhere in the world. I've been to the original pizza restaurant in Naples, and to some of the most famous ones in the US. They've all been good, but none has been quite as good as Cresci. My special favourite is their Pepperoni. They use a thin crust, crisp around the edges but deliciously soaked in melted cheese and oil in the centre. With a sprinkling of hot oil... just sinfully moist and delicious. Isabelle's favourite is something quite unique, an aubergine (eggplant) pizza, very thin slices of aubergine, a little cheese, and the same yummy thin base.
Of course we went there at other times too - if we were tired and just couldn't be bothered with eating at home, it was so easy. And it's huge (by French standards anyway), so even when it's packed at the height of the tourist season, you never have to wait long. But since moving to California, it's a wee bit less convenient and we hadn't been there for a long time. Then this spring, we visited Sorrento and Naples, then spent the weekend in Nice. Fresh from Napoli, the self-appointed capital of pizza, we decided to have lunch there. It was as wonderful as in our memories! The pepperoni pizza was delicious, the aubergine too (so I'm told), and as always with view of the Cannes waterfront.
Forget all the famous many-starred restaurants in Cannes, head straight for Cresci. It's the place to eat!
Saturday, 6 August 2011
Worst Ever Dining Experiences #3: The Fat Duck, England
The Fat Duck is to food as Damien Hurst is to art. Neither is either, by any reasonable definition. Rather, they're an attempt to see how far you can lead people down the path of the ridiculous, if you constantly reassure them how sophisticated they are. Not that different from the story of the Emperor's New Clothes. In both cases they have been highly successful: the Fat Duck managed to fool the Michelin inspectors into giving it three stars, which is truly astounding.
The original concept of a restaurant was that it was a place you could go to get a decent meal. Surprisingly, it was originally not a generic term, but the name of a specific establishment in Paris, the word coming from the French verb restaurer, to restore or replenish. Since 1765, when it was first coined, the meaning has evolved somewhat. If you want a good meal you naturally think of going to a restaurant. But at the same time some of the top restaurants of the world have evolved beyond simply giving you a good meal, to giving you a unique eating experience. You don't go to Troisgros or the French Laundry just because you're hungry. (Or maybe some people do - there was a distant friend of the family, wealthy, who lived in Roanne and who supposedly ate at Troisgros every night. Why not - he could afford it and it was better than eating the French equivalent of beans-on-toast at home).
Though there are still top restaurants whose focus remains just a good nosh - the Savoy Grill in London, for example, which serves excellent but basically unsophisticated food, that Desperate Dan would feel at home with.
There's no question that the Fat Duck provides a unique culinary experience. It's just that it has strayed so far from any notion of food that you can't really call it "eating", except in the raw physiological sense that you do put something in your mouth, chew it and swallow it. Though I'm not sure "eating" applies to things that aren't food, except maybe in the sense "the dog ate my homework".
Our visit there was before it had acquired the fame it has today, about ten years ago. No Michelin inspector had yet been bamboozled into giving it three stars. We were with another couple, making four of us. There were several amuse-gueules - tiny teaspoon-sized concoctions, each more bizarre than the previous one. I remember some kind of purple jelly thing. None of them had much in the way of flavour, I suppose the idea is to look extraordinary - which they did.
But it is the main course that I'll never forget. It was supposed to be the greatest item on the menu - after all, if you're going there, go for the best. Raw pigeon. Yep, pigeon breast, raw. Marinated in something that had changed it a bit, but fundamentally, a raw piece of pigeon. Isabelle took one tiny mouthful and left the rest, in disgust. Foolishly, I persevered with it. It was edible, though a bit chewy, and with little taste. I really can't imagine, with hindsight, why I ate it. It wasn't enjoyable, it wasn't interesting, and as it turned out it was exceedingly unwise.
I don't remember the details of the rest of the meal, except that were even more weird amuse-gueules. Eventually we left and drove for twenty minutes back to our hotel. I just about had time to run from the lobby to the nearest toilet, where I was violently ill. There's a reason why raw pigeon isn't a common element in the human diet, and I'd just discovered it. Fortunately, I'd recovered by the next morning - after a thoroughly unpleasant night - and was able to take our flight home.
I guess the inspector who awarded the three stars must have chosen something else, or maybe has developed an immunity to fowl-borne gastric infections. Though the Fat Duck did have an extended bout of poisoning its customers a couple of years back, for reasons that have never been very clear. Amazingly, that has done nothing to harm its reputation. The local Indian restaurant would have been shut down (we're talking hundreds of customers here, not just one or two, over a period of months). But when your reputation is about shocking people rather than feeding them, maybe it doesn't matter.
The original concept of a restaurant was that it was a place you could go to get a decent meal. Surprisingly, it was originally not a generic term, but the name of a specific establishment in Paris, the word coming from the French verb restaurer, to restore or replenish. Since 1765, when it was first coined, the meaning has evolved somewhat. If you want a good meal you naturally think of going to a restaurant. But at the same time some of the top restaurants of the world have evolved beyond simply giving you a good meal, to giving you a unique eating experience. You don't go to Troisgros or the French Laundry just because you're hungry. (Or maybe some people do - there was a distant friend of the family, wealthy, who lived in Roanne and who supposedly ate at Troisgros every night. Why not - he could afford it and it was better than eating the French equivalent of beans-on-toast at home).
Though there are still top restaurants whose focus remains just a good nosh - the Savoy Grill in London, for example, which serves excellent but basically unsophisticated food, that Desperate Dan would feel at home with.
There's no question that the Fat Duck provides a unique culinary experience. It's just that it has strayed so far from any notion of food that you can't really call it "eating", except in the raw physiological sense that you do put something in your mouth, chew it and swallow it. Though I'm not sure "eating" applies to things that aren't food, except maybe in the sense "the dog ate my homework".
Our visit there was before it had acquired the fame it has today, about ten years ago. No Michelin inspector had yet been bamboozled into giving it three stars. We were with another couple, making four of us. There were several amuse-gueules - tiny teaspoon-sized concoctions, each more bizarre than the previous one. I remember some kind of purple jelly thing. None of them had much in the way of flavour, I suppose the idea is to look extraordinary - which they did.
But it is the main course that I'll never forget. It was supposed to be the greatest item on the menu - after all, if you're going there, go for the best. Raw pigeon. Yep, pigeon breast, raw. Marinated in something that had changed it a bit, but fundamentally, a raw piece of pigeon. Isabelle took one tiny mouthful and left the rest, in disgust. Foolishly, I persevered with it. It was edible, though a bit chewy, and with little taste. I really can't imagine, with hindsight, why I ate it. It wasn't enjoyable, it wasn't interesting, and as it turned out it was exceedingly unwise.
I don't remember the details of the rest of the meal, except that were even more weird amuse-gueules. Eventually we left and drove for twenty minutes back to our hotel. I just about had time to run from the lobby to the nearest toilet, where I was violently ill. There's a reason why raw pigeon isn't a common element in the human diet, and I'd just discovered it. Fortunately, I'd recovered by the next morning - after a thoroughly unpleasant night - and was able to take our flight home.
I guess the inspector who awarded the three stars must have chosen something else, or maybe has developed an immunity to fowl-borne gastric infections. Though the Fat Duck did have an extended bout of poisoning its customers a couple of years back, for reasons that have never been very clear. Amazingly, that has done nothing to harm its reputation. The local Indian restaurant would have been shut down (we're talking hundreds of customers here, not just one or two, over a period of months). But when your reputation is about shocking people rather than feeding them, maybe it doesn't matter.
Sunday, 31 July 2011
Favourite Restaurants: #2, Memories of India, London
After I bought my flat (apartment) in London, in 1997, for several years I was spending most weekdays on my own in London, returning home to France for the weekends. Cooking for one is no fun, and nor is eating alone in fancy restaurants. So friendly neighbourhood restaurants, where I could go with a book and eat a pleasant meal quietly in a corner, were highly sought after.
England is of course full of Indian restaurants. I doubt that there's a town that doesn't have one. In London there are literally thousands. The menu is pretty much the same in all of them, and with luckily rare exceptions the food is good too. But of course some are better than others. When I explored the ones in the area round my flat, I quickly found one that was head-and-shoulders above the others. Memories of India is an absolutely typical London Indian restaurant, that just happens to serve exceptionally good Indian cuisine.
When I lived just across the street, I would go there at least once a week, and when my willpower was feeble (often), more than that. Settling down at a corner table with a good book, a few poppadoms, a beer or two, a Shah Gostaba and a few side dishes was just as good as sitting down at home to a meal - with the added distraction of people-watching. This is a popular tourist area, with many mid-priced hotels and a handful of big ones. Every few minutes a couple or small group would pause outside the window to study the menu. And each time, the owner would rush outside to give them his sales spiel. About half the time it worked - to their good fortune, since they could easily have ended up in the nowhere-near-so-good place a few doors down. The other customers were a complete mixture, everything from noisy groups of caricatural American tourists to earnest young couples from the provinces, identified by their accents such as Geordies (from the Newcastle area) or from Northern Ireland.
"Eeh bah gum lass, even London 'as Indian restaurants, just like back 'oom in Bradford", they'd murmur softly to each other, holding hands discreetly across the table on their once-in-a-lifetime-treat outing to London. Or so I imagined, anyway.
Watching the owner makes you realise just what a treadmill it is to run a restaurant. Every single night he's there, keeping an eye on the place, trying to attract customers, greeting the regulars. The place can run without him - once when I went there he was on holiday. But still, there's not much of a break.
It's ten years now since I moved to California and let my flat. But when I stay in London it's usually in this area, often at the Royal Garden round the corner on Kensington High Street. And in that case, a meal at Memories of India is mandatory. Amazingly, even after ten years the owner still remembers me on the one or two occasions a year when I visit.
After I moved to the US I harboured a little fantasy of opening an Indian restaurant locally, just so I could call it "Memories of Memories of India". Surprisingly, here in Silicon Valley where half the population seems to be Indian, there are very few good (as good as Memories of India) Indian restaurants. So Memories of Memories of India, or M2I for short, would I'm sure be a great success, and soon I could open another branch - called, of course, Memories of Memories of Memories of India, or M3I. Eventually I could be the owner of a nationwide chain of excellent local Indian restaurant, its size limited only by the breadth of shopfronts to accommodate the ever-increasing names.
Well, it was a nice idea. My bubble was burst when I discovered that there are already several restaurants in the US called Memories of India. In fact, there's at least one more in London, too. But not as good as mine, I'm sure.
England is of course full of Indian restaurants. I doubt that there's a town that doesn't have one. In London there are literally thousands. The menu is pretty much the same in all of them, and with luckily rare exceptions the food is good too. But of course some are better than others. When I explored the ones in the area round my flat, I quickly found one that was head-and-shoulders above the others. Memories of India is an absolutely typical London Indian restaurant, that just happens to serve exceptionally good Indian cuisine.
When I lived just across the street, I would go there at least once a week, and when my willpower was feeble (often), more than that. Settling down at a corner table with a good book, a few poppadoms, a beer or two, a Shah Gostaba and a few side dishes was just as good as sitting down at home to a meal - with the added distraction of people-watching. This is a popular tourist area, with many mid-priced hotels and a handful of big ones. Every few minutes a couple or small group would pause outside the window to study the menu. And each time, the owner would rush outside to give them his sales spiel. About half the time it worked - to their good fortune, since they could easily have ended up in the nowhere-near-so-good place a few doors down. The other customers were a complete mixture, everything from noisy groups of caricatural American tourists to earnest young couples from the provinces, identified by their accents such as Geordies (from the Newcastle area) or from Northern Ireland.
"Eeh bah gum lass, even London 'as Indian restaurants, just like back 'oom in Bradford", they'd murmur softly to each other, holding hands discreetly across the table on their once-in-a-lifetime-treat outing to London. Or so I imagined, anyway.
Watching the owner makes you realise just what a treadmill it is to run a restaurant. Every single night he's there, keeping an eye on the place, trying to attract customers, greeting the regulars. The place can run without him - once when I went there he was on holiday. But still, there's not much of a break.
It's ten years now since I moved to California and let my flat. But when I stay in London it's usually in this area, often at the Royal Garden round the corner on Kensington High Street. And in that case, a meal at Memories of India is mandatory. Amazingly, even after ten years the owner still remembers me on the one or two occasions a year when I visit.
After I moved to the US I harboured a little fantasy of opening an Indian restaurant locally, just so I could call it "Memories of Memories of India". Surprisingly, here in Silicon Valley where half the population seems to be Indian, there are very few good (as good as Memories of India) Indian restaurants. So Memories of Memories of India, or M2I for short, would I'm sure be a great success, and soon I could open another branch - called, of course, Memories of Memories of Memories of India, or M3I. Eventually I could be the owner of a nationwide chain of excellent local Indian restaurant, its size limited only by the breadth of shopfronts to accommodate the ever-increasing names.
Well, it was a nice idea. My bubble was burst when I discovered that there are already several restaurants in the US called Memories of India. In fact, there's at least one more in London, too. But not as good as mine, I'm sure.
Update, July 2024: The restaurant is still there in Gloucester Road, but some time since Covid it has changed hands. The owner who would recognise me even after years of absence is no longer to be found encouraging passing tourists to stop for a meal. It's still a decent neighbourhood Indian restaurant, but it is no longer the same, for me at least.
Friday, 22 July 2011
Moving my Linux system to an SSD
Phew, done it! I decided to put a solid-state disk (SSD) on my new Linux system, to get some experience of using them. I expected to run into a few obstacles, but as usual with Linux I also expected to figure them out with a judiciously worded Google query. (Open-source would not work without Google).
It wasn't that easy. My goal was to move my existing system. A re-install from scratch would have been easier but then I'd have to try and remember all the hundred or so packages I've installed since, remember how I configured things like Apache and MySQL...
With Windows of course this is impossible. Thanks to that brilliant invention (not), the registry, you have to reinstall from scratch every time, then spend hours locating the CDs and babysitting the installation process. Been there, done that, and it's one of the main things I dislike about Windows.
I googled around and found a few descriptions of what to do, and indeed it seemed easy. So I physically installed my brand new 64GB SSD, which worked fine, and copied everything on my 1TB hard drive (not that much) to it. The of course I just needed to make it into a bootable system... and that is where the fuin started.
Ubuntu uses a boot system called Grub. I'd found clear instructions how to run that. Unfortunately for me, I just upgraded to Ubuntu 11.04 ("NattyNarwhal"), which uses Grub2, not Grub. And of course, they are completely incompatible - they don't seem to have a single command in common. (This seems to be a fairly widespread disease in the open-source world, deciding to reinvent some well-known piece of the system and make it gratuitously different. The most egregious example is Python 3, though bjam, the build system for Boost, runs a close second).
And I just could not find how to make Grub2 make changes to anything other than the currently running system. I could install it on the SSD, but trying to boot from it was a failure. Ubuntu finds file systems by their unique ID (UUID), and the SSD system was looking for the old hard drive's UUID. If both drives were plugged in, the SSD would boot Grub which then cheerfully booted from the hard drive. But if not... not so good.
I tried creating a "Super Grub 2" boot CD, hoping I could use this to make the changes. This however deserves some kind of award for unhelpful software. There is no "help" command and as far as I can tell no documentation either. So that was out.
By now I'd spent (wasted) two whole evenings on this project. Only my intense natural reluctance to give up on things kept me going, since I didn't actually need this to work. Then I tried a slightly reworded Google query and found this article. If you're an experienced Linux sysadmin you're probably thinking, "What an idiot, everybody knows that's how you do it". But I didn't know...
The key to success, once the files have been copied and /etc/fstab edited, is the following:
sudo -s
for f in sys dev proc ; do mount --bind /$f /ssd/$f ; done
chroot /ssd
grub-install /dev/sda
update-grub
The magic here lies in the chroot command, which is what gets Grub to work on a different drive from the current one. Now I know about it, I'm sure I'll find all sorts of other places to use it.
That done, the SSD booted perfectly by itself, and with a bit of juggling of SATA connections, I got it to boot with the hard drive as well. Problem solved.
By the time I finished this, I was ready for a glass of wine and dinner. So I can't yet say whether the SSD has indeed given me the expected boost in system performance. But at least I've got it working.
It wasn't that easy. My goal was to move my existing system. A re-install from scratch would have been easier but then I'd have to try and remember all the hundred or so packages I've installed since, remember how I configured things like Apache and MySQL...
With Windows of course this is impossible. Thanks to that brilliant invention (not), the registry, you have to reinstall from scratch every time, then spend hours locating the CDs and babysitting the installation process. Been there, done that, and it's one of the main things I dislike about Windows.
I googled around and found a few descriptions of what to do, and indeed it seemed easy. So I physically installed my brand new 64GB SSD, which worked fine, and copied everything on my 1TB hard drive (not that much) to it. The of course I just needed to make it into a bootable system... and that is where the fuin started.
Ubuntu uses a boot system called Grub. I'd found clear instructions how to run that. Unfortunately for me, I just upgraded to Ubuntu 11.04 ("NattyNarwhal"), which uses Grub2, not Grub. And of course, they are completely incompatible - they don't seem to have a single command in common. (This seems to be a fairly widespread disease in the open-source world, deciding to reinvent some well-known piece of the system and make it gratuitously different. The most egregious example is Python 3, though bjam, the build system for Boost, runs a close second).
And I just could not find how to make Grub2 make changes to anything other than the currently running system. I could install it on the SSD, but trying to boot from it was a failure. Ubuntu finds file systems by their unique ID (UUID), and the SSD system was looking for the old hard drive's UUID. If both drives were plugged in, the SSD would boot Grub which then cheerfully booted from the hard drive. But if not... not so good.
I tried creating a "Super Grub 2" boot CD, hoping I could use this to make the changes. This however deserves some kind of award for unhelpful software. There is no "help" command and as far as I can tell no documentation either. So that was out.
By now I'd spent (wasted) two whole evenings on this project. Only my intense natural reluctance to give up on things kept me going, since I didn't actually need this to work. Then I tried a slightly reworded Google query and found this article. If you're an experienced Linux sysadmin you're probably thinking, "What an idiot, everybody knows that's how you do it". But I didn't know...
The key to success, once the files have been copied and /etc/fstab edited, is the following:
sudo -s
for f in sys dev proc ; do mount --bind /$f /ssd/$f ; done
chroot /ssd
grub-install /dev/sda
update-grub
The magic here lies in the chroot command, which is what gets Grub to work on a different drive from the current one. Now I know about it, I'm sure I'll find all sorts of other places to use it.
That done, the SSD booted perfectly by itself, and with a bit of juggling of SATA connections, I got it to boot with the hard drive as well. Problem solved.
By the time I finished this, I was ready for a glass of wine and dinner. So I can't yet say whether the SSD has indeed given me the expected boost in system performance. But at least I've got it working.
Thursday, 21 July 2011
The Joy of Country Codes
The creation of South Sudan as a distinct national entity implies a huge number of practical problems. Little things like creating a viable government, a functional police force and army, a national infrastructure, and all the rest. For the sake of the people there, who have already suffered much more than enough, I hope that it works, although one newspaper article has already referred to it as a "pre-failed state".
Among all these things, one that has to happen is the creation of country codes which are used for all kinds of things. In particular, there is the two-letter code that appears at the end of a URL (like '.uk'), and the international dialling code. Alphabetic country codes are designated by a standard called ISO 3166, administered by the International Organisation for Standardisation, or ISO for short - the acronym carefully chosen since it is actually not an acronym at all, standing for neither the official French nor English names of the organisation. International dialling codes are designated in a standard called E.164, administered by the International Telecommunications Union (ITU).
The ITU grants an E.164 code to a country within 30 days of it being recognised by the United Nations. These codes are mostly two digits long (e.g. 44, the United Kingdom) or three digits (e.g. 351, Portugal). There are two exceptions: 1 and 7. 1 isn't actually a country code at all, since it designates the geographical area of North America including Canada, the USA, and various Caribbean islands. 7 used to be the USSR. Here be politics. It may seem simple enough to assign codes to countries, but actually it's a political and diplomatic minefield. When the codes were assigned, the Cold War was at its height and the USSR could not accept that the US could have a single digit (even though it didn't) and they didn't. Or so I suppose - I wasn't there, at the meeting of CCITT (former name of ITU-T) Study Group 2 where all this must have been hammered out. So now 7 is Russia, except that it's also used by Kazakhstan, and despite the fact that these two countries between them probably have fewer telephone numbers than some countries with three-digit codes.
Reading lists isn't everybody's cup of tea, but they often contain little gems of curiosity. Anyone who's had to call Taiwan knows that its country code is 886. But you won't find this in E.164. Rather, what you'll find is the entry for China, 86, with a footnote saying "within country code 86, 866 is used to designate the Chinese Province of Taiwan." But don't try dialling 866, because it won't work. Looking further, you'll find an entry for 886 with the text, "886 is reserved for assignment by the United States". In other words, China was not prepared to permit any reference to Taiwan as an independent country (their long standing position) but wasn't going to stand in the way of a practical arrangement that would let everybody get on with things.
Two-letter country codes, which are by far the best known, are in fairly short supply. In theory there are 676 (26*26) of them, but they try to have some mnemonic significance, and for well over 200 countries and other territories this makes it difficult to fit everything. For some reason, 'M' is a very common initial, and nearly all of the m's are used up. When I wanted to add Molvania (along with Elbonia and the Wallis and Grommet Islands) to the list of countries in our in-house database app, the best I could do was MJ. (Incidentally the same is true for state names in the US - M is the most-used first letter of the two-letter state codes). But luckily for South Sudan, even though 'S' is also a common initial, SS is still free. Perfect, n'est-ce pas?
Well, except that "ss" has, ahem, unfortunate connotations. Opinions differ as to whether the ISO Secretariat will allow this or not. And if not, all the other likely possibilities are already taken. About the best that I can think of would be to use a possible French version of the country name, "Sudan Meridional" (a word for "southerly" in French, along with "austral"). That would give SM. Of course that has connotations too, and very favourable they could be too for the fledgling country. Think how much money tiny Tuvalu has made from the happenstance of getting TV. There must surely be any number of kinky websites that would pay for as SM domain name... or there again, maybe the ISO Secretariat wouldn't be too keen on that either.
ISO 3166 is full interesting little tidbits. You know, of course, that FR is France. Well almost. Actually, it's "France including Clipperton Island". Where is that? I hear you ask. You mean you didn't know that it's a (usually) unpopulated atoll in the middle of the Pacific, 1000 kilometres from the nearest other land (Mexico)? And why on earth is it considered to be part of France? Thus begins a lengthy distraction on Wikipedia. Oh, Clipperton Island also has its very own code, CP, although according to Google there is not a single site that uses it.
And you know the code for my country, the United Kingdom of Great Britain and Northern Island (to give it its full title)... everyone knows that it is UK. Well, except it isn't. Actually it's GB. For some reason when they starting assigning URLs they decided to use UK instead. So UK is covered under a handful of oddball codes (along with CP incidentally) with the text "Reserved on request of the United Kingdom lest UK be used for any other country".
ISO 3166 has its share of odd diplomatic compromises and oddities, too. I bet you didn't know that BO is "Bolivia, Plurinational State of".
And you thought all this stuff was easy.
(Update, 16th August: they did get SS, read about it here. And the dialing code is +211.)
Among all these things, one that has to happen is the creation of country codes which are used for all kinds of things. In particular, there is the two-letter code that appears at the end of a URL (like '.uk'), and the international dialling code. Alphabetic country codes are designated by a standard called ISO 3166, administered by the International Organisation for Standardisation, or ISO for short - the acronym carefully chosen since it is actually not an acronym at all, standing for neither the official French nor English names of the organisation. International dialling codes are designated in a standard called E.164, administered by the International Telecommunications Union (ITU).
The ITU grants an E.164 code to a country within 30 days of it being recognised by the United Nations. These codes are mostly two digits long (e.g. 44, the United Kingdom) or three digits (e.g. 351, Portugal). There are two exceptions: 1 and 7. 1 isn't actually a country code at all, since it designates the geographical area of North America including Canada, the USA, and various Caribbean islands. 7 used to be the USSR. Here be politics. It may seem simple enough to assign codes to countries, but actually it's a political and diplomatic minefield. When the codes were assigned, the Cold War was at its height and the USSR could not accept that the US could have a single digit (even though it didn't) and they didn't. Or so I suppose - I wasn't there, at the meeting of CCITT (former name of ITU-T) Study Group 2 where all this must have been hammered out. So now 7 is Russia, except that it's also used by Kazakhstan, and despite the fact that these two countries between them probably have fewer telephone numbers than some countries with three-digit codes.
Reading lists isn't everybody's cup of tea, but they often contain little gems of curiosity. Anyone who's had to call Taiwan knows that its country code is 886. But you won't find this in E.164. Rather, what you'll find is the entry for China, 86, with a footnote saying "within country code 86, 866 is used to designate the Chinese Province of Taiwan." But don't try dialling 866, because it won't work. Looking further, you'll find an entry for 886 with the text, "886 is reserved for assignment by the United States". In other words, China was not prepared to permit any reference to Taiwan as an independent country (their long standing position) but wasn't going to stand in the way of a practical arrangement that would let everybody get on with things.
Two-letter country codes, which are by far the best known, are in fairly short supply. In theory there are 676 (26*26) of them, but they try to have some mnemonic significance, and for well over 200 countries and other territories this makes it difficult to fit everything. For some reason, 'M' is a very common initial, and nearly all of the m's are used up. When I wanted to add Molvania (along with Elbonia and the Wallis and Grommet Islands) to the list of countries in our in-house database app, the best I could do was MJ. (Incidentally the same is true for state names in the US - M is the most-used first letter of the two-letter state codes). But luckily for South Sudan, even though 'S' is also a common initial, SS is still free. Perfect, n'est-ce pas?
Well, except that "ss" has, ahem, unfortunate connotations. Opinions differ as to whether the ISO Secretariat will allow this or not. And if not, all the other likely possibilities are already taken. About the best that I can think of would be to use a possible French version of the country name, "Sudan Meridional" (a word for "southerly" in French, along with "austral"). That would give SM. Of course that has connotations too, and very favourable they could be too for the fledgling country. Think how much money tiny Tuvalu has made from the happenstance of getting TV. There must surely be any number of kinky websites that would pay for as SM domain name... or there again, maybe the ISO Secretariat wouldn't be too keen on that either.
ISO 3166 is full interesting little tidbits. You know, of course, that FR is France. Well almost. Actually, it's "France including Clipperton Island". Where is that? I hear you ask. You mean you didn't know that it's a (usually) unpopulated atoll in the middle of the Pacific, 1000 kilometres from the nearest other land (Mexico)? And why on earth is it considered to be part of France? Thus begins a lengthy distraction on Wikipedia. Oh, Clipperton Island also has its very own code, CP, although according to Google there is not a single site that uses it.
And you know the code for my country, the United Kingdom of Great Britain and Northern Island (to give it its full title)... everyone knows that it is UK. Well, except it isn't. Actually it's GB. For some reason when they starting assigning URLs they decided to use UK instead. So UK is covered under a handful of oddball codes (along with CP incidentally) with the text "Reserved on request of the United Kingdom lest UK be used for any other country".
ISO 3166 has its share of odd diplomatic compromises and oddities, too. I bet you didn't know that BO is "Bolivia, Plurinational State of".
And you thought all this stuff was easy.
(Update, 16th August: they did get SS, read about it here. And the dialing code is +211.)
Wednesday, 6 July 2011
Favourite Restaurants: #1, Bar Oceanic, Hossegor
[Update 19/10/2023 - sadly the Bar Océanic is no longer with us. If you look for it, you'll find a place called La Nord. The owners of L'Océanic sold out about three years ago, after a short period of trying to manage without their star cook who had passed away. There have been at least two other attempts at revival in the meantime. Running a successful restaurant is hard. I can't make any comment about La Nord either way - we tried it once out of nostalgia, it was OK but not stellar.]
This week I'm in Hossegor, so it seems fitting to choose Bar Océanic as the first one. Hossegor has been a family tradition for over 20 years now, and a lot longer than that for my wife, who used to come here for her childhood holidays. We'll gloss over exactly when that was, but the house where I'm sitting typing this came into the family 21 years ago. The location is perfect, a two minute walk from the beach, a ten minute walk from the town, and close to the beachfront restaurants.
Hossegor is most famous now as a surf place. The annual world championship has an event here every summer, taking advantage of the giant Atlantic waves as they crash into the beach. Or not - there can be some really impressive surf here, but it's the exception rather than the rule. We've watched the championships take place in a millpond-flat sea, the surfers desperately seeking even the smallest wave.
Before the surf, Hossegor was - and still is - a family town for holidays. It has wonderful beaches, part of the vast expanse of of perfect, clean sand which runs from the Spanish border for a couple of hundred kilometres nearly to Bordeaux. It's the combination of families and surfers that makes Hossegor unique - it's a very lively place, with bars open until the small hours and beach parties, mixed with grandparents and their progeny and everything in between.
The beachfront, a two minute walk from our house, has a bunch of restaurants of different styles, from Dick's Sand Bar (not advised if over 25) to restaurants catering rather more to the family crowd. And of these, our long-term favourite is le Bar Océanic. Their menu is a range of south western French staples. And the king of such dishes is confit de canard, duck cooked slowly in its own fat for hours and hours until it becomes tender yet moist. Yum, especially when it's grilled at the last minute to make the skin crispy, then served with fried potatoes, either French fries or sliced thinly then fried slowly in more duck fat. Needless to say, this is on the menu. It may not be quite literally true to say it's the only main course I've ever eaten there, but it's close. Served with a bottle (or two or three, depending on the number of people) of excellent local wine, it's just irresistible.
The really surprising thing about le Bar Océanic, though, isn't so much the food as the proprietor. Or more specifically, his astounding memory. We've been regulars in Hossegor for 20 years, and I think we ate there the very first time we came, but that means just once or twice every year. And there was a period when we didn't come here in the summer, for about six years, just a couple of out-of-season visits in that whole period.
Yet every time we go there, he not only remembers us but even our favourite dishes. Can you imagine? You have thousands of customers who you see at most a couple of times a year, and you remember their menu choices individually? I just don't know how he does it.
When we moved to the US, there was a period of about three years before I managed to get back to Hossegor. The day I arrived, I was walking past le Bar Océanic. The proprietor happened to be standing outside. "Bonjour Monsieur," he said, as if I had just been in there the night before.
Subscribe to:
Posts (Atom)