mha.dk

Random thoughts of wisdom - the personal blog of Michael Holm Andersen

ColorBlender - My favorite colour tool..

If you're into website design or just need a nice set of colours for your upcomming logo, I highly recommend "ColorBlender" – A free online tool for color matching and palette design.

It's a joy to use: Simply choose a preferred color using the color picker below, and a 6-color matching palette (a "blend") will be automatically calculated. Using the radio buttons you may switch to Direct Edit mode to tweak or edit individual colors of your blend.

Blends can be saved for future use, and will be available whenever you return to the site.

Check it out at www.colorblender.com

Suzuki GS500F owner

I've bought a motorcycle. A Suzuki GS500F from 1997, which have only driven 30.900km - now I just need a driver license :)

Click to see a high-res image of the bike: gs500_big.jpg (427.10 kb)

Stuff for Visual Studio

Martin (http://unitofwork.dk/) mentioned a link the other day, I think is worth sharing: http://www.visualstudiogallery.com/

Ton's of great extensions for Visual Studio, both commercial and free!

Subversion made easy!

We're using CVS as our version control system at Sonofon and it actually works really well. For some time now, I've been planning to start using a version control system for my own projects, more precise: Subversion.

However a number of posts have claimed that setting up Subversion, Apache etc. is not that easy, but using VisualSVN it is really easy, trust me. VisualSVN is a complete install package for Windows which contains Subversion, Apache and a management console, all you have to do is click "next", "next, "next" - and you're done! :)

After Subversion is up'n'running you'll need a client which integrates the version control system into the Windows Explorer interface. Simply download TortoiseSVN, again it's a matter of clicking "next" a couple of times and you're ready to use Subversion.

Start by downloading the excellent TortoiseSVN manual in PDF. When you know all you need to know about TortoiseSVN, create a Repository using the VisualSVN management console and you're good to go! - All the mentioned software is free and can be downloaded right here:

  • http://www.visualsvn.com/server/
  • http://tortoisesvn.net/
  • http://tortoisesvn.net/support (PDF manual)

Enjoy!!

LINQ Providers

Charlie Calvert has put together a list of links to LINQ Providers and there's some real nice providers available, e.g.: 

  • LINQ to Active Directory
  • LINQ to NHibernate
  • LINQ to MySQL, Oracle and PostgreSql (DbLinq)
  • LINQ to Google
  • LINQ to Sharepoint

Take a look at the complete list

 

Left Outer Join using LINQ

Often we need to do a left/right outer join. A friend of mine asked me how to do this using LINQ - and the short answer is this:

from s in Suppliers
    join c in Customers on s.City equals c.City into temp
    from t in temp.DefaultIfEmpty()
    select new {
    SupplierName = s.CompanyName,
    CustomerName = t.CompanyName,
    City = s.City
    }

Using LINQPad, simply make a connection to the Northwind database and execute the above query.

The "CustomerName" column will contain NULL for the rows in the Suppliers table, where no Customers exists for that specific city.

 

ASP.NET ViewState in depth

Mohamad Halabi has written a very detailed article about ViewState and the page life cycle. If you're not completely sure exactly how ViewState and state tracking in ASP.NET works, I highly recommend reading his article (if you're new to ViewState, you probably need to read it more than once! :-)

The article can be found here