# Friday, August 22, 2008

From Delegate to Lambda

The article wrote for Code Magazine, named 'From Delegate to Lambda', about understanding the transition from delegates to lambdas has been published in the September issue and can also be found online at: http://www.code-magazine.com/Article.aspx?quickid=0809081.

#    Comments [4] |
# Monday, August 11, 2008

SDN Conference 2008

The annual geekfest, the Software Development Network Conference 2008 is being held on the 6th and 7th of October at the Leeuwenhorst in Noordwijkerhout (close to Amsterdam).

The list of speakers and sessions has been published and the Early Bird discount applies until August 16th. So sign up now.

#    Comments [0] |

2nd Dutch Code Camp

After last years success, three user groups in the Netherlands are again coordinating their efforts to create the 2nd Dutch Code Camp.

Interested in speaking or attending? Sign up here.

#    Comments [0] |

Tenth Boston Code Camp: DEV inTENsity

Chris Bowen and and a group of volunteers is putting together the TENTH Boston Code Camp. Call for speakers is out right now. So go ahead and volunteer to speak at this great event!

#    Comments [0] |

Speaking at the BAND

Tomorrow night I'll be the guest speaker at the BAND (Bangor Area .NET Developers user group). I'll be talking about Workflow Foundation.

Workflow Foundation (WF) is one of the pilars of .NET 3. If you think WF is an end user tool then you’re wrong. It is a framework targeted at software developers that want to embed workflow into their custom applications. This session will explore the WF basics and focus on implementing State Machine Workflows, how to use the workflow runtime and where Windows Communication Foundation fits in the whole picture.

Sign up here.

#    Comments [0] |
# Sunday, August 03, 2008

VirtualPC images on a USB Flash Drive

I use a VirtualPC environment for all my software development work, usually using a unique environment for every customer. This eats up the drive space in my laptop pretty darn quick. So after reading about running a VirtualPC image from a USB Flash Drive I decided to give it a try. I purchased a 32GB memory stick and plugged it in.

After a little experimenting I can now confirm it runs the VirtualPC nice and fast. But writing data to the disk and reading at the same time is horrendously slow. So you need to do two things:

a) Make sure the .vmc file is NOT located on the flash drive
b) Enable UndoDisks

These two steps will create a temporary file on your harddisk, in the folder where the .vmc is located. This means that while using the drive you only read from the flash drive, but never write.

When you shut down the VPC you can choose to commit the changes to the flash drive, this may take a little while, so only do it when you have time to wait for it to complete.
I usually choose 'Save State' which allows me to restart the VPC where I left off.

#    Comments [0] |
# Friday, August 01, 2008

XSD.exe turns integer into string

If you're using the xsd.exe tool to generate C# code from an XML Schema you'll find that an attribute defined as an integer is generated into a string field.

The reason is listed on MSDN:

The xs:integer type is specified as a number with no upper or lower bound on its size. For this reason, neither XML serialization nor validation map it to the System.Int32 type. Instead, XML serialization maps the xs:integer to a string while validation maps it to the Decimal type that is much larger than any of the integer types in the .NET Framework.

#    Comments [0] |
# Wednesday, July 30, 2008

What is a Software Architect?

Ted Neward offers a very good description of what a Software Architect is:

"an architect is not like a construction architect, but more like the conductor of a band or symphony. Yes, the band could play without him, but at the end of the day, the band plays better with one guy coordinating the whole thing. The larger the band, the more necessary a conductor becomes. Sometimes the conductor is the same thing as the composer (and perhaps that's the most accurate analogous way to view this), in which case it's his "vision" of how the music in his head should come out in real life, and his job is to lead the performers into contributing towards that vision. Each performer has their own skills, freedom to interpret, and so on, but within the larger vision of the work."

#    Comments [0] |
# Wednesday, June 11, 2008

AIM Map Phone

