Tuesday, 28 July 2009

The Garden of Eden

"We choose to go to the moon. We choose to go to the moon in this decade and do the other things, not because they are easy, but because they are hard [...]"

These are the words spoken by John Fitzgerald Kennedy, spoken in Dallas, Texas on September 12th 1962 and launched the United States' space programme which resulted in the first three men setting foot on an alien planet (see the full speech on YouTube). This event changed the world and brought with it more innovation and a greater sense of unity than any other event in world history. All around the planet, on July 24th 1969, people gathered to watch Neil Armstrong and his crew walk where no man had ever set foot before. They gathered around televisions and radios wherever they could be found, filling the streets and stopping work for this momentous occasion, and Armstrong and his crew became heroes and an inspiration to people for the rest of their lives.

But what remains untold is the backstory: the story of the work that was required to put these men where they stood and to take them across this vast distance of space. From this journey, we developed videotape, microwaves, Teflon and whole host of other technical achievement and these achievements came from the heroic work of thousands of engineers across the globe.

I had the privilege to visit the Kennedy space centre a while ago and was reminded not only of the scale of such a project but also the dedication of the men and women involved. NASA have a saying: "This project will not fail because of me" and the true heroes of the Apollo programme are all people involved, from the guys who cleaned the vehicle assembly building (the largest one-story building in the world) to the engineers at the Jet Propulsion Lab who were responsible for the engine systems on the lunar module. These days, people have forgotten what it means to be a part of something larger than themselves; that, by their small contribution, they can achieve great things.

This post has come about because I have seen a film: In the Shadow of the Moon, a well-made documentary about the journey of the Apollo astronauts and the reasons the programme existed. Soon, America will begin its next greatest mission: the journey to Mars, our next nearest stellar neighbour, but before they do, take heart in the words of Alan Bean, the Apollo 12 lunar module pilot who said simply: "We live in the Garden of Eden."

Regardless of your beliefs, our world is an oasis in space: the extents of science no of no other planet like ours and we have discovered no other intelligent life except for its own, and this, above all differences of skin, race, religion or other identifying attributes should be what binds us: that we are all human and that, as a species, we are distinct within the expanse of space.

Friday, 24 July 2009

My Very First Website

I've just been talking to some friends on MSN Messenger and, for reasons I can't fathom, was reminded of the very first website I made professionally, back in 2001. It was for the National Business Angels Network (aka www.nban.com) and was made when I worked for iDesk plc under the guidance of one Ben Joyce who was a brilliant boss and taught me a lot of very good lessons. He's since become not only a rather good programmer, but also a rather talented photographer.

NBAN was the start of an amazing career; I'd been spending some time for iDesk writing their technical support knowledge base (about 100 articles covering standard problems and their solutions) with a three-month time budget and I finished a month early. Ben was looking a bit stressed and I was a bit bored, so I offered to help out. He asked me to re-build the NBAN website, which I did and I revelled in it. Part of it is still available here at archive.org, but since the archive doesn't contain much in the way of images, you can't really tell, although I recognise my footprints in this code.

Funny how people's work changes; my current work is so much better it's astonishing, and it's still a hell of a lot of fun. I have some great ideas up my sleeve and I think it'll be fun seeing how far my imagination, and my implementation skills can go.

Sunday, 19 July 2009

Special Potatoes

I've been asked what I mean by special potatoes, so I thought it was high time I shared the recipe. It's dead easy, requires no special equipment (except a cheese grator and/or mandoline) and only takes about 20 minutes to prepare.

The recipe was inspired by dinner at Mon Plaisir, London's oldest French restaurant, in particular their dauphinoise potatoes. I was a bit unhappy with just how unhealthy this dish is (tradtionally) so I came up with an untraditional alternative. I cooked this for my cousin and her daughter today and Paul Curley, who I know from Twitter asked about them, so here goes.

