Exocet RS D2 first impressions

I took delivery of my new Exocet RS D2 sailboard a couple of weeks ago, but only got it out on the water last weekend. These are my early impressions.

First up, some caveats.

Firstly, although I’ve been windsurfing for 25 years, I’ve never sailed a raceboard class board before. I’ve done lots of racing, but all Division II and then Formula.

Secondly, I don’t (yet) have a raceboard sail, so I’ve been getting by with my Warp F2005 9.0. This is a high wind formula sail that is perfectly at home in 25 knots, and not remotely suitable for light or even moderate winds.

Thirdly, this is all just freeride, not racing, so I can’t really comment on the speed of the thing.

OK, down to business.

It’s big. It’s purple. It’s heavy. I didn’t weigh it, but with centreboard and footstraps it was comparable to any big board. Maybe 18 kilos? Suffice to say much heavier than any short board, even the formula “plank”.

My first run was in 15-20knots. The infamous Moreton Bay chop (think of a square wave with wavelength of about 10 feet and amplitude of 2-3 feet) was in full swing. Immediately after I sheeted in and cleared the breakwater the nose punched straight through two steep waves in quick succession. When they call this a wave piercing nose they aren’t kidding. It’d be wrong to say the board went through the waves effortlessly – but it didn’t slow down much, certainly not enough to throw me off balance. In contrast, two or three waves like that would be enough to virtually stop my formula board dead unless I was really set up for them and managed to float the board over them.

Upwind I found trim a bit tricky. It doesn’t roll over onto the rail effortlessly like a Div II. It has two distinct modes, fully railed or not. Sailed flat or slightly railed, the nose lifts almost back to the mast base. Once fully railed, virtually the entire leeward rail engages. All of a sudden you’ve got an extra four feet of waterline length with a curve in it which tends to want to track to windward. As you can imagine the trim is very different between the two modes. The centre of lateral resistance (CLR) can move several feet either way in a second or two, involving a lot of dancing up and down the windward rail to keep the steering neutral. In automotive terms, the board has oversteer – bear away, the board flattens, the nose lifts, the CLR moves back – and the board wants to bear away even faster. Round up, the board rails, the leeward rail engages, the CLR moves forward, and up she goes at twice the rate. Obviously the answer is to stay in one mode, but first time on the board in that chop – it wasn’t going to happen, so it came down to being prepared and anticipating.

After a bit of experimentation I set the mast base to about 6 or 7 (just forward of centre) upwind and fully aft downwind. Upwind, with the track further forward the board would bear away uncontrollably as soon as the nose lifted. Bear in mind, though, that this flat-as-a-board formula sail was not helping at all. It’s almost impossible to rig-steer with these sails even on a short board.

Downwind…what can I say. I’ve seen footage of aircraft carriers on Arctic convoy duty with white water coming over the flight deck. That’s what it was like. This board has no rocker to speak of. It does plane nose high, but in the short steep chop it just wasn’t enough. Combine that with my “sheet in to keep the nose down” formula reflexes, and you won’t be surprised to learn that I stuffed the nose in in the most spectacular fashion about…oh, at least twenty times. I ended up standing with my back foot on the centreline of the board right over the back fin bolt. Coming down a wave, I’d sheet out, transfer all my weight to the back foot, and lift on the strap with my front foot. Think of 14 foot skiffies trapezing off the transom. It seemed to work reasonably well as long as I angled across the waves sufficiently, and by my second lap of the bay I was catching the nose much less, and recovering when I did. Stomping hard on the fin at speed did induce a bit of tail walking, but hey, you can’t have everything. Running square I didn’t even attempt – just not an option. It’s early days, but I might try a smaller fin at some point to see if it makes any difference.

Having just read an article stating “longboards don’t spin out”, I did manage to spin out twice. The first time the board slid fully sideways, the rail caught, and in I went over the high side (as motorcyclists say). Thanks to the particular wind and tide conditions, the sail then kept going right under the board and up the other side. So I managed to barrel roll my RS D2 on its first outing. The second time was much less exciting and didn’t even involve swimming. Once I stopped trying to load the fin so much (formula reflexes again), beam and close reaching was very controllable and felt fast. That chine gives a surprising amount of grip.

