Category Archives: Uncategorized

Mono is here to stay.

I couldn’t agree less with the idea that Mono is dead. That is the nice way that I say that I think someone is so dumb that they should not be allowed to write and communicate their opinions with others. I’m talking to you Neil McAllister. Mono is here to stay. I refuse to type the title or subtitle of the article to which I am referring.

Open sourcing Java under the GPL has no benefits compared to the state of Mono. At least half of the points regarding Microsoft and patents in the article are addressed on the Mono website under the Licensing FAQ. Neil McAllister is worse than the slime of the Open Source community that is Bruce Parens. Bruce just makes very stupid comparisons of closed source to the abomination of slavery. Neil just flat out lies. Alright, I retract that. Neil is not worse, he is equally low slime.

Neil seems to think that Java is just as good as the CLR (the runtime which runs .NET and Mono applications.

…recent releases of Java have done much to close the gap. Why go over to the dark side when established, mature technology is already available?

I’ll quickly point out that words like ‘dark side’ should immediately trigger the readers FUD detector. This type of illogic is no different than the FUD that Microsoft marketing once propagated which said that closed source was less than secure and written by uneducated teenagers.

What is worse is to realize that Neil believes that Java has done much to close the gap. He obviously has not spoken to anyone who has used both technologies. With Mono and .NET I have the choice of using C#, VB.NET (I can still use the ms compiler and run my code on mono), Iron Python, Boo, F#, and countless other languages. With Java I can choose to program in Java, or… well maybe Groove. Sorry, JPython doesn’t work with modern JVM. Now consider all of the features of all of those languages and compare. Java has TONS of catching up to do.

On this point I’d like to comment that I hope Java catches up and blasts past .NET. It will only mean that Microsoft will be forced to do the same. A healthy game of competitive leapfrog could be very great for developers using both technologies.

Another licensing issue which I would like to pull directly from the Mono licensing faq is just why Mono is NOT licensed GPL. Mono uses an interesting mix of licensing. The compiler and tools are licensed under the GPL. Runtime libraries are licensed under the LGPL. The class libraries are licensed under MIT X11. This means that I don’t have to worry about the GPL unless I am modifying the compiler. I can write software, even closed source, and I can link to the LGPL Mono runtime. I can ship my software closed source, along with an open source mono runtime. With Java under the GPL, technically any software linking to the java libraries must also be GPL. I am not a lawyer but does this means it is illegal to use the GPL version of Java with closed source software? It sounds like it.

The Mono class libraries are licensed under the MIT X11 license for exactly this reason. From the Mono Licensing FAQ:

Originally, the class libraries were released under the terms of the GNU Library GPL (LGPL). The problem with the GNU LGPL is an outdated wording related to “derived works”. A derived work of the library must be covered by the same license as the library itself. This definition was fine before object oriented frameworks existed, but with the introduction of object oriented frameworks, different people disagree whether some code that uses object-oriented inheritance is an instance of a “derived work”.

This is completely ignoring that a high number of the best Linux desktop applications are written in C# and run under Mono. F-spot is the iPhoto application for Linux. Tomboy is sticky notes merged with a desktop wiki. Banshee is quickly becoming an alternative to iTunes for syncing audio with an ipod and does things like transcoding from lossless codecs that iTunes does not do.

On the commercial front, Mainsoft actually uses Mono and IKVM to sell an application that helps people take their ASP.NET applications and run them on a J2EE webserver. At this point the line between Mono and Java is getting blurred. IKVM is an awesome bridge. All those existing Java libraries are accessible from Mono and visa-versa.

It is a shame that ComputerWorld would publish such an uninformed piece, but sensationalism sells.

Dumping stored procedures using boo.

A while ago David Cumps posted about Extracting stored procedure content via SQL.

I liked this post and I knew I wanted to do something with it.  We want to keep a copy of all of our stored procedures in Subversion, our version control system.  This little boo script connects a database server, iterates through all of the stored procedures in all of the databases and outputs them to a directory named after the database.

import System
import System.Data from "System.Data"
import System.Data.SqlClient from "System.Data"
import System.IO

def Main(argv as (string)):

    Exit = System.Environment.Exit
    mkdir = System.IO.Directory.CreateDirectory

    if(null!=argv and argv.Length>0):
        databasehost = argv[0]
        databasehost = "MyDefaultDbServer"

    ignoreDatabases= ["master", 'model', 'msdb', 'Northwind', 'pubs', 'tempdb']

    connectionString = string.Format("server={0};database=master;Integrated Security=True",databasehost)
    print "using connection string:"+connectionString
    conn = SqlConnection(connectionString)
    cmd = conn.CreateCommand()
    cmd.CommandText="SELECT name FROM master.dbo.sysdatabases ORDER BY name"
    reader = cmd.ExecuteReader()
    while reader.Read() :
        if ( not ignoreDatabases.Contains( reader.GetString(0) )):

    print databases

    for database in databases:
        cmd = conn.CreateCommand()
        cmd.CommandText = "use ${database};SELECT name FROM sysobjects WHERE type = 'P' AND category = 0 ORDER BY name"
        reader = cmd.ExecuteReader()
        while reader.Read() :

        print "${database}: ${spNames}"
        for spName in spNames:
            cmd = conn.CreateCommand()
            cmd.CommandText = "use ${database}; SELECT text FROM syscomments WHERE id=(SELECT id FROM sysobjects WHERE name='${spName}') ORDER BY colid"
            reader = cmd.ExecuteReader()
            outputf = File.CreateText( Path.Combine(database, "${spName}.sql") )
            while reader.Read():

powered by performancing firefox

Maybe we like Firefox because it is less fragile

Maybe we like Firefox because it cannot be screwed up as easily as Internet Explorer.

Somehow, ALL new IE windows would fail for me.  At first I thought the popup blocker was screwy, but then (weeks or months later) I realized that right clicking and picking open in a new window was also not working.  A quick use of google gave me the above link.

I don’t see how this same kind of thing could happen with Firefox.  Maybe Firefox will be the better browser for my Mom because it can’t as easily get hindered like IE did in this case.

I know that I’ll never have to register COM dlls to fix a Firefox bug.  My fix for IE was easy enough:
regsvr32 shdocvw.dll
regsvr32 actxprxy.dll

But my Mom would NEVER figure this out.

powered by performancing firefox

Save 10% storage on your Ubuntu installation

sudo apt-get remove –purge nautilus-cd-burner

Immediately save 10% of your used disk space.

Yes, I am storage cramped in this day and age of 750G hard disks.  Yes 250MB is not much.  I don’t care.  It also means I don’t have to download and install updates on all these packages.  I probably should have done a server install.

powered by performancing firefox

Code Better is having a book giveaway.

I like the look of the books, and I’ve referenced Code Better before.  So consider this my entry.

Palermo is blogging about NHibernate again.  It is great to see on Code Better.

I don’t know if Vista upgrade cupons are this soon or not, but I fear it may mean that I’ll want a new computer sooner rather than later.  Of course, I’d be converting the computer to run Ubuntu Linux and run the Windows in a VM.

I finally upgrade my disk in my old computer.   I still don’t know how I was living with a 15G / partition.  It was rough.  I haven’t done such an upgrade in a number of years.  I’m not sure, but I think it was smoother.  I think udev does some magic or something.  I rsynced my / to /newdisk and changed my fstab on the new disk.  fstab maintenance is MUCH smoother using UUIDs and LABELs rather than devices.  In my case I also rearanged cards on my PCI bus so that I could install grub on the SATA drive.  Grub didn’t like the 3ware card, so I’ve been using lilo for the past few years.  I was expecting some problems because sdc was to become sda, but DUH, the module load order didn’t change in my initrd, so sdc did not become sda and it would not have mattered anyway thanks to UUIDs in fstab.  The speed of the 160G SATA disk is so much more than the old 30G disk that it is almost like having a new computer.

powered by performancing firefox

Internet Explorer is truly evil.

I avoid web development.  It is just much more of a pain in the rear end
than it should be.  When I do web development, I test in Firefox.  I
write valid XHTML and valid CSS.  When I have to get something to work in
Internet Explorer, I curse.

So for future reference:


error: invalid character

can happen when one of the scripts which you reference does not

<script src=”scriptaculous.js” type=”text/javascript”>

oops, scriptaculous.js doesn’t exist.  Thank you Microsoft for writing
such excellent and accurate error messages.  The quality of this software
continues to astound me.


Windsor featured on CodeBetter


It is about time that someone other than a Castle Project contributor bloged about Windsor!  David Hayden over at writes about Windsor.

I can’t think of very many applications that shouldn’t be written using Windsor, and I can think of scarcely few more which should not take advantage of Binsor.  The Meticulous Geek even says “I never want to configure my container with XML again.”

Yes, I realized I just linked Ayende again.  He blushed at my last post where I summarized what I thought were the best Active Record and NHibernate related posts of the past 8 months.  It was difficult to stay on topic.  There were many other great posts, but many were about other things.

ORM vs. your own DAL with everything in Stored Procedures

I was arguing in an instant message window today. I was trying to relay the awesomeness that is Castle Project’s Active Record. I realized I’m not a very good arguer. I found myself digging for URLs which I know I had read, which do the comparison of DAL vs. ORM and dispel the myths that “you must use stored procedures for all database access”.

As I was skimming reverse chronologically through Ayende’s blog, I realized that for someone starting off, reading these things in some kind of logical order would help. I’ve decided to try to put things in some kind of order. Regarding Ayende/Oren’s blog, his really is all you need. He links to many other sites with excellent information.
So first, I’d like to try to build a case for using ORM.  I don’t have to do much, it has been done for me:

Just because you are using ORM, doesn’t mean it is magic.  You have to still understand what is going on under the hood.  This is definitely an area in which I am lacking.

It is probably best to read Clemens Vasters post, then read Ayende’s follow ups.  They are very enlightining.  It is great to get both sides of the issue.


Don’t think DLINQ is the answer, or that it does more.  Many DLINQ fans don’t realize that most ORMs have been able to do this stuff for years.

A comparison of LLBLGen to NHibernate.  Now to be fair, Oren is a contributer to NHibernate so he may be a little biased.  I’ve not used LLBLGen, but I have browsed its documentation, and I’d also rather use NHibernate.

On security of the stored procedure approach vs. ORM.  This is a great detailed description.

For some reason there are LIES surrounding ORMs.  Know this:  They are lies.
Some people have responded to others and said “I’ll write my own!”  Oren(Ayende) gives 25 reasons not to:

It turns out he was repeating himself, because he mentioned it a little less detailed months before:

A common problem to run into once you start using an ORM, any ORM, is know as the SELECT N+1 Problem.

I’ve never done this, but I should probably keep it in mind.  I’ll bet I could use it, and it is a great example of how quickly you can get things done using these tools.

I haven’t even read these yet. How could I have missed them?  They go into how it works.
All you wanted to know about Castle’s ActiveRecord – Part I
All you wanted to know about Castle’s ActiveRecord – Part 2

Finally, there is a whole series of posts building up a demo app, including using Brail for MVC.  This is ActiveRecord + MonoRail stuff, a great way to see the big picture.
A couple of items which I think are worth reading, but I couldn’t fit into this semi-ordered list of links.


Once you are familiar with the ActiveRecord library, I highly recommend checking out the rest of CastleProject.  Windsor is awesome.  MonoRail is ASP.NET on steroids.