Updating computer name in TFS workspaces

When I changed my computer name recently, I found that all my Team Foundation Server mappings were still looking towards my old computer name.  Fortunately, searching the TFS documentation revealed that there is a quick way to update your computer name without having to reset all your workspaces.  Run the tf.exe tool, found in \Program Files\Microsoft Visual Studio 8\Common7\IDE directory:

tf workspaces /updateComputerName:MyOldComputerName /s:http://MyTFServer:8080

Books to read over and over

After finishing Harry Potter and the Deathly Hallows (started: 5:30 pm, finished: 1:45 am), I had an urge to turn back to the first page and start all over again.  In fact, I wanted to read the whole series again.  I really don’t have anything to say about the series that hasn’t already been said, but I wanted to comment on it.

That got me thinking about the books that I read over and over again.  Even though I know the books very well, it’s a rewarding experience to read them again.  The words greet me like old friends, and just like seeing old friends again, I find out new things each time.  I’ve learned not to lend these books; I will not see their return and have to buy a new copy when I want to read them again.

  • J.R.R.  Tolkien, The Hobbit and The Lord of the Rings.  Probably the greatest literary work of the 20th century, a masterful epic tale with the most intricate world ever created for a fantasy.
  • Orson Scott Card, Ender’s Game.  This is a book that is seemingly a simple page-turner but really a dense morality story that pops up new favorite parts every time I read it.
  • Frank Herbert, Dune.  Herbert’s society is complex, politically, religiously, and culturally (actually, they are inseperable in this book).  Paul Muad’Dib is a great character, struggling with what he is and what he is willing to give up to achieve his goals.  (I probably care less for subsequent Dune books, even though they are Dune‘s literary equivalent, because Paul is either not shown in the same detail or not the major character.)
  • Robert Heinlein, The Moon is a Harsh Mistress.  I believe that two things shaped my political views: growing up with Ronald Reagan as president and reading Robert Heinlein.  This tale of libertarian revolt by the (originally penal) colony on the Moon is a great story combined with Heinlein’s musings on society, governance, and responsibility.
  • Robert Heinlein, Starship Troopers.  The classic novel of military sci-fi, page-turning reading combined with Heinlein’s eye for dissecting society.  (Any of Heinlein’s so-called “juvenile” novels is a good read; Starship Troopers is the best of them though.)
  • Neil Stephenson, Snow Crash.  A book that sucks me in from the first line, with a plot about computer viruses, Sumerian myths, and what the Internet may become.  Also brilliant social commentary with its exaggerations of things from modern life (the Burbclaves, pizza delivery in 30 minutes… or else, et al.).
  • Neil Stephenson, Cryptonomicon.  Denser than Snow Crash, more ambitious, more complex, and more fascinating, with a sprawling cast and multiple plots.
  • Pat Conroy, The Lords of Discipline.  If I were written as a literary character, I would be Will McLean.  Pat Conroy captured what makes me tick in that character, down to the neuroses and needs.  He’s even slightly color-blind, like me.  (I would only hope to be as heroic as Will in his situation; thank God I am not in his shoes.)
  • Stephen King, The Eyes of the Dragon.  A good story told by a good storyteller.
  • Richard Adams, Watership Down.  A rousing adventure tale about seeking a new home after destruction of the old (think: The Aeneid with rabbits instead of Romans).
  • Lloyd Alexander, The Chronicles of Prydain (The Book of Three, The Black Cauldron, The Castle of Llyr, Taran Wanderer, The High King).  A coming of age story full of heroism, sacrifice, and adventure.
  • Kenneth Grahame, The Wind in the Willows.  A childhood favorite that endures the test of time.

Changing web service URL without updating the web reference

We all know the problem.  We work and work at it, and there seems to be no explanation or cause for it.  We develop test cases that all seem to work, and then it never works when we do it for real.  We spend hours upon hours on it, testing, scouring Google for answers, writing and rewriting code, and waking up at odd hours with a completely off-the-wall proposed solution to it.

Then we figure it out, and it’s so blazingly simple that we wonder how we ever consider ourselves geeks.

Here’s mine, for the past couple of weeks.

I had a bizarre Web Services problem.  The service uses a strongly-typed parameter:

DoWebServiceStuff(MyType theParameter)

The web service is published to other interested parties for two-way communication; i.e., they build a component to consume our web service and we build a component to consume theirs.  We were having difficulty debugging a new development effort.  The symptoms of the problem were:

  • The parameter never deserialized at the other end.  Every time it was checked, it was null.
  • The XML string for the parameter deserialized to the object with no problems, if we took the string out of the logs and wrote code to deserialize from it.

