Using Twitter as micro blog

Because I’m sometimes a bit lazy, I decided to use Twitter as my micro blog engine. My current tweets are visible on the left side. In the past I’ve never thought that Twitter is of any use for me but it is a useful way to post interesting information snippets quickly without the need to write a lengthy blog entry (as I told, I’m lazy).

What Lean and Agile really means in development

The latest book of Craig Larman, Scaling Lean & Agile Development, written with Bas Vodde is a very well written guideline and collection of suggestions how Scrum can be scaled to larger teams (meaning more than 7 members). Instead of suggesting more organizational clutter like “Scrum-of-Scrums” it focus an really challenging topics like how to handle large backlogs without loosing the view for the big picture. Besides providing practical suggestions, the book does also a very well job in providing introductions to the values and ideas behind Scrum which are rooted in the Lean and Agile movement as well as in classical ones such as System Thinking. This is the first book I’ve seen which combines a long time of personal experience with all important values and ideas from the domains of Lean, Agile and Scrum (and their foundations) in a very compact form.
Highly recommended!

Microsoft CHESS for managed code available!

Presented on the PDC 2008, Microsoft has finally released the first version of the concurrency unit-testing tool CHESS. It was available already for Win32 applications but is now also available for managed Win32 code and integrated in Visual Studio 2008. Because CHESS is controlling all threads and their schedule while executing your code it will find “Heisenbugs”, means it is possible for the first time to build unit tests which are capable to test concurrency reliable.  This is a unique capability which I’ve not seen  in any other  test framework,  so it will be interesting to run it against some code of my own as well as from 3rd party libraries…
The only downside so far is that the Visual Studio version needed is the Team System one, because of the Microsoft unit test framework, which is not available to everyone. But Microsoft provides a trial version, valid until December 2009, as Virtual PC image so there is a way to use CHESS.

Unnecessary ghosts from the past

I have recently read a book about the last big cholera epidemic in London which leads to one of the first great data visualisations, Snow’s Map. He counted the number of deaths at every location so this is how he found the center of the epidemic at the Broad Street pump and discovered that the contaminated water was responsible. Currently cholera is back in Zimbabwe on large scale. The most important thing of the treatment is simply clean water, which seems not to be available any more in a country which was one of the highest developed ones before 1980 and destroyed by the criminal regime of Robert Mugabe. It is time that the neighbour countries take care of this mess.

How silly can they be?

The french presidency seems not to have understand that they put with their decision (see also this blog entry) in favour of the old car industry not only the environment targets at stake but also the industry by itself. The old car industry is dieing, certainly not all as fast as GM, and has to reinvent itself, which is possible, for providing electric or hybrid cars as well as using the chance to be in a leading role in this new market. Yes, the old management is sponsoring, aka lobbing, the current decision makers, but at least the EU parliament should be aware that by voting against this agreement they will safe a lot more jobs in the near future. 
Changing old industries needs the force by public or goverment otherwise they will overlook the point of no return and die.

Microsoft CCR and DDS, Part 2

Using the CCR Toolkit Microsoft also presented a new framework for distributed service environment, Decentralized Software Services (DSS). The framework provides the hosting environment for services, a new REST-oriented, SOAP based communication protocol and contract based programming model not dissimilar to the WCF framework. Services basically have a unique service- and contract identifier, multiple instances of a specific service will be identified by an additional UUID. Both descriptions are directly accessible via HTTP. Every service defines exactly one main CCR port which is responsible to handle the DDS protocol commands as well as the standard HTTP commands. The state holder of the service is explicitly defined and can be also accessed via HTTP which allows it to provide a web based interface to any service instance. DSS also provides a publish/subscribe service which can be used to communicate state changes between services. DSS also provides distributed queries based on LINQ for accessing the state as well as the actual message information of an particular service or contract. DSS also can use UPnP for discovering services.

I have only played a little with the tutorial examples and what these are my impressions:

  • Using CCR ports as accessors of the service the handling of the protocol is very simple also in the case of concurrent access. And debugging is actually a lot easier as in traditional concurrency structures …
  • Because services can provide their contract and description as plain HTML page as well as their state, it is a very convenient way to have a human readable monitoring interface available
  • Similar to WCF the contract definition for data and the service conversation is very simple as is the rest of the service implementation
  • Hosting of services is very simple and can be easily embedded
  • Working with the CCR is a new experience, without events or callback delegates

