This blog is going to have surfing, snowboarding, tech stuff and maybe some 'meaning of life' stuff if I'm feeling particularly stoked.

Tuesday, November 30, 2004

Dawn Patrol

Dawn patrolling this morning. Up at 6:30 and on the road for 6:45.

Hit the 'Port just before 8 (still dark) and both beaches had clean, offshore waves.

East Strand would have been perfect for my 9'2 but I had packed a 7'6 mini-mal for convenience so I reckoned it would be better suited to West.

Black Rocks had heavy 4-5 ft sets as I got changed but I decided the 2-3 ft Castle Erin break looked a better bet given there was no one else about and I was still half sleeping.

The strong offshore was holding the waves up a little too much, they were almost making it to the beach before breaking, then they had nowhere to go. I got hammered on the first couple of sets, partly because I've been riding a longboard for the last couple of weeks and partly due to the steeply jacking faces.

Since the waves were closing out on the beach there was no ride to speak of, the thrill was about making the steep drop and then trying to get back over the wave before it charged you into the sand.

After a while a longboarder joined me and said he had left his car about 10 to 9 so I had another 15 minutes or so. I probably only caught one wave between that and my final ride in.

Trying to explain to anyone why you would get up at six thirty am to drive one hour for one hours surfing followed by a one hour drive home and then go to work is fairly pointless unless that person surfs. If that person is a surfer, well you don't need to explain, because they know that nothing beats the feeling of the dawn patrol.


Sunday, November 28, 2004


The other day someone asked me about the new CLR feature of Generics and I felt that my answer wasn’t exactly crystal clear. I believe this was because I was so accustomed to using templates in C++ whereas the enquirer had no background in C++ at all.

Perhaps if I blog on the subject I will be better prepared the next time I am asked.

Most of the information I have seen so far on Generics talks about writing generic types and generic methods when in fact the vast majority of people will use generic classes rather than actually author them. For example, with C++ templates, I used them all the time in STL and more abstractly in ATL yet I don’t think I have ever written a template class in production code.

Therefore I am going to focus only on the new generic BCL classes which ship with 2.0 and use these to illustrate the features & benefits of generics. I am deliberately not touching on the subject of performance since this is a post in itself (which I will hopefully do) and requires a much deeper understanding of generics and the CLR.

At a most basic level, generic classes will provide developers with the option of using strongly-typed collection classes without having to rewrite the standard collection functionality (Add(), Remove(), GetValue(), etc) each time.

On my current project we tend to use the existing BCL collection classes like Hashtable, ArrayList, etc and therefore we live with the runtime type checking that is necessary because these classes treat everything as the base type Object. A benefit of these "any type" collections is that there was no need to reimplement the common collection methods (Add, Remove, etc) for specialised types (e.g. our Account class). One of the drawbacks of this approach was that less experienced developers were often unsure about which type should go in which collection and this inevitably resulted in runtime Invalid Cast exceptions.

private HashTable custHT = new Hashtable(30);

custHT.Add(idxCustName, "CustomerName"); // would compile
custHT.Add(idxCustName, 32); // would also compile

A sub-system which had a different design team (still in-house) decided to go with strongly typed collection classes derived from BCL collection base classes (i.e. System.Collections.CollectionBase) . The benefit of this was that types (e.g. the Role class) were all known at compile time and any mismatch would not be tolerated by the compiler. A drawback was the amount of repeated code along with a fair number of essentially “incomplete” collections where methods were not implemented if they were not immediately required.

private IRoleCollection roleCollection = new RoleCollection();

// Use IRoleCollection method AddRole(Int32 roleId, IRole roleToAdd)

roleCollection.AddRole(1, aRole); // would compile
roleCollection.AddRole(1, 32); // would not compile

Generics will bridge the gap between these two approaches by providing classes such as Dictionary which can be strongly typed at compile time yet still provide all the functionality of the "any type" class Hashtable.

using System.Collections.Generic;

private Dictionary genDic = new Dictionary(30);

genDic.Add(idxCustName, “CustomerName”); // would compile
genDic.Add(idxCustName, 32); // would not compile

To summarise, CLR generics, at their most basic level, provide type safety and encourage code reuse.

In later posts I will attempt to cover design & development of generic types and methods, dig into the internals of generics and look at how generics could improve performance.