My article on combining AIM Call Out with geocoding a phone number to display the location of the person you're trying to call has gone live on the AOL Developer Network.

I think it turned into a very cool sample application.

Dial a number and see the location of the person you're calling!

#    Comments [0] |
# Tuesday, June 10, 2008

Live Mesh - One month later

It seems there is some controversy (1) (2) around whether Live Mesh is good or bad. Here is my 2 cents: I've installed Live Mesh Tech Preview about a month ago and am pretty impressed by it so far. It seems to me Microsoft may have found the tool that will unify the desktop (where they make their money) with the cloud (revenue?). Currently there are two features that I use and like:

a) Sync files automatically with all machines in my Live Mesh group of devices
b) If my Live Mesh device is on, then I can use Remote Desktop Connection (or a Live Mesh version thereof) to remotely connect to that device. Even if it is behind a firewall and on a dynamic IP DSL connection. This is great because my machines at the office are connected to the Internet via a dynamic IP connection and now I can just connect to them, by clicking them via the Live Mesh icon in my icon tray.

The sync files feature will be further improved in the future when Peer 2 Peer synchronization will be supported. I suggested this feature on MS Connect, but it was already planned :-)
Here is the response I got:

We plan to include selectable direct Peer to Peer (P2P) as a sync scenario in a later milestone, which is in effect what you have asked for here I believe.
Thank you for this report!
Tim

I use a lot of Virtual PC images. I'm hoping I can use this P2P sync service to create continuous backups (don't know if the bandwidth needed will prove to be a killer).

What is interesting is that files on Live Mesh will sync, even if the user is not signed in. This means that on the client Live Mesh is connected to the cloud without a user logging on. This offers potential for an interesting feature like 'Live Mesh Lockdown'. Suppose my machine is stolen. I could use some other device, go to the Live Mesh Desktop on the web and mark the device as stolen. This could lead to the machine being locked for further use. I have no idea what information is stored on the server with regards to the device. Perhaps this feature could even become part of the next version of Windows. That way if the thief re-installs the machine the server can still recognize the device (based on MAC address?) and still lock the machine.

Anyway, can't wait to see what the developer API for Live Mesh looks like.

#    Comments [0] |
# Thursday, May 29, 2008

SDN Event - Collaboration

The Software Developer Network user group will be hosting it's quarterly event on Monday, June 23. The theme of the event will be Collaboration, but plenty of general topic sessions will be held as well (a total of 30 sessions!).

Go to www.sdn.nl/sde to sign up.

Here is an overview of the sessions:

.Net C#

.Net VB
DotNetNuke
Inform. Worker
Delphi
User eXperience
8:30
Registratie / Ontvangst
9:00
General session
Softwarekwaliteit, wat is dat eigenlijk?

Jaap van Ekris

Addressing non-functional requirements with aspects

Gael Fraiteur

DotNetNuke Development: meer dan modules

Stefan Kamphuis

SharePoint 2007 en WWF: Integratie van Divergerende Werelden

Gustavo Velez

VCL for the Web

Hadi Hariri

User Experience op het web

Robert Kuunders
10:15
Pauze - 30 min.
10:45
General session
Waarom agile wel werkt en waterval niet

Sander Hoogendoorn

SharePoint filter webparts - theorie en praktijk

Ton Stegeman

Dynamic Localization in DotNetNuke

Peter Donker

Samenwerken, met Groove een fluitje van een cent!

Dennis Vroegop

Continuous Integration in .NET

Hadi Hariri

Adobe Flex en AIR : De kracht van Rich Internet Applications

Christoph Rooms

12:00
Lunch - 60 min.
13:00

.NET en hardware - video capture en servo's aansturen

Jeroen W. Pluimers

Towards more complex aspects using PostSharp

Gael Fraiteur

Synching your dev and live environments

Erik van Ballegoij

Gepersonaliseerd nieuws op basis van MOSS 2007 Search

