Upgrade 1.0.9

   I have deployed the new version of the no-blog which contains several improvements:

   1. Added page size setting for the comments.
   2. Clicking latest comments now takes the user to the comment and not just to the news item page.
   3. Removed link to the CSS file from every comment or news item. This means less HTML validation errors.

   I have calculated that moving to the comment after clicking on the latest comments takes on average 2 seconds and even more if the comment is not on the first page. Considering that this no-blog has millions of readers and each of them loses 2+ seconds every time a comment is posted I have just saved thousands of manhours. You can start expressing your gratitude now.

   As always you can download the source code on Codeplex.
Posted by:   Stilgar
22:51 22.12.2008

Ninja

    Who is stronger the white ninja or the black ninja? And who can defeat the white ninja and the black ninja together?

.NET Ninja!

.NET Ninja!

THE .NET NINJA!

    mkochanov is my username in the company domain.

Posted by:   Stilgar
16:25 21.12.2008

Upgrade 1.0.8

Upgrade 1.0.8
   Here is another software update of everyone's favourite no-blog. With this release admins can change the text on the "About" page and the text on the master page. However what really matters is that with this release the Personal Webpage Engine passed the official "Works on My Machine" certification program. I have proudly added the official certificate badge to the website.

Just to remind to any of you who might want to view the code or submit a bug (not that I care about your bugs, mortals), here is the project page on Codeplex - http://www.codeplex.com/BlogNET.
Posted by:   Stilgar
23:17 08.11.2008

C# 4.0 Features Announced

   The big news (actually the big news was Windows Azure but I care more about C# 4.0) from yesterday is that Anders (Hallowed be his name) has spoken. The future of C# have been announced. I bet that many of you mortals are eagerly awaiting my interpretation of the words of the Prophet.
Posted by:   Stilgar
04:49 29.10.2008

OOP in Math

   My coworker Lyubo came up with the following OOP problem while we were having lunch the other day. He says it is a well known problem that you can see on numerous places but it is new to me.

   We know from mathematics that the square is a special case of rectangle. In OOP terms "special case" means inheritance. Obviously the mathematical square inherits from mathematical rectangle. Your task is to create OOP model for that relationship. Lets say that we want the rectangle to expose get property (getter for you Java readers) – the area of the rectangle. This is not as simple as it sounds. Here is one of the simplest (and very wrong) solutions:

   class Rectangle
   {
       /// <summary>
       /// A side of the rectangle
       /// </summary>
       public uint A { get; set; }

       /// <summary>
       /// B side of the rectangle
       /// </summary>
       public uint B { get; set; }

       virtual public uint Area
       {
           get { return A * B; }
       }
   }

   class Square : Rectangle
   {
       public override uint Area
       {
           get
           {
               return A * A;
           }
       }
   }

However this means that the B property is not actually used. This can lead to unexpected results in polymorphic client code. We expect a rectangle to have a area of A*B and somehow it will not if it is an instance of Square. We can override the property setters, add some exceptions but what inheritance means is that the child class can do ANYTHING that the base class can. If you need to add special case behavior for any of the child classes then the inheritance hierarchy you have created is simply wrong. So go ahead make it right... (or view full text for explanation)
Posted by:   Stilgar
00:20 25.10.2008
First Previous ... 11 12 13 14 15 16 17 18 19 20  ... Next Last