Saturday, November 27, 2004

Mad Dog McClure

Headed up the coast today with "Mad Dog" McClure.

Weather was pretty bleak and just as we got down to the Whiterocks car park surfers were starting to leave the water. All had the same story; that the wind had suddenly done a u-turn and transformed a clean small wave to mushy ankle-snappers. It was pretty much confirmed as unsurfable when even John McCurry didn't seem to be able to catch anything.

We checked out Portballintrae but it was very full and totally exposed to the onshore wind, which seemed to be stronger than at Whiterocks.

Surfers were still bailing as we suited up at Whiterocks but the size did seem to be picking up even if the wind was too.

Despite all of the above I had a great session, the water felt colder than last week but that only made it more refreshing. It was especially invigorating for Mad Dog since his gloves were back in Belfast, in the boot of my car!

It was almost dark by the time we came in and I think the only people left in the water were a couple of spongers.

Anyway, apart from the surf, what made the trip worthwhile was listening to the yarns from McClure. Some great memories from his "Mad Dog" days. That moniker gets conferred all too easily around these parts but this man is truly deserving of the handle.We talked a bit about blogging so I said he should blog those memoirs, they'd be worth reading!

Looks like it's going to stay onshore for tomorrow but the chart looks intense for early next week. More on that tomorrow.


Friday, November 26, 2004

The Devlins

Surf still lousy.

Maybe a sacrifice is in order.

My cousins' band The Devlins are playing tonight at The Kings Head, Lisburn Road.


Thursday, November 25, 2004

Surf Report

Portrush: Pond-like.

ok so I haven't got the prediction skills honed just yet!


Wednesday, November 24, 2004

Still no waves

Just a quick update:

Still perfect weather & wind conditions on the North Coast but no waves!

I'll stick my neck out and predict a small swell to hit tomorrow but not last very long.



Despite the title this is a techie post not a "meaning of life" post.

Brad Abrams has produced an excellent draft paper on the use of the Obsolete attribute in V2.0 of the .NET Framework.

It’s great to see that Microsoft are not allowing the constraint of backwards compatibility to stifle innovation in the CLR.

I believe the Obsolete attribute provides an opportunity for all .NET developers to improve and evolve their codebase without incurring the wrath of project managers who do not always see the benefit of design change “wish lists”. There is a strong band of “if it ain’t broke don’t fix it” advocates out there who generally don’t like to build development resource into a project plan unless it directly satisfies a customer requirement. This approach can be frustrating for architects who end up with a growing list of design changes which become increasingly difficult to introduce as incumbent APIs continue to be used in successive releases.

I had flirted with the Obsolete attribute earlier this year but since it generated a compiler error we ended up with a “big bang” exactly like the case we were trying to avoid, where the deprecated method was actually removed from the codebase.

By suppressing the warning, as Brad describes, and moving the onus of alerting to FXCop, the implementation of design improvements can be decoupled from their introduction to the main code base.

Of course there is still the possibility for developers/managers to live with the FXCop warnings or even suppress them but I have found that a change which is tested and ready to be used is much more likely to be adopted than one which is floundering on a “wouldn’t it be great if” list.

[Note: the FXCop rule, ConsiderNotUsingObsoleteFunctionality, mentioned in Brads whitepaper is not yet available in any public release of FXCop]


P.S. If I was asked to recommend just one blog to any .NET developer it would be Brad Abrams

Tuesday, November 23, 2004

Dolphins Got Soul

This piece from Australia prompted some discussion on the intelligence of dolphins and I took some stick in work for suggesting that dolphins were not only smart, but more importantly, they had soul.

A quick search of the web revealed that this notion of soul is very much connected to dolphins and in particular the "shark vs dolphin" metaphor is used to describe two distinct personality types.

Not only is this metaphor common but it has often been applied to corporations (Sharks to Dolphins : The Search for the Corporate Soul) and indeed corporate politics. In their book, Swim With The Dolphins, Connie Glaser & Barbara Steinberg Smalley talk about sharks as:

[They] are stern taskmasters who relish power. Their approach is strictly top-down, leaving no doubt whatsoever about who’s in charge. They bark orders to their subordinates, expecting obedience and loyalty in return.... In fact, because sharks think with their heads, and not with their hearts, they are oblivious to employees’ needs and desires.

