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

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

Valve Made Me Mad

   I was browsing the Steam Store today with the intent to buy Left 4 Dead. However the price seemed a bit high. At 45€ I had better buy the retail version which costs only 70 leva (about 36€) in Bulgaria. After asking around it seems that there is no way to revert back to USD. I was furious so I submitted the following support ticket:

   Hello,

   It seems like the option to revert back to US currency is missing. Will you please manually revert my account to USD as it was before. Also I hope that you will able to fix this BUG soon because as it seems other people ( http://forums.steampowered.com/forums/showthread.php?t=770231 ) cannot find the option either. I am absolutely sure that it is just a software BUG that you are not aware of and Valve did not mean to insult the European players' intelligence. I have been a loyal Valve and Steam customer for years. I like buying my games online but if Steam games are going to stay 30% more expensive than their retail versions I will have to go back to buying useless boxes from retailers. Another good workaround until you fix the BUG will be to ask my friends living in the USA to buy me games as a gift.

   Also if you do not fix this BUG I will probably change my opionion about your great customer service and may stop buying every game that Valve releases. What is more I am not looking at third party products but at Valve's own Left4Dead and I am comparing the prices with the retail prices here in Bulgaria in the European Union.

   To sum up my question: WHAT THE FUCK WERE YOU THINKING?


   It seems that a lot of people are pissed off. This 120+ pages thread on the Steam forums proves it as does this 8000+ steam group. If Valve do not fix this after the holidays I am going to file a complaint to the European Commission as suggested in the thread.
Posted by:   Stilgar
04:50 24.12.2008
First Previous ... 11 12 13 14 15 16 17 18 19 20  ... Next Last