My second outing was in 5-12 knots, badly underpowered on the 9.0. This time I took my GPS. Again trim was hard to judge with that sail, but the board was much easier in the flatter water. Upwind I was hooking along in the gusts at 8-9 knots board speed, and it railed nicely at that speed. In the lulls it’d drop back to 6-7 knots, but the wake separated cleanly at the stern at that speed (and in fact right down to about 4 knots boat speed). At the lower speeds the foil didn’t really generate enough lift to overcome the considerable lateral stability of the shape, so I’d stand on the centreline and try to rail it – with mixed success.

The board tacked *very* slowly – although again, a bit of grunt in the sail would help.

Interestingly the board hardly accelerated at all when bearing away. I think 8-10 knots board speed in that wind with that sail was pretty much top speed. Without the extra apparent wind gained from heading into the wind the sail was pretty lifeless, so stay tuned – the story might change when I get a more suitable sail. Still, quite a strange feeling after the cat-with-a-firecracker acceleration of the formula board (although if I was out on my formula board that day I would have spent 75% of my time slogging).

Downwind the board slipped along beautifully. Dead square was easy, much more stable than a Div II. 3/4 reaching was surprisingly difficult to keep steering straight in the small chop, especially in a board that turns so sluggishly tacking and gybing. The nose can tend to steer the board if it hits a wave at an angle with the board heeled, and the same shifting CLR effects I saw upwind in the heavier air came into play when surfing down a wave. Add to that the almost negligible rig steering, and it was quite a winding path I took. There was no question of using the harness lines with needing to retrim so much, but with the board sliding along so easily there wasn’t much rig pressure in the hands anyway.

Finally, some comparisons. The RS D2 isn’t really competing against Formula in the market, but it is competing for my riding time, so a few thoughts.

It’s a bit of a myth that Formula is a light wind format. Notwithstanding the ability of the pros to get around in vanishingly small amounts of breeze, Formula is at its best in around 15 knots of breeze. Below 10 knots for my skill and fitness level planing ranges from difficult to impossible. In this wind the formula board is exhausting work, with its big heavy rig and gigantic planing hump to pump past. Actually, the formula board is exhausting in any wind, but in light wind the effort/reward ratio gets a bit on the thin side. The RS D2 was a far more pleasant experience. I got to windward a lot quicker, and without the risk of a long slow slog home.

In the stronger breeze, there’s no doubt the Formula board is much quicker. No surprise there – around a race course a Formula board in the groove is about the fastest sailing craft there is, up there with foiler moths, 18 ft skiffs and America’s Cup class yachts. However, the RS D2 wins on several counts. Firstly, it’s a lot less aerobically tiring. I put in a solid two and a half hours on the RS D2 on the windy day, even with all the falls. The formula is such high intensity all the time that I get winded before I’ve really worked my muscles fully, and I rarely last more than an hour. Combine that with less time on the water due to the sheer unattractiveness of light wind formula, and there’s a fitness hump I’ve been struggling to get over. I’m not a gym kind of guy, so the RS D2 actually represents a (fun) way for me to build fitness which in turn will benefit my formula sailing.

Secondly, the RS D2 is a smoother ride. With high speeds and that huge flat surface, sailing formula in any serious chop is like being beaten on the soles of the feet, and is a serious workout for legs and knees – and at my age the knees aren’t always up for it. Thirdly, fewer gear decisions. Again, fitness plays a part. With pro pumping skills and gorilla-like strength, the top formula guys can make an 11.0 sail work from 5 to 25 knots. For me, that same sail works from 10 (ideally 12) to 18 knots, meaning every session starts with agonizing over the forecast. The RS D2 offers a simpler life. Insane wind? Take the flat 9.0 (or just jump on a wave board :) ). Anything else? Take the raceboard 9.5. Easy.

