2nd production WPF application ever…

About 5 or 6 people have now pointed out to me that Tim Sneath has featured the Regatta Manager as his #7 Great WPF application.  I am truly flattered by his kind words, but more importantly am honored to have had the opportunity to work with him and the others involved in publicizing the Skandia Cowes Week software.

I think however I was most shocked by the fact that the Regatta Manager was only the 2nd application to go into a production environment that made use of WPF.  Whilst surprising I suppose it is understandable; I was in the fortunate position to be in control of the entire develop process, had a fixed deadline of the end of July and made the call that the advantages of using WPF more than outweighed any issues that might arise from using beta software.  Making that call resulted in a fantastic piece of software, as Tim says, that we could really is a testament to the quality of WPF.

Microsoft Case Study

Microsoft have published the case study that they produced for the Skandia Cowes Week Regatta Manager Suite.

Since the Vista Launch is now over, I promise I’ll limit the self-congratulation for a few weeks, but only after dropping the text on my blog for posterity…

 

Skandia Cowes Week Regatta

Regatta Sets Optimal Courses for 1,000 Boats With Pioneering Use of Visual Technology

Skandia Cowes Week Regatta—one of the largest competitions of its type in the world—set its sailing courses using pins and string on a wall-mounted chart of the waters, as it had for most of its 180 years. But that method limited course setters’ ability to create the most accurate and enjoyable courses for participants. So, the regatta’s organizer became one of the first organizations anywhere to use a software solution created with Windows® Presentation Foundation, which helps developers build highly visual solutions quickly and effectively. With Presentation Foundation, software partner SiSoft created the solution’s rendering engine in days rather than the months that it took to create an earlier course-setting solution. The code base was cut by 36 percent while the solution became more useful and powerful, and participants are delighted by the courses that organizers can now create.

Situation

It’s one of the largest and longest-running international sailing regattas in the world. Held every year since 1826—with time off for two world wars—it’s been visited by royalty and world-famous personalities. It attracts more than 1,000 boats, 8,500 participants, and 10,000 spectators per day during its eight-day run.

“It” is the Skandia Cowes Week Regatta, held annually in the Solent channel off Cowes, the home of the Royal Yacht Squadron on the Isle of Wight in the United Kingdom.

What keeps participants returning year after year, according to Stuart Quarrie, Director of Cowes Combined Clubs, the event’s organizer, is the excitement of the “interesting and challenging sailing” for competitors, including more than 30 courses set in one of the busiest commercial stretches of water in the world.

Keeping Courses Challenging

As the regatta has grown, keeping those courses interesting and challenging—as well as safe—has been an increasing challenge for the event’s 14 course setters. Courses can’t have too many boats approaching the same locations at the same time. Managing the boats’ finishes—1,000 boats will arrive at two finish lines within a one-hour period—is another. Understanding the affect of tides and weather on the courses complicates matters further.

Making the courses interesting and challenging means ensuring that they aren’t too long for the smaller boats or too short for the larger boats. They must have legs of varying lengths and a mix of wind angles, so that participants sometimes must zigzag into the wind and sometimes can let the crosswind carry them along stretches that are just “fast and fun,” according to Quarrie. Ensuring that boats can complete the courses within the allotted times, rather than being stymied by unexpectedly light winds, is another concern.

By the late 1990s, the increasing numbers of participants, boats, courses, and classes at Skandia Cowes Week were making those challenges more difficult for the event’s course setters to meet. In 1997, several races had no finishes because of problems with the courses—and the following year, participation in some of the affected classes dropped by 33 percent. That’s when Quarrie was hired as director.

Using Pins and Strings

What he found was a method of course setting little changed from the regatta’s founding in 1826. The course setters—some of whom had been working in that capacity for 20 years—defined courses for the boats by setting pins and string on a paper chart of the waters. When a course didn’t look right, they unwound the string, pulled the pins, and tried again.