Serves 2-3, prep time 20-30 minutes, cooking time 1.5 hours (it's worth it)

What you'll need
Cheese grater
Large casserole dish
Saucepan
Garlic press
Mandoline (optional)

Ingredients
1kg Charlotte potatoes
250g Chestnut mushrooms
200g Smoked bacon
300ml Half-fat creme fraiche
2-3 Garlic cloves

With all of the ingredients you can substitute anything else in the same category, but bear in mind that this is tried and tested; the cheese is a traditional Swiss version of cheese and potatoes and the chestnut mushrooms add a nice kick. With your choice of bacon, try to find a variety with no added salt or sugar, so experiment. Creme fraiche works well because cream makes the whole thing too heavy; trust me on this!

Read the steps below first, as once you get the sauce warmed up and on the go, all of the other stuff is a doddle. It's just a matter of chuck it in a dish and mix it.

Preheat the oven to 180C or Gas Mark 4 (ish).

Preparation - Sauce
Grate the cheese, put a bit to one side
Empty the creme fraiche into the saucepan and put on a low heat
When warm, add the garlic via the press and give it a minute or two.
Add the cheese, let it melt in and stir a bit to smooth it out.

Preparation - Everything Else
Wash and slice the potatoes straight into your dish
Wash and slice the mushrooms, add to the dish
Rind and chop the bacon into half-inch bits and ... guess what?
Mix it all up (I use my hands)
Pour the sauce on top
Put the lid on the dish and bung in the oven

At this stage, it won't look like much - just a dish full of potatoes and 'shrooms. As it cooks, the mushrooms will shrink down and the liquids from all of the ingredients will mingle together so don't worry that you've only got a little bit of sauce.

Every 20-30 minutes, take the dish out of the oven and use a big serving spoon to stir/rotate its contents. After about 1hr 20mins, it'll be about ready and you can test this by grabbing a slice or two of potatoe with a fork - if it's crunchy, it's not ready yet so give it a few more minutes.

When ready, sprinkle the spare cheese on top and shove back in the oven for a bit to make it golden brown and rather yum looking.

The dish is a meal on it's own (hence lunch today) but if you want to be really fancy, you could try serving it with my special duck (recipe coming soon) and some steamed green beans. Enjoy!

Tuesday, 14 July 2009

How a little WINE lets Google top Microsoft at their own game

Recently, there have been an awful lot of people speculating about Google's new product: Google Chrome OS. This has been a product which has been talked about in hushed circles for some time and, like everything else Google does, there has been very little said from the company on the subject until the recent press release. They've slated a release for it, according to their blog, for 2010 and, if my suspicions are correct, this will mean the end of Microsoft and I would like to explain why.

On its own, a Google OS is not really a big threat to Microsoft. Yet another Linux distribution without anything special about it would really just dilute the entire landscape of Linux operating systems - yet another flavour of the system to add to distrowatch. However, Google aren't just any old company: they recruit solely the pinnacle of all engineering staff: I've had a look recently at their research arm. They have hundreds of peer-reviewed publications covering a vast array of subjects (see Research Papers for yourself) and people have come to expect something rather special from this knowledge and technology behemoth.

One of Google's best aspects is taking something very ordinary and, through the application of a little ingenuity, produce something truly remarkable. Mail is a wonderful example of this: look at every webmail solution except this and you will see a fat, bloated web application heavy with advertising, slow and often difficult or unintuitive to use. Gmail, by contrast, is incredibly lightweight: the development team created an entire Javascript framework in order to make it fast and efficient and thus was born Google Gears.

So now you're probably wondering what is so significant about Google's OS? What is the Joker card in the pack that is making Microsoft so very, very scared. Well, the timing is perfect because the companion software for Google's OS recently reached its 1.0 release. That software is WINE. This application is an absolute killer; it is, on its own a pinnacle piece of engineering that has been brushed to one side by major technologists for some time, until now.

The acronym standard for WINE Is Not an Emulator. Instead, it is an entirely open-source set of libraries and binary interfaces that allows Windows programs to run, fully functioning, on Linux without a virtual machine. Not everything in the Windows world is supported though, and the project maintains an applications database that allows people to find out what will work with WINE before taking the risk and installing software. After all, good businesses employ due dilligence, which means doing your research to make the most informed choice possible. With the current version of WINE, you can run Google OS (or indeed any supported flavour of Linux) and install most of the common applications you use on Windows but without the cost of a Windows license and, because of the way WINE has been developed, Microsoft cannot stop them.

One point that's worth looking at is the investment Google is making into WINE. Google are putting serious resources into the project and it only takes a quick glance at their code contribution list for WINE to see just how much effort Google are putting in, over time - approximately 425 patches in between 2006 and 2008. (Thanks to Roberto Usai for pointing this out).

So why does this scare Microsoft? Why is Google so special? The answer is all about trust. Who would you trust more? A company whos products are always in the news for their security breaches and who continue to churn out products, year after year, which aren't (on the surface) that innovative or a company whos very existence is founded on the easy access to knowledge and whos commercial arm was a spin-off of their search engine, whos adverts are unintrusive because Google realised that if you're subtle, it actually works better than a flashing banner.

Even this, though, does not spell the end for Microsoft. That is, until you look at their financials. According to their financial report for 2007, their company revenue comes primarily from two streams: their Windows division and their Business division, meaning Office. To understand what this means, think about this scenario:

Google launch Google OS in 2010, for free, and it runs all major Microsoft Windows software.

Support will be available for a nominal charge for home users, with a higher cost for business users. Recent advances in the Samba software suite, brought forward by the European Union anti-trust lawsuit, in which Microsoft agreed to license their intellectual property and open their SMB protocol allows an open-source implementation of the Microsoft domain management system, including Active Directory, which is key to so many businesses, small and large alike.

Microsoft are doomed because their entire business model is built upon making profit from effectively re-selling the same re-skinned operating system over and over again. When Windows NT was released, it was an amazing product: NT stood for New Technology, because it was a complete re-work from the operating system kernel up. Since then, every version of Windows, including (to the best of my knowledge) Vista has been built of the Windows NT kernel, or a version of it. If you were to look in your the Registry of your Windows machine, you will still see signs that NT is still there. They try to hide it, but it's there.

Ironically, Microsoft had a real chance to win this war some time ago, when Vista launched. When it was originally announced, it was to be a technical marvel. It had some features of truly awe-inspiring imagination, specifically WinFS - an entirely new filesystem which worked a bit like a database. Engineering and scheduling problems forced them to drop this and it still isn't back. This could have changed their fortunes entirely, but instead they continue to struggle to deliver solutions that are clean and reliable and are often shamed by massively public failures such as the Blue Screen of Death during the 2008 Olympic opening ceremony.

Unfortunately for Microsoft the reason for this and, in my understanding, most of these problems stem from the way their built their core Visual C++ and Visual Basic libraries and how people are still developing using very old technology that still, many years on, contains unhandled memory leaks.

So, in my opinion and, on the basis of the evidence, Microsoft is doomed. Le roi est moi, vive le roi.

Sunday, 12 July 2009

How to be True Blue

So this morning, I am greeted with the shocking revelation that Duncan James from the boy band Blue has come out as bisexual. For him, it seems to have been quite a step forward. The Sun, in all their wiseness actually published the video interview they used for material for the story, which actually makes them look bad because in their story, they've massively overemphasised the wrong points (as you'd expect from a tabloid) and completely left out the important bits which even the commentors miss. The key point is this: he, personally, not for anyone's benefit but his own, has done something positive in his life and by doing so has shown the public the truth.

