Monthly Archives: December 2011

The psychology of mattress pricing

Anyone who has ever purchased a mattress knows this drill:

Marked price: $1,799
Sale price: $899.50 – 50% off!!!
Extra haggling: $750.00

Meanwhile, you’re still not 100% certain that you’re getting a good deal, but because you’re paying so much less than the item was originally marked, you feel ok.

This strategy is called price anchoring. In this [interesting article on price anchoring](http://danwin.com/2011/12/the-irrationality-of-price-anchoring/), Dan Nguyen posts about an interesting example from Daniel Kahneman’s new book involving a roulette wheel and a guessing game. If you find the mattress pricing scam appalling, you should definitely check it out. It’ll make you even less excited about their tactics.

How to: Successfully resolve XBOX Live error code 80169D94

Like a lot of proper geeks, I received a video game for Christmas. Battlefield 3 to be specific. Because I have a long history with the Battlefield series, many of my XBL friends also play this game, but have purchased map packs (of course), which means I pretty much have to purchase the map packs.

The day after Christmas I fired up my XBox and hopped online. I tried to purchase the Back to Karkand map, only be be met with an error and status code:

> Can’t retrieve information from Xbox LIVE.
> Please try again later.
>
> Status code: 80169D94

Oh boy, “Try again later.” *Riiiiiight…*

I was patient, figuring that maybe XBL was overloaded because of the holiday. I tried again this morning before 9 AM when load would surely be less. Same thing. I even went to Best Buy yesterday and purchased a 1600 point XBL card in an attempt to work around the problem; thinking maybe it was credit card related. No dice.

Some Google-ing turned up a great article by [Brad Feld][1]. The article revealed a couple of important facts: 1) this code means your account is on some sort of billing lock, and 2) that XBL support would likely fail to resolve the issue on the first shot. What follows is how I managed to get resolution in about 30 minutes.

### Before calling XBL support

