A lazy way to write webpage components · Apr 7, 06:20 pm by Michael Dales
At work I’ve been looking into how to play video in a browser reliably, and until both the world’s browser makers agree on supporting all common video formats and the institutions of the world move on to those modern browsers, you’re unfortunately stuck in the world of using something like Adobe Flash or Microsoft Silverlight to get multimedia content in your webpage. I’m all for HTML5 video, but as someone who has to deal with customers still stuck on IE6, it’s an ideal I can’t yet work with.
As part of some new features to Camvine webservice, I’ve been looking at how to play WMV and H.264 videos in a browser, and currently that means essentially using Silverlight – it has much better video support than Flash does currently, enabling me to produce a video plugin that’ll suit my needs. Or it would if I knew how to write any .net code.
This is the rub in doing web development – you need to be skilled in multiple languages at once. I’m already writing Python on the backend, and Javascript/HTML/CSS on the front end, and now I need to learn yet another language and set of frameworks just to play video? Or in my case, take an existing open source video player and make it do what I specifically need?
Perhaps not, thanks to a project called Gestalt, which both amazes and slight horrifies me at the same time :)
Gestalt essentially takes advantage of .net having support for two of the most common web development languages: Ruby and Python. It also takes advantage of something know as the DLR – Dynamic Language Runtime – to load code in .net applications as they run. Essentially, Gestalt lets you write Python and/or Ruby into your web page, just like you would Javascript, and then at run time dynamically places the code into a Silverlight plugin for execution without you having to do anything other than include some extra Javascript libraries. It’s amazing in both its technical swizzling and its simplicity to use.
So, if you use Python you could just start writing Silverlight style .net Python in your HTML like this:
<script type=“text/python”> import System def OnClick(s,e): window.Alert(“Hello, World!”) document.say_hello.AttachEvent(‘onclick’, System.EventHandler[System.Windows.Browser.HtmlEventArgs](OnClick)) </script>
And you can test this out here. Quite cunning, and very slickly implemented by the Gestalt guys – it’s very little effort (a few silly fixed paths in their code aside) to get up and running.
Now, I’m not about to throw away all my nice Javascript and use Gestalt with Python – although it’d mean one less language I’d still have to learn all the Silverlight frameworks, Gestalt seems a bit over the top for something that I can do natively in the browser. However, it does mean I can access the bits of Silverlight that can do things browsers can’t do (in my immediate case, play videos) by writing Python just like I’d write Javascript – no Visual Studio or other heavy tools required – it just fits into my existing workflow. Better yet, they’ve got some sample plugins for just this case that I’ve started to modify to suit my needs. It’s early days, but it looks like a great approach for such tasks.

Engineered Skin · Apr 4, 12:13 pm by Michael Dales
Although I’m sure you were expecting something intellectual about biotechnology, I’m afraid this post is about motorcycling. About a year ago, after much searching, and after spending too long being too hot/cold/wet in my first basic set of motorbike gear, I decided to splash out and get something better suited to doing long tours in a variety of conditions. After trying on lots of suits from different vendors, I opted for the Rev’it Cayenne Pro suit. Having ridden it for all seasons, I thought I’d finally write up my thoughts on it.
The headline result is, I’m very impressed. The suit comes in three layers: the outer layer, a waterproof layer under that, and an insulating layer under that. The inner two can be individually added and removed to suit the conditions, and after a little practice this can be done quite quickly. As a result, I’ve ridden in hot weather, cold weather, dry weather and wet weather, and the suit has been fine at all times. It’s got air vents on the front, sleeves and legs, which are sensibly designed so you can operate them quite easily with gloves on.
Actually, the whole thing shows lots of nice touches where they’ve thought about how it will be used. The zips for the inner layers are colour keyed, so you know what to zip where. The studs for snapping in the sleeve ends on the inner layers are not 180˚ apart, so you can avoid studding it up twisted round. Just little touches like this make it great to live with.
It comes with plenty of armour, thought the back armour is an optional extra (which I opted for) – Rev’it sell a lot of strap on back protectors, so I guess they’re hoping you pick those, but the unit for the jacket is well fitting, and as it heats up will mould to your body, but hardens on impact (so I’m told, I’m yet to fall off :). It’s also got seven external pockets, two of which are fully waterproof, and the others are water resistant. I’ve kept my phone and wallet in the waterproof pockets in rain and they’ve been fine.
A year on, other than being a bit less clean, it’s not showing any signs of wear and tear. I’m trying to think of some flaws, but none spring to mind. So, if you’re looking for an all year suit, then I can happily recommend trying the Cayenne Pro.

Ulysses and Remus · Apr 4, 12:05 pm by Michael Dales
Although I’m sure you were expecting something intellectual about ancient mythology, I’m afraid this post is about motorcycling. My Buell Ulysses is three years old now – indeed yesterday was the annual UKBEG event at Black Bear in Newmarket, and it was there three years ago I test drove the Ulysses for the first time, and the shortly after in my order.
The Ulysses is a fantastic bike, and I’ve had no regrets about my decision. However, nothing is perfect, and one of the common issues with Buell’s is that their underslung exhausts, whilst fantastic for lowering the bike’s centre of gravity to make it corner well, are not built for British winters – they rust like anything. After two replacements under warrantee, it was time to replace the third on my own penny. Rather than buy the same exhaust again, I decided it was time to get a third party replacement that might last more than 12 months before starting to mimic the surface of Mars:
Now, I’m clearly an atypical motorcyclist here, in that it seems the main aim of most third party exhausts is to make the bike sound louder, and I really don’t want that. I like the quiet sound of the Ulysses, and the fact that my neighbours don’t send death threats every time I start the bike up. But, Buell being somewhat of a niche market, there isn’t much choice, so in the end I went with the popular choice, a Remus exhaust and hoped that the option sound baffles would be enough to keep the noise down. It’s made of stainless steel, so hopefully will weather better than the Buell exhaust, which seemed to be made of iron embedded with salt crystals… One trip to the very nice people at Black Bear, and I’ve now got the new exhaust fitted.
The Remus is louder, but hopefully not too much so. Black Bear originally fitted it without baffles, and that was just embarrassingly loud. I drove it a mile and had to take it back and ask them to fit the baffles – I was scared to overtake horse trucks as I left Newmarket for fear of killing the equine occupants through fright! But baffles in, I’m much happier.
It sounds a little louder than the video implies, but it’s not too bad – and it normally doesn’t eject water like that, I’d just hosed it down :) We’ll see in twelve months if it’s doing better than the stock unit and was worth the small fortune it cost to get the new unit. It gets the pillion’s thumbs up, but I suspect that’s mostly because the packaging refers to it as a “sportauspuff” :)