Finally, is this the new Div II? Not quite. The Div II was sheer elegance upwind, and actually very easy to sail on the breeze, and the RS D2 doesn’t really match that. In heavy wind, though, Div II’s suffer from not being able to keep the power on, whereas a heavy guy on a flat-bottomed board can just keep the hammer down. Div II’s were very quick off the breeze as well, even in planing conditions (another myth), but insanely unstable running square. There’s no doubt the RS D2 is easier off the breeze, even with its submarine tendencies. Right up to the point where I was running downwind on the light wind day I was sort of wishing the RS D2 was more Div II-like. A couple of wobbles in the chop, though, and it all came flooding back to me. That one point of sailing, in those specific conditions (moderate wind with chop), is so horrible on a Div II that if it came down to it I’d take the RS D2.

In conclusion – so far the RS D2 is looking just the ticket. If it turns out to be fast on the racecourse as well, that will be just an added bonus.

I have a Demon 9.5 raceboard sail on the way. I’ll post some more when that arrives.

Speaking at cfObjective(ANZ) 2011

I’ve had the honour of being accepted as a speaker at this year’s cfObjective(ANZ) conference in Melbourne. My topic will be “Why bother with OOP?”, which is a question that needs to be asked from time to time. By the way, in case you think I might be either a procedural Luddite or a functional zealot, I think we should bother with OOP – but we should know why we are doing it.

It’s a live issue for ColdFusion in a way that doesn’t apply to, say, Java, because in ColdFusion we have some very effective ways to write simple but powerful apps without writing any OO code at all. Object orientation, like most software design techniques, is a way to manage complexity. What if your platform has abstracted away so much of the complexity that there’s not much left to manage? That’s the situation some simple ColdFusion apps are in.

If you can’t make it to the conference, I’ll blog a bit more about the talk after the fact (i.e. once I’ve written it).

Media organizer blues

Both Windows Media Player and iTunes have some fundamental flaws that make them unsuitable for managing my music teacher wife’s music library.

A media organizer is in essence a pretty simple beast. There are some amazing bells and whistles out there, but basically a media organizer is just a way to manage file metadata (I consider playlist membership to be file metadata). Modern OS’s now will rip, burn and perform (some) device synchronization out of the box but still drop the ball when it comes to metadata management, despite having all the required support structures under the hood. If you’ve ever tried to manage playlists using nothing but Windows Explorer and shortcuts you’ll know what I mean.

Fortunately just about every media organizer does a great job of managing playlists. Where the big two fall down massively is in an area that really should be the absolute bedrock functionality, which is the way they interact with the file system.

Filesystem synchronization

Windows Media Player (WMP) as of Windows 7 still does not provide any sensible way to keep its library consistent with the file system. The state of the art is to delete your entire library and re-import it. There are a variety of 3rd party add-ons to do things like directory watching and orphan pruning. If you got the right set of those installed and working together (and trojan-free), you’d have a workable system.

iTunes does a decent job of keeping itself consistent with its own special area of the file system, but you’re on your own if you want to have any say over how your music is filed. You can update the iTunes library by re-importing your set of folders, but on Windows this has one fatal flaw. iTunes will convert any .wma files it finds to some more Mac-ish format (mp4 maybe? can’t remember). Not only does this take forever, but iTunes does not remember which files it has already converted, meaning if you import once a week for five weeks, you end up with five versions of every wma file you have.

So the notion that the media library should actually reflect the filesystem on which it is based seems to be beyond both Microsoft and Apple. It gets worse though.

Title tags

Both of these packages seem to assume that every piece of music you have has been bought in a store and arrives fully tagged with title, artist, album and genre. This isn’t always the case, especially for musicians. There is one piece of “metadata” that every file reliably must have – its filename. Unfortunately this is the one piece that both WMP and iTunes decline to notice. When burning a CD or synchronizing to a device, these packages will use the title field. If that’s missing, they simply number tracks sequentially, so the file “my great accompiment in C major.mp3″ becomes “track 17″ when it gets to the iPod. Worse than that, neither package provides a way to use the filename to fill in missing title fields.

A solution

No doubt this tale of woe is a well-trodden path and you’re all muttering “Just get [real media organizer brand X] and stop whining, for Pete’s sake”. Anyway, in our case brand X is J. River’s Media Center. Is this the best media organizer? I have no idea. After beating my head against WMP and iTunes I didn’t have the energy to do the full comparison. Is it free? Nope.