Mike Fortgens & Mirjam van Olst

Unicode in Delphi for Win32

Bob Swart

Silverlight2

Robertjan Tuit

14:15
Pauze - 15 min.
14:30

Microsoft Sync Framework in action

Dennis van der Stelt

Het gebruik van een Object Relational Mapper tool

Diderick Oerlemans

DotNetNuke Schedular Interface

Leigh Pointer

Bouw een Silverlight smoelenboek in SharePoint

Donald Hessing & Reinhard Brongers

Practical Delphi WOA

Paweł Głowacki

Interaction Design: What the user really wants

Stefan Bookholt

15:45
Pauze - 30 min.
16:15

Peer-to-peer en collaboration met .NET 3.5

Alex Thissen

Customize VSTS WorkItems within your application

Mike Glaser

Content Syndication met DotNetNuke

Peter Donker

Collaboration met Lotus Quickr en Microsoft SharePoint

Arjan Uijl &
Ton Stegeman

Delphi en het Clipboard - copy en paste meer dan tekst alleen

Jeroen W. Pluimers

Developers + Designers = User Experience

Martion Tirion

17:30
Einde
#    Comments [0] |
# Wednesday, May 21, 2008

WCF serialization and RemotingFormat

Anyone familiar with building applications using .NET Remoting (in .NET 2.0) knows that the DataSet and DataTable classes have a property called RemotingFormat. This could be set to either XML or Binary where Binary would give you a performance boost since it is more compact.

Windows Communication Foundation does not use this property at all. The service binding dictates the serialization format, no matter what you set the RemotingFormat property to be, even if your using a NetHttpBinding.

The following configuration will setup a service to use .NET Binary formatting over Http:

<system.serviceModel>
  <bindings>
    <customBinding>
      <binding name="NetHttpBinding">
        <reliableSession />
        <compositeDuplex />
        <oneWay  />
        <binaryMessageEncoding  />
        <httpTransport />
      </binding>
    </customBinding>
  </bindings>
  <services>
    <service behaviorConfiguration="ServiceBehavior" name="MyService">
      <endpoint address="" binding="customBinding"
        bindingConfiguration="NetHttpBinding" name="HttpBinding" contract="IService" />
      <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
    </service>
  </services>
  <behaviors>
    <serviceBehaviors>
      <behavior name="ServiceBehavior">
        <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
        <serviceMetadata httpGetEnabled="true"/>
        <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
        <serviceDebug includeExceptionDetailInFaults="false"/>
      </behavior>
    </serviceBehaviors>
  </behaviors>
</system.serviceModel>

So even if your service looks something like this:

public DataSet GetData()
{
    DataSet ds = BuildDataSet();   // retrieve some data here
    ds.RemotingFormat = SerializationFormat.Xml;
    return ds;
}

The DataSet will still get serialized as a .NET binary as defined in the binding ('binaryMessageEncoding').

#    Comments [0] |
# Tuesday, May 13, 2008

Building a .NET VoIP Application

The article I wrote about building a Voice over IP .NET application using AIM Call Out and the AOL Open Voice API has just gone live on the AOL Developer Network. Read it here.

#    Comments [0] |

.NET CLR 2.0 SP2

A lot is being blogged about the availability of VS 2008 SP1 and TFS SP1. It contains fixes and many new features and sound almost too good to be true, but I checked, it's not an April fool's joke :-)

A little lost in the noise about new features is the fact that .NET Framework 3.5 SP1 will include .NET CLR 2.0 SP2. I've been unable to find anything about this other than this one post by Eric Eilebrecht, but any CLR update is significant.

#    Comments [0] |
# Saturday, May 10, 2008

VB9 does not have Collection Initializers

I just wasted some of my time figuring out how to do collection initialization in VB9.

C#3.0 has a new feature called collection initializer and according to a (somewhat older) post by Scott Guthrie, VB9 was slated to have it too. I guess it got cut somewhere.