I've seen Blue around in the papers and on TV; I'd dismissed them as, well, fairly thick pretty guys who can sing and dance a bit. I made the assumption that they can't play instruments (which may or may not be true) and that they probably don't write their own material: as true a manufactured band as any, in the grand old style of Stock-Aitken-Waterman (poor, poor, Pete Waterman, dancing away on The Hitman and Her at 3am like some granddad at a school disco - good for him for doing it though!).

Thing is though: watch the video. What you'll see is something completely different. Duncan comes across as eloquent, thoughtful and well spoken. Irrespective of my man-obsessive comments about Sean Maguire, he comes across just as a normal bloke and that's what we need more of: celebrities who are people, not people who are celebrities.

This is the same message that Stardust gives us: "I'm not a shop boy ... I'm just a boy who works in a shop."

Saturday, 11 July 2009

The Horniman Museum

I have just been to see one of the finest museums in all the world and it is right round the corner from my home in Forest Hill. It is The Horniman Museum. It has a crap website, but I have just emailed the curator to pass on some compliments so maybe I can use that as an opening to get Redwire some more work. The museum has an amazing story, which I would like to relate to you here.

The museum was founded by a Victoria tea trader, Frederick John Horniman, a wealthy man who in the course of his work had sailed the world and seen some amazing things. He wanted to share the things he had seen with the people of England, to inspire them with the beauty and complexity of the greater world around them. So he started collecting things as he went and built a great hall in which to put them and, at a time when so many poor people existed, he opened the country's first free museum, the Horniman, dedicated to the people of the world, so that he could share the treasure, beauty and astonishing things that exist in the world. He was a good man, who had seen some awe-inspiring things and wished to share that sense of wonder and awe with the common people, just as I am trying to do with my Sixty Seconds project, which is currently on hold.

