Archive for the Uncategorized Category

Once upon a time in Developer Land, a developer was instructed to build a page that will show the great achievements of the ancients. He diligently started to create a model and used all that he could think of in order to make it good and make its employers proud. He added text and used nice fonts and alignment tags. He used lists to enumerate battles and deeds, and images to depict the stories.

The developer was good in his work and always printed his masterpieces at InternetExplorer’s shop because they were good friends and got to know each other well. And so his latest work got printed there also and it was looking marvelous.

Unfortunately this developer never got to read all 100 Commandments passed down to developers and stopped just short of 57 where it said:

“All tags should be finished by /> or </ …>”

But his friend, the apprentice from InternetExplorer shop knew him well, and if he found a tag not looking like it should he tried to make the best out of it and it was always good.

One day the employers hired a new developer and he was good also, but this one had read the commandments and even though he did not remember them all he had a tool that checked those rules and saw that in his colleague work an <img> tag was missing the end tag and he added it. When printing it at InternetExplorer shop it was looking fine. But there was you see something wrong, as this infamous tag was looking at first like this:

<img id=”imgAchievement” >

but after the second developer with his tool had modified it, it looked like this:

<img id=”imgAchievement” alt=”" />

Now the apprentice at InternetExplorer shop saw this but did not know where is the image that he should put in place and he said to himself that the developer erred and he went about his work and everything was good.

But one day a client said “I don’t like the guys at InternetExplorer shop and I want to use FireFox shop to print” and so he did, but there the apprentice of FireFox was a genius and knew all commandments and when looking at the <img> tag, he saw it was not saying where the image was and so he went about and did what he knew was right and showed there a picture of the whole artwork. But this was not good for the customer and so they tried to fix it but the developer could not speak with the apprentice from FireFox shop because they spoke different languages and only knew what the client said and so they struggled for what seemed to be an eternity.

Then the original developer remembered that a long time ago another client used to print this work at FireFox shop and that there was no problem and so he said “Why don’t we give this customer what I gave the customer from a long time ago ?”. And this was good ’cause the print was fine and wonderful and this because of one tiny thing. The old print had the old <img> tag which the apprentice from FireFox shop saw it was wrong and incomplete and ignored the troublemaker.

But our story does not end here because the new developer was a perfectionist and his proofing tool never failed and when he saw that the model was wrong again he modified it unaware of the troubles it would bring. A while later another client went and used the FireFox shop and the problems were there again. But this one was determined to find out why, and so he took the long journey to the city where FireFox Inc. had shop and through endless discussions and sign languages he found what the problem was, and then he was struck. He did not need that <img> tag, it was not doing anything but trouble and so he removed it and that model was still printed for years to come even on the shop of Safari Inc.

Conclusion

You see young developers we all must abide by the commandments, because by them work also the print apprentices ,and while some learn our habbits and move and make shop in other countries calling themselves FireFox 2 or FireFox 3.0.3 or Internet Explorer 6.1 or 7.0 they all know the commandments. And if we make the model by those commandments we can be sure the prints are as we envision them.

Damn, I knew it would come to this … probably gonna take a holiday … :D

For the nostalgic ones here are some movies from past fallouts:


The intro from Fallout1


This is the famous “War never changes …” story from the intro of Fallout2. It took quite some time to find one that has the sound in good quality.


And finally the intro from Fallout3

Hilarious …

Check this out : http://www.thewebsiteisdown.com/salesguy.html

I never thought to live this day. I have Vista for over an year now and I have never seen the dreaded blue screen on it. I thought it was a thing of the past, an pre-Vista feature :). Still it happened. I tried running the Windows version of the TCPDump and the moment packets started flying through the network pipeline I was presented with the blue screen. Still this happened once in 1.3 years so I can say it’s a pretty good record so far.

Vista is the most stable Windows version I worked with and even though it’s a resource hog, on a high end machine it moves like it should.

Cheers.

Hi there,

I just read a small article on slashdot.org about Intel being on the verge to release 80 and 120Gb Flash drives (solid state drives). Beside this being a quite astonishing news, because we use to think Intel is making only processors and chipsets, one gas got me thinkinh of the current state of computing within the PC area.