It does take a sensible attitude to keeping the library in sync (i.e. it works). It does still have the bad attitude about even a blank title tag being preferable to a full filename, but at least it provides tools to transfer filenames to titles in bulk. Incidentally, the bad attitude seems to be a new “feature”, as I’m pretty sure older versions used to happily use the filename. And it has a strange habit of importing MIDI files into the video section of the library, even though the .mid file extension has been configured as an audio type. Once again, the tools are there to bulk transfer them back into the audio section.

The real solution

This entire problem would just go away if we could do one simple thing – have a file in more than one directory, which is all a playlist really is. The file system structures are all there, only the UI is lacking. My next step (once the blood pressure has subsided a bit) is to investigate 3rd party file managers. I’ll keep you posted.

Javascript’s attire considered insufficient

Perhaps the emperor isn’t entirely starkers, but he isn’t dressed in much more than a grubby loincloth. Which is to say that I’ve often been bemused lately by the enthusiasm with which web developers have taken up the notion of coding entire applications in javascript. The word “notion” is important here – I don’t know if it’s actually being done to any significant degree, but lots of people seem to be reading a book or writing a toy app. Anyway, the fact that this seems to me to be a very odd thing to do I’ve just put down to my own ignorance and lack of insight, so I was somewhat heartened (and amused) to come across this interview with Gilad Bracha who had some choice comments on the subject.

In response to a question from Markus:

“…negative influences, languages you wouldn’t want to influence your [language] – I’m thinking about javascript in particular…”

Gilad replies:

“…javascript is a fairly poorly thought-out language, considering its influences were Scheme and Smalltalk it’s rather sad what came out…”
“…we are relatively lucky ’cause a lot worse [than javascript as the default in-browser language] could have happened, I mean javascript is a wonderful assembly language…people should not be programming the web directly in javascript, they should program in whatever they want and they should compile it down…”

More in this vein can be found on Gilad’s blog.

Interestingly, javascript as a compilation target is an essential part of the recent crop of cross-platform mobile development tools.

View/model coupling

How important is it to decouple view code from the model?

Jeffry Houser and I contradicted each other on this point recently. The fact that we were both right (IMHO) led me to re-examine the issue and write this post.

My point: If I have a view that’s drawing, say, this page, it’s dependent on a blog data model. The view has to know about comments, replies, tags – all that blog stuff. Therefore the view is coupled to the blog data model, at least in as far as it has to know about all the same concepts. So there’s a semantic coupling. There’s also the more practical considerations of field types and data lengths. You have to know stuff about the model to draw the view.

Therefore: why not just have the view invoke the model’s API directly? I contend this does not actually increase the coupling, which is already extensive. There are only two reasons not to take this approach. Firstly, you genuinely expect to use this same view with another model. So, for example, I could take this page from WordPress and use it on top of BlogCFC. (Does that ever happen? I’ve never heard of it.) Secondly, you have a 2-tier or n-tier architecture and remote invocation of model objects is problematic. This is a great argument for 1-tier architectures, but that’s a whole other discussion.

Jeffry’s point: reusable UI components are reusable precisely because they are decoupled from any model. Imagine if we needed a different text input control for each application!

Well, he’s right, isn’t he? Succinct, too. I could argue that there’s some fundamental difference between reusable components and full views, but the dividing line is so blurry that it becomes a circular argument – a full view is something that is dependant on a particular model, a component is something that is not dependent.

More fruitfully, let’s take a look at Smalltalk-80 MVC. I’d strongly encourage anyone who uses the term “MVC” to read this in full, but I’ll summarize the main points here:

  • the view invokes the model directly when it needs data
  • the controller fields user input and updates the model and/or the view accordingly
  • the model may broadcast change events, which the view can register to receive (observer pattern)
  • there may be a nested hierarchy of views (composite pattern); in this case there will be an exactly parallel nested hierarchy of controllers

(Lest you suspect that this only applies to weird dead programming languages, here’s a modern reference to the same concepts).

With this in mind, I’ll accomodate Jeffry’s argument by saying there’s also a nested hierarchy of models, one for each view. So for the area on this page that displays comments, I can just pass the comments list for this post. The comments list, along with related objects, is the model for that sub-view.