“The problem was that you could envisage only four or five bits of string on the board before it became totally unintelligible,” says Quarrie. “And you couldn’t then take off the first courses because they were under other layers of string. We were getting course lengths wrong because we couldn’t take tides properly into account, and we had lots of boats ending up at the same mark at the same time.

“What we were trying to do was too complicated for the human mind to grasp because of all the permutations involved—but it would have been simple for a computer,” says Quarrie.

Solution

Quarrie didn’t have far to go to find a computer-based solution for Skandia Cowes Week Regatta. He turned to his son-in-law, Simon Middlemiss, founder of software company SiSoft.

Middlemiss’s computerized course-setting solution replaces pins, string, and paper charts with an image of the course territory displayed on a pair of high-resolution 30-inch LCD wide-screen monitors—one for small-boat courses and the other for large-boat courses. The course setters design and manage their courses as part of a single, fluid process. By letting the mouse pointer rest on a buoy or mark icon, the course setters can see displays of the classes that are already scheduled to reach that point, when they’re scheduled to do so, and what the tide, wind, and other weather conditions are at that point. Clicking the buoy or mark selects it as part of the course that the setter is creating.

Course setters can choose to view any single course, an overlay of some of the courses, or all courses at once. In response to changing weather conditions or anticipated congestion of boats at a particular point, setters can change a course by dragging and dropping to a different buoy or mark. The user interface keeps each new course separated from the existing courses until the course setter chooses to accept the course and make it part of the race.

That feature allows course setters to experiment with new courses without changing variables for confirmed courses. It also allows course setters to consider 10 or more potential courses at a time before deciding on the one to adopt, without complicating the view of the confirmed courses. Once a course setter accepts a new course, he or she can replicate the course to other classes or days with a few mouse clicks.

Pioneering Use of Visual Technologies

Middlemiss created version 1.0 of the course-setting solution using Managed DirectX® extensions, which required him to code user interaction and data binding manually. This process took months. Then he and Quarrie agreed on the need for a new interface, one that would isolate new courses until they were confirmed by the course setter. Middlemiss needed a faster way to create the new solution.

Middlemiss then created one of the first solutions to go into production based on Windows® Presentation Foundation in Microsoft® .NET Framework version 3.0, an integral component of the Windows operating system that provides a programming model and runtime for Web services, Web applications, and smart client applications. Presentation Foundation is a new presentation subsystem that takes full advantage of modern graphics hardware and an extensible set of managed software classes to facilitate the development of highly visual applications—exactly what Quarrie and Middlemiss were seeking.

Windows Presentation Foundation was an essential ingredient in the solution, according to Middlemiss, given the need for a highly visual solution to make it easy for users with limited computer experience to manage the process of creating new courses. To work with Presentation Foundation, Middlemiss used the Windows Vista™ operating system and the Microsoft Visual Studio® 2005 development system, together with Microsoft Expression® Blend design software and Extensible Application Markup Language (XAML), which enable developers to use an XML-based model to declaratively specify user interface behavior, rather than having to code that behavior into the interface.

Replacing Paper Charts with Rich Graphics

In the solution’s presentation layer, what was once the old paper chart of the manual solution now is re-created as a collection of vector shapes rendered on NVIDIA GeForce 7800 GTX–based hardware for rich, responsive graphics at very high resolution.

The application layer includes a core set of libraries that handles the complex algorithms for calculating estimated times of arrival, positions, and conflicts. Middlemiss designed this core so it can run locally or through Web services—enabling the solution to be easily extended and scaled out. The application layer also includes a reporting engine, a system for transmitting courses to boats by short message service, and a system for transmitting course and estimated time of arrival data to the results center.

In the database layer, the Microsoft SQL Server™ 2005 database makes use of Common Language Runtime integration by deploying managed assemblies that process weather-forecast data.

The production environment consists of six computers:

Two workstations running the course-setter application