Anyway this is what collection initializers look like in C#3.0:

List<int> numbers = new List<int> { 1, 2, 3, 4, 5 };

The closest thing in VB9 would be to use array initializers:

Dim numbers As New List(Of Integer)

Dim temp() As Integer = {1, 2, 3, 4, 5}

numbers.AddRange(temp)

#    Comments [0] |
# Friday, May 09, 2008

Building a RSS aggregator using LINQ to Objects and WCF 3.5

Okay, so you read the title of this post. Perhaps you're expecting huge amounts of code, but guess what. As it turns out, this is so ridiculously easy. This will be a very short post.

Step one is to have a method that loads an RSS feed. WCF offers a new class called SyndicationFeed.

private SyndicationFeed Load( string url )

{

  XmlReader reader = XmlReader.Create( url );

  SyndicationFeed feed = SyndicationFeed.Load( reader );

  return feed;

}

 

The above method will take a url and use to load a feed. Now suppose I have a list of urls and I want to take all the items in all the feeds, sort them and use them to generate a new, aggregated feed. Sounds like a fair amount of work, right.

Here is the code:

 

private SyndicationFeed Aggregate( List<string> urls )

{

  var items = from url in urls

              from item in Load( url ).Items

              orderby item.PublishDate descending

              select item;

 

  SyndicationFeed feed = new SyndicationFeed( items );

  return feed;

}

 

Cool!

#    Comments [0] |

Next BAND meeting May 27th in Bangor, ME.

Heroes Happen in Bangor! The BAND is proud to announce we will be putting on a mini-launch event for Microsoft's Heroes Happen Here launch of the 2008 products.  Come to the event at Kominsky Hall at Husson College in Bangor on Tuesday, May 27 at 6:00 pm.

Greg Howe and Jeff Hall, BAND co-leaders, will be talking about Visual Studio 2008 and how it will impact your development efforts.  There will be two 45-minute talks, one focusing on the web world, and one focusing on the IDE.  You will leave this event knowing how you can benefit from the new products, including Windows Sever 2008 and SQL Server 2008.

More info here.

#    Comments [0] |
# Tuesday, May 06, 2008

Windows Live Writer & dasBlog

My blog runs on dasBlog version 2.x and when I started blogging I did all my typing online. Then Office 2007 came along and Word offered the feature of creating a blog entry offline and then upload it to dasBlog using the MovableType API.

This wasn't too great though, since Word markup would end up in the HTML and sometimes the publish process just froze or refused to logon to my web site. Also, uploading pictures was kind of a hack.

Last week I installed Windows Live Writer and this runs as a charm. Definitely a recommendation!

#    Comments [1] |

69%

A new quiz on www.justsayhi.com says I'm:

69% Geek
#    Comments [0] |

Live Mesh beta program

I heard about Live Mesh last week and decided to check it out. So I’ve signed up for Live Mesh beta program and it is pretty neat, but still fairly simple. I’ve not (yet) been accepted into the Mesh Developer beta, which is a separate program. As I understand it Live Mesh will allow you to not just share files, but Silverlight applications as well.

 

Current state of Live Mesh

Live Mesh allows you to turn a folder on your machine into a Mesh Folder. This in turn allows you to automatically share the folder across multiple devices. Every account has one default device: the Mesh Live Desktop, an online desktop which acts like a Windows desktop.

Mesh Folders can be shared with any Live Messenger contact. Each Mesh folder will track all changes and allows collaboration my attaching messages to the folder.

 

Picture of Live Mesh Desktop, I've shared the Develop-One folder which sits on my laptop. It shows up as a folder on my Live Mesh desktop.

 

clip_image002

 

Device support will include Windows Mobile and Mac!

 

clip_image004

 

For anyone that knows Office Groove, it'll be interesting to see how the final version of Live Mesh and Groove compare.

#    Comments [0] |