I would like to share with you, as well, a little-seen secret that I have found at the museum. Overlooked by almost everyone who sees it, its existence underlines the message that the Horniman portrays. It is a stained glass tile, the only coloured glass used in the greenhouse, now the cafe which I caught my eye as I left.



If you look closely at the stained glass image, you will see that the sun is shining down upon the world and you can see the rays of light that shine from it. This picture is a metaphor for the distribution of knowledge and the sun is a metaphor for the human eye, showing it the wonders of the world. It is an embodiment of the wonder of compassion, charity and the goodness that can happen when ordinary people become educated by the wonders of the world that surrounds them.

Krod Mandoon and the Flaming Sword of Fire

Oh, my god. The BBC have finally come up with something truly brilliant: Krod Mandoon and the Flaming Sword of Fire - an utterly brilliant piss-take of fantasy series, with a similar sense of humour as the idea I had for "Xena: Tit Princess". Starring Sean Maguire, who I've always had a thing for since he was in Grange Hill, now returning to form as a bit more of a serious actor (it's very hard to play comedy, I think, especially if it doesn't come naturally to you) and now looking incredibly buff after having done his bit in Meet The Spartans.

The script for this show is just pure gold and sounds an awful lot like it's been written by Ben Elton, who gave us his piece de resistance with Black Adder and, starring Matt Lucas (who is actually a bit of a tit in real life, although he wasn't about ten years ago when I first met him, propping up the bar in a gay bar on Charing Cross Road) playing a very silly character and playing it well, which is what he's really good at. Everyone is, even the comically camp mixed-race guy, wandering around in blue velvent. Priceless!

He even has, literally, a Flaming Sword of Fire, which is just ridiculously silly as it's really meant as a metaphor. Sheer comedy genius!

"Rub him with oil! Make him greasy!" - 'nuff said!

Full Stereo

So I am relaxing by watching one of my favourite films: Stardust. One of the masterpieces of modern fantasy cinema: a beautiful tale of transformation - the story told time and time again by Disney and others, of a boy who through some courageous act transforms into a man. And featuring one of the most remarkable entrances of a leading lady, utterly trumpting for showiness, the Borg queen in Star Trek: Insurrection although I'm pleased to say the Borg queen wins the award for sexiest! Scored beautiful by a relatively unknown (to me, at least) Ilan Eshkeri, the soundtrack even features a throwback to Close Encounters of the Third Kind, in the way that octaves and semi-quavers are used as a stepping mechanism between bars of music. Very clever, and a brilliant and subtle homage to the work of John Williams, who set the stage for 'big' film music.
Watching this on DVD, though, is almost painful having seen the quality of reproduction that can be gained from Blu-Ray and, having done some research especially so when a lot of Blu-Ray are released just be reampling the DVD instead of an entirely new transfer from the original print. Thankfully, there is at least one studio (Warner, I think) who invest heavily in their transfers, knowning that happy consumers will buy more of their products. Rock on good customer service!

