Free Microsoft Press E-Books !


Microsoft Press is handing out 3 books:

– Introducing Microsoft LINQ by Paolo Pialorsi and Marco Russo

– Introducing ASP.NET Ajax by Dino Esposito

– Introducing Microsoft Silverlight 1.0 by Laurence Moroney

Silverlinght 1.0 is probably a bit outdated (with 1.1/2.0 close), but the others should be good, judging by the authors. Dino Esposito wrote couple of very good books on ASP.NET and .NET.

See this blog for more details and download links.

Reading source code considered harmful ?


Every software developer will tell you how frustrating it is to trace problem in your application up to the point of third party library call (jar file or .dll / .so – make your choice) – and then have to resort to trial and error exploration, because you have no source code for that particular library module. For this very reason, most developers always prefer working with libraries or toolkits that comes with source code attached – if they have a choice. As a side benefit, these libraries are often free as a beer as well – but being able to understand the module is much more important as whether you have to pay license fee …

Couple of days ago there was an announcement about Microsoft publishing the source code for parts of the .NET framework 3.5. Few years ago such announcement would be a big deal. Now it was received mostly as “yet another me-too move on MS behalf” yawn – when many other really big companies are opensourcing many products, what options does Microsoft really have ? Robert Scoble calls it a “defensive move” and notes that as many times in last few years, Microsoft follows, rather then leads industry:

… this isn’t open sourcing .NET, just releasing the source. That’s even lamer cause the other two have actually open sourced and are accepting submissions from the community. Cool, but when you’re last to do something does it really matter anymore?

Indeed, what was done was not really opensourcing, only publishing the source – because license under which the code is available is none of accepted open source licenses (you are e.g. not allowed to modify the source). But regardless of the legalese details about the license, it is a good thing that developers are able to read the code and use it while debugging, right ? This was my first thought after reading the news. But as several people pointed out, you should be really careful before you look at the code. Steve Vaughan -Nichols even considers this to be an deliberate, malicious attempt to trap open source development – especially the Mono project.

At first it sounds crazy – why would Microsoft want to stop the Mono that exports the .NET technology to other platforms and this way helps to remove one of its main disadvantages against Java ? The one possible explanation – sounding a bit like conspiracy theory offers Kevin Hoffman (btw, it is really readworthy blog) in this post:

Microsoft is going to shut up a lot of whining Open Source people who claim that MS is just a big closed system. At First. If you ask me, the real reason for them releasing this source code is to make it more difficult for the mono project to create replicas of WPF, WinForms, and ASP.NET. With the source code available for all to see, it is far easier for Microsoft lawyers who might potentially engage in law suits in the future to claim that the people working on the Mono project stole their WPF code or their WinForms or ASP.NET code from the public BCL instead of building it on their own.

and also

What if, let’s just say, Mono suddenly became as feature-complete as the regular .NET Framework. You think Microsoft wants to start losing server business (where it makes all of its real money…) because a bunch of .NET developers decided to run Linux .NET instead of Windows .NET?

This may sound pretty wild speculation, but unfortunately just few days after release the source code, a patent infringement lawsuit was filed against RedHat and Novel. Not directly by Microsoft, but one cannot help to suspect some involvement from Redmond, considering the remark of Steve Ballmer that

People who use Red Hat, at least with respect to our intellectual property, in a sense have an obligation to compensate us ..

Now is this really a plot to derail open source project(s) – or just a symptoms that Microsoft became so large that two groups do not coordinate their steps and while one group (“techies”) trying to evolve their platform and push .NET adoption release the source, other group (“lawyers”) at the same time goes after money and very real threat of open source competition. Is it a malice or just an exceptionally bad timing ? Should we trust that it is actually OK to look at the source code ? Should we really trust a company that claims that open source software violates 235 their patents ?

Make your own conclusions – but note that Mono development team contribution policy explicitly disallows even looking at the .NET source code.

If you have looked at Microsoft’s implementation of .NET or their shared source code, you will not be able to contribute to Mono.

