Going Random on an Enumerable

   I have not published any programming articles recently and I know that a throng of readers eagerly await them so I decided to share an interesting task that was brought up by a guy on IRC. You have an enumerable sequence and you are required to write a method that selects a random element from the sequence with just one iteration over the sequence. This means that you are not allowed to call methods like Count because it will iterate through the sequence. You are not allowed to save the elements in another collection. Of course an even distribution of the results is required (i.e. every element should have equal chance to be selected). When you are ready look at the full text to see my solution...
Posted by:   Stilgar
00:37 26.01.2009

Troy

Troy
   Гледам си филма Троя и се възмущавам какви са ги забъркали в Холивуд. Възмущението ми е толкова силно, че реших, че трябва да го умножа многократно като го споделя с многомилионната ми читателска аудитория...
Posted by:   Stilgar
01:50 19.01.2009

Upgrade 1.0.10

   Here is the latest upgrade to my personal website (which should be your homepage). This release contains only bugfixes. I believe that from now on there should be just one XHTML validation error. This error will not be removed for several reasons. First of all I will have to code for a week to recreate the wonderful ASP.NET pager control which renders it. Second it is absolutely harmless - a "disabled" attribute for a link that is ignored with no effect in every browser but IE. And finally it is a sign of defiance of W3C, web "standards" and all of that bullshit. Some issues with cache invalidatin were also fixed. The most important fix is that the Sietch now works in IE8 or at least I hope so.

   As always you can download the source code at Codeplex and even get involved in the development of this software masterpiece.
Posted by:   Stilgar
02:15 16.01.2009

Windows 7

Windows 7
   There is much talk on the Internet about Windows 7. Most of the reviews are highly positive and there are many that proclaim that Windows 7 will save the world from the dreaded Vista. However there are few that actually saw the truth. And the truth is that internally Windows 7 is just Vista. What is more interesting is that with the current beta it is no different than Vista on the outside. This just shows that tech reviewers are morons. The same people that wrote gigabytes of text to prove that Vista is bad are now doing the same to prove that Vista (renamed to Windows 7) is really good. Wait! I predicted it all. However there was something much more interesting in Windows 7 that no one was mentioning until now...

Update 13.01.2009:
Here is a review that agrees completely with what I have written:

http://arstechnica.com/articles/paedia/windows-7-beta.ars/1

Notice that the article was published two days after mine :)
Last edited by:   Stilgar
on   16:55 13.01.2009
Posted by:   Stilgar
15:17 09.01.2009

The Broken Web 2

   If you have not done so be sure to check my first rant about the Web and how broken it is here.

   I was gathering more insight on the state of the web and now I am almost scared. Lets start with some pictures showing the behavior of some well-known, standards-compliant browsers. These screenshots are from a real project of mine. The project is still not visible from the outside world so I did not check it with an HTML validator but I usually write valid XHTML and even if this piece happens to be invalid (which I doubt) I can guarantee that the visual differences are not caused by validation errors. Probably most of you know that valid markup guarantees nothing about how this markup will be displayed in different browsers.
Posted by:   Stilgar
01:30 01.01.2009
First Previous ... 41 42 43 44 45 46 47 48 49 50  ... Next Last