Virtual PC "erratic mouse" problem with some intel-chipsets
For my work I got a new Dell Vostro 1700. It's a great machine. 2 gigs of memory. A 7200RPM sata disc. Core 2 Duo CPU. 1920x1200 resolution. Pretty fast for a notebook. Fast enough to run me a virtual instance of Windows Server 2003 right? Well that seemed to be a bit of a problem.
I created a completely clean install of Windows Server 2003 R2. Installed all updates and installed the Virtual Machine additions. But still I seemed to have a "erratic mouse". And not only the mouse, the whole system seemed to suffer from that problem. It was as if the vritual CPU could not synchronize with the host CPU.
After investigation I came across this blog post. It provides this workaround:
The problem I experienced, had something to do with a specific version of "Speedstep" which is used in some intel centrino chipsets. It's actually a Virtual PC problem, since VMWare and Parallels didn't seem to have the problem. I don't have a complete list of which chipsets have the problem, but when you have the problem, and you have a centrino notebook, try this fix.
I created a completely clean install of Windows Server 2003 R2. Installed all updates and installed the Virtual Machine additions. But still I seemed to have a "erratic mouse". And not only the mouse, the whole system seemed to suffer from that problem. It was as if the vritual CPU could not synchronize with the host CPU.
After investigation I came across this blog post. It provides this workaround:
- Stop running Virtual PC
- Open notepad
- Open %appdata%\Microsoft\Virtual PC\options.xml
- Locate or create the <virtual_machines> section of the file and add this key:
<enable_idle_thread type="boolean">true</enable_idle_thread> - Save the file and exit notepad
- Start Virtual PC
The problem I experienced, had something to do with a specific version of "Speedstep" which is used in some intel centrino chipsets. It's actually a Virtual PC problem, since VMWare and Parallels didn't seem to have the problem. I don't have a complete list of which chipsets have the problem, but when you have the problem, and you have a centrino notebook, try this fix.
Boolean parameters or Enums?
We all did it: adding a parameter like “bool useCachedConnection” to a method. When using the method it will look like this:
C#:
While the method works, one day your collegue (or yourself) will come across this function and needs to digg into the definition to understand what the boolean implies, or worse, needs to adjust the method interface due to the fact that there are three options, instead of using or not using the cached connections. I’ve seen it several times and it saves a hell of a lot time if boolean parameters were to be avoided. A better way to do it:
C#:
Now it’s possible to add options without having to change the methods’ interface. After a while you’ll have a nice collection of enums which can be reused by other projects. And don’t forget that the .NET Framework holds his own collection of enums which can be reused. When working with languages like T-SQL you don’t have a choice, but with .NET you have. Please make use of it. It’ll brighten up my day….. and yours. ;-)
C#:
1 | DoSomething(true); |
While the method works, one day your collegue (or yourself) will come across this function and needs to digg into the definition to understand what the boolean implies, or worse, needs to adjust the method interface due to the fact that there are three options, instead of using or not using the cached connections. I’ve seen it several times and it saves a hell of a lot time if boolean parameters were to be avoided. A better way to do it:
C#:
1 | enum ConnectionOptions
|
Now it’s possible to add options without having to change the methods’ interface. After a while you’ll have a nice collection of enums which can be reused by other projects. And don’t forget that the .NET Framework holds his own collection of enums which can be reused. When working with languages like T-SQL you don’t have a choice, but with .NET you have. Please make use of it. It’ll brighten up my day….. and yours. ;-)
.NET Framework 3.5 will be released with source code
As anyone can read on Scott’s page Microsoft decided to release the source code (with comments) of the .NET Framework (not the CLR as some blogs might make you think), beginning with V3.5. This is a big thing. But I want to tell you why.
There are several disassembly tools available for .NET which allow you to disassambly an assembly into source code. When you want to see what happens in System.Threading, just disassemble. But, it won’t provide you with debugging symbols. The result is you need to read it line by line when you want to figure something out. Hooray for Scott, because this release won’t just include the source code, but also debugging symbols, which are dynamically (down)loaded from the MSDN in VS 2008. Hence, the big thing. Great stuff. :-)
There are several disassembly tools available for .NET which allow you to disassambly an assembly into source code. When you want to see what happens in System.Threading, just disassemble. But, it won’t provide you with debugging symbols. The result is you need to read it line by line when you want to figure something out. Hooray for Scott, because this release won’t just include the source code, but also debugging symbols, which are dynamically (down)loaded from the MSDN in VS 2008. Hence, the big thing. Great stuff. :-)
iPhone problems
I have a problem. And it is not the iPhone itself. It’s the fact that I like the device. I really think the iPhone is a huge leap forward in mobile devices. It utilizes a full operating system with accellerated graphics and sound, an indexed file system, based on unix. It runs great software and the hardware features are cool too. A accellerometer, a proximity sensor and multitouch display. It is a piece of art. Apple really made a nice phone. Ok, it lacks GPS, 3G and the ability to run Java or other 3rth party software, but that is something that will become possible in later versions.
“So, what’s the problem?”, you ask. Well, if I tell people I like the iPhone, I instantanuously become a “brainwashed Apple fanboy bowing down for Steve Jobs”. But that isn’t the case. I like the iPhone in a professional kind of way. I love software when it’s good. And apart from security (not really my domain) I can tell this is great software. It breaks us away from static mobile phones. It really is helpfull, more intuitive and more fun to use. But that doesn’t matter to the Apple basher. It is “cool” to bash Apple fans and telling them over and over again what the phone lacks.
I don’t care. I like the phone. But please stop the speeches about how I don’t have my own opinion! I like the phone, because I like it. Not because it’s a hype.
“So, what’s the problem?”, you ask. Well, if I tell people I like the iPhone, I instantanuously become a “brainwashed Apple fanboy bowing down for Steve Jobs”. But that isn’t the case. I like the iPhone in a professional kind of way. I love software when it’s good. And apart from security (not really my domain) I can tell this is great software. It breaks us away from static mobile phones. It really is helpfull, more intuitive and more fun to use. But that doesn’t matter to the Apple basher. It is “cool” to bash Apple fans and telling them over and over again what the phone lacks.
I don’t care. I like the phone. But please stop the speeches about how I don’t have my own opinion! I like the phone, because I like it. Not because it’s a hype.
Microsoft DevDays 2007
My graduation-company offered me to visit both days of the Microsoft DevDays in the Netherlands in exchange for giving some demos of my graduation-project. This gave me the opportunity to attend some sessions and that was a lot of fun. More than I expected, because I thought it would be a giant Microsoft commercial. Lukily, that wasn’t the case.
I attended the sessions by Scott Guthrie about silverlight. My first thought on this is: why oh why are we introducing yet another “standard”. Ok, there will be a plugin available for Safari and Firefox, yet Linux or mobile users won’t be able to browse the silverlight websites. I think these kind of developments are nice in a technology-geek kind of way, but it isn’t the most smart one, considering the compatibility problems we have with flash (or for that matter: HTML/CSS).
I also attended the sessions about Vista Development for Managed Code by Daniel Moth. That guy can talk! Going fast, but not too fast and talking about stuff that matters! I even got to know some features I didn’t know they existed at all. For example <a href=”https://winqual.microsoft.com/”>WinQual</a>. Ever had those weird boxes telling that an error had occured and it asks you to send information over to Microsoft? This is WinQual in action and not an imaginary bug server at Microsoft. It is actually very useful for developers. Go read about it. It is worth it.
I hope I can attend DevDays next year, but we’ll see.
I attended the sessions by Scott Guthrie about silverlight. My first thought on this is: why oh why are we introducing yet another “standard”. Ok, there will be a plugin available for Safari and Firefox, yet Linux or mobile users won’t be able to browse the silverlight websites. I think these kind of developments are nice in a technology-geek kind of way, but it isn’t the most smart one, considering the compatibility problems we have with flash (or for that matter: HTML/CSS).
I also attended the sessions about Vista Development for Managed Code by Daniel Moth. That guy can talk! Going fast, but not too fast and talking about stuff that matters! I even got to know some features I didn’t know they existed at all. For example <a href=”https://winqual.microsoft.com/”>WinQual</a>. Ever had those weird boxes telling that an error had occured and it asks you to send information over to Microsoft? This is WinQual in action and not an imaginary bug server at Microsoft. It is actually very useful for developers. Go read about it. It is worth it.
I hope I can attend DevDays next year, but we’ll see.