Whereas they characterise Dolphins as:

Supremely gifted motivators. Excellent communicators. Acutely intelligent. Warm-blooded and friendly.... In contrast to sharks, dolphins prefer operating in webs rather than in hierarchies. They seek respect (rather than obedience) from subordinates and recognize that loyalty cannot be commanded; it must be earned.... Dolphins are extremely intuitive and constantly tuned in to employees’ needs and desires.

I reckon I see sharks and dolphins every day in my line of work and I know which ones I'd rather go swimming with!

BTW Dolphins Surf.


[Update] There are no waves on the North Coast today, hence this "meaning of life" post.

Monday, November 22, 2004

WestBay Surf Cam

Richard, the North Coast's premier shaper (WestBay Surfboards) has updated his web site so maybe that's why there was no picture this morning.

Waves looked small on Troggs East Strand Cam.

Hopefully some techie posts coming around new ideas about C++ development (e.g. prefast static analysis tool, etc). I haven't written any serious C++ code since VS 6.0 and I'd like to get back into it (even though C# is definitely my language of choice now).


Sunday, November 21, 2004

Chart Reading

Doesn't look like the anticipated swell will hit us after all. You can see from the BBC Pressure Chart that the high pressure (that's what's making it a lot warmer today) has pushed up between the two lows (that were previously looking good for hitting us today) and forced them off to the side of us.

Basically a low pressure system to the north of Ireland means bad weather out in the North Atlantic which will generate ocean storms and the effects of those storms are big waves which ripple towards us just like when a stone hits the surface of a pond. Swell comes off at similar angles to the orientation of the isobar lines on a pressure map and can travel 300 - 400 km in a day.

So no swell up on the North Coast today even though wind conditions are perfect; moderate SW means offshore on the north coast beaches.


Saturday, November 20, 2004

Microsoft Don't Surf!

If they did, they wouldn't have slyly removed the ability for XP Pro users to add more than one web site to their IIS 5.1 configurations! This Microsoft tactic reeks of greed and mean-spiritedness, two qualities which I hope would never be attributed to any fellow surfer.

I definitely did not intend my first techie post to be an anti-Microsoft diatribe so I will keep this one short and as sweet as possible.

While I realise Microsoft is not a charity it seems this un-feature goes very much against their doctrine of being developer-focused. I want to "develop" my sites on XP Pro but I want to "run" them on W2xx Server and am happy to pay for that production environment.

Anyway this post was going to be about how an ISAPI filter like multisite could get round the problem and maybe even give some background on ISAPI filters but since I couldn't actually get this thing to work with our ASP.NET web sites I'll leave it a pure rant for now. BTW multisite works great if you have simple html pages and a simple site structure. It won't work for ASP.NET but if you're really desperate Steven Cohn has another workaround using admin scripts but that one also has limitations which mean it doesn't suit my needs.

I'm getting used to this blogging, I could write all night but I have to go.


PS If you don't recognise the film quote I've borrowed for the title of this post check out Apocalypse Now, the famous surf scene is one of my favourite movie moments.

Surf Report 20 Nov 2004

Portrush: 2-3ft, light offshore

Surfed at Blackrocks (West Strand) today, the waves were small but super clean and it was a beautiful clear cold day. Water temperature felt like around 9-C but air temperature was more like 3-C. There was snow on the mountains driving up!

Lots of surfers in the water but still got my fair share of waves, thanks to packing the long board.

Still waiting for this long distance swell to reach us, let's hope it arrives overnight.


Friday, November 19, 2004

Surf Report

Portrush: 2-3ft Strong Onshore.

Forecast: Looking good for the weekend, wind to turn off-shore and swell out there.

Hopefully I will post something a bit more thought-provoking than a surf report but for now that's something to keep me posting daily.


Thursday, November 18, 2004

Hello Ocean

Gotta do the classic "Hello World" opening post with just a slight twist in view of the blog name.

I've been reading blogs for about a year now so I reckoned it was time to get one of my own.

I'm hoping to blog about surfing, snowboarding, tech stuff and maybe some 'meaning of life' stuff if I'm feeling particularly stoked.

Anyway, that's quite enough for a test post.