Home
March 8th, 2010 — James

This is a bug in the text editor (shell?) that I have seen in Visual Studio 2008 and 2010. It may not impact most developers.

I like to use word wrap because I don’t use new lines where it doesn’t make sense. So, some lines may be wider than the screen. Now to avoid scrolling which is not an ergonomic friendly act, I enable the word wrap feature for all types of languages. You can enable this by going to Tools -> Options -> Text Editor -> All Languages. The option is “Word Wrap”. I also enable the “Show visual glyphs for word wrap” option to recognize the places where the word wrapping occurs. All good.

The bug is when I try to copy the line that is wrapped using the keyboard shortcut for single line copy. You can copy the content of the current line Visual Studio by just clicking the copy button or just CTRL + C. When I do this on a wrapped line, it only copies the first line of the wrapped text. Even though content is technically a single line, the copy mechanism seems not getting it.

The line selection also works the same way. When I select the complete line by keeping the cursor at the beginning of the line and press SHIFT+DOWN, it is supposed to select the whole line. When I enable the word wrap, it doesn’t.

The argument against the argument that it should select only what is visually on the same line is that what is visually on the same line is irrelevant to developer. When I make a line copy, I almost never want something wrapped to be left out of the selection and copy. Wrapping is a function of the available screen width and a line selection based on that doesn’t make sense.

Track the bug at Microsoft Connect.

February 24th, 2010 — James

There seems to be a bug in the way Dns.GetHostEntry is implemented.

Assume that your server is in a Windows domain but the top DNS suffixis different from the domain name. There are many reasons you may want this.

When you call Dns.GetHostEntry with IP address and host name as the input, you get various outputs depending on where you made the call from.

Case 1: You are on a computer that has domain name as the dns suffix. You call Dns.GetHostEntry with the IP address and host name of a computer with different dns suffix than the domain name.

IPAddress input ->hostname.dns.suffix

Hostname input ->hostname.domain.name

Case 2: You are on a computer that has different dns suffix and domain name. You call Dns.GetHostEntry with the IP address and host name of a computer with different dns suffix than the domain name.

IPAddress input ->hostname.dns.suffix

Hostname input ->hostname.dns.suffix

Case 3: You are on a computer that has different dns suffix and domain name. You call Dns.GetHostEntry with the IP address and host name of the local host. You may also use 127.0.0.1 and localhost.

IPAddress input ->hostname.domain.name

Hostname input ->hostname.domain.name

Bottom line: That host name attribute is not reliable. nslookup always returned the hostname.dns.suffix no matter where the call came from or how I specified the input, IP Address or host name.

Here is a comment from MS Support here: “looking up a host name based on IPAddress is not reliable and in Ipv6 it is not supported”.

A discussion at work with DNS guys suggests that this call may be going to AD (Active Directory) for name resolution. In some cases it may be going to AD first. In those cases it may only be going to AD and never to DNS.

Here is the code to test it:

using System;
using System.Net;

namespace DnsQuery
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                if (1 != args.Length)
                {
                    Console.WriteLine("Usage:");
                    Console.WriteLine("DnsQuery <IP Address>");
                    Console.WriteLine("        OR");
                    Console.WriteLine("DnsQuery <Host Name>");
                    return;
                }
                Console.WriteLine(Dns.GetHostEntry(args[0]).HostName);
            }
            catch (Exception Ex)
            {
                Console.WriteLine(Ex.Message);
            }
        }
    }
}
February 24th, 2010 — James

Quality control is not perfect anywhere. Take a look at this image.

February 17th, 2010 — James

Do you hear the fan running loud after shutting down Windows 7?

Do you have ASUS motherboard?

Your Windows 7 computers’ cooler or fan won’t stop after shutdown?

Here is what happened to me and what a user found out as the solution.

During the beta days I experienced a strange problem on my computer. When I shutdown, I still would hear the fan running loud. I didn’t know where it was coming from. I had Windows 7 beta on two computers and the problem occurred only on one computer. I think what I have done was opened up the computer and then shut down Windows 7. I think the fan that was running was the power supply fan.

This was a computer I assembled and had ASUS P5B-E motherboard. I posted an article on this blog about this problem. It turned out that a lot of people with ASUS motherboards had the same problem. There were posts at Microsoft and ASUS forums asking about the same problem. No one had a clear solution.

Then one day a reader on my blog posted a solution in the comments. It worked perfectly for my setup. Since then lot of people have been able to use the same solution to resolve their problem.

Since then I have changed motherboards on all my computers to Gigabyte. They are not known to be as advanced as ASUS. But I like them now for two reasons. First, they are cheaper. Doesn’t mean they are cheaper in quality. So far I haven’t had any problems or regrets about their quality. Second, all the ones I have purchased have dual BIOS. All my motherboards were bricked at some point by BIOS upgrades. A dual BIOS is very welcome feature for someone like me.