A laptop running the weather forecasting application

Three laptops for managing reports, communication with radio operators tracking boats during course runs, and an administrative console to the database

The production environment was mirrored in a test environment used to confirm the solution’s performance, and the entire solution was deployed using the ClickOnce deployment technology in the .NET Framework.

Benefits

The course-setting solution enabled Skandia Cowes Week Regatta organizers to meet their goal of creating more exciting and fun courses to boost participant satisfaction, and it also was created in a fraction of the time—and the size—of the previous, less powerful solution.

Cut Development Time from Months to Days

After developing version 1.0, Middlemiss needed a faster way to build its successor. He got it with the new technologies in Microsoft .NET Framework 3.0 and Windows Presentation Foundation, along with the XAML-based tool Expression Blend. Using these technologies, Middlemiss created the rendering engine—which had taken three months to develop the year before—in a weekend.

“I was amazed to see how much faster I could work with Windows Presentation Foundation to create a visually stunning application,” says Middlemiss. “Using XAML and Expression Blend, I put together an application that did what I wanted very quickly. I could take advantage of data binding, of new objects in.NET Framework 3.0.”

Middlemiss calls the data binding model in Windows Presentation Foundation the best capability of the new development environment. “There’s no business logic whatsoever in the user interface and no massaging of data in code either—it’s all done declaratively,” he says. “I could just assign a data source to a control and design the layout, without having to manage all the plumbing between the two.”

Separating the user interface and business logic meant that Middlemiss could concentrate on optimizing the business logic and then on optimizing the design, without having changes to one affect the other. For larger development teams, he notes, developers and designers can work simultaneously, without impinging on each others’ work.

Reduced Code Size 36 Percent While Boosting Performance

The same rapid application development capabilities in the new development technologies helped Middlemiss cut the code base for the solution by 36 percent—from 110,000 lines to 70,000 lines—while achieving a solution with a richer and more effective interface, more features, and greater performance.

“Basically, with Windows Presentation Foundation, Windows Vista, and Expression Blend, I got the rapid application development of Windows Forms combined with the application performance of DirectX,” says Middlemiss. “I would tell other developers that Windows Presentation Foundation and .NET Framework 3.0 can seriously reduce the amount of code that they have to manage on their user interfaces. And less code means the application is easier to manage.”

Using Windows Presentation Foundation reduced the line count for the CourseSetter portion of the solution by 50 percent.

Increases Participant Satisfaction

The goal of the course-setting solution is to create better courses that give participants the fun and excitement for which they come to Skandia Cowes Week Regatta. After running the 2006 regatta using the software, Quarrie says that’s what the solution delivers.

“What the course setters get from the technology is not an automated answer to where they should send people but feedback on how long a leg will take, what the wing angles will be, and what the interaction is with all the other classes, so that they can make the intelligent decisions,” says Quarrie.

“The result is better courses more quickly, because the course setters can check the feasibility of their design as they create it, rather than having to complete a design and then check it,” Quarrie adds. “They can take more variables into account than they otherwise could, and even can change a course that’s in progress to adjust for changes in wind or weather so we don’t leave boats stranded.”

The ability of the solution to predict the time that it would take to complete courses was so high that at least two predictions differed from actual measures by fewer than five seconds. “Over two hours and 20 miles, that isn’t bad,” says Middlemiss.

“This past year, the courses gave our 8,500 participants and tens of thousands of spectators what they wanted from the regatta,” says Quarrie. “The proof is in happy competitors—and we had many more happy competitors.”

Enables Easy Extensibility

While the course-setting solution was a great success in its debut at Skandia Cowes Week Regatta, Quarrie and Middlemiss already have their sights set on enhancements. The use of the .NET Framework and service-oriented architecture will make it easy for them to create new components and functionality, or to add best-of-breed components from third parties.