Sly smile · Mar 29, 07:09 pm by Michael Dales

Increasing MPGPM² · Mar 28, 10:09 am by Michael Dales
Walking around Kensington yesterday I observed to a friend that it had rather a high MPG per area – lots of nice cars with low MPG figures – Porsches, Aston Martins, and so on. But it seems at least one person was bucking the trend:
The first Tesla I’ve seen in the UK. Looked quite nice on the inside, and on the outside very similar to a Lotus Elise, except where one would have expected to see an engine there were just huge cooling fans that look like the ones from the back of a PC. But other than that and the logo you’d have been hard pushed to tell the difference.
The major disappointment was that the owner was nowhere to be seen, so we could all queue for a run around the block in it :)
Update: Thomas kindly alerted me to my mistake of saying reducing when I meant increasing originally – doh! Thanks Thomas!
Comment [1]

Semper Fi at Live & Unsigned · Mar 28, 09:48 am by Michael Dales
Semper Fi, my brother’s band, were one of the winning acts at the regional heat of Live & Unsigned. They had to blend an original act and a cover song into one act, and here’s their performance of a Bill Wither’s track and one of their own:
Live and Unsigned – Ain’t No Sunshine / Duh Duh Duh…Duh! on MUZU
Tristan’s the one hitting things with sticks and stamping his feet at the back :) Well done to him and the rest of the band for a great performance, and good luck to them for the area finals next month!

A walk on the beach · Mar 20, 07:16 pm by Michael Dales

My Mifi & I · Mar 12, 08:52 pm by Michael Dales
Today and tomorrow I have been and will be attending WhereCampEU, a geo hacking unconference. We were warned in advance that the wifi might be iffy, so I used this as an excuse to finally get a Mifi, which I’d been pondering getting for a while:
The Mifi is essentially a 3G data only device that you connect to over wifi. So you can turn it on, put it back in your bag, connect your laptop to it over wifi, and it talks to the wider Internet over 3G. It’s like the USB dongles that people use for mobile Internet access, but as it uses wifi you can share that connection if you like, and it’s less fiddly than having something sticking out the side of your laptop all the time.
I’ve used it in anger today in London during the first day of WhereCampEU, and it’s been great. The LED based user interface is confusing until you realise that it’s just little tardy – if after pressing any of the buttons you imagine there’s an hourglass for two to five seconds, then it makes sense. After connection though it’s anything but tardy. Both the brief use in Cambridge, and today just of Euston Road in London, and I got nice fast broadband rates. An there’s not much in the way of configuration – just use the supplied cryptic wifi password and you’re online.
The Mifi comes on the Three network in the UK (not seen it on any other provider here yet). Three’s coverage isn’t as good as other networks, but when it does work it’s meant to be fast (up to 7 Mbps in some areas), and my limited experience seems to back that up. It’s fifty quid on pay as you go, so not as cheap as a USB dongle, but given the convenience, and that you can’t use a USB dongle with iPhones or iPads, I think it’s a better option.
Comment [1]

Uses for a superbike #213: simple magic tricks · Mar 11, 07:56 pm by Michael Dales
It’s a silly advert for the BMW 1000RR, but I must confess it made me go wow the first time I saw it:
See, motorbikes have lots of applications…

The great dried fruit conspiracy · Mar 3, 02:09 pm by Michael Dales
I’ve had a conspiracy revealed to me, and I’ll never see the world in the same way again. I’m really quite angry about it all, and I definitely think something should be done about it. What has caused this infuriation? This:
I’ve been eating these for years, a nice snack that hopefully is more healthy for me than a mars bar, and I’m quite keen on blueberries. And clearly, as you can read, this is a blueberry oat bar, and you can even see the blueberries in it.
But the blueberries are a lie.
Whilst listening to episode 15 of Shift-Run-Stop, I was alerted to the fact that some companies get cheaper fruits and flavour them as other fruits to save money. The scoundrels! Apples flavoured as pineapple apparently. Cranberries flavoured as strawberries. The very thought. At least my noble healthy Jordan’s Frusli would not stoop to such lows. But no…
This Frusli is 24% dried fruit, most of which (13% of the bar) is in fact “Blueberry Infused Diced Cranberries” – those cranberries are at it again! Next comes raisins (7%) and then finally at the end there is just a scant amount of actual blueberries (2%). The cheek! It clearly states “BLUEBERRY” on the front, not “BLUEBERRY FLAVOURED OTHER STUFF”. Why isn’t Parliament doing anything about this?
Well, many thanks to the crew at Shift-Run-Stop, who have ruined snack bars for me forever now – yes they may help take the edge off my hunger in the middle of the day still, but they’ll also bring a sad feeling of mistrust in the world in doing so.
Comment [2]
