Let’s dive right down to the level of a text input component. This is a very simple sub-view, eminently reusable. Its sub-model is defined as a single object of type “string”. The text input is very tightly coupled to that model – it simply doesn’t make sense if you give it an array, for example. Fortunately, my overall model has lots of instances of that sub-model – i.e. it has fields of type “string”. Because the text input’s model is literally embedded in my overall model, I don’t even have to do any conversion. This might not be the case if, for instance, the text input wanted unicode strings and my model only had ASCII. But essentially, I get to reuse that component because I have already reused its related model.

So, to generalize:

  • Every view is tightly coupled to its model. This is necessary and desirable.
  • A generic view will need a generic model
  • Reusability of a generic view is dependent on the reusability of its related generic model.

In conclusion: if you’re busy copying model data into value objects to pass to a view, and you are not explicitly creating a reuseable component (and you don’t have remoting issues) – you’re wasting your time! Just pass the model object and be done with it.

Model-Glue

This is a response to Jeffry Houser’s critique of Model-Glue. You should read Jeffry’s post before this one, as I directly respond to some of his points. To cut to the chase – me too, Jeffry, me too!

I’ve used M-G for two medium size projects. Like Jeffry, I can’t see a case where I’d use it again.

I couldn’t agree more about the event/view structure – this is just a global scope by another name, which as a way of passing variables takes us back about 40 years in programming language evolution. Yes, there are intelligent ways to use it, but the fact is that a robust mechanism for defining APIs already exists in the language (public function parameter lists) and a really great argument needs to be mounted for disregarding it. So does the rest of M-G mount that argument?