I got now a rig with 4Gb Ram, and a SATA2 WD400Gb hardrive and still I don’t feel like my computer is flying or running extremly fast, although there are improvements. But this has a very solid reason - the harddrive. This is the slowest component in a system. The ram supports nowadays around 6400Mb/sec when using 800Mhz memory or 4267Mb/sec when using 533Mhz memory and the internal bus of a modern chipset can handle that easily; and dual core / quad core processor can process most available data on the bus. But all this hit a wall when communicating with the harddrive. Although the SATA2 interface can handle a theoretical 3000Mb/sec, and the best deliver around 2000Mb/sec, because of the physical constraints and how the drives are build, a typical read/write operation is around 1000Mb/sec and that is in ideal conditions.

So what can be done to improve this state of matters. You really have few options and all of them are expensive.

  • Buy a 10.000 rpm drive. This is a simple sollution, but an expensive one as a 32Gb drive has the same price tag as a 500Gb 7.200Rpm drive.
  • Get 2 smaller drives, let’s say 2×120Gb 7200rpm drives and put them in Raid 1 if your motherboard supports that. This can theoretically deliver around twice the bandwidth of a single drive both in writing and reading. This I think is the cheapest sollution at the moment because they can deliver more than a 10.000rpm drive in terms of bandwidth at a price twice as low.
  • Get a SCSI harddrive. Well I am no expert in this but I know you get more performance when using it right but yes, it’s expensive. You have to have SCSI harddrives and also a SCSI controller which are not over the top in pricing but it will set you back quite some.
  • Use solid state drives. Ugh, this is still a dream for the average user. SSD can deliver 0.1ms seek time and top models can sustain continuous 1000Mb/sec read operations while a normal mechanical drive has fluctuations of this value. Reading small files scattered around the disk is also faster that mechanical drives. Also there is small power consumption, better resistance to physical shocks, etc. Still there are downsides at the moment:
    • write operations are below the rate of a mechanical drive
    • price tag is simply prohibitive; a good SSD with 64Gb will set you back with 800-1000USD.
    • technology is still in it’s infancy. Many things can change and if manufacturers keep their promise, in two months you may realize your top of the line product is now rated middle segment.
  • In very specific scenario the HDD replacement may be an overkill because there are better suited sollutions. In my case, a web developer, I saw cases where I could increase productivity a lot even if I could manage to move 1Gb of data from HDD to a more faster storage device. For example in RAM. Yes, why not? A good development machine has 4Gb of Ram. Windows, even Vista stays below the 1.5Gb mark so you have 2.5Gb of Ram that can be put to good use. So you can emulate a partition in Ram. There are tools for that and Microsoft even delivers a free one. Just move your projects there and set the database tempdb to be stored on that partition and voila, you have them on a 300 times faster drive.

So, there is a problem and there are sollutions. The choice depends really on the person, scenario and budget. At this point I would recoment 2 drives in Raid1 if you need extra performance but that’s just my pick, you have to find yours.

If you have better ideas, let us know …

Update

I just found a news on TomsHardware (here) about OCZ anouncing a SSD with SATA2 capable of sustained 120Mbps reads and 100Mbps writes which is almost twice as fast as the old SSD generation and it’s available already in the UK with prices starting around 700USD for the 32Gb model and 1300USD for the 64Gb model.

There are quite a lot of us who have a lot of papers on their desks with notes, tasks, observations. And there are those who use notepad alot to store usefull information on the project. Still it’s not easy to do this organization tasks when programming as it makes you either leave the development IDE or take your hands of the mouse and keyboard.

Why don’t we have a way to make quick notes within Visual Studio 2005. Well we actually do, although I have not seen any using it. Just go to the View menu and select Task List. A dockable window will come in front and you can dock it somewhere, I dock it in a group of windows below the code, so that it is easy accessible. How do you use it, well, just double click on the first available row in the list and enter your comments/tasks there.

For example, you have a task which is actually containing 7 inner tasks/functionalities. At some point you have to hardcode a variable so that you can go faster to another task and at some point you have to get back and correct this. This happens. No, no, don’t shake your head! you did it at some point. The problem is that you will likely forget this. Well, add a task like “Correct the hardcoding on file myfile.cs line 44″. At some point you will check that list and you can see what you still need to do and well … do it. Then just mark the task as completed (checkbox on the same line left side), or delete it.

No more yellow stickers and endless blocknotes :)

Cheers

Well, URL Redirect, which is mostly used in PHP for making user friendly urls is supported by IIS but with a twist, at least in IIS7.

