Galin Iliev's blog

Software Architecture & Development

Learn C# 3.0 by solving interesting problems

Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.

Bill Wagner started solving them employing new C# 3.0 features and post them in MSDN Code Library.

Follow his blog post series to learn them.

Of course it is preferable to try to solve them by yourself in order to tease your brain :)

IIS7 Admin Packs add analytics features

IIS7 is grew to a development platform and become the most wanted feature in the new Windows Server 2008. But this is not the end - IIS7 Admin Pack first CTP is here and provides a nice set of features that can help you to understand what is happening on the server...

here are new features in short:

  • Database Manager: Built-in SQL Server database management, including the ability to create, delete, and edit tables and indexes, create/edit SPROCs and execute custom queries.  Because it is integrated in the IIS administration tool it all works over HTTP/SSL - which means you can use the module to remotely manage your hosted applications (even with low-cost shared hosting accounts), without having to expose your database directly on the Internet.

  • Log Reports: Built-in report visualization with charting support for log files data.  Full range selection and custom chart creation is supported, as well as the ability to print or save reports.  Like the database manager you can use this module remotely over HTTP/SSL - which means it works in remote shared hosting scenarios.

  • Configuration Editor: This is a power module that provides complete control over editing all web.config settings within the admin tool.  You can configure it to track the changes you make using the UI and have it auto-generate configuration change scripts that you can then save and tweak to re-run later in an automated way.

  • Request Filtering UI: This admin module provides more control over the new request filtering feature in IIS7.  Check out Carlos' blog post here for details on how to use it.

  • .NET Authorization: This admin module provides a custom authorization rules editor which allows you to more easily manage the ASP.NET <authorization> configuration section.

  • FastCGI UI: This admin module provides more support for editing all the new <fastCGI> settings (for when you use FastCGI modules with IIS7 like PHP).


While DB manager can save you time jumping between applications Log Reports definitely rocks. It gives you an option to view activities on the server in very convenient form in following categories:

  • Web Server\Status code:  This report gives the comparison between number of hits and status code.
  • Web Server\Hits Per Url: This report gives the comparison between number of hits and the Url.
  • Web Server\Hits By Hour: This report gives the comparison between number of hits and the Hour.
  • Web Server\User Agent: This report gives the comparison between number of hits and the User Agent.
  • Web Server\File Extension: This report gives the comparison between number of hits and the file extension.
  • Web Server\User: This report gives the comparison between number of hits and the User.
  • Web Server\Time Taken: This report gives the comparison between Average time taken and the Url.
  • Web Server\Win32 Errors: This report gives the comparison between Hits and the Win32 Errors.
  • Web Server\Client Machine: This report gives the comparison between Hits and the Client Machine.
  • Web Server\Http Method: This report gives the comparison between Hits and the Http Method.

Just see these screenshots:

For more info visit these links:

Outsource your own job :)

I've just read an interesting article on The Micro-Multinational

And the story begins with a programmer in US who outsourced his own job to a guy in India. The magazine says this is "all win" situation because:

By subcontracting out the generic parts of his job, the programmer gives himself a promotion. The Indian developer is well paid. The employer gets good code.

I would strongly disagree: at least the employer gets code with a delay because of additional communication between a US programmer and the one in India.

I am also strongly for outsourcing as long as it put a brilliant people together to create a better product. But the quality should not suffer. Also it is not very loyal to keep this as a secret to the management because delays should be considered in the estimations (which are hard enough to create :) in software business ).

How big is .NET Framework!?

.NET Framework become a blockbuster right after it's release for many reasons. Part of them are:

  • good architecture
  • unified dev style independent from the application type
  • consistent API
  • constantly improved APIs and libraries that solves most common tasks and minimize doing same thing over and over again (take for example writing WinForms application with VC++ 6.0 - there you had to write code for the window and buttons; you had to call a method just to move data from variables to UI controls and vice versa)

This comes with the price - the price of the size!