Because DSS is used for nearly all functionality provided by the Robotics Developer Studio, there a lot of examples how to interact with unmanaged code, GUI application as well as complex service choreography and the Visual Programming Language (VPL), which allows it to build really complex applications based on the DSS infrastructure.

So the only downside is that the CCR and DSS libraries can only be distributed if you by the separate license, which is not really expensive, and the feature to build actual distributable assemblies out of a VPL application is only available in the Standard Edition of the Robotics Studio. Either way, this is a very elegant and impressive new toolkit which is maybe the better the best solution for SOA architectures on the .Net platform today, at least better suited as Remoting or WCF.

50 in 50 presentation at JAOO 2008

Extremely well made presentation about computer languages. I think there is nearly for everyone something he has not seen or heard until today, at least not in this way. What a shame not been in Aarhus this year!
BTW this is also a very interesting style of presentation of Guy L. Steele and Richard P. Gabriel.

QCon 2008 San Francisco Slides

The slides of this years QCon 2008 in San Francisco are available here in public.

How Kevin Bacon Cured Cancer

Found a well made documentation about small-world and scale-free networks produced by ABC Television. In addition to the popular books of Barabási and Watts/Strogatz this one gives a good start. At least it will be also more imaginable why the financial system can fail in days and why the “real” economy is also effected in very short time …

Microsoft CCR and DDS, Part 1

After presenting the Concurrency and Coordination Runtime (CCR) and Decentralized Software Services (DSS) Toolkit at the PDC08, Microsoft released it as commercially available product. Originally, the toolkit is part of the Robotics tool selection and frameworks. This week now the current version was released, Microsoft Robotics Developer Studio 2008, as free, downloadable, Express and normal Standard edition. Part of it is the CCR as well as the DSS library, also Microsoft Visual Programming Language is part of the package. The runtime libraries can not be redistributed, for this you have to by the seperate product bundle, but for playing around with the new toolkit this is more than sufficient.
The first interesting part is the CCR. There are three main components:
Ports which provide a type safe, atomic data interface. Arbiters on the other side are responsible for coordination and the execution of the user code. The last interesting piece are the Dispatcher and the DispatcherQueue, responsible to actually react on data posted at a port. Data can be posted to a port and either a Arbiter schedules the execution of a specific user code section provided by a delegate with the help of the Dispatcher. The important thing is, that all calls are atomic and is thread safe, so there is no need for locks. Basically it works conceptually like message passing. The CCR is very well documented and provides the basic structure for the DSS and most of the Robotics services. One interesting concept is how iterators are used to handle the asynchron program workflow. For this a small code example which uses them for reading a file can demonstrate this:

IEnumerator FileReadEnumerator(string filename)
{
    // this is the port which is responsible for handling the 
    // IAsyncResult structure
    var resultPort = new Port();

    // open the synchron file read stream, and this is important: inside
    // a dispose block
    using (FileStream fs = new FileStream(filename,
        FileMode.Open, FileAccess.Read, FileShare.Read, 8192,
            FileOptions.Asynchronous))
    {
        Byte[] data = new Byte[fs.Length];

        // start reading from the file, the port post function is used
        // as callback
        fs.BeginRead(data, 0, data.Length, resultPort.Post, null);

        // the second important thing: the iterator suspends until the port
        // gets data, meaning that asynchron processing has finished. A
        // empty delegate will be executed at this event
        yield return Arbiter.Receive(false, resultPort, delegate { });

        // get the actual asynchron result structure for closing the port
        var ar = (IAsyncResult) resultPort;
        try
        {
            Int32 bytesRead = fs.EndRead(ar);
        }
        catch
        {
            // handle I/O exception
        }
    }
    ProcessFileData(data);
}

This implicit iterator is now called by the following code snippet:

Dispatcher dispatcher = new Dispatcher();
DispatcherQueue taskQueue = new DispatcherQueue("Default", dispatcher);
Arbiter.Activate(taskQueue,
    Arbiter.FromIteratorHandler(() => FileReadEnumerator(@"C:\test.txt")));

The arbiter is using the handles the delegation to the actual file reading logic and works in non-blocking mode, the iterator is responsible for the actual program flow. The beauty of this code is that the program flow in in one, optical, sequential flow and has some important advantages
instead of using anonymous delegates. For one thing the using() ensures that the file stream actually gets correctly closed while not using delegates it is possible to use parameters and local variables which can lead to problems otherwise.