Skip navigation

Monthly Archives: February 2008

Don’t know exactly how I came across this but I did. There is a Subversion plug-in for Visual Studio that Microsoft recommends, seen here http://msdn.microsoft.com/msdnmag/issues/08/LA/Toolbox.

My first thought was, well that’s good. A plug-in for Visual Studio for open-source, free source control that Microsoft is advertising, this can’t be all bad. Boy was I wrong. Subversion may be free, but the plug-in isn’t. The plug-in, called VisualSVN, cost $49….per license. Now I’m not saying it’s all Microsoft’s fault. They didn’t write the plug-in, but come on. How can someone write a plug-in for something that is free and charge for it. It figures that Microsoft would back this instead of something like ankhsvn, which is also open-source and, are you ready for this, free.

Figures that this would come from something on MSDN, the most useless resource for everything worthless.

This is a quick one. The other day I ran into an ASP.NET error basically indicating one of my virtual directories was running as an ASP.NET 1.1 app instead of an ASP.NET 2.0 app. “Easy enough, I’ll just go ahead and change it in the IIS mmc snap-in” I thought. To my surprise, the virtual directory properties window was missing the ASP.NET tab. I first went and made sure ASP.NET 2.0 was enabled in the web services extensions portion of the IIS snap-in, it was. I then used google, NOT LIVE SEARCH, to try and find an answer. After a ton of digging, I found that most of the time the reason this happens is related to a common Windows problem. Somehow, a piece of the registry gets hosed. I tried the fix mentioned in that forum post and it didn’t work. Finally, I found the reason for my particular issue. This one blows my mind. I installed vmware server because M$ Virtual PC is a piece of crap (it wouldn’t let me install Ubuntu). Somehow, vmware server removed my ASP.NET tab. To fix this I had to do the following (found here):

1) Stop the IIS Admin service (and any services that depend on it)
2) Open C:\WINDOWS\system32\inetsrv\MetaBase.xml in notepad or your favorite XML Editor. _DELETE_ the line that reads ‘Enable32BitAppOnWin64=”TRUE”’
3) Start -> Run -> iisreset

I don’t know who to blame here, M$ or vmware. Since it’s usually M$’s fault, I’ll blame them. I guess if Virtual PC weren’t so crappy I wouldn’t have had this issue at all.

Sources:

http://midwestcoders.net/blogs/monish_nagisetty/archive/2007/06/19/VMWare-Server-_2D00_-Missing-ASP.NET-tab-in-IIS-issue.aspx

http://www.velocityreviews.com/forums/t292908-missing-aspnet-tab-in-iis.html

I have had many a discussion lately on the topic of what operating system is best. To me, it really comes down to how you use your computer. That being said, I think the world could do without windows. There is no reason why everyone couldn’t use either Mac OS or some flavor of Linux. As far as I’m concerned, Mac OS is the most well rounded, easiest to use OS out there. Linux is great for people who like a customized experienced. Some distributions of Linux, such as Ubuntu, are getting to the point where every day users can easily use them. The world is moving in the right direction. A little competition never hurt anyone, and hopefully it helps open Microsoft’s eyes.

On to the main event. Why Windows Blows.

Windows’s Visuals

With a name like Windows, you’d think the OS would be good at handling windows. Think again. Yes, that includes Vista. You could argue that the latest version of the window manager produces better looking windows than its predecessor. But, the memory utilization and sluggishness it causes is hardly worth it. The window manager in all versions of Windows is very unresponsive. For example, how many times have you gone to drag a window only to have it stay in place, then eventually (sometimes 30 seconds or more) catch up with your mouse. More frustrating to me is the inability to change the appearance of windows. Sure, you can change the color and the font, but you’re stuck with pretty much the same looking window titles and borders.

Same goes for the widgets. There is no easy way to change the look and feel of the widgets. I say no easy way because there are programs and hacks that can do this for you, but they do it at the cost of performance. Reducing performance of an already sluggish operating system is never a good thing. I would be willing to guess that the reason the widgets are so awful is because the windows painting engine is so awful. The sucktitude of the painting engine is on display any time you see a window that is filled completely white. This happens mostly when a program is doing something that in the same thread as the main window, which prevents the window from painting. You may say, well that’s the fault of the developer of the program. And, it probably is to a point. But, Microsoft applications are the worst offenders (Visual Studio 2005 may be the worst).

Resource Management

The resource management in Windows is so bad you may even wonder if there is any at all. It seems as if Windows is a free for all when it comes to memory and CPU usage. When you are trying to do more than one thing at a time, it seems as if the programs you are using are fighting over your computer’s resources. It wouldn’t surprise me if this is really what is going on behind the scenes. A great example is trying to Alt+Tab out of a game and do something else. A lot of times it’ll take twenty seconds or more to get out of the game and start doing something. Doing this on Linux (even while playing a windows game) does not produce the same result. As a matter of fact on Linux you can run a game and visual effects (compiz) at the same time.

Computers are very powerful these days. When your operating system isn’t smart enough to divvy up resources properly it will really cripple even the most powerful of machines. Sometimes, the resource management really breaks down and the system will crash. The worst kind of crash I see in windows is the kind where the user isn’t even aware it has crashed. Programs will just stop responding, eating up the computer’s processor and sometimes the memory as well.

Perhaps my favorite Windows error of all is the blue screen of death (BSOD for short). I will admit that in later versions of XP this error happened fairly infrequently. But believe me, it’s still around. When I was running Vista on my laptop, I saw it a number of times. Another good one is the memory fault error. At the end of the post you will find examples of these errors, some are quite funny.