That may indicate something. Even if you never plan to contribute an open source project, consider what impact would have a potential legal dispute regarding intellectual property for your company, your product or your project – should it happen – and should you or your team have been using the source code in question, even if for debugging. IP lawsuits and very hard and very expensive and guess who is better prepared for a long legal fight :-).

As for myself, I will stay away from the hot source potato and use just the .NET documentation, however bad it is.
There is, after all so much great elegant and free source code to read (even in C#) …

MSDN Documentation – the follow up


Judging by the number of hits, Joel (and myself) are not the only people who would like to see nicer, better and faster MSDN documentation. As a very nice surprise, some of the feedback came directly from the people than actually can do something about it – like Darren Parker from Microsoft and Anand Raman from the Sandcastle project. Rob Relyea suggested and interesting looking tool based on XAML.

Thanks everybody – it is always nice to find out that even really big companies listen to the developers and want to address the problems. It almost feels like OpenSource experience where (it was few years back) we have encountered an issue in one of many Java templating libraries, posted to discussion group a question and few hours + several emails later had patch for the bug from the library creator :-). But back to the topic.

In addition to the issues mentioned yesterday, I’d like to add few more suggestions:

1) Multiple languages on the same page.

In theory, it sounds great to be able to select in which .NET language syntax I want to see the class, but …. In real life, we seldom switch languages. The project that starts as C# projects will stay C# project – and for several months the developers will not care about documentation in anything but C#, certainly not J# or Javascript … For that reason, ability to dynamically switch languages is not really important. And who needs J#, anyway 😉 ? If there is one thing that should go to sub-pages, the “other languages” should be it.

2) Visual organization

Sounds like minor problem, but it impacts usability a lot. Few examples: The icons in the first column can be safely dropped and free space better used to add the return type and parameters. Position in the inheritance tree and list of parent classes / implemented interfaces (hyperlinked) should follow. After that, the list of members – constructors, methods, properties etc, preferably in single page with links to detail page / code examples. Just compare the definition of DataSet in Mono documentation and in MSDN to see the difference.

3) Postback behaviour

Frames are old and out of fashion, but IMHO still best solution for some sort of tasks – such as documentation. One of killer features of frames is separate and independent reload of one frame while others keep the selection, scroll position etc. Why does the MSDN page – which uses frames – have to reload all of them ?

4) URL’s

In the spirit of REST, the URL should be descriptive and understandable. The MSDN URL’s are not bad – take for example

I am not sure, however, what value adds embedding the VS version into URL. It may be sometimes interesting to see the changes between the 1.1 and 2.0 versions of the same class, but it would be cleaner to make the “split” at the top level ( e.g.

) and provide link from the 2.0 version of DataSet documentation to 1.1 / 1.0 version of the DataSet documentation. This is immensely usefull if you are porting the 1.1 application and need quickly review the changes.

4) Breadcrumbs or Dynamic Menu or what the heck it is

I mean this:


This is something that really should be reviewed, both from implementation and well as content perspective. As I see it – it tries to be several things at the same time and does not really do properly any of them. It duplicates part of the path in tree in left frame, interwoven with some other information.

Some members of this construct are just plain confusing – for example Previous Version. Assume that I am on DataSet documentation and Click on Previous versions, it lands me either on starting page for .NET Framework 2.0 or 1.1 implementation. The problem is that NONE of these pages has anything to do with page I was on – the DataSet – and only way how to get back is Back button …

From usability perspective, selection in the “menu” often causes postback and redraw of all frames …

One more thing: it is not really important (and it may not be a problem on Microsoft side), but the left-side tree does not load in Safari on Mac – not that there would be too many people reading MSDN documentation from OS-X platform 😉


MSDN Documentation – the worst in class ?


Did it ever happened to you that you were using some tool day after day – and never realized it’s pretty big deficiencies ? Until somebody, coming from different background pointed out what everything is wrong with the tool ? Before that moment of revelation, the issues were just inconvenience, but right after that they became real annoyance ?

Exactly this happened to me last week and the credit for pointing out what is wrong with MSDN documentation (and the “standard” .NET documentation format in general) goes to Joel 🙂