It seems to me that the heart of M-G is the implicit invocation mechanism. Essentially this is an event-driven programming model, and like all event-driven programming it supports very strong decoupling. At the point where you raise an event, you have no control [but see Brian's comment below] over who will handle the event or what they will do with it. This is a powerful technique with applicability where system behaviour needs to remain loosely specified until load-time or even run-time (this is why you can change the menu structure in Microsoft Word while it is running). The tradeoff is increased opacity, increased debugging difficulty, and greater emphasis on good design – or to put it conversely, it’s much easier to make a mess of it.

As a programming model, it absolutely is not what I want when I’m setting up an average web app. 99% of the time I know exactly what controller function I want to invoke, I know exactly what data I need, and stating that with clarity is good design. Adding several layers of indirection adds no value at all – rather it greatly increases the risk of regression during future changes. As mentioned above, M-G tends to obscure the APIs of the various components rather than help define them. This is not to say everything should be hardwired. My beef with M-G is that it pervades the whole application, unlike techniques such as dependency injection and aspect-oriented programming, which let me introduce extra abstraction and complexity only where I get the payoff.

As a piece of software, M-G is a great achievement. It’s just the wrong tool for pretty much every job I have. The tragic thing is that, even if I did have to write a complex event-driven GUI, I’m pretty sure I wouldn’t be using ColdFusion to do it.

P.S.
A minor disagreement – I don’t think there’s anything wrong with the view having a dependency on the model. In fact it’s kind of absurd to think that a view can avoid having a dependency on the data it is representing. The important thing is that the model doesn’t have a dependency on the view. (Trygve Reenskaug’s original MVC pattern is instructive in this regard, although it’s not directly applicable to the web). So having to pipe all data via the controller is another layer of useless indirection. Having said that, there’s a fair bit of confusion about where the boundaries between the controller and the view are, so maybe this is just an issue of definition.

Windows update firewall issue

Just putting this out there in case someone else is stuck. The symptom is that Windows Update just stops working. You may not find out about this until your PC complains that it hasn’t been updated for x weeks. In fact, depending on your version of Windows, you may not know unless you actually check the date of the last update.

I get a variety of error codes, all of which boil down to some networking problem (check DNS, etc.) and none of which are actually helpful. The real problem is that the windows firewall is blocking traffic from my router to my PC. For reasons that are beyond my discovery, windows update (and microsoft update) generates traffic from my router to my PC. The source of the traffic actually is the router, not just outside traffic passed through.

So, the fix is:

  • Prepare your geek resources. If you’re not comfortable poking around in firewall rules, go out to the forest and capture a geek.
  • Find out the IP address of your router. Often this is printed on the bottom of an ADSL router and will be something like 192.168.1.1
  • Enable logging of dropped packets in your firewall. I’m not going to tell you how to do this as there are too many variations, so you’ll have to look it up. Just a tip, though – if you’re using Windows built-in firewall, make sure you enable logging for the active profile (usually the private profile).
  • Kick off an update
  • Look in the logs for dropped packets with the router’s address as the source address. Make a note of the port and protocol (e.g. UDP port 2048).
  • Add a rule to the firewall (again, use the active profile) to allow that traffic.

The final twist is that the port may change when the router is rebooted. So unless you want to just allow all traffic from the router, you need to keep an eye on this. For a long time I only saw ports 2048 and 2049, but just lately it’s flipped over to 2051.

Not an especially straightforward fix for something as fundamental as windows update. It’s a disturbing thought that for a user without reasonable tech skills, this problem basically just disables updates, invisibly and permanently. I have found absolutely no mention of this anywhere on the net. Maybe nobody else has this problem – but I’ve seen it with two different routers, four different PCs and three different Windows versions.

I’d be intrigued to know if anyone has any insight into the cause. I can only guess there’s some sort of link monitoring, QoS heartbeat or some such going on. I have found port 2048 mentioned in a list of well-known ports as “dls-monitor”, but no luck finding out what that means.

Online/offline data sync with Adobe AIR

This is a bit of a progress report. Bit light on actual wisdom, sorry – check back later for that.

I’ve been playing with Adobe AIR as a way to develop cross-platform intermittently online applications. I’ve already got a fully fledged Java domain model using Spring and Hibernate, so for the server side Spring’s BlazeDS integration is a real godsend – and it really is as easy to set up as it looks in the Adobe evangelist’s easy as falling off a log video. Flash Builder is pretty neat too, so all is good.

Local data storage is no drama, so one box left to tick – syncing offline data when we get back online.

There are some products that help with this:
Adobe’s LiveCycle Data Services – a vast, enterprise-grade JEE app. Not ruling it out, but hey, I just want to sync a couple of records – this is going to be a very lightweight app.
WebORB – OK, I’m a Tomcat noob, but I failed to get this running in two of three possible installation modes. The one that did work, the prepackaged install, doesn’t even let you change the server port. Guess what – 8080 is already taken (who would have thought?). I don’t want to diss WebORB, but between my install problems and the fact that I really don’t need or want another server, I’m moving on for now.
Farata’s Clear Toolkit. Does anyone else find Sourceforge to be a complete PITA? Every second download fails. In this case *every* download failed. Life is too short to spend it looking at a page full of blinking ads.

OK, so I’ve parked the off-the-shelf idea until I’ve built up a bit more desperation. So how hard can it be to code this up from scratch? The server side is taken care of, all I need is the client-side code.

With SQLite on the client side, the term “database replication” springs to mind. On reflection, though, what I have on the client side is really just a cache, not a database in the business sense of the word. A write-though fault-tolerant cache with pluggable fetch and store strategies would fit the bill nicely. There must be a ton of those already out there, right?

Wrong. Not for AS3, anyway. Please ping me if you know of one.

So that leaves me with two options:

  1. Futz around with native process calls and try to package something like ehCache with my app. Is ehCache really going to work on a phone? I’m nervous.
  2. Write an AS3 cache myself. Now, I have the deepest respect for anyone who has written a bug-free caching system – that’s a very select bunch of people. So I’m still nervous.

Of course the third option is that my Google chops are rubbish and some kind reader will post one of those humiliating “if you looked for 0.7 seconds you would have found this” comments. Here’s hoping.

Slides and code from cf.objective(ANZ) 2010

Slides are here for download. Associated code samples are here.

Speaking at cf.objective (ANZ)

I’m delighted to have been accepted to speak at cf.objective (ANZ) again. The topic will be that timeless old favourite, design patterns. Timeless? Well, since about turns around to check jacket of GoF book 1994, anyway. Not entirely coincidentally, the centre where I work has got into design patterns in the education space, so I’ll be able to draw on that to show just how widely relevant the design pattern approach is.
Excited! Come and heckle if you’re in Melbourne Nov 18 and 19.