I banged my head for a couple of hours and for some reason I could not make it work. Lastly I decided to google for url rewrite AND IIS7. To my surprise there is an additional step to be done when registering your HttpModule (the one that will handle the url rewriting). You not only need to add it to the modules tag of the web.config, but also to the <system.webServer> modules tag. See example below (of course this is a stripped down code, you have to intertwine it with your existing web.config)

<system.web>
    <httpModules>
        <add name=UrlRewriter type=Rewrite, UrlRewriter, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null />
    </httpModules>

</system.web>
<system.webServer>
    <validation validateIntegratedModeConfiguration=false />
    <modules>
        <add name=Rewriter type=UrlRewriter.Rewrite preCondition=managedHandler />

    </modules>
</system.webServer>

Lots of thanks to Scott Guthrie for his article on url rewriting in asp.net: http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

and also to Denis van der Stelt for his observations on IIS7 and url rewriting: http://bloggingabout.net/blogs/dennis/archive/2006/11/29/IIS7-and-Url-Rewriting.aspx 

07-03-2008
Yesterday I had to upload to a hoster a website using the above technique and it would not work. The hosting was using IIS6, so the ASP.Net would look at <system.web><httpModules> for additional modules, whereas IIS7 would not take into account that, but the settings in <system.webServer>. So what was wrong? The application complained that it could not load the type Rewrite. So I had a closer look and … I wrote the declaration wrong :(. Below you will find the correct add declaration to be added in httpModules:

<add name=UrlRewriter type=UrlRewriter.Rewrite, UrlRewriter, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null />

I’m sick and tired of people bashing Vista. What’s wrong with you people?!

I use Vista for over a year now. I am a proffesional .Net Developer and I do all my work on Vista.

Problems? Where?

Slowness? Where? When?

Incompatibilities? For god’s sake … where? The only incompatibility I have is with my tv-tuner and that only in Media Center which does not yet support my Leadtek.

Gaming issues? Nope … and I played over 15 titles last year.

And let me point out another thing. Recently at work I had to work with XP (until the new licences come) and you cannot imagine the horror … It’s slow, buggy, unreliable and after 6 hours of work I have to restart it in order to make sure I can work further (and the machine it’s a beast in terms of raw performance). I can’t wait to put a Vista on that machine …

I confess, I always update my machine and I started using SP since the first beta came out and that makes a difference, but the OS is good and more reliable that XP was even after SP2.

The only anoying things with Vista are the new file dialogs and UAC, but UAC can be turned off and the file dialogs have a tendency to learn how you use them so after two days of working everything is ok.

Don’t forget that the new SP (which is now available on MSDN) also brings the kernel of Windows Server 2008 which makes it more stable and faster. Take your time and install it, you won’t regret it.

Ding, dong …

There are quite some articles on this small issue but what I would like to post here is a more special situation.

This error occured while building a website in Visual Studio 2005 (the website was actually a port from an older Visual Studio 2005 WebSite Project). I could simply not find out why this error occured. It seemed that the compiler was building an object having a method or member with the same name as the class representing the page. In the codebehind file one could not pinpoint the problem, and then a coleague pointed out: “The form id has the same name as the class!”.

There you have it: in a ASP.Net 2.0 Website do not give the form object of a page the same id as the name of the page! otherwise you’ll get an error.

I have Vista installed for … 6 months now. Normally around this period XP would have been a rotten corpse because of the heavy usage and frequent software installs/uninstalls. I cannot say that Vista was braver. I encountered until now two situations that were so hairy that I was at a feet from reinstalling the beast. Still I remembered on NICE feature of Vista: System Restore.

How it works?

Everytime you install a piece of software or unninstall one, or important changes are made to the system, Vista makes a backup of important system files (notable here are registry and other important files). This backup is stored and given a time stamp and relevant information about the reason for it’s creation. Unfortunately this consumes space (about 300mb per backup) but if you are carefull, you can select only relevant ones and delete the ones not deemed worthy. And of course one can create a restore point at any given time nomatter the status or reason.

Ok, ok, how does this help me?! Obviously, you will find yourself in the devious situation where the OS is behaving like a madman. What do you do? If you are a masterfull sorcerror and knowleadge-able in the inner workings of Windows you can repair it, using the dark arts and a lot of googling :)
Or, you can restore the system to a previous state, which you know it works. Yes, you might lose some stuff, but only information from the system state, all your data is still there.

There it is, now you can rest a little bit more easy, Vista gives you the tools needed for its survival and for keeping your hair from going gray…

Cheers