Our methodology is that the codebase has a reference set to the instance of the web service that we sent.  To send to another system (regardless of whether it was one we developed or not), we use the same reference and set the URL to be the URL of the end system.  If I built a custom reference to the other system, it would work, but not when I used my reference to send to their URL.

Finally, I figured out the problem.  Their web service was built as DoWebServiceStuff(MyType TheParameter).  Notice the difference?  The name of the parameter was different, therefore its SOAP wrapper was different.  When I created a web reference to their service, .NET abstracts the SOAP process away from me so that it’s handled properly, but when I use my web reference to send it, the parameter name is still different.

In programming, we’re so used to thinking that the name of the parameter only matters locally, and focused on what is contained within that parameter.  So, if you’re ever seeing a problem where a web service parameter won’t deserialize, check your parameter spelling and casing between systems.

Thoughts of murder

The time is now 12:45 in the morning.  I am up because I am plotting murder.

The intended victim is the designer of the Firex model ADC smoke detector.  You, sir, better hope that you never cross my path.

What dastardly deed did you commit, you ask?  You have designed a product with the worst feature ever imagined.

When the battery in your smoke detector begins to shuffle off this mortal coil, the fire alarm beeps.  At random intervals.  Sometimes every few minutes.  Sometimes every half hour.  Sometimes longer.  My only choice to determine the offending detector is stand under each one in turn and wait for it to beep.  The process can take a few minutes, or a couple of hours.

There are 8 in my house, all wired together in a circuit so that when one detects smoke, they all sound the alarm–pretty sensible, actually.  However, sometimes they will chime in concert for the low battery alarm, making it impossible to determine which one needs attention.

ONE SIMPLE CHANGE would have rectified this matter.  In addition to the audible alarm, BLINK A F***ING LED.  That would be the sensible solution, eh?  Then I’d hear a chirp, visually inspect the alarms, quickly locate the offender, change the battery, and be back to sleep–oh yes, this happens at night exclusively.

If you really wanted to be user friendly, add a photoresistor that determines the ambient light of the area and silences the alert at night.  A nightlight that turns on at night and off during the day can be had for a buck at Wal-Mart; surely this can’t be that difficult to add to a smoke detector.

The final insult to injury is this: the AC power connection has a tab that blocks access to the battery door until it is unplugged:

and of course there are clips on either side to hold the connector on.  So after finding the smoke detector I have to then fight the plug to get the battery door open.

These devices should really be installed at Guantanamo Bay.  One night of this and the most hardened terrorist would spill his guts.

You, Mr. Smoke Detector Designer, are a complete, heartless bastard.  I wish you may hear random chirps every night for the remainder of your life.

Recursive DNS, Active Directory, and You

Recursive DNS queries make the Internet run.

They also provide a convenient means to spoof servers, implement distributed denial of service (DDoS) attacks, and poison your DNS cache. (See the US-CERT report on DNS recursion (PDF).)  The general “best practice” recommendation has become to disable recursion on publicly-available DNS servers (i.e., the servers answer DNS for only the domains for which they are authoritative).

This causes problems when your Active Directory server is publicly available (SBS, some Exchange setups, etc.), because clients need to point to that server to use Active Directory services but need recursive lookups to use internet resources.  Here is the solution that I used to resolve this difficulty.

On the Active Directory servers (you do have two, don’t you?), I disabled recursion (instructions from Microsoft).  These servers are available from the internet as authoritative for my domains.  (For the purposes of this example, let’s say these servers are authoritative for mydomain.com and reside at 192.168.1.2 and 192.168.1.3 on the local network.)

I set up another DNS server that is not reachable from the internet.  (We’ll call it 192.168.1.4 in this example).  Recursion is enabled for this server.  On the Forwarders tab, I set the forwarders for “All other DNS domains” to be my ISP’s DNS servers (123.123.123.2 and 123.123.123.3 in this example):

To allow the DNS server to do the proper lookups for Active Directory, I created a new DNS domain for mydomain.com, and set its forwarders to be my AD servers (from above, 192.168.1.2 and 192.168.1.3):

 

Now I point all the local Active Directory computers to this new DNS server, and they are able to get the proper Active Directory lookups and recursive internet lookups, without exposing my AD servers to recursive DNS attacks.

DNS and Active Directory

A client recently restructured their network as part of an office move, and when computers were moved to the new site several computers were unable to log in to the network, with a message that “The specified domain either does not exist or could not be located.”

In my experience, a majority of Active Directory problems like this are DNS related.  Here are some useful tools to help diagnose problems.