"Nothing says romance like the gift of a kidnapped, injured woman!" - excellent!

Thursday, 9 July 2009

One small step for a man...

And so ends a rather frazzled day, where I've managed to lose something rather valueable and had to spend several hours of a normally busy day chasing across London to find out of a company I'd ordered from actually existed and would be able to fulfil the order. They did, but I cancelled my order anyway and offered some good advice to them to help improve their business and prevent a recurrance of another dissapointed customer.
As for what was lost, well that's another matter and it seems my insurance will cover me and the money I get from that will give me something I've wanted for a while but been unable to afford, plus a reasonable replacement for what was lost. I like insurance!

I've also bought my first coffee table book: a real work of art. It is Leonardo's Notebooks, a complete copy of his entire writings and drawings, translated and displayed in full instead of the usual interpretation and 3D-rendered versions that you normally see. Only £25, too, so a good purchase from Waterstones.

I've also been in contact with Sony, who have confirmed my hopes about their new Blu-Ray player, the BDP-S560. This is Sony's new top-of-the-range device and is incredibly sexy. They were finally able to confirm that its DLNA support will play video, meaning that my Ultimate Home Entertainment set-up will work. I only hope that they have fixed the start-up and disc loading time issues that I've seen with my 'stop-gap' BDp-S300. The S560 is a beast: packed full of some of the best engineering consumer electronics can purvey and, with an estimated price of £249, an incredibly good value for money machine. I just wish they'd sort out their distribution problems so I could buy one!

Watching stuff on Blu-Ray is a hell of a thing. I'm joining LoveFilm when I can so that I can marvel at the astonishing video and sound quality, like the drumming in Crouching Tiger, Hidden Dragon, where it feels like the drums are literally right in front of you. I've somehow managed to get a really cool set-up without spending thousands of pounds. It, like everything else, seems to be a bit of a pain in the arse to set up but when it's done, it's done.

Wednesday, 8 July 2009

HOWTO: Reverse proxy with Apache 2

Today I completed a piece of work for Redwire which allows us to proxy requests for one of our clients so that we can manage their SEO through redirects whilst they host their website on their own servers. It took me a while to come up with a complete end-to-end process on how to install the necessary modules for Apache 2 and get the proxy to work with our existing redirects and I thought it would be a good idea to put this up as a HOWTO, since I guess this might be a common project for people to do.

Traffic Flow
First of all, we need to understand how traffic will through the website, through our server, to the remote server and back again and for that, we need a diagram:
  • User's Machine -> Redwire Servers -> Apache Proxy -> External Servers

