Home
About
Contact
Thursday, August 28, 2008

It's great when we manage to get people like Dan North to NNUG. Many knew who he was from before and where excited to hear what he had to say, others didn't know so much about him but where excited by what the others told them. Dan talked about BDD and DDD, and how they are related. He said that without DDD, BDD would not have existed (hope I got that right). Which says a lot about BDD AND DDD! :-)

One of the more funny things I remember from the event (which is not related to the topic itself) was the use of I in Interface in e.g. C#. So Dan said, why not use the I for something meaningful? Ask the interface the question: What do you do? And the interface says: ISendEmail or ISearchFiles or IPingComputers. This is a great way of giving interfaces roles. I just think this is brilliant!

My overall impression of the event was really good, but I would like to know what you think. Comment on this blog or drop me an email here. Actually since we had him over at Contiki as well, I'm a bit confused about what was said in his presentation and not :-) Right now there is so much new and interesting knowledge trying to be consumed in my brain that I'm having problems concentrating :-) 

I hope you liked the event and I also hope you would like us to continue getting people like Dan to Bergen.

Agile | CSharp | Events | NNUG
Thursday, August 28, 2008 8:32:21 AM (W. Europe Daylight Time, UTC+02:00)
Friday, August 08, 2008

A couple of days ago I discovered a bug in Hotmail that you can read about here.  As it turns out it was both a bug in Hotmail and in my code (sort of), and a type error in my blog post causing some confusion. Thanks to Rune Grothaug for getting me in touch with the Hotmail team.

The bug in Hotmail is related to how they query for content id's in the email. It's too expensive to load the email into a html parser to get the id's, so they do a string match instead. Here's how I understand it:  When they try to match nnug10 they actually get nnug1 back (as the first match). One solution suggested by them was to reverse the order of the searches allowing nnug10 to be found first. I'm not sure if this is what they're going to do. (Update: I got confirmation that this is the solution they're going for)

As for my bug it was that I forgot to add the file extension to the ContentType.Name (see code below). This is the name that actually gets displayed for the attachment image in the mail. In Hotmail (and Gmail for that matter) it shows all linked resources as attachments, and the name of these attachments had no extensions (e.g. jpg). A workaround for the Hotmail bug could have been to do the same with the ContentId. When the id is nnug10.jpg it actually works! In my blog post I said that the cid's where nnug0.jpg, nnug1.jpg etc. which was not the case. It did not have the .jpg extensions.

Taking the above into account this makes the Hotmail bug far less serious than I originally thought.

But..., when you see the property ContentId you're thinking it can be whatever only it's unique right? This is why I didn't think much of what the ContentId was as long as it was unique. However, to be absolutely sure that something like this will not happen again I changed the cid's to be guid's instead (this was also suggested by the Hotmail team). Better safe than sorry :-)

Here's the code after my modifications:

LinkedResource img = new LinkedResource(stream, mediaType);
img.ContentId = guid;
img.ContentType.MediaType = mediaType;
img.TransferEncoding = TransferEncoding.Base64;
img.ContentType.Name = img.ContentId + fileExtension;
img.ContentLink = new Uri("cid:" + img.ContentId);
resources.Add(img);
Friday, August 08, 2008 9:30:42 PM (W. Europe Daylight Time, UTC+02:00)
Thursday, August 07, 2008

Update: More on this story here.

I've been playing around with an email tool that I've created to send out emails to NNUG members. It's just a simple command line tool sending an email to each person in a list to avoid using bcc which sometimes get hooked in a spam filter. Another thing this tool does is to take an html page (an html formatted email), scan it for images and embed the images using the AlternateView class and its LinkedResources collection for sending as an html email.

The emails sent by this tool looked ok in Outlook, Gmail and Hotmail on every test I did. Except for when I decided to use the tool to send out an official NNUG invitation to 300 members! The only change I had done was adding one extra image. I noticed that the email I got on my Hotmail account had a wrong image at the end. The image used was the same as the second image in the email. The reason was not hard to find.

When I add images to the LinkedResources collection, I name the images/files nnug[someNumber].jpg like this:

nnug0.jpg, nnug1.jpg, nnug2.jpg etc.

This worked fine for all images up to nnug10.jpg. Can you see why nnug10.jpg did not work and what the bug is? The last image that was supposed to be nnug10 was showing up as the second image instead (nnug1). E.g. nnug10 = nnug1! Hmmm.... Come on!

Then my apology. To all members of NNUG with a registered Hotmail account and to Christian Weyer:

I'm sorry that I did not discover this bug before, so I could have changed my algorithm. Sorry to you Christian for being nnug1.jpg! You replaced the NNUG logo, resulting in the email ending with:

  Kind regards [image of Christian]

instead of

  Kind regards (image of NNUG logo)

...giving the email a bit different meaning than I intended :-)