3-4 year ago it was possible for one to cover all aspects of dev types. For instance I still have no time to ramp up with .NET 3.0 (WF, WCF, WPF, Cardspace) although I had some basic ideas about it but still nothing in production. The funny part is that I am very acknowledged with .NET 3.5 (even wrote a tutorial ;) )

Is it huge or I am getting old???

This is how big is .NET Framework in numbers:

I feel this when beginner devs are asking me where to start from.

Thanks, Brad for this interesting info! Brad Abrams asked in his post: "Any guesses on how many types will be in .NET Framework 4.0?"

IIS7 supports media streaming through new module

IIS7 team released a new module that will optimize the work and bandwidth usage of media serving sites

Imagine this scenario - a client connects to your video site, clicks on your featured video, watches 5 seconds of it to realize they have no interest in watching further, and move on to the next video.

In those 5 seconds, the server could have sent out 5 minutes worth of the video, and you paid for 5 minutes worth of bandwidth. With the bit-rate throttler + media bitrate detection, the server would only end up sending a little over 5 seconds worth, and you would end up paying only for what was used.


Download links:
- 32 bit -
- 64 bit -

Read full blog post of the daddy of this project.

Update:ScottGu posted a more detailed post on his blog covering this module with some screenshots

The below whitepapers describe how to enable and use it more:

ADO.NET Data Services Framework samples

As project codename Astoria has new name "ADO.NET Data Services Framework " and it is part of ASP.NET 3.5 a.k.a ASP.NET futures it has its place on site.

There are plenty of samples and descriptions what is it and how to use from client and server site.

If you struggle what is REST and how it is different than well known web services  take a look at this web presentation: Reconciling Web Services and REST Services.

Microsoft DevDays 2008 in April

The registration for the biggest annual event for developers in IT pros in Bulgaria is open. It will be held in International Exhibition Center - Sofia, Bulgaria. For second year in row it is paid event but the price is very low for the knowledge one can gain - it is just 50 EUR.

I am going to present two sessions: LINQ to XML - Data Access Technologies and IIS7 for Administrators.

If you're particularly interested in some details drop me a line and I will try to cover it. In case it is too specific to present we can chat after the session.

Almost forgot: The event will take place at April 24th and 25th 2008.

See you there!

Visual LINQ

LINQ is a nice way to write a more readable code but sometimes it is diffucult to understand the actions and the order they happens.

Visual LINQ project would give you an idea (watch the screencast of Visual LINQ in action) :

So for this query

VisualSource<string> words = new VisualSource<string>
    (new[] { "the", "quick", "brown", "fox", "jumped", 
             "over", "the", "lazy", "dog" }, 
     canvas, "words");
var query = from word in words
            where word.Length > 3
            select new { Word = word, Length = word.Length};
pipeline = query.End(); 

you will see similar screens:

Download source code.

(For more detailed info read Jon Skeet's blog post Visual LINQ: Watch query expressions as they happen!)

'Hawaii': A Visual Studio Paradise for Developers?! C# 4.0?

After it ships the "Whidbey" and "Orcas" versions of its popular Visual Studio tool set, Microsoft Corp.'s Visual Studio development team is headed for "Hawaii."

Hawaii is the code name for a version of Microsoft's Visual Studio tool set two versions beyond Whidbey, also known as Visual Studio 2005, according to sources familiar with Microsoft's plans. Hawaii will be a completely redesigned tool set, aimed at taking developers well beyond current capabilities, the sources said.

Although Microsoft had been using the names of Pacific Northwest islands, such as Whidbey and Orcas, to code-name new versions of Visual Studio, developers chose the code name Hawaii because it takes developers much further than the other two versions and also because the team plans to celebrate redesigning the IDE (integrated development environment) in Hawaii, sources close to the company said.

(from the Live Spaces blog post and a bit more info here)

Also here are some news about C# v4.0: C# will have dynamic lookup - this is what VB devs call "late binding".

MS MVP Jon Skeet compiled a good list of mistakes in C# design in past releases. Although nice summary of important additions we cannot blame C# Team for not having all goodies in v 1.0