Microsoft lists the DNS requirements for Active Directory in this article.  The basic requirement is that _ldap._tcp.dc._msdcs.DNSDomainName must be locatable by the client.  You can check this by running nslookup from a command prompt, then set type=srv, and then _ldap._tcp.dc._msdcs.mydomain.com (obviously, substitute your fully-qualified domain name for mydomain.com).  If the client is unable to resolve this service address, they will not be able to log in.

Server problems, VPN problems, network card problems, and several other tests are available through NetDiag, a tool that is installable from the Support Tools of Windows Server installation CDs.  A good basic tutorial is here.

Group policy troubleshooting, Kerberos authentication problems, and Active Directory replication failures (among other things) can be identified through DCDiag (also in the Support Tools).  A good basic tutorial is here.

I would recommend using NetDiag and DCDiag to identify errors, and then Google the error that you are receiving.

You can find some more advanced usage scenarios on both NetDiag and DCDiag from Microsoft here.

Tales of Sorrow from the World Whine Web

The promise of the internet is that it will connect us all and give voice to everyone.

A friend sent me a link to bestbuysux.org, which lists complaints about Best Buy.  I was thoroughly amazed at what I read!

Here are some of the most amusing (all bold emphasis is mine):

Date: Wed, 21 Mar 2007 11:41:58 -0700 (PDT)

