Why I am right!

December 30, 2008

iPhone review and AT&T Outage

Filed under: AT&T, Fail, iPhone, Technology, Verizon — Shaun @ 12:32 am

I picked up an iPhone on Saturday and it is probably the most glorious device I have ever used. Everything works how I would expect it to work without reading a manual. As much as I generally hate Mac’s and their users they might have done something right with iPhone. Before deciding on the iPhone I tried out all the competitors Verizon had including the new Blackberry Storm. The storm was just ok and was generally sluggish to perform any task.

Before switching to AT&T I was with Verizon for 14 years. Their customer service and phone selection is near the top of my hate list but their network was really good. If they made a phone that was decent and didn’t have all their propeitary vCast, vzNavigator, vCrap I would have stuck with them.

AT&T on the other hand could be the worst thing ever. I took the phone home Saturday night and everything worked fine. I had service inside my house and at MOST places I drove. There seems to be quite a few dead zones in some fairly heavily populated areas. Then came Sunday morning. Apparently their was an outage for the whole Midwest which meant I was basically dead in the water all day. If that wasn’t bad enough apparently their “customer service” center is closed on Sundays. There is/was no announcement on their website or on their customer service recording saying their network was down. Congratulations AT & FAIL!

Apparently I have 30 days to decide how much I hate AT&T before I am stuck in their 2 year contract. If the phone wasn’t so awesome I would have taken it back already. So I think I am going to stick it out for the next 27 days and see how bad their network really is.

Advertisements

October 1, 2008

Swipe your own credit card

Filed under: Best Buy, Credit Card, Stupid, Technology — Shaun @ 3:01 am

By now I’m sure everyone has seen the do it your self credit card transaction. Pretty much any store you go to now has the little machine where you swipe your own card and then sign in the box. I love those machines because you can usually swipe your card ahead of time and speed up the transaction. I think the more you can get the $8/hour clerk out of the transaction the better.

One place where that kinds of falls down is at Best Buy. Here are the Best Buy steps:

  1. Swipe your own card like normal.
  2. Cashier stands there looking confused.
  3. Cashier asks for the card that YOU just swiped so they can enter the last 4 numbers.
  4. Cashier talks to friends in line next to you
  5. Card is returned along with 8 foot long receipt with 2 surveys on it.

So if they have to actually take the card from you why don’t they just swipe it themselves?! Am I missing something here?

May 22, 2008

Debugging "caught" Exceptions

Filed under: Debugging, Microsoft, Technology, Visual Studio — Shaun @ 10:05 pm

For the past week or so I noticed a few strange entries in the Visual Studio “Output” window when debugging to a certain page of our app.

Overflow

Something on my page is throwing and catching an OverflowException. Now it probably didn’t matter what was causing this exception because the application was working fine but sometimes things like this bother me enough that I have to figure it out. Luckily there is an easy way to debug ANY exception that you see in that window. I found the solution here.

Once I setup Visual Studio to catch all exceptions of type System.OverflowException (by following the steps in the linked article) the debugger popped the following window anytime that exception was thrown.

  Overflow

From here I was able to follow the stack trace to debug the actual problem which was an Integer getting set incorrectly in a grid we use.

May 13, 2008

Toyota Financial Services

Filed under: Green, Stupid, Technology, Toyota — Shaun @ 10:05 pm

Would you be surprised to find out that Toyota Financial services does not have an e-billing option for monthly payments? You would think the company who invented the gas saving Prius would certainly have a billing alternative that would help save trees. I’m surprised all the hippies haven’t complained about the “greenness” of this policy. Here is the reply I recieved:

Thank you for contacting Toyota Financial Services.  Billing statements
are system-generated, and you will continue to receive a paper billing
statement each month for your records.

We are currently not able to email billing statements.   You may view your
last printed billing statement by selecting the Statements tab.  You will
then need to select the most recent Statement Period from the dropdown
menu.  Billing statements are generated approximately 17 days before your
due date.

You may choose to receive Email Notifications by selecting the My Profile
tab.

We value your business and look forward to servicing your needs in the
future.  Thank you for visiting us at www.ToyotaFinancial.com.

Sincerely,
Toyota Financial Services

I signed up for their automatic payment service so my payment is deducted on the due date every month. I am a pretty anal record keeper so I usually like to know how much of a payment was applied to the principal and interest every month. Their statement and website cannot even tell me that information. If you want to know that you have to call and then they mail you a printout from their internal system that lists the amount applied to each.

I also have a loan through Honda Financial services. They have apparently figured out this black art of statement e-mailing. Each month my payment is deducted and they send me an e-mail with the details.

The worst part of all is I don’t even own a Toyota. I got a loan through them when I purchase a new Honda because apparently Toyota’s interest rate was .5% less.

January 18, 2008

Changing the diff/merge program used by Visual Studio

Filed under: Beyond Compare, Microsoft, Technology, Visual Studio — Shaun @ 9:42 pm

I first want to congratulate Microsoft on releasing a diff tool that is significantly better than any of their previous versions. I would also like to thank the developers for giving us a way to change the default tool to something else.

Personally I prefer using Beyond Compare. There are a number of reasons why I like it better but in the end it just comes down to what you are familiar with and personal preference. If you are still stuck in the stone age using tools like WinDiff, SourceSafe give it a try, it is free for 30 days.