For example, because the solution is already able to track participants as well as set courses, Quarrie and Middlemiss envision using Global Positioning System (GPS) technology to boost the accuracy of that capability. A trial with 20 boats tracked through GPS devices was a success in 2006. The two men also envision presenting real-time tracking of races to spectators. The highly visual user interface could be projected on large screens for spectators at the regatta and presented live on the Internet for those who want to follow the regatta from anywhere in the world.

Vista Track – Session 1 : Presentation Advances in the .NET Framework Version 3.0

The first session started with the video of the Regatta Manager from Skandia Cowes Week 2006 that I can’t stop talking about! Whilst not the final version, it was still very cool to see it on the big screen.

The actual session was an excellently presented introduction to WPF by Mark Johnston. He went over most of the basics in a demo that many will have seen before, but nonetheless covered everything you need to see to be impressed by the technology which I think is the major motivation for this event.

The session ended by Rich Griffin from Conchango talking about the work he’s been doing with the Telegraph and Daily Mail.

 

Keynote

First off, a screenshot (an old one I admit and not the one on the left)  of my app was shown in Sanjay Parthasarathy‘s keynote so I’m seriously impressived!

The keynote was the usual inspirational stuff of a Microsoft VP who’s passionate about developers and the new technologies in Vista, .NET 3.0 & Office 2007, but more than that it was an affirmation of what we’ve all been doing for the past 2 years or more. Sanjay referred to it as ‘Generation User’.

Launch Day!

Today is launch day! Well the uk developer launch anyway. It’s the culmination of a lot of work by a lot of people, both at Microsoft and in the community, something that’s been fantastic to be involved in even in such a small capacity.

Unsurprisingly I’ve been concentrating on my stuff, so it’s going to be good to see and hear from other’s.

Over the last couple of weeks I’ve been working with a technical writer on the case study for the Regatta Manager which *should* be being published today.

Will add more as the day progresses.

Skandia Cowes Week – Regatta Manager Videos

As I’ve mentioned before, Microsoft sent a film crew along to Skandia Cowes Week to see the Regatta Manager in action and below are the results. There is a technical and business version of the video.  Thanks again to Tim, Heather, Barbara and Ian at Microsoft who made this happen, and to Bubble Solutions for putting together this great film.  I’ll stop now as this is starting to sound like an Oscar acceptance speech… 

MSN Soapbox

SiSoft Regatta Manager - Business Edition
SiSoft Regatta Manager – Business Edition

SiSoft Regatta Manager - Technical Edition
SiSoft Regatta Manager – Technical Edition

You Tube

SiSoft Regatta Manager - Business Edition
SiSoft Regatta Manager – Business Edition

SiSoft Regatta Manager - Technical Edition
SiSoft Regatta Manager – Technical Edition

Skandia Cowes Week, Microsoft, WPF, Windows Presentation Foundation, SiSoft, Regatta Manager, Simon Middlemiss

Polar diagram generation tool

This is a repost

Update : I haven’t got around to separating the Polar Diagram tool from my main application (which is huge) so anyone who wants me to generate a polar for them please get in touch at simon dot middlemiss at microsoft dot com.

Update : I’ve removed the tool because it didn’t work with the release build of WPF.  I’ll update it if anyone is interested in it. Leave a comment…

Since I’ve had a lot of hits to my blog from Google searching for things along the lines of “J/109 polar diagram” and “X-332 polar diagram” I’ve repurposed a bit of the Regatta Manager to produce a polar diagrams for all the major one design classes with the option to generate one from an IRC rating.

It produces polar diagrams for the following classes:

Laser SB3
Etchells
1720
RSK6
Daring

Dragon
Sonar
707
Flying 15
RS Elite

Redwing
Solent Sunbeam
Squib
Swallow
Mermaid

Victory
XOD
J-109
X-332
Sigma 38

Sigma 33
Sunsail 37
Contessa 32

Shout if anyone wants any more defaults added, I’ll post a link over the weekend.