So, about the solution. A user named lemon75 (that’s all the information I have about this user) posted this comment with the solution in that post: Click “Start”, on “Computer” click right mouse button and select “Properties”, click “Device Manager”, select “IEEE 1394 Bus Host Controllers” group, only contains one device called “VIA 1394 OHCI Compilant Host COntroller” on that click right mouse button and select “Properties”, select “Power Management” tab, and finally check the “Allow the computer to tur off this device to save power” box!

Even today I am getting a fairly large number of hits on this page and people are searching for the same symptoms I and others were facing.

February 11th, 2010 — James

Google Buzz is a good idea that has a few problems. Until they fix those problems, I am off. Not sure how much harm is already done. Hope it is not not much.

My gmail account is personal. A lot of my family and friends are listed there. When I open up it doesn’t mean I am opening up the profile of my friends and family. I also do not want any one to follow me and get access to my non public information.

The default setting for any application in this century should be a closed one. Unless it is a stand alone one where you explicitly open a new account, like twitter. Facebook is pretty closed. I like it that way. Twitter is open and I like it that way. Buzz right now is neither and I don’t like it.

It feels like buzz was rolled out in a hurry unlike all other stuff rolled out by Google. I don’t remember seeing any closed beta for it.

As soon as I enabled buzz, I posted on twitter that “Not everyone considers friend and follower the same. Do buzz differentiate those?”. Now it sounds like the whole web is saying the same thing.

For now buzz is turned off in my gmail.

Update 2/15/2010: Just re-enabled buzz. On that later.

February 10th, 2010 — James

On the preferences->devices tab, I have checked the prevent iPhones and iPods from syncing automatically. I do not want the sync kicking in every time I connect my iPhone to the computer. It stops the playback of whatever I am listening to and won’t go back and continue playing whatever I was playing before the sync kicked in. It is an annoyance. At least it should provide an option not to auto sync when I am playing something or running an application.

So, here is the problem. Whenever I connect my iPhone to the computer, iTunes does a short sync of sort even though I have disabled the auto sync. I don’t know what it is doing but it does reset whatever I was playing. All the podcasts I listened since the last sync are reset back to the state of the last sync.

I do have a workaround though. I close the iTunes before I connect the iPhone to the computer. Once I connect and the iPhone beeps/vibrates, I can open the iTunes. Now it won’t do that short sync. The problem is I keep forgetting to close the iTunes before I connect my iPhone to the computer. Most of the times I just scrub through the podcasts I already listened to get around this. When the number of podcasts I already listened are large, I have to listen a bit to figure out if I already listened them.

Update: This workaround doesn’t work! I just had one instance where it did sync and mess up my podcasts.

I have no guesses on what is the real purpose of this sync. If this problem does not appear on iPod Touch, my guess would be something pushed by AT&T through iTunes.

I also don’t know if the same issue occurs on the Mac version of iTunes.

February 4th, 2010 — James

It’s been a while but I thought I would share this.

February 4th, 2010 — James

Disclaimer: I do not have all the information to prove this is exactly how the problem occurs or even there is a real problem.

Yesterday when I went home my wife said she no longer has a password for her Windows 7 account. Then she explained how it happened.

When she tried to login, Windows 7 said her password expired and needed a new password. Since it is just a home computer she tried to enter the same password. I am guessing she missed the second box where you need to enter it again to confirm. So, Windows 7 said the passwords do not match with the OK button. She clicked on the OK button and Windows proceeded to login. She didn’t seem to have realized that the password did not change or something wrong happened. Next time she tries to login, there was no password prompt. It went ahead and logged in with no password. She didn’t know how to use the control panel to set the password. It was obvious that she did not use control panel to clear the password as well.

If this is exactly how the events happen, then there is obviously a problem. I tried going in to control panel and do the same thing and did not have the same effect. My guess is that it could only happen through the expired password interface.

December 21st, 2009 — James

If anyone thinks Windows 7 got the disk activity under control, here is one example showing otherwise. Disks are still the bottlenecks in consumer computers and there is no way you get a better performance out of the computer when there is a lot of disk churning going on.

December 15th, 2009 — James

Look at this image. Shouldn’t it say “login” or something like that? I have been seeing this for a while now.

twiiterbug

Update March 6, 2010: This is how you can reproduce this. At least on the Chrome browser. Login to Twitter and make sure to check that remember me button. Usually the session expires in a day or two. Set the Chrome start up to open the previous tabs. Keep the Twitter tab open when you close the browser. Next day when you open the browser the Twitter will be logged off showing the above screen. When you click on the Sign In, you will see the button saying “Create List” instead of “Sign In”. If you try to reproduce this by just logging out, you won’t see this bug. Your session must time out.