I bought a JVC TV from Best Buy 1/31/04. I called for service and was told it would cost $600.00 to fix. I only paid $525.00 for it. What happened to companies standing behind their products. [sicNo, I didn’t have the extended warranty. I shouldn’t need it. A tv used to last at least 10 years. It cost me $90.00 to find out my TV is CRAP. They wouldn’t even offer me any compansation [sic], such as money off on a new TV. I won’t go back to Best Buy anymore, and the book is still out on if I buy aJVC [sic] product.

Wow, I guess I missed the giant Push, Pull, or Drag your broken, out of warranty TV to Best Buy for money off on a new TV sale!

Date: Mon, 19 Mar 2007 17:18:39 -0600

[… snip …] A few years back I was working as a tech support rep for MSN Internet Access. Best Buy and MSN had partnered up w/ some cross promotional deal, where the sales people conned customers into signing up for a 3 year contract with MSN dialup, in exchange for a Best Buy gift card. [… snip …] One of my calls was  from a man who had signed up for the contract, knowing nothing about MSN aside from the phone number he was given to set it up. He called up asking me how he could get his new MSN set up, so I started asking him questions about his computer, to find out what version of the software and/or patches we needed to install. Turns out, he didn’t have a computer. The salesman over at BestBuy talked him into signing up for 3 years of MSN IA to get $300 off the cost of a refridgerator [sic] he was buying. When I explained to him that MSN was an Internet service provider, and that the Internet was a global network of computers that must be accessed by a computer, he was furious, and demanded that I cancel his contract. [… snip …]

Let me get this straight, someone signed a contract for a service that they had no idea what it was, and it’s the store’s fault when they find out they don’t need it?

BTW, I’m already tired of adding [sic] everywhere, so I shall discontinue the practice despite the abuse the English language receives through the rest of these tales of woe.

Date: Sat, 10 Mar 2007 12:11:07 -0800

I had an extremely disappointing experience with BestBuy in San Luis Obispo. I wanted to buy a Panasonic plasma TV and noted that CompUSA had one priced about $200 less than BestBuy. I checked the local BestBuy inventory and the model was available.

Best Buy prides themselves on price matching and I thought I would save the shipping cost by buying locally. I drove over to Best Buy and attempted to purchase the model shown as available. The salesman told me that they were out of stock for the model I wanted and the only one remaining was the demo model. I did not want to buy the demo model but also was in a bind since this was going to be my anniversary present to my wife. I reluctantly agreed to the purchase. The salesman then packaged the TV, transported the TV to my SUV, loaded the TV into my SUV and stated emphatically that it had to remain upright otherwise the “gas will react with the glass” and TV won’t work correctly thereafter. I assumed he knew what he was talking about. As soon as I backed out of the parking space, the TV fell over, and the screen broke. Needless to say Best Buy stated that it was my responsibility and my fault.. and added “have a nice day.” They did not offer to do anything to help compensate for the loss. Unfortunately for Best Buy, I am an Attorney and have filed suit. We’ll see who has the last laugh in this case. I look forward to dissecting the Operations Manager before the Court, assuming he has the stones to show up.

One assumes that the Best Buy employee added something like “Make sure you don’t secure the television within your SUV, as we exist to bear responsibility for your own foolishness,” which would make Mr. Attorney’s case pretty cut and dried.

(If he is an attorney, he’d also know that there is a little thing called a subpoena that would remove the optionality (regardless of its basis in the Operations Manager’s possession of minerals, pebbles, rocks, or other geological entities) of a court appearance.)

And possibly Mr. Attorney will look for an anniversary present for his wife before he’s driving home the day of the event, and allow me to suggest that many women prefer jewelry or flowers to electronics for such gifts.

Date: Tue, 6 Mar 2007 19:12:12 -0800

My son -age 11 — washed cars and saved up to purchase a computer game he had been wanting.  I took him to Best Buy and he proudly put down his $21.54 to purchase the game.  When we got home, he got to work downloading five CD-Roms (wow, this was one huge game program) onto our designated computer for kids games.  Then he got to the set up screen and learned that this game required that a credit card be entered and that it would cost him $14.95 per MONTH for the privilege of playing a game he had already PURCHASED.  We discussed it, and he agreed to return it and pick out something else.

The game is called Guild Wars. [… snip …] 

We trekked back to Best Buy and were directed by the “concierge” to the customer service counter.  My wonderful son (sorry, I am very proud of him) explained the problem and the clerk bluntly told: “sorry, no refunds.” Recongnizing the sign of uncontrollable tears being held back, I reluctantly stepped in and explained further:  there is nothing visible on the box to indicate that the game costs an additional $15 per month to play, and the checkout staff also did not alert us to that fact.  Therefore, it is immoral if not illegal for them to refuse us the refund.  For goodness sakes, we are talking about an 11 year old kid who worked and saved up the money.  When she would not budge, I asked for the store manager.  The manager came over and just repeated the same company line:  “No refunds on software.  Period.” I was stunned.  Absolutely and literally speechless.  We have spent thousands of dollars at this store over the year, and we were being dismissed forever as a customer (I have a VERY LONG memory) over $20.  And $20 of hard earned 11-year-old kid money at that!!!  I refused to take the software home.  I left it on the counter in front of the manager, thinking that would surely shake him out of his delusional trance.  Nothing doing. He said nothing.[… snip …]

I don’t remember being reminded that I need to purchase electricity or cable service the last time I bought a television either.  Should I demand a refund on that basis?  Best Buy’s return policy on software–“Opened computer software, movies, music and video games can be exchanged for the identical item but cannot be returned for a refund”–is by no means hidden by the store, nor is it an exception to the rest of the retail industry.  Let’s hope our 11-year-old learned a lesson about knowing what he’s purchasing before plunking down his hard-earned dough; it’s a lesson that is worth far more than $21.54!  (Financial counselor Dave Ramsey calls this “stupid tax,” and I think we’ve all paid more than enough of it in our lives!)

(I’m also a little confused too.  While I’m not any more familiar with Guild Wars than just the name, the price seems to be $29.99 for Guild Wars and $39.99 for Guild Wars: Factions (perhaps there was a $19.99 sale one week?), and both products specifically mention that there are no monthly fees to play online (as determined by me from product descriptions and reviews on Amazon.com)…)

And here’s the winner of my coveted “Want some cheese with that whine?” award:

Date: Sun, 25 Feb 2007 00:10:44 -0500

Hello

This letter is to note a practice that I think is at the least unfair, or perhaps “unfriendly”, and not conducive to good customer relations.
I purchased a Sony DVD – VCR Combo recorder 3 years ago, along with a 4 year “service contract”.
The unit began to malfunction about a month ago, and I took it in to get repaired.  I was advised that the unit was unrepairable, and that I should come in to pick out a new one.
Wonderful!
As it turns out, the new unit cost $220 less than the original.
The service contract reads “repair or replace, or give a store credit voucher for the original purchase amount – $500!!, at the discretion of Best Buy.”
The store manager REFUSED to give the full value of the unit as a credit voucher – $500 -.
All I received was a replacement unit, valued at about HALF of the original.
They would not even extend the courtesy of a gratis service contract on the new one.
A store employee given the job of processing my exchange advised me that if the manager had given me a credit voucher for the full amount, at his discretion as worded in the service contract, that that amount would have come out of his bonus!!!
This sort of customer – unfriendly “service” stinks.

Thanks for posting this.

Isn’t that a hoot?  The person honest-to-God feels entitled to that $220!  It’s not enough that they picked out a new unit (probably with updated technology and more features), but “all [they] received was a replacement unit, valued at about HALF of the original.”  It really warms my soul to know that every time that person uses their DVD – VCR combo, they’re going to think about how Best Buy screwed them out of the $220 that was theirs by right and all they got was this lousy replacement that does the exact same thing as their previous one…

The tragedy of the internet is that we’ve discovered that we’re really sort of petty and foolish!