Btw. don't forget to sign up for the NNUG events by Christian Weyer and Dan North 25th and 27th August!

.Net | Fun | Microsoft | NNUG
Thursday, August 07, 2008 1:43:23 AM (W. Europe Daylight Time, UTC+02:00)
Monday, August 04, 2008

After finishing the book "The Art of Agile Development" which I reviewed here, I was asking myself a few questions:

  • Why are we doing Scrum?
  • Why did we start out with Scrum on not XP?

I think the answer to these questions rely on many of the misconceptions around XP. If people really knew what XP was about and not that XP=pair programming and/or XP=no documentation or whatever first impression you get from XP, I think the adoption rate would have been higher. If that's true, what makes people adopt Scrum?

First of all Scrum got really hyped a few years back, many books were written and many adopted the process. They also introduced the certification program of ScrumMasters and Product Owners. If certification is good or bad is still being discussed in agile forums today, but one thing is clear; the certification programs gave Scrum much publicity and I will claim that it helped the adoption rate of Scrum. It also might have helped some companies to easier except the process as a "proper process".


One thing to consider is that Scrum is a management process. It has no practical solutions of how to develop software, only how to manage and plan for successful software delivery. My impression is that after a while teams that started out with Scrum start to look for ways to improve their process and they often turn to the practices defined in XP (or adapted by XP). I think that every successful adoption of Scrum is also adapting one or more development practices like Continuous Integration, Test Driven Development, pair programming etc, and they might not even know that they're a core part of XP.

If you look at what XP says about the management part you see that it resembles Scrum in many ways, or was it the other way around? ;-) I would dear to say that the difference is so small that it doesn't really matter what you choose. However, Scrum cover less of the complete development process than XP does, so my preference at the moment is XP though we're still doing Scrum. In essence this only boils down to what you call your process and which community you want to belong to. So maybe I should just be satisfied by saying we're Agile :-)

This makes me wonder what students learn about Scrum and XP today? If at all? The only process I learned at university was RUP. If they learn both Scrum and XP, which one would they choose? Any students/teachers/professors out there that would care to comment?

This also makes me wonder if a Scrum shop has more credibility towards customers than XP? If you where (or are) a boss of a company that were about to develop some software, would you choose an XP team or a Scrum team for the task? Would you care at all?

Monday, August 04, 2008 10:04:44 PM (W. Europe Daylight Time, UTC+02:00)
RSS RSS - Comments Twitter LinkedIn
         
SEARCH
 
 
         
TOP POSTS
   
         
NAVIGATION
   
         
CATEGORIES
  .Net (61) ADFS (3) Agile (30) Ajax (5) Architecture (20) Articles (1) ASP.NET (6) ASP.NET-MVC (1) Blogging (12) Books (2) BPEL (1) CleanCode (1) CloudComputing (7) Community (4) CSharp (11) DasBlog (5) Database (2) DDD (5) Deployment (16) DSL (1) Events (38) ExtremeProgramming (6) Fun (6) Gadgets (4) IIS (10) InfoQ (4) Java (2) Lean (3) Linq (2) MemoryLeaks (5) Microsoft (37) MVC (1) NDC (2) NNUG (36) Other (10) Patterns (9) Performance (3) Scrum (17) Security (7) ServiceBus (1) Silverlight (4) Software (19) TeamManagement (11) TechEd (7) Testing (4) Tools (25) TvGuide (1) WCF (8) Web (15) WebDeploy (1) WIF (3) Windows (10) Vista (15) VisualStudio (16) WiX (9) Work (16) Workflow (3)  
         
ARCHIVE
   
         
BLOGROLL
   
         
ON THIS PAGE...
 
Quick summary after Dan North @ NNUG
Bug in Hotmail (update)
Bug in Hotmail forces me to apologize
Why are we doing Scrum again?