For developer using object oriented language such as C#, Java or Ruby, what you need on daily basis is to find information about a class, see its public interface,members, constructors, method signatures. Ideally, on single page, with possibility of drilling down to the details of a method and to a code example. You also very often need to see all implemented interfaces, have easy access to parent class and (in case of e.g. an interface inside a framework) to access the implementing classes or derived classes within this context.

Unfortunately, the Microsoft .NET documentation makes this simple task not exactly easy, pleasant or fast. As an example, lets take something really simple e.g. DateTime struct. In the documentation, information about this simple class are separated to 6 pages: datetime structure itself, Members, Fields, Constructor, Methods and Properties. If you would expect that with this devotion of low level categorization the particular page for e.g. Methods will give you all details about all DateTime methods, you are wrong. What Methods page gives you is just list of names, not even a method signatures – parameter types and return values are missing. To get this information, you must click through into the page dedicated to that method. If the method is overloaded (take e.g. omnipresent ToString), the Methods page contains only one name and only the next page gives you the signatures, linked to another page with details. See for yourself


In addition to bad information structuring, almost every link causes full page reload.

Compare with how much more usable is the Java documentation: it is very easy to see all interfaces, methods, constants, parent classes, implemented interfaces in single page. The dated frames-based UI actually makes lots of sense and is (except AJAX based dynamic site) much better way how navigate the documentation.

With all that said, I am not surprised that the tools such as Reflector are so extremely popular in .NET world. It not only provides very useful debugging/inspection tool, but thanks to excellent and compact presentation of information about the class retrieved from reflection, they are the fastest way how to get meaningful information on core classes API. Other than Reflector, the other fast way how to get information on .NET core library details is Google search.

Try for example how fast you can access a documentation for particular class starting with Google search – let’s take e.g. WebConfigurationManager. Google search returns blazingly fast (as always) – with the MSDN page as first hit. Now compare how fast you will get the same information starting from MSDN home page, (which is btw, advertising ‘new and improved search and navigation‘). Your mileage may vary, but I usually see 3-8 seconds delay in search response (compare to <0.5 sec for Google). Few seconds seems like no problem, but when you do it all the time, it easily becomes pretty annoying. Even more so when you realize that Google is searching WHOLE WEB, with content they do not own or control, only index and rank, whereas MSDN search is searching MSDN data repository, which is – however you measure it – by many orders of magnitudes smaller and Microsoft fully controls most of it’s content.

Why cannot the largest and most powerful software company create documentation that is useful and usable ? Even the documentation for the OpenSource Mono project (port of .NET to Linux and other platforms) is *much* better than the original. See the class DateTime there for comparison: the menu is dynamic and does not reload page every time you click on a link, the methods have full signatures and everything is on single page with local links and only details are on second level page.

Martin Fowler’s article on Ruby and Microsoft


There has been lots of interesting news related to Microsof and Ruby recently, mostly about DLR’s support of dynamic languages. One of my favorite tech authors stirred the waters once again last Friday with an article that goes beyond this and tries to paint larger picture of the uneasy relation between Ruby platform, Agile movement, OpenSource Community and Microsoft.

One quote from the article:

The attitude to open-source is a large part of this problem. When Java appeared there were yawning gaps in its portfolio, and worse some dreadful standard tools in its API (visions of Entity Beans spring to mind). Those gaps and bad ideas were fixed by the open-source community. Ant gave us a build tool, EJB was displaced by Spring and Hibernate. .NET has also got its gaps, and again the open source community has stepped up to fill them. Yet Microsoft refuses to collaborate with these efforts, even seems to go out of its way to undermine them. I was particularly sickened by Microsoft’s reaction to NUnit – an excellent XUnit testing tool, elements of whose design were lauded by Anders Hejlsberg at OOPSLA. Microsoft ended not just bringing out a competitive library, but deliberately making it incompatible. That’s not the kind of reaction that encourages people to invest their time in the platform.

There has been many reactions, the most notable by Rocky Lhotka, Sam Gentile, Cory Foy. They do not necessarily agree with Martin Fowler (but quite often do), but mostly they do confirm, that there is indeed a problem with how to deal with Open Source. Microsoft on one side would like to be the center of grass-root movement, lead and inspire it and benefit from innovation coming from the masses – and at the same time keep full control over the community project’s direction and code base. This is impossible, as other companies (like Sun) found out the hard way.