I have been using Ubuntu 7.10 for about four months now, and I have never seen a similar error. Not even a memory fault error of any sort. As a matter of fact, the only times Ubuntu has frozen on my were either due to user error (me doing something I shouldn’t) or my faulty video adapter. If an application has issues in Linux, it doesn’t bring the whole OS down with it as is the case in Windows most of the time. Linux makes is really easy to deal with applications that aren’t responding for whatever reason. It’ll allow you to force quit the application. In Windows it takes forever for the “program is not responding” dialog, if it ever shows up. And it takes even longer to close the application after hitting the “end now” button. I love when you get about eight of these when shutting down your computer.

Newer Is Better, Right?

Not when it comes to Microsoft. Windows Vista, albeit better looking, is definitely NOT better than Windows XP. The first and most obvious issue is the System Requirements. Aside from Home Basic, which is basically Server 2003 with a facelift, all versions of Vista require at least 1GB of RAM, a 40GB hard disk (requiring AT LEAST 15GB to install). This is absolutely ridiculous. Yeah, computers today are really powerful and most systems meet these requirements. The problem is that when the OS requires that much, it doesn’t leave room for much else. An operating system should be as lean as possible so that the applications running in that operating system have enough breathing room. As much as I dislike Windows XP, I’ll take it any day over Vista.

To my friends I sound like a broken record, but I cannot stand Microsoft’s development strategy when it comes to Windows, and most of the other products they put out. Windows probably hasn’t been completely re-written since at the latest Windows 98, and maybe even earlier. Windows XP is based off Windows 2000, which is based off Windows NT / Windows 98. It’s sad how old pieces of the operating system are. Some of the more obscure pieces are unbelievably old. Take the windows font installer for instance. That thing has been around since at the latest Windows 95, maybe even windows 3.1. Observe:

Windows Vista Font Installer

Beautiful isn’t it? This thing is visible, and it’s that old. Imagine how old some of the things you can’t see are! If Windows were written well, I wouldn’t be complaining, but it’s not. When I write bad code, I don’t leave it around forever, let alone bring it forward into newer versions. I really think if Microsoft would just start over they could really have something. They have lost their edge. I know how it goes though, I work at a big company, you do what you’re told. And unfortunately, Microsoft’s business practices show that they care more about getting things out the door and pulling in money than producing a well rounded product for their customers.

Final Thoughts and Funny Error Messages

I am no psychic, but if Microsoft stays on their current path they will find as people become more computer savvy, they will start looking for alternatives. And people these days are becoming more and more computer savvy. My generation grew up with computers, and our children will have even closer relationships with them I am sure. I am not saying that I want Microsoft to go away, at this point that’s not possible. I am saying that I hope Linux continues to gain popularity so that Microsoft will crap or get off the pot.

Wow

Not an error, but still funny

error_windows_1.jpg

BSOD

Sources:

http://www.microsoft.com/windows/products/windowsvista/editions/systemrequirements.mspx

http://www.microsoft.com/technet/archive/winntas/tips/techrep/bsod.mspx?mfr=true

http://www.techeblog.com/index.php/tech-gadget/category/windows+vista/

I had an interesting discussion today with a coworker about how he has changed his style of programming. As of now we are writing in primarily C# at work. The discussion surrounded using the built in shortcuts of C#. Generally I am in favor of shortcuts but the ones in question seem too VB-like to me. Let me start by saying my first language was C++, which is obviously a very strict language.

The first piece of the discussion surrounded the ‘this’ keyword. My colleague explained at length why he felt the ‘this’ keyword is not necessary. Interestingly enough he used to be strongly in favor of using ‘this’. He argues that the ‘this’ keyword is not necessary because it is implied. However, when he is accessing a static property or method, he always prefixes it with the class it belongs to, even when calling a static from the same class. I think that ‘this’ should always be used where applicable. The biggest issue I see is in the case of a constructor that accepts parameters. Most of the time, these parameters are going to correspond to members of the class. So, you would either have to name the members differently or name the parameters differently if you do not use ‘this’. The second point is consistency. If you prefix static members and methods with the class name they belong to, then you should also prefix local class members and methods with ‘this’. I think C# should be more strict about this because using ‘this’ makes the code a lot more readable and easier to follow.

The second point being argued was the use of the keyword ‘private’. My colleague again argued because it is implied, it shouldn’t need to be used. My argument was that for consistency, you should use the ‘private’ keyword. This is because you have to use ‘public’, ‘protected’  and ‘internal’ so for consistency sake, use ‘private’. Again, I think this should be enforced by the compiler. It seems too much like VB to me, and yes, that is a bad thing.

The last argument was over the initialization of variables. I think variables should always be initialized (again stemming from my C++ upbringing). Yes, .NET handles initialization of most types (I.E. int is initialized to 0). But, some people forget the fact that the string type is a reference type, which means it’s default value is null. In most instances, a null value in a string isn’t what you want. Again, if you’re initializing variables in once place, you should do it everywhere for consistency.

You may think that I am looking too much into this, but simple things like this can really make a difference in large scale systems. Writing clean, easy to follow code reduces the chance of bugs, and makes it easier to locate and repair them. The further we stray from good programming techniques, the worse our code will get. I may sound anal, but again, I’m a C++ programmer at heart.  It’s not like it’s hard to write out a few extra characters in each line of code we write.