Author Archive
October 25th, 2008
Continental Airlines flight CO39 from OSL to EWR that (that I happened to be on today) was delayed about 50 minutes something that started a small chain reaction; I missed my connecting flight to LAX and when I went to the rebooking desk I was told that I already was booked for the first flight tomorrow morning. My first idea was to ask that I was put on the standby list but after some rethinking I decided to go for a hotel for the night. My seat was positioned right in front of the right wing and my ears are still full of static noise from the trip (and I used silicone ear plugs most of the time…)
I got a set of vouchers for a hotel room, dinner & breakfast and was initially sent to the Holiday Inn North with a shuttle bus. But the bus driver stopped at the Sheraton hotel instead – and here I am, half a Pizza Hut pizza & a Pepsi later.
My throat hurts after all the hours breathing the dry recycled air onboard – I really hope it is better tomorrow morning…
My internal clock says that the time is 0040AM – but the clock on my computer begs to differ; it’s 0640PM here in Newark/New York (Eastern Time). I’m dead tired but I have decided to try to stay up at least a couple of more hours to start adapting to the even harsher time difference in LA; –9 hours (compared to Norway).
24 hours wireless access costs $9.99 – but it is really crappy; it is capped at 25 kB/sec
I had hoped that I could fill up the hard drive with some music & movies during the night but that will have to wait.
The weather is really crappy outside so I have no intention of leaving the hotel – I Twittered with my colleague André which is in New York right now with a couple of other colleagues of mine (They’ve been to the OOPSLA conference and are on their way home). He asked me to join them for some drinks later – but I’m afraid I’m all worn out :-/
Stay tuned for on-topic stuff from PDC – I’m signing out…
PS: Some bonus self-shaming; I’ve worn my boxer shorts inside-out the whole day – hilarious
October 24th, 2008
Ok, it’s been a bit quiet on the blog the last week, basically caused by too much to do @home (Torill has been sick, so there’s been extra stuff to do…)
Now it’s 10:15PM or so here in Norway and I’m leaving Oslo Airport Gardermoen (OSL) at 11:25AM tomorrow morning, heading for LAX via EWR.
I’m starting to see the end of the packing hell; my back hurts after ironing 7 shirts – I’ve probably packed 3 times the amount of clothing that I’m gonna use – but better safe than sorry
I think I’ll use the time in the air to prepare some blog posts. I’m also planning on writing at least one blog post a day during the PDC to sum of the events of the day – but there may be more than one
If you’re attending the PDC – please feel free to contact me at messenger: lars at sral dot org (that goes for mail too), twitter: larsw or voice/sms to +47 954 15 260 and we can hook up for a lunch or some after-sessions activities.
See you at the PDC!
October 15th, 2008
On September 30th 2008, Steve Ballmer held the keynote at MSDN Live Oslo. The Norwegian .NET User Group leaders where seated on two of the front rows, and had a great view of the “show”. Right after the keynote, we were rushed out to a backstage area where we got a handshake from the man as well as a photo. I’m the first person to the left on the front row.
Videos of the keynote can be found on YouTube:
Part1 Part2 Part3 Part4
I guess That photo will probably be something to show the grand children
October 14th, 2008
Here’s my list of addins an customizations to Visual Studio 2008 that I currently use:
Addins
- Jetbrains Resharper 4.1 – Description should be unnecessary.
- dotTrace 3.1 – Performance/Memory profiling – works well together will R#
- PowerCommands for VS2008 – A couple of nifty commands; especially copy/paste assembly references between projects. (I believe the former name for this addin was CoolCommands).
- Visual Studio Properties Window Search/Find plugin – Adds a textbox to the property grid, that enables you to quickly filter and find a specific property in the list. To install this one, you need to change the 8.0 in the .Addin file to 9.0, and all the files from the archive into the Addins subfolder of My Documents\Visual Studio 2008 (Create one if it’s not present).
- Clone Detective – Just installed this one. The reports says that it actually quite good at detecting “cut’n’pasted” code section, and helps you identify what you can factor out.
- Lexware Assembly Reference Tool for Visual Studio – Great addin for sorting out / cleaning up assembly references. (Before I found this tool, in multi-solution scenarioes I had to open the project files and change the bin\Debug or bin\Release part of the references with bin\$(Configuration) by hand.
- AnkhSVN – Adds Subversion Source Control Management features to Visual Studio. Open source / free.
Color themes and fonts
- Theme: Ragnarok Blue
- Theme: Faculty of the mind
- Font: Envy Code R
- Font: Lucida Console 14pt
- Font: Consolas
Templates and snippets
I have some custom WCF related project & solution templates as well as a couple of snippets that I will polish & publish later.
Shortcuts that I can’t live without
- ctrl+. or shift-alt-F10: multi purpose; typically infer usings of types.
- alt-enter: R# Swiss army knife shortcut
- [ctrl-k, ctrl-c] and [ctrl-k, ctrl-u]: Comment/uncomment section.
- [ctrl-m, ctrl-m], [ctrl-m, ctrl-l] and [ctrl-m, ctrl-o] Collapse/Expand sections.
- shift-alt-Enter: Full screen – code is king!
So, I’m really interested to hear what other people uses and if there are some obvious things missing from my list.
I’m tagging the following persons and ask about their opinions:
October 9th, 2008
Last night, while hacking on the Aggressive project, I where in the need of a container. My initial idea was to try out Autofac, but since I was offline at the moment, I quickly hacked together a small container myself. Since I actually thought the look&feel of the interface was exactly what I wanted, I decided to put the source code in a separate project and give it a name; Tinyject. The code can be found here and is licensed under the Apache License 2.0.
Features:
- A Register() method in different flavors (including generic versions) for registering concrete types & interfaces in the type map.
The Register() methods return this, so they can be chained.
- A Resolve() method in different flavors (including generic versions) for resolving new and existing instances of registered types.
- An idea of instance lifetime; Transient & Singleton.
- Property, field and constructor injection.
- The container implements System.IDisposable, and can be used in a using() { … } scope.
- A static, thread-safe wrapper, TinyjectStatic.
- A small number of xUnit-based unit tests to check the integrity of the stuff.
That’s it. At the moment there is no configuration system – and no extensibility points, but I believe the 2.0 version – maybe developed tonight after the baby swimming, will contain a simple extensible configuration model.
If anyone want to design a logo for it – please go ahead

October 4th, 2008
With Visual Studio 2008 Microsoft bundled a new tool; the WCF Test Client (and its partner in crime; WcfSvcHost). The intention is good, but sadly the tool isn’t the one you pick up when you develop real-life services. (IMHO) The biggest shortcoming is the lack of functionality for saving and loading test data (templates) so you don’t have to enter the data manually each time you fire up the tool.
Last November, I attended the WCF Master Class held at Programutvkling’s premises right outside Oslo and the class instructor was Michèle L. Bustamante of IDesign.
During one of the first days when we still was going through some WCF Fundamentals, we came to discuss the shortcomings of the WCF Test Client, where raised the issue about the missing save/load functionality. I joked that I would see to that the functionality would be there in the end of the week.
Since I’ve played with WCF since the first Indigo bits went public, I had some “free” time during the first days when Michèle walked through the basics, so I set off on my mission equipped with .NET Reflector and VS2008.
I’ve done my amount of “Non-public binding” and .NET hacking before to get passed shortcomings and bugs in the Base Class Library and third part components before, so I had an idea of which strategy to go for.
The easiest solution would have been to use a .NET Reflector addin to disassemble the WcfTestClient.exe into a set of C# source files & a Visual Studio project.
That would have been too easy – and it would have prevented me to release the source code found below.
So the strategy I chose was to create a wrapper, that loads the original assembly, creates the main window form, and inject the UI elements (Save/Load/About tool strip menu buttons).
Everything in the existing assembly is marked as internal, so all object construction and method invocation has to be done by binding to the members with BindingFlags.NonPublic | BindingFlags.Instance. Apart from that, it was really just a dirty job (but somebody had to do it, right?
).
Disclaimer: This code is only for educational purposes and is released to the public domain “AS-IS”.
You can find one of the ugliest hack I’ve ever done here.
Note: I asked a friend of mine, Anders Norås, to do a smoke test on the solution. On his Macbook he got an error when he tried to unzip the archive. So if you have any problems with the ZIP – you can try the RAR.
Instructions
Unpack the LarsW.WcfTestClientEx.zip to a suitable location and open the solution in Visual Studio 2008. There is an assumption in a post build event in the LarsW.WcfTestClientEx project that the original WcfTestClient.exe is located here at C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE. If you’ve installed Visual Studio to another location, you will have to change the post build event.
I’ve bundled a simple test service. If you’re running as a non-administrative user, you will probably have to either use netsh http add urlacl or httpcfg add urlacl to reserve http://localhost:12345/ – or change the service so that it uses another URI for the service endpoint that you have already registered.
Open the solution properties window and set the radio button to Multiple startup projects. Set both projects to Start.
When the WCF Test Client Extended! starts – it analyzes the metadata/WSDL from the service, and populates the operation tree.
Select on of the operations, and enter some test data into the generated UI grid.
Now, use the new Save… item on File menu and store the data to a file. Overwrite the data you entered with something else in the grid, and try the Load… item. Select the file you just persisted the test data to, and it should set the elements in the grid to the values you first entered.
Easy – isn’t it? Well, I have to admit that there is *no* error handling whatsoever, so there is probably a dozen ways the application can puke on you. This is just a proof of concept.
Later, I will show you have you can turn the WcfTestClient.exe into a scriptable console application, where you can specify the input data in one file, and the expected outcome in another (or you can just pipe the output and inspect it later) – could turn very useful for TDD purposes…
PS: One of the reasons I wrote this blog post now, was to have an excuse to advertise for Michèle’s WCF Master Class course starting 13th October 2008. Last time I checked, there was empty seats – so if I were you, I would head over here – and sign up. If you live in Scandinavia – it is really no excuse to skip this opportunity
Update: I just want to explicitly point out that the hack described above is not in the WCF Master Class curriculum.

October 2nd, 2008
So, with the new project set up – it is time to decide which players to put on the field, and who’s to ditch.
At the moment, the following is in:
- Visual Studio 2008 / .NET 3.5 / C# 3.0 (SP1)
- Expression Blend 2 SP1
- Resharper 4.1
- CodePlex w/ SvnBridge
- Silverlight 2 RC0
- Windows Communication Foundation
- LINQ to SQL (for first version).
- xUnit 1.0.3
- Autofac 1.2.8.423
- ASP.NET MVC Framework Preview 5
The “maybe” list:
- Some BDD specification framework
- Windsor Castle, Ninject or Unity instead of Autofac
- A mocking framework (RhinoMocks, TypeMock or similar)
- A documentation tool
The “Not/No way” list:
October 2nd, 2008
So, I’m currently writing some infrastructure/backend code for Aggressive – a new lightweight time management I’m putting up on CodePlex.
The idea is to us it to practice something that I’m not really good at; TDD – and also try to apply DDD from “top to bottom”.
I’ve taken an interest in internal DSLs and fluent interfaces, so I started to mock up a simple interface for manipulating the Aggressive model.
Take #1:
I tried two different models in the fixtures; the first one where the navigation starts from the user object – and ends up in the task – and the other going the opposite way.
Aaarrrgh.. Grrrr… xUnit 1.0.3 used for testing
I’m open for input & comments.
October 1st, 2008
This post is a work in progress. I feel that I need a place to organize all my pet projects, whether they still only exist in my head or have materialized into some code.
-
Miles Platform
- Active Directory FOAF Gateway – internal beta
- Active Directory Photo Uploader – internal beta
- MOAT (Meaning Of A Tag) service / client – idea
- Internal Library service / client – prototype
-
WCF related
-
Miscellaneous
- Agressive – Silverlight-based, lightweight Time Management System – planning/prototyping stage.
- Visual Studio Theme Explorer – planning phase.
- Tinyject – A tiny IoC/DI container in about 200 lines of C#.
The idea is to release as many of these under a liberal open license – probably hosted on CodePlex or a similar service.
September 19th, 2008
On Wednesday, I visited the JavaZone 2008 conference in Oslo. This is normally a conference that I would not attend, since it is, as the name implies a Java conference. But my employer, Miles, is one of the partners/sponsors and all the employees were offered a free ticket – so I felt that I couldn’t say no.
Before the conference started I had made a rough plan of what sessions I was going to attend. My initial plan was to follow the labs that had a focus on agile development, service-oriented architecture and other of the more technology-agnostic sessions.
I started the day by hanging out in our stand area – which was designed by an event bureau of some sort – featuring a red leather couch, a whine cooler refrigerator, a gas-driven fireplace and more of the standard stand equipment.
0830AM Hurra Torpedo went on stage and did they’re opening gig. Their thing is to play on household appliances. It was noisy as h*** and it really wasn’t my cup of tea that early in the morning. I didn’t watch the whole show, but Kristoffer Schau apparently broke one of his finger before he lifted a large washing machine as the grand finale. Crazy guys.
0900AM and I was off to the first session. Erich Gamma of Rational talked about the development process and tools they use to create the Eclipse platform. They are ~70 developers spread over five or six sites working on different components of the IDE. He talked a lot about how they used Rational Jazz to help the distributed development.
A colleague of mine had one comment; strait jacket! And I had to agree, it seemed really rigid and non-agile. Some features of Rational Jazz reminded me of those I have used in Microsoft Visual Studio Team System – but the number of features was really mind-boggling.
My initial plan was to follow Jim Webber’s “Guerrilla SOA” talk at 1015AM – but I ended up talking to a lot of old acquaintances instead and didn’t attend any sessions before 0200PM when Rickard Öberg went on stage in lab 3 to talk about his Qi4j framework and the concept he called Composite Oriented Programming followed by my NNUG board member partner-in-crime Anders Norås‘ talk; Better Domain Driven Design. The two talks touched some of the same topics. Anders also talked about some of the shortcomings of the JVM – mainly the lack of real generics support (A design mistake I personally believe borders to scandalous).
The rest of the afternoon I spent mostly on our stand or wandering around talking to different people. All the sessions were broadcast on six large canvases in the main hall and you could listen in with a wireless headset that could be borrowed from the information stand. But I failed to get it to work properly ( tried a couple of times with different headsets) and by the different acrobatic moves (to get a good reception) I observed by some of the other attendants I was not the only one with the problem.
At 0500PM or so, we brought out the Spanish Serrano ham and started handling out wine at our stand. People poured in, and it acted as a pre-party for the ClubZone events later in the evening.
Press Play On Tape played a lot of computer music/game classics from the stage, and the atmosphere was good.
At 0730PM or so, we headed off to Gloria Flames – a rock club located a short distance from the venue (Oslo Spectrum). The party was sponsored by Programutvikling – In my opinion Norway’s best course provider – and hosted by some of their fabulous crew – Siv, Martine, Kjersti, Rita & the rest – kudos to you.
The place was filled with beer thirsty techies probably continuing their discussing from earlier that day – but when LoveShack – a group specializing in hits from the eighties – went on stage – the dance floor filled up and the people went crazy. When the band asked the crowd to jump under a couple of the songs, the floor actually started swinging and I actually started worrying if it would hold all the people.
Luckily, it did – and when it was getting close to midnight, I split the party and took a train home.
So to end this blog post – here’s the scores from the .NET man:
JavaZone: 4/6
ClubZone: 5/6
The end.