Unlike the reactions above, there was also lots of very different reactions – as one could expect with such flame-baits in text 🙂 Like this one – proudly promising “deconstruction” of Fowler’s article. The author even found in the article lots of between-the-lines meanings like:

“Fowler is, in almost as many words, claiming Ruby is not a language, but a religion. Complete with values (commandments), a community (church), and a priesthood (himself, among a few others). I had to pick myself off the floor the first time I read that. ”

Strangely, even after re-reading the article, I did not see that. What I saw is confusion between the community passionate about platform or technology and a religion. Which only confirms that it is very hard for Microsoft’s hardcore fans to understand how open source movement and communities work. I think that an unbiased reader can find the Aaron’s article filled with more religious-like zeal than Fowler’s:

“LINQ, Lambdas, Expression trees, WCF, Workflow, WPF, Silverlight (again), IronPython, IronRuby, holy !@#$. A loud yawn? From whom? Certainly not from my clients or colleagues, who are salivating over this stuff. LINQ, more than Ruby, more than Java, will change the way we code – no other language since Foxpro has had this level of support for set operations directly in the language (yes, I know people that still do Foxpro, and they are laughing their *!#es off at how LINQ is a reinvention of what they have been doing for 20 years, but I digress).”

Truly enough, there is merit to the statement that mixing SQL (or SQL like) code with language used to code the user interface (which in a nutshell is one the LINQ “innovations”) has potential to change the way how we code. For the worse …

The other caveat is that it already did happen few times – and latest incarnation of this masochistic coding practice is used a lot in the PHP camp. And before PHP – let me think: DBase ? FoxPro ? MS-Access ? SQL-C ? None of these is exactly major enterprise software platform today, right ?

I also quite share the excitement for lambdas and other functional programming constructs, but do not quite get how should they be a LINQ or Microsoft’s innovations – or innovations at all. Apart from the fact that languages such as Python, Ruby, Haskell do have very powerful functional programming support for like 10-15 years – and IMHO better one than C# or LINQ – all this goes back to Lisp, which will be celebrating 50th anniversary next year.

But it is not the technology that is main source of tension and controversy here. It is the relation between open source projects and Microsoft. This relation was always problematic one – which is one of the reasons why are there so relatively few thriving OSS projects on Microsoft based platform, considering the Windows domination (I do NOT say that there are few projects, I am saying that with Windows owning maybe 90% of installed PC base, there should have been many more MS toolset based opensource projects than there are).

As one the reactions on Fowler’s article did put it: “Microsoft consistently moves to take the air away from its competitors, and it views successful OSS as competition. If you ask me why my team at Oxygen uses MbUnit instead of MS Test, Castle instead of ObjectBuilder, NAnt instead of MSBuild, and Subversion and CruiseControl instead of Team System, there are a few reasons. The first set of reasons are the standard OSS arguments: control, community, fitness to purpose, and price. The second set of reasons boil down to me being pissed off that Microsoft is trying to suffocate these projects instead of supporting them.”

Our recent experience with last two large .NET projects confirms this findings – we ended up using NAnt rather than MSBuild, because it was much easier for us to enhance and extend it, using CC + CVS/Subversion + MbUnit rather that VSTS – as there was no appealing reason to justify the cost and overhead.

As long as this is reality, the strange relationship MS vs OSS will probably continue. Which is too bad – because pragmatic software developers need the MS platform and MS needs developers and thriving communities. The .NET is pretty decent development platform – the best we had on Windows in last 20 years. After developing for many years for Windows in C with Win32, C++ with MFC and ATL, COM and DCOM, VB and doing ASP Websites I really do value how huge improvement is C#, .NET and the VS2005. It is therefore very sad to read that people and teams who work on improving the tools for the platform are attacked, rather than supported by the platform owner. Or hear about legal threats and possible patents lawsuits against open source …