DNS Records
The next thing to set up is to tell our Redwire server where to find the external machine to proxy from, as website's DNS address points to the external client servers. We need to override DNS for this host, which we can do by adding the following lines to hosts file:
www.dummyexample.com  195.149.56.12
This is set up so that we can (when we're ready) change the DNS records for the rest of the world to point to our servers, so that the proxying and redirects can happen. If we can't do this, we can't provide a part of our contracted services.
NOTE: Once these entries are in place, they will not need to be changed unless the IP address of dummyexample.com changes so bear this is mind.

Apache 2 Configuration
If you are using the Windows install, enable the module in your php.ini file - mod_rewrite is the module you'll need, and in Linux you can install this as an RPM or by source, which is how I've done it:
1. You'll need to change to the modules directory from your source code:
/usr/local/src/httpd/httpd-2.2.3/modules/proxy
2. Once there, compile and install the required modules:
/usr/local/apache2/bin/apxs -c -i mod_proxy.c proxy_util.c
/usr/local/apache2/bin/apxs -c -i mod_proxy_http.c proxy_util.c
This is a one-shot process; the APXS system compiles and installed two modules, which you will need in addition to mod_rewrite, which you should install in a similar manner.
Loading these into your Apache httpd.conf is critical, as is the ordering. The LoadModule lines for these entries should be in the correct sequence, as follows:
LoadModule proxy_http_module  modules/mod_proxy_http.so
LoadModule proxy_http_module modules/mod_proxy_http.so

Once these are entered, you need to check your Apache configuration; in my example, I am using a Linux server so these are the commands I enter, as root:
[root@server proxy]# apachectl configtest
Syntax OK
[root@server proxy]# apachectl stop
[root@server proxy]# apachectl start
Configuring the Site
Once the Apache modules are loaded in, we can now set up the site to proxy requests to another location, which we can do by changing the configuration file for the site we are working on, www.dummyexample.com so that its primary virtual host directive reads as follows:
ServerName www.dummyexample.com    
RewriteEngine On
RewriteRule (.*) http://www.dummyexample.com/$1 [P,L]
As you can see, we still keep all of the normal ServerName and logging information but instead we enable URL rewriting for all paths in this virtual host, and by specifying the [P] option (mod_rewrite options are specified in square brackets) we tell mod_rewrite to proxy the request via a different URL. This is significant, because the web server then uses its host file to look up www.dummyexample.com and, as we have already set this up, this points to the external servers. So now, by default, all traffic for dummyexample.com is now proxied by our server, once the external DNS change is published.

Handling Redirects
This is a key requirement of the project; without this we cannot fulfil our obligations so I have to find a way to make the original mod_alias Redirect rules work. The original rules look like this:
# Original redirects
Redirect permanent /news/content.html http://www.dummysite.com
Redirect permanent /news/brochure.html http://www.dummysite.com/marketing.html
These will not work on our server now and if implemented as shown would cause a redirect loop as the site sends browsers back to itself. So they have to be enacted as part of the proxy and rewritten:
# Equivalent rewrite rules
RewriteRule /news/content.html http://www.dummysite.com [R=301,L]
RewriteRule /news/brochure.html http://www.dummysite.com/marketing.html [R=301,L]
Why the extra characters on the end? Well, mod_rewrite allows you to add some HTTP headers to response that's sent back, so we're sending back a 301: Redirect Permanent code to the browser.

We did some other cool stuff, specifically making part of the site non-proxied (i.e. served by us) but I will add this a bit later.

Good Luck, Mr Gorsky!

I've just spent 45 minutes on the phone to my grandfather, as it's his birthday and I forgot to send him a card so thought it'd be nice to call him to wish him my best for the day. It was really nice to talk to him about what's going on in my life, about my home and about how I feel. During our conversation, we were talking about the Apollo moon landing and so I thought this would be a good topic for my first post here.

"Good Luck, Mr Gorsky!" were among the first words spoken by Neil Armstrong when he stepped off the lunar module and onto the surface of the moon. NASA, in their wisdom, tried to cover this up as problems with his VOX ("Sounded like his VOX was a little slow on the uptake." noted here). Jim (my grandfather) told me the full story, which goes a bit like this:

When Neil Armstrong was a boy, he was in his back garden playing with a ball and he accidentally threw it over the fence, and so went to get it. Whilst he was in his neighbour's garden, he overheard Mrs Gorsky say to her husband something along the lines of "Oral Sex? Oral Sex? The boy next door is more likely to set foot on the moon before you'll get that from me!"

For twenty five years, Neil refused to comment on the matter. Then, one year, he finally confessed to the truth of the matter, saying that now that the people involved were dead, he was free to tell the tale and so I relate it to you now, as it's a fascinating example of the fragility of human nature and the way that events touch and shape young people. Neil didn't go to the moon for this purpose, but it's a good story and the fact that it's true and that NASA tried to blank it out makes it all the more amusing!