Anyway, here is how you change the default diff/merge tool in Visual Studio. I know this works in 2005 and 2008. From what I recall the menus are pretty similar in each version.

  • Open Visual Studio
  • Click Tools.. Options
  • Select Source Control in the left pane. (If it is not there check the “Show all settings” box at the bottom left.
  • Select Visual Studio Team Foundation Server.
  • Click the “Configure User Tools” button in the right pane.

Options

  • Click Add in the “Configure User Tools” window

Add

Now you are ready to enter the configuration for whichever tool you choose to use. Below is what I entered for Beyond Compare.

Compare Settings:

%1 %2 /title1=%6 /title2=%7

BeyondCompare

Merge Settings:

%1 %2 /savetarget=%4 /title1=%6 /title2=%7

Merge Settings

If you are not using Beyond Compare here is a post by James Manning that lists settings for different compare and merge tools including WinDiff!

 UPDATE (2/20/08): Added Merge settings

January 2, 2008

Updating XML columns in SQL Server 2005

Filed under: Microsoft, SQL, SQL Server 2005, Technology — Shaun @ 7:33 pm

I had a table with a large XML column containing hundreds of rows. I needed to update the value of a single node in some of those records. Here are the steps I used to do it and the errors I encountered along the way. Hopefully this will save someone else some time. I cannot use my actual code for a number of reasons so I will attempt to simplify it for this example.

Assume you have a XML format like this:

<Sample>
  <NodeOne>Value1</NodeOne>
  <NodeTwo>Value2</NodeTwo>
  <NodeThree>OldValue</NodeThree>
</Sample>

We want to replace ‘OldValue’ in NodeThree with ‘NewValue’.

Attempt 1 (Invalid):

DECLARE @newValue varchar(50)
SELECT @newValue = 'NewValue'
UPDATE [Product]
   SET ProductXml.modify('replace value of (/Sample/NodeThree)[1] with '+ @newValue)

Since this script would be run a number of times with a different parameter I needed a way to change the ‘NewValue’ without rewriting the script. I was hoping to use String concatenation but it does not work.

Msg 8172, Level 16, State 1, Line 5
The argument 1 of the xml data type method “modify” must be a string literal.

Attempt 2 (Invalid):

DECLARE @newValue varchar(50)
SELECT @newValue = 'NewValue'

UPDATE [Product]
   SET ProductXml.modify('replace value of (/Sample/NodeThree)[1] with sql:variable("@newValue")')

To fix the above error I had to use the sql:variable syntax. as you can see this simple replaces the string concatenation with sql:variable(“@newValue”). I thought I was home free but there was one more problem.

Msg 2356, Level 16, State 1, Line 6
XQuery [Product.ProductXml.modify()]: The target of ‘replace value of’ must be a non-metadata attribute or an element with simple typed content, found ‘element(NodeThree,xdt:untyped) ?’

Attempt 3 (Valid):

DECLARE @newValue varchar(50)
SELECT @newValue = 'NewValue'

UPDATE [Product]
SET ProductXml.modify('replace value of (/Sample/NodeThree/text())[1] with sql:variable("@newValue")')

What I really wanted to do was replace the text of the NodeThree element. To do that I had to add /text() to the end of the XPath. This script will replace the text of the specified element with whatever value is in the @newValue parameter. Thanks to this thread for the answer.

Disclaimer:

As far as I know this only works on un-typed XML columns. If you have a typed column I believe you need to add a couple things to this statement but hopefully this will point you in the right direction.

During testing I wrapped my entire script in a BEGIN TRANSACTION/ROLLBACK TRANSACTION so I could see the results of my script without doing any damage. You should do at least that before attempting any updates as the XPath is generally tricky.

December 20, 2007

ASP.Net Edit and Continue in Visual Studio 2005/2008

Filed under: ASP.Net, Edit and Continue, Microsoft, Technology, Visual Studio — Shaun @ 4:20 pm

I have seen many articles that said Edit and Continue does not work in ASP.Net for Visual Studio 2005. Well, it works for me and here is how to enable it. I have showed many people how to enable this and every time I show someone I have to figure it out again. So I am putting this out there to hopefully save someone else the frustration.

To enable Edit and Continue there are 2 separate setting. The first is under Tools.. Options. Open the Debug section of the tree and click on the Edit and Continue Group. Make sure “Enable Edit and Continue” is checked. If you are using the VS 2005 Professional you may need to click a checkbox at the bottom of this screen saying something like Show all Options.

Options

The second setting is in a strange place. I am not sure if this works with the new Web Projects introduced in 2005. We are using the Visual Studio 2005 Web Application Project which may have something to do with it. Open up the solution you are attempting to debug, right click on the web project, and click Properties. When the property window opens click down to the “Web”. Check the Enable Edit and Continue box and you should be all set.

ProjectSettings

I will never understand why there are two places you have to enable this, but at least it works.

UPDATE: You must be at a break point in your code to edit. You cannot edit method signatures, add new methods, etc. Changes like that were not what Edit and Continue were designed for and I can’t even start to think how that would be implemented by Microsoft.

UPDATE (again): I recently started working with Visual Studio 2008. This fix applies to that version as well.

Create a free website or blog at WordPress.com.