* Make sure you have your live.com login and password handy (I use [1Password][2], yay!)
* Log in to [http://billing.microsoft.com](http://billing.microsoft.com) and update/verify all your payment information
* Is your billing address correct?
* Is the card on file expired?
* Have you ever had to dispute any charges from XBL?
* Fire up your XBox and:
* Press the Guide/Dashboard button in the center of the controller
* Go to Settings, Account Management
* Move right one panel to “Your Memberships” and select your subscription
* Select “Change Payment Options” and verify that the card in use is active and all details are correct
* Jot down some notes about your issue
* The exact message and status code you received
* Any steps you’ve taken to attempt self-resolution (like this list here!)
* If you’re redeeming an XBL card, write the code out using the NATO [Phonetic alphabet](http://en.wikipedia.org/wiki/NATO_phonetic_alphabet) (handy bash script [here](https://gist.github.com/1523933) for nerds among you); you’ll need to repeatedly provide this number to the support rep

### Calling XBL support

When I called XBL support, Hector (my rep) first insisted that my account was not locked. He attempted to add the points to my account three or four times while I read him the code from the card (ugh that was painful). Hector’s diagnosis was that the store had not properly activated the card and that I should go back to Best Buy. Having watched the clerck activate the card, I wasn’t prepared to let him off the phone, so I pressed further.

In my case, I had resolved a dispute with XBL in August of last year regarding some unauthorized purchases. I explained this to the rep, along with the steps I had already taken, and pressed him to look in to my error message further. I reiterated that he might need the status code I received, which he made note of, and placed me on hold while he did his support joo-joo.

When Hector returned, he acknowledged that the acount was “locked” afterall, and that, if I could verify all my billing information was correct, he could unlock it. I had already updated my info, so I gave him the green light to unlock. Bingo! The card worked immediately.

### What might be different about your situation

It seems to me that this status code is probably related to billing lock for reasons related to fraudulent activity. It might not be constrained to fraudulent activity, but I found plenty of other status codes covering other reasons. This appears to be one of the few status codes not covered by the XBL support website, and when searching, I didn’t see any results returned for xbox.com. It’s almost as if Microsoft purposefully avoids keeping information related to this code out in the open.

I suspect I was able to get a resolution quickly because I supplied the dates of my previous support incident. The rep was able to look up my resolution and unlock the account on his own because my account had already been “released” by the fraud department. The delay that Brad Feld experienced likely relates to the tiered structure of XBL support. Fraud is handled by an entirely different department, which in my experience, is staffed by much more competent staff. The problem is that they’re almost always backlogged.

All of the above is speculation on my part, but a large part of what I do is troubleshooting large organizations. I hack people as much as I do technology, and I have a pretty good track record of building an accurate internal picture of how a company works without actually stepping inside.

Hopefully this write up augments the other information you’ll find when searching for information on 80169D94.

[1]: http://www.feld.com/wp/archives/2008/12/the-unbearable-frustration-of-error-code-80169d94.html
[2]: https://agilebits.com/onepassword

Rails: rails vs ./script/rails

Long time Rails developer Jesse Storimer (of Shopify) recently blogged about the efficiency of the new (since 3.0) `rails` command versus using plain old `./script/rails`. You can find his piece here: [The rails command and exec(2)](http://jstorimer.com/2011/12/20/rails-and-exec.html). You should definitely read that before moving on.

So Jesse’s premise is that you should consider using `./script/rails` instead of the `rails` command because of the overhead involved with the rails script and exec. When I read this, I was skeptical. Just how much overhead can there be in a simple wrapper like the rails script? Why ask rhetorical questions when we can know for sure!?

I performed this testing in our staging environment:

* Linode 512 instance running Debian 6.0
* Rails 3.1.1
* Ruby 1.9.3-p0
* Bundler 1.0.21
* Gems in bundle: 68

Since this is a capistrano deployed environment, we rely on bundler, so I wasn’t able to test the bare `rails` wrapper. Maybe another time.

I ran two sets of tests. First, I figured I’d run a test against `rails runner` because it wasn’t immediately obvious to me how I’d execute `rails console` using the GNU `time` utility. Once the console is open, the REPL interface would sit there waiting on me and be included in the `time` results. Easy fix. I simply added a call to `exit` to my ~/.irbrc file causing irb to execute immediately and reliably without waiting on a slow human. Once I figured out how I’d test the console, I wired up my tests.

TL;DR – Avoiding the wrapper `bundle exec rails` saves you about 1 second for every execution of `console` or `runner`. Meh. Although, a full second can seem much longer when you’re reloading your console 5 times in a row because of some stupid error you keep making.

Read on to see the methodology and analysis.

**Files**

Exec: count gems (no file, just executed at a prompt)

# Be sure to subtract 1 for the header line!
bundle show | wc -l

File: test_script

puts “Runners gon’ run!”

File: ~/.irbrc

# Be sure to remove this later or you’ll be reeeeeally confused
exit

File: bench_runner.sh

#!/usr/bin/env bash

echo “Runner tests: 4 times each”
echo
echo “cmd: bundle exec rails runner -e staging test_script”
time bundle exec rails runner -e staging test_script
time bundle exec rails runner -e staging test_script
time bundle exec rails runner -e staging test_script
time bundle exec rails runner -e staging test_script
echo
echo “cmd: ./script/rails runner -e staging test_script”
time ./script/rails runner -e staging test_script
time ./script/rails runner -e staging test_script
time ./script/rails runner -e staging test_script
time ./script/rails runner -e staging test_script

File: bench_console.sh

#!/usr/bin/env bash

echo “Console tests: 4 times each”
echo
echo “cmd: bundle exec rails console staging”
time bundle exec rails console staging
time bundle exec rails console staging
time bundle exec rails console staging
time bundle exec rails console staging
echo
echo “cmd: ./script/rails console staging”
time ./script/rails console staging
time ./script/rails console staging
time ./script/rails console staging
time ./script/rails console staging

**Test Results**

Let’s have a look at the results for `runner`:

Runner tests: 4 times each

cmd: bundle exec rails runner -e staging test_script
Runners gon’ run!

real 0m9.949s
user 0m9.190s
sys 0m0.715s
Runners gon’ run!

real 0m9.519s
user 0m8.753s
sys 0m0.724s
Runners gon’ run!

real 0m9.652s
user 0m8.898s
sys 0m0.712s
Runners gon’ run!

real 0m9.898s
user 0m9.105s
sys 0m0.747s

cmd: ./script/rails runner -e staging test_script
Runners gon’ run!

real 0m8.765s
user 0m8.101s
sys 0m0.621s
Runners gon’ run!

real 0m8.417s
user 0m7.731s
sys 0m0.642s
Runners gon’ run!

real 0m8.991s
user 0m8.290s
sys 0m0.657s
Runners gon’ run!

real 0m8.530s
user 0m7.828s
sys 0m0.658s

And now `console`:

Console tests: 4 times each

cmd: bundle exec rails console staging
Loading staging environment (Rails 3.1.1)

real 0m9.712s
user 0m8.885s
sys 0m0.782s
Loading staging environment (Rails 3.1.1)

real 0m9.725s
user 0m8.905s
sys 0m0.774s
Loading staging environment (Rails 3.1.1)

real 0m9.661s
user 0m8.861s
sys 0m0.754s
Loading staging environment (Rails 3.1.1)

real 0m9.742s
user 0m9.024s
sys 0m0.675s

cmd: ./script/rails console staging
Loading staging environment (Rails 3.1.1)

real 0m8.617s
user 0m7.978s
sys 0m0.596s
Loading staging environment (Rails 3.1.1)

real 0m9.168s
user 0m8.385s
sys 0m0.738s
Loading staging environment (Rails 3.1.1)

real 0m8.589s
user 0m7.868s
sys 0m0.677s
Loading staging environment (Rails 3.1.1)

real 0m8.573s
user 0m7.846s
sys 0m0.684s

**Analysis**

Time to do the math. Since we’re interested in the time we have to wait before we can do more work, we’ll look at the real field results (using Ruby, of course).

Runner:

# average times for bundle exec rails runner
([9.949, 9.519, 9.652, 9.898].reduce(:+).to_d / 4).to_s

# average times for ./script/rails runner
([8.765, 8.417, 8.991, 8.530].reduce(:+).to_d / 4).to_s

Using `bundle exec rails runner`: 9.7545s avg
Using `./script/rails runner`: 8.67575s avg

Result: avoiding `bundle exec rails` for `runner` saves you an average of 1.07875 seconds every time you execute runner.

Console:

# average times for bundle exec rails console
([9.712, 9.725, 9.661, 9.742].reduce(:+).to_d / 4).to_s

# average times for ./script/rails console
([8.617, 9.168, 8.589, 8.573].reduce(:+).to_d / 4).to_s

Using `bundle exec rails console`: 9.71s avg
Using `./script/rails console`: 8.73675s avg

Result: avoiding `bundle exec rails` for `console` saves you an average of 0.97325 seconds every time you boot a console.

Bringing balance to the force: CarrierIQ

There’s a severe lack of balance in this whole conversation surrounding CarrierIQ. The fact that CarrierIQ logs keystrokes makes the whole issue so terrifyingly intrusive that it’s difficult to look at the broad picture objectively.

Working in telecom isn’t much different than working in application development. Consider this common scenario:

> A user’s application crashes. They immediately call your customer service and spew vitriol, claiming the application has crashed ten times in the last week and lost all their data. ZOMG!

> Because you’re a seasoned — albeit somewhat cynical — developer, you include a crash reporter component that sends you detailed application usage and crash information. You pull up the customer’s records and see the application has only crashed three times in the two years the customer has owned it. The log of their data file size shows the file size has only ever gone up, and the report of data file integrity that runs every time the app boots reports no issues reading the file. Ever.

Wow, this must be the worst customer ever, right? And what’s up with this developer spying on his users. What a sociopath, right? Oh, I see he has got SpyMeSat Mobile App to notify him when an imaging satellite could be taking his picture. Of course he would say he just needs new satellite images, but the real reason is evident.

Probably not. This is more typical than we’d like to admit, but what drives users to such hyperbole when reporting issues? Tech support practices teach users this behavior. In order to understand how, you must understand a few things.

First is that, to your customer, the technology is a “black box”. To quote Arthur C. Clark: “Any sufficiently advanced technology is indistinguishable from magic.” When a customer calls a support line, there is a good chance the CSR is going to have them go through some basic steps they’ve already tried. Unfortunately, you can’t just take the customer’s word for it, because customers are liars…

Woops. See what just happened there? That’s the second thing you need to understand: common tech support methodologies tell us to distrust what the user says.

Thus begins the cycle of distrust. A certain percentage of customers will lie to save time. Another set will lie because they *think* they know what’s causing the problem, but they lack the depth of subject matter knowledge to even understand why they’re wrong. The technology is magic to them, so “restart the application/device” might as well be “say hocus-pocus three times.”

This issue runs even deeper because many customers really *do not* want to call your support line. They really don’t. Who wants to feel distrusted? They learn from every support experience, and will often take the basic troubleshooting steps themselves. They’ll tell you this, but as we know, a certain percentage will lie, and you have no way of knowing who this percentage is, therefore we must treat all customers as liars.

You spin me right round
baby right round
like a record baby…

*Ah-hem…* Sorry.

In a tech support conversation, the customer very quickly feels distrusted, and as we know from some rather infamous psychological experiments [1], people who feel distrusted will act in a way worthy of said feeling. Because of this deep rooted, dysfunctional relationship with our customers, we develop solutions that circumvent the issue entirely and gather the data directly. Pay no mind to the man behind the curtain, and all that. You see, the customer relationship problems are the same in telecom as they are in application development; web or otherwise.

This begs several questions:

Why ask them if they recently rebooted the device when the technology can tell us so accurately?

Why ask a customer how many dropped calls they experienced if we can simply look at a log?

Why not have a look at where the user was when they reported poor call quality, so we can correlate it to our tower location database?

Why trust that a particular setting is configured correctly when we can inspect the condition of the device?

*Why rely on a user’s assertion that they typed the URL correctly when we can just look at their keystrokes.*

Whoa, hold on a minute.

Let me back up a moment and be clear about something. I am not advocating that the data collection performed by CarrierIQ is “OK”. It’s also not entirely clear whether carriers can actually see your keystrokes, but they are logged on some devices. I am playing devil’s advocate here. I hope the scenario I’ve presented is identifiable to you. The technical groups at the carriers want you to have a positive experience, and this drives them to collect data.

I know more than a few people who work in technical departments at AT&T. They don’t live in a mountain-side complex plotting schemes for world domination. They really don’t. They’re normal people like you and I, and they care that people think their service sucks. Like we’ve all experienced, management doesn’t always give them the resources they need to fix the root cause. As is typical in service-related enterprise, they focus on *fulfilling* failure demand [2], rather than restructure their organization to reduce it.

This (excessive failure demand) is what drives the market for tools like CarrierIQ. I would be very surprised if the genesis of CarrierIQ was the marketing department, but the conundrum we face is that data collected for troubleshooting is like a trifecta of meth-heroin-cocain to marketers. The same data you’d need to build a robust support mechanism where the user does zero troubleshooting could be used to lead thousands of marketers right off a cliff. It’s too powerful an attraction. No firewall can withstand the gravity of “the bottom line”.

So take a step back for a moment and re-evaluate the CarrierIQ situation. Should there be more transparency? Yes, definitely, but let’s not turn this in to Salem 1692. These tools are incredibly valuable for carriers from a tech support perspective. They can’t go away entirely, but we do need better transparency and regulation of how the data is used.

Comments welcome on the [Hacker News item](http://news.ycombinator.com/item?id=329997).

1 – I’m referring to the [Stanford Prison Experiment](http://www.prisonexp.org/) conducted by Philip G. Zimbardo in 1971.

2 – [Failure demand](http://leanandkanban.wordpress.com/2009/05/24/failure-demand/): A work product that does not meet the customers needs and generates additional work. It is opposed to value demand, which is the customer wanting something new.