To demonstrate how company cares for developers, shouting Developers, Developers, Developers does not really cut it – even if shouting is really loud and delivered by the CEO. Supporting and encouraging more really successful projects like DotNetNuke or Mono – or sites like CodePlex does.

Code in Ruby under ASP.NET: coming soon ?


The support for using dynamic languages such as Ruby or Python to code ASP.NET pages was announced for future versions of ASP.NET in the ASP.NET futures.

Unless I am mistaken, it means that we eventually will be able to write control event handlers in Python or even Ruby – which is certainly more fun than in VB.NET or even in C#, but is it really so important ?

What would be *really* cool if the whole ASP.NET become more agile and more “rail-ish”. To make overall architecture more flexible – such as departure from not very flexible page-centric architecture towards MVC and routing. Maybe some version of ActiveRecord ? Or even multiple (and pluggable) template languages ? That would be really something.

BOTD (blog of the day): Frans Bouma’s Blog


A brief look at my Google Reader subscription list made me aware that I have added to my reading list a loooot of blogs, newslist and so on. Unfortunately, they are not organized very well and should be properly placed into folders. In a process of doing that, I will put some of the interesting blogs here.

For today, it is Frans Bouma’s blog – focusing on .NET and Microsoft technology platforms. From the most recent good articles, look at why API’s should not be designed by scientists – discussing and comparing various ways how the database level paging is handled in various databases (MySQL, PostgreSql, DB2, Oracle, SS2005), or read Frans’ comments on Entity Framework being cut from .NET 3.5 – which is sad, but IMHO fairly accurate summary of the recent development. See for yourself.



DHH is (obviously) David Heinemeier Hansson (the creator of Rails) and RIA (in this context) means Rich Internet Applications. And here is the quote:

I think there’s always room for new ideas, but I don’t think that the whole fuss that’s currently going on about RIA, rich Internet applications, is justified. I think we’ve been through this cycle so many times before that it in some ways amazes me how history seems to be ignored. We went through this with Java applets, they were going to rule the Web. Everything was going to be in a Java applet. HTML and CSS is history. And Flash came around, and Flash started focusing on applications. Now Flash is going to rule the Web and HTML and so on is yesterday. Now, Silverlight, Apollo, JavaFX, they’re all bidding to take over the JavaScript, HTML and CSS [spaces], and I just don’t buy it. I don’t buy that developers by and large are going to jump into a proprietary technology and replace what HTML and CSS has given them.

Read the full interview here

New kid on the block in race to be Flash killer


After Adobe’s Apollo and Microsoft’s Silverlight, Sun has addes own version of scriptable, interactive platform named JavaFX. Unlike the previous three (Flash included), this is going to be Open Sourced – under the Microsoft’s most hated license – GPL.

Now the race to replace Flash  really becomes  really interesting …

Differences between Visual Studio and SSMS


I am working on the BI modules for automotive data-analytics application these days. Which means that I am doing quite a bit coding and using T-SQL and in addition to Visual Studio 2005, I use quite often the Sql Server Management Studio for SQL Server 2005. In theory, both tools should be based on the Visual Studio IDE code base. Which is maybe true, but there are many quite annoying differences.

Some of the differences is available featureset. I wish there was single tool that had all the database features of both: strong scripting capabilities of SSMS and much better development support with debugging in VS-2005. One can understand that the tools were meant to serve different audiences, but why not make the SSMS a lightweight, trimmed down version of VS2005 targeting database and OLAP projects only ?

Some differences are really annoying though. One discovered today is related to GUID’s. Take the code sequence

Declare @MyGuid uniqueidentifier
set @MyGuid = NEWID()
select 'aaaaa', @MyGuid

You would expect that the result will be one row, consisting of value ‘aaaaa’ and some GUID, right ? Wrong. It is true only in SSMS as the picture shows:

SQL Server Management Studio

In Visual Studio 2005 SP1, the result looks like this:

Visual Studio without conversion

which on one side announces 1 row in resultset, but does show the same result as if the resultset was empty. As we found out, the problem is related to displaying the GUID value – if your resultset does not contain it, the row will show OK. Same result can be achieved using explicit conversion, as shown in the picture:

Visual Studio with conversion