Monday, November 24, 2008

Error 9009 in Visual Studio means....

that Visual Studio can not find the executable you specified probably in Pre- or Post-Build command line.

That can have 3 reasons:
1.) There is no PATH environment variable set. You need to include the full path to your executable.
2.) You need to quote the fully qualified path to your executable if the path includes any blanks.
3.) The file really does not exist.

SvcUtil.exe parameter1 parameter2 will fail

C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\SvcUtil.exe
parameter1 parameter2 will fail

"C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\SvcUtil.exe"
parameter1 parameter2 will do.

Tuesday, November 18, 2008

Bug in Visual Studio 2008 WSDL Interpreter

When I started working with Flat-WSDL we soon came to a phenomenon where our list types suddenly become converted to


instead of


It took a while to drill down the cause to the following.

A common wsdl:types section looks like this:

</xsd:schema ....>
</xsd:schema ....>

but whenever there is the following section in the WSDL

<xsd:schema ....>
<xs:schema xmlns:xs="" ....>

you can not switch the ListTypes anymore. They will all be ArrayType[] . This applies for the ServiceReference as well as for svcutil that simply ignores the /ct: Parameter .

Both WSDL descriptions are perfectly valid as both tokens xsd: and xs: reference the Namespace and hence are synonyms.

I reported the bug to Microsoft using Connect (MSConnect ID:387245). But I heavily disagree with their answer, which basically says "It's not a bug it's a feature". You should find some samples wsdls there.

IT Hall of Shame


Oracle column alias length limitation

The following SQL:

select 1 as "Why shouldnt you have a very long column name" from dual

will result in

"ORA-00972 identifier is too long"

The maximum length for a column alias in Oracle is 30 characters. Guys, we live in age of Terabytes!

Trying to pass a list as parameter

Try the following SQL:

select 1 from dual where 1 in (:var)

with :var = 1 (works)
with :var = 1,2 (no error but no result. The list is interpreted as float)
with :var = 1,2,3 (error Invalid number)

There is no way with standard SQL instruments to pass a list as parameter in Oracle.

Saturday, November 8, 2008

The Variant strikes back

Anders Hejlsberg, lead-architect of C# announced at the PDC 2008 that C# 4.0 will be enhanced towards a dynamic language. With the keyword "dynamic" you can declare a variable as a datatype that will be bound at runtime rather than compile time.
The background is, that it will make the use of COM components much more convient. Today you link your code against the exact version. If the version of your component is not installed on the remote computer your code will fail, even if the interface the installed component has not changed.
Reflection is in its usage for emergencies only and not suited for complex interfaces. Your code will become a huge mess if you try to handle complex objects.

So this is a HUGE break with current C# dogmas..

But wait a minute! Don't all of you, who know what's behind the letters "VB" feel strangely remembered? Something we thought we had burried a long time ago?

The VARIANT strikes back!

And to be honest, coming down the C, C++ path I feared and hated it, whenever sub-average VB programmer colleagues started using it in their code. The Variant or Dynamic liberates developers from spending a minimal time on thinking before start coding. They simply declare some global "Variants" and use them to store whatever comes along. Absolutely impossible to tell whats the content of the variable when you read the code. The absolut horror of everyone who has to maintain or debug this kind of code.

I clearly see the advantages of runtime binding, but I see the immense risks the same time.

Maybe you should pass some sort of qualification exam to get this type enabled.

"Anders Hejlsberg, Chef-Architekt der .Net-Programmiersprache C#, hat im Rahmen der Microsoft Professional Developer Conference (PDC) in Los Angeles neue Sprachfunktionen für C# 4.0 und die darauf folgende Version erstmals vorgestellt.
Die Hauptneuerung in C# 4.0 ist die Erweiterung in Richtung dynamischer Sprachen. Mit dem Schlüsselwort dynamic können C#-Entwickler in Zukunft eine Variable so deklarieren, dass die Bindung erst zur Laufzeit stattfindet." (

Microsoft rewrites Workflow Foundation from the scratch

In a keynote at the PDC 2008 conference the speaker Kenny Wolf announced that Microsoft is rewriting Windows Workflow Foundation from the scratch. The basic concepts will be retained but the implementation and all components will change fundamentally. It will be shipped with .Net 4.0 and will not be compatible with current Workflow Foundation Code.

One of my next articles in this blog would have been titled "Why I do not believe in Windows Workflow Foundation". I think I can skip this article now, as Microsoft obviously has come to the same conclusion.
First of all. If you want to do workflow driven development, the current Microsoft strategy is a mess in itself. Do I use Workflow Foundation, Workflow Foundation for Sharepoint, Biztalk or what? Currently we have 3 products offering more or less the same. But even even if you get behind the point of simply chosing Workflow Foundation things do not lighten up.
If you look closer at the word "Workflow" you will soon encounter some philosophic problems.
What is a workflow? Are we talking about program level workflow, about technical workflows or do we even talk about interactive workflows, are we talking about business processes, do I store my business object in the workflow object, when do I use sequential workflows or state machines....
Workflow Foundation fails to answer any of these questions and hence gives you no clear strategy what WF is aimed at. For me it felt like getting a tool box tossed at my head with a sticker on it saying "Find out what it's good for".
To the point where I used Workflow Foundation in technical workflow, things where working out but when I got to the point where I tried to implement an interactive workflow with just 4 states things were getting messy.
The whole communication concept with workflows is a mess, the Workflow controller is unbearable slow, the workflow designer shipped with Visual Studio 2008 was ***unusable*** before service pack 1. If you want to user persistence or tracking you end up rebuilding the database frequently, because errors come up that can not be solved differently.
The WCF-WF integration example published by Microsoft definitely belongs into the Hall of Shame. A calculator that needs a Start() and Stop() Method before/after it does calculate something. Jeeeez. Who dared publishing something like that? It clearly shows that both techniques where designed independently and were never designed to interact.

But with the new approach am looking forward to see what the result will be. I definitely believe that the future of development will be workflow driven. Software definitely needs to get to the point where my business process reflects in software. There and only there I benefit from workflow driven development.

"In einem Vortrag auf der PDC 2008 offenbarte Sprecher Kenny Wolf, dass Microsoft die Windows Workflow Foundation (WF) noch einmal von Grund auf neu schreiben wird. Die Konzepte einer Laufzeitumgebung, die aus einzelnen verbundenen Aktivitäten bestehende Workflows ausführt, bleiben zwar bestehen. Auch die Workflow-Dienste wie Persistierung und Ablaufverfolgung wird es weiterhin geben.
Die Implementierung und alle Bausteine (Laufzeitumgebung, Aktivitäten und Dienste) werden sich jedoch in der kommenden Version fundamental ändern. Die neue Ausgabe wird nicht mehr kompatibel sein zu den derzeit am Markt verfügbaren Versionen." (Heise)