Saturday, March 3, 2012

Best Buy Needs to Change

12 years ago I got my first job. It was part time selling computers at my local Best Buy in Toledo, OH. I was an incredibly shy kid and as a result I almost didn't get hired. The sales manager at the time asked me to sell him a pen in an interview, a task I found incredibly difficult. I didn't know how to sell, all I knew was that I loved computers and I loved browsing the aisles at Best Buy looking at the newest stuff. I wanted to work there, partly because it looked cool, and partly because, well, there was a great employee discount.

I got lucky. That store actually had two sales managers and Larry Neal, the other manager, saw something in me that I honestly didn't see in myself. Larry taught me that even if you're a shy, introverted person you can put on a persona of a salesman. I went on to be a pretty successful part timer at that store. I made MVP a couple times and consistently hit my numbers.

So you could say that I owe Larry and Best Buy a debt of gratitude. That job was my first chance to learn how to interact with strangers. It taught me how to make a convincing argument, how to present myself as helpful and sincere when working with people. I've learned a lot at every job I've ever had but I probably grew more as a person working for Best Buy than any job I've had since.

I tell this story to make it clear than I'm not a Best Buy "hater." Quite the opposite in fact. I used to love opening up their Sunday flier and seeing what new cool stuff was on sale. I still shop there every black friday and I have camped on their sidewalk on thanksgiving night more times than I can remember (seriously the cold has wiped out my memories.) I am a fan through and though, but like many fans of a franchise on the downswing my hope is dwindling.

In the past 3 years I cannot claim one situation where I've had a good experience shopping at a Best Buy. That isn't to say they are overtly bad, we're not talking style interactions with employees or pseudo-scams. My problems have been much more subtle but I believe the issues I'm encountering will do more to hurt their brand than even the biggest of PR disasters. Their's will be a death by empathy as their customer base realizes that and their other online competitors are simply more convenient and a better shopping experience than walking into a Best Buy.

As an example I'll talk about today's trip. It's one of many similar experiences but highlights some of my frustrations.

My wife and I walked into the store today, a particularly busy one out in Mentor, OH. I was there to spend a reward zone certificate and a couple gift cards on a Kindle. The first problem we run into is neither of us knew where we would find Kindles. This is partly because they are either frequently moved or located differently based on which store you're in. First I thought maybe the mobile department would have them, I swear I've seen e-readers over there before. No, ok what about media, I remember they used to stock hardcover books a few years back an e-reader isn't much different. Nope. Last stop is computers where we finally find what we came for.

We walk up to the display, I'm not quite sure yet if I want the normal entry level kindle or the kindle touch. This is a problem that a brick and mortar store is uniquely qualified to help with. I can't pick up and play with something on but I can at Best Buy. So first I walk over to the entry level kindle. I pick it up and immediately an alarm goes off. Great, now everyone in the department is looking at me like I'm some kind of petty thief all because I wanted to play with something on display. Let me be clear this is not the first time this has happened to me. I've set off alarms on tablet computers, digital camera, just about anything that you pick up and hold in order to try out. The salesman comes over to turn off the alarm and even confirms that this particular one is prone to frequent false activations.

So while the alarm is being deactivated I pick up the Kindle touch and play around. I'm not too impressed so I switch back to the classic Kindle. I find out this unit has been damaged by customers and so it was reset to factory settings and now it doesn't have any books on it.

I walk away to head to car audio to setup an appointment for my wife's stereo install. This goes pretty well, it's a little slow to get the attention of a sales person but all told everything is handled well.

I've had time to think now so we head back to computers and I stand around for ten minutes while all the sales people are busy. I want the $79 kindle but there are none to be seen on the shelves, which leads me to believe my only option is to ask for one, meaning a lengthy wait for an available sales clerk and then another wait to checkout. All for a product not much more expensive than the $60 video games I can just pick up and carry to the counter.

Finally we're rung out, which goes well, and I'm on my wait out the door. No receipt check this time (another practice that gives retail a bad name in my opinion.)

Compare this to a trip to another retail electronics store - the Apple store.

When I bought the original iPad my trip to Apple's store went like this -

I walked in and an employee quickly asked my name and what I was there for that day. I told her I came to look at the iPad. She pointed me to a large display off to the right where I was able to pick one up and play with a number of apps that had been preloaded, and carefully selected, to show off the devices best uses. After a couple minutes another employee walked up and said "Hi Josh, I hear you're interested in the iPad." I had a couple of questions all of which he was able to answer then I told him I'd like to buy one. He pressed a button on his headset and requested someone bring up the product. While we waited he explained to me their Applecare plan, which I politely declined and then I was able to checkout, right there, as the employee ran my credit card on his iPhone which doubles as a point of sale device and emailed me my receipt. Meanwhile a third employee came from the back with my new iPad in a bag and ready to go. I walked out and the greeter thanked me for shopping.

The point of all of this is simple. The success of retail today is all about the experience. The experience of shopping at Best Buy is frustrating. Terribly ambience, employees who tend to be uneducated about the products, a confusing store layout where it's difficult to find anything, product displays that don't work, long waits for help when you need it and you feel like you've been labeled a shoplifter the moment you walk in the store.

I love going to the apple store, and clearly I'm not alone. They get it, and guess what, they don't give up anything to get there. You know those guys at the front of the Best Buy who check your receipts? The security guys (called LPs or Loss Prevention when I worked there.) Apple has that too, but she's a greeter who helps you get what you need and makes sure your name is in queue for help as soon as you walk in the door. She's also looking out for someone walking out the door with an iPod in their pocket but you don't realize that because she's genuinely helpful.

What about those dreaded add ons. The extended warranties and accessory sales. Apple does that too but they convince you it's good by making it part of the experience of playing with the product. They place the awesome 27" monitor with the mac mini and the magic trackpad. They put information about Apple care right next to the product and don't treat it as an upsell but a great product in and of it's own.

I've talked long enough and I could write a book on the things I think Best Buy could do to improve their experience but I'm going to wrap up with a list of a few heavy hitters.

1) Change your LP team into a customer care team. Give them an in-store intercom and when someone walks in with a purpose make sure they get to the right place and there's someone waiting there to help them with their buying experience.

2) Stop putting out demo units that don't work. This is such a pet peeve of mine. If you walk into any Best Buy in the country their mobile department will be made entirely of plastic phones with stickers made to look like the phone you really want. They don't work at all, they are completely fake. Stop that. Spend the money, open the box, work with your partners to get demo units, whatever you have to do but if I'm spending time to leave my home and go to your store I want the opportunity to use the product not look at a plastic brick of a phone. The same applies to any product anywhere in the store. This means no more locked screen savers on the computers, no more glued down remotes for TVs and no excuses. Customers will break things, they will steal them... deal with it.

3) Stop treating the people who are still showing up as criminals. We both know most theft in retail comes from the employees not the customers. I'm not saying you have to put out untethered demo units, but pay attention to how you tether. I should be able to comfortably use the product without your security getting in the way. For a phone that means a 4-6 foot cord not a 1 foot cord. For a kindle that means at least 2'. And for the love of all things holy ditch the ridiculously embarrassing alarms and come up with a way to draw attention to a untethered product without your customers getting a stare down. Remember that intercom thing in #1. Maybe you can put out a targeted announcement in your employees earpieces that a product is disconnected.

4) Make the checkout process better. Seriously just steal this one from Apple because they do it right.

5) Stop putting low cost items in cages. Sorry but $79 is far to low a price to be locked up. I should be able to walk in, pick up a kindle and take it to a checkout counter (or someone to check me out, see #4.) I understand the $1500 laptops and $700 iPads.

6) If something is locked up have dedicated runners instead of waiting for a sales guy who is constantly busy. Maybe your geek squad people could double as this on lighter days.

7) Your store layouts feel dated and confusing. There shouldn't be three places that a e-reader could reasonably live. I have no real suggestions here other than to look at what Ikea does for appliance sales and maybe borrow a bit of their "small homes" model for your bigger departments. You actually bought Magnolia a decade or so ago and they did this well.

8) Get rid of the furniture departments. It's always been half assed and it makes you look bad. If you must keep it around then take some pride in it and come up with a way to make it work. Maybe see the Ikea like homes in #7. This one is kind of random but it's always bugged me.

9) Display the accessories for the product with the product. Put them at eye level and make them relevant. That means Kindle cases should be next to the kindle. The Ink for the printer, even if it's an end cap should be next to the printer. Never ever let the wrong accessory be next to an incompatible purchase (this happened to me once and I almost walked out with 60 dollars worth of the wrong ink for a printer.) This is your bread and butter, you customers shouldn't have to hunt to help you sell them.

That's just a few ideas. I'm no retail expert and these could all be terrible from a business perspective. Clearly some of them will cost some money to implement, but I really do believe in order to compete with online Best Buy has to make the most out of the advantages of bring a Brick and Mortar store. That means the convenience of getting your product the day you want it, the ability to see related products and get those too, and the ability to hold, feel, touch and play with the thing you're thinking about buying.

Sunday, January 15, 2012

Mapping (Multiple) Legacy Databases With Datamapper

We're starting in on a new project at work and it comes with some unique requirements (don't they all?)

To get things going so the rest of the team can take over and run with it I spent a couple days figuring out Datamapper the ruby ORM and mapping a number of legacy data tables.

This application is unique in that it will run against 3 separate databases. Two of them come from an older version of the application that the client built several years ago, we'll call these databases db1 and db2. The third database is where any custom data will be held for the web interface itself. We'll call it web1.

The first trick to getting datamapper to work in a rails applications is knowing what to actually install. Datamapper is a general purpose ORM and can be used quite effectivley outside of rails, as such the documentation on doesn't really focus on rails. No problem, take a look at the dm-rails gem.

dm-rails overrides a number of ruby on rails default generators, patches rake db:migrate to work with datamapper upgrades and automigrates and even integrates well with rspec and cucumber. Also worth noting that it worked fine on the latest and greatest (as of this blog post) - Rails 3.1.3 with Ruby 1.9.3.

Part of setting up dm-rails is getting your database.yml configured correctly. The documentation on the github page is great but as an added example here is a version of my config (with secure info removed.)

db1_defaults: &db1_defaults
  adapter: mysql
  username: [USERNAME]
  password: [PASSWORD]
  host: localhost
  database: db1

db2_defaults: &db2_defaults
  adapter: mysql
  username: [USERNAME]
  password: [PASSWORD]
  host: localhost
  database: db2

web1_defaults: &web1_defaults
  adapter: mysql
  username: [USERNAME]
  password: [PASSWORD]
  host: localhost
  database: web1

  database: web1
  <<: *web1_defaults
      <<: *db1_defaults
      <<: *db2_defaults

test: &test
  database: web1_test
  <<: *web1_defaults
      database: db1_test
      <<: *db1_defaults
      database: db2_test
      <<: *db2_defaults

Once your database is configured you should be able to run rake db:migrate and see success messages. At this point you have no models configured but you can see that it can connect correctly.

The next step is mapping your existing tables.

db1 and db2 have quite a bit of existing data, their own data formats and a somewhat inconsistant naming structure. This resulted in a lot of custom mapping and eventually I just decided to explicitly spell out every mapping for consistency (even if the datamapper conventions would have applied.)

Here's an example model file. Again I've removed business context by renaming some things. I'll call out some pitfalls after.

class Procedure
  include DataMapper::Resource

  def self.default_repository_name
  storage_names[:db1] = "procedures"

  property :id, Serial, :field => "id"
  property :name, String, :field => "procnam"
  property :length, Integer, :field => "avgminlen"

  validates_length_of :name, :max => 25

The first important thing to note is this method declaration.

  def self.default_repository_name

This is how you tell Datamapper which database this model's table is in. In this case Procedures come from the db1 database.

Next thing worth noting is:

  storage_names[:db1] = "procedures"

Which is how you set the table name. In this case the table was pluralized. If you find that all of your tables follow a naming standard (something like tblProcedure) there are ways to override the naming globally. In this application naming standards were fairly inconsistant so I ended up adding this line in every model even when it was technically unnecessary.

Also for each varchar type column I added a length validator. The length of the varchar varied wildly in my application from 1 char fields up to 50 varchar fields. The best way I could come up with to deal with that was to simply validate that it never overflowed. Would love suggestions on any other config flags I could add if need be so datamapper knows what it is structurally.

One last thing to note. The override to default_repository_name MUST BE BEFORE THE PROPERTY DECLARATIONS. Sorry for the all caps. I spent about 2 hours fighting datamapper before figuring that one out. I even made a SO post on it before i figured it out.

Saturday, January 14, 2012


2012 marks my fourth year at Codemash. I've written about this conference before but in short, if you don't go to Codemash you should. For your (or your companies) dollar it is the best value you will get. If you run a company you should send your people to Codemash, or sponsor it, maybe even host a bacon bar (thanks DI).

So the promotion is out of the way, what I really want to do with this year's recap is talk about each of the sessions I attended because they were all phenomenal.

The Scala Koans - Dianne Marsh & Daniel Hinojosa

The first precompiler was a half day session that covered the Scala Koans. The Scala Koans are a Scala implementation of the Ruby Koans.

Koans, in the context of computer programming, are "short, enigmatic stories that usually involve some kind of epiphany. (Jim Weirich)." The idea of a language koan exercise is that by completing a series of short questions you will learn the core of a language. Jim Weirich and Joe O'Brien really started this approach to leaning programming languages with the aforementioned Ruby Koans but now implementations exist in Scala, Objective-C, C# and many other languages.

Scala is a pseudo-functional, pseudo-object oriented language that has static typing with a dynamic style syntax. So.. it's a Mutt, but a very interesting Mutt. As a ruby / C# dev I saw a lot of promise in having the power of a runtime like the JVM and static typing with the comfort of ruby-style syntax.

If nothing else it's worth checking out the Scala Koans to get a really quick overview of another language.

Advanced Patterns with Ruby on Rails - Jeff Casimir

This precompiler was targeted at an existing ruby developer with a few projects under their belt that wanted to learn more about applying various design patterns or concepts to their ruby (and rails) applications.

Among the topics covered was isolating business logic and limiting law of demeter violations with Draper by using the decorator pattern.  Also slimming down controllers by refactoring calls to activerecord into one method and limiting the number of instance variables used in the view.

Keynote: Rethinking Enterprise - Ted Neward

Thursday's morning keynote focused on how enterprise software needs to reevaluate what it values. How reuse is no longer as significant as it was in the past, how we should be not only looking at the tools we are comfortable but looking to find the best tool even if it isn't part of out "enterprise stack." It warned agains being technist "This platform is always better than that platform."

It's the Little Things - Brad Colbow

This talk focused on the little issues in UX design and how when put together they can add up to larger problems with your applications. He used the example of the Cleveland Public Library (and really Overdrive.) He previously did a comic strip to express his frustrations with their interface for downloading audiobooks which became quite a popular strip. How taken individually the issues he ran into were minor but as a collection completely infuriating. He advocated small changes like remembering to turn off autocorrect or autocapitalize on a login form for iphone users.

Brad also talked a bit about his experience building an iPad magazine and how so many of the other iDevice magazines tend to make bad assumptions about their audience and use custom gestures that are confusing and easily forgot.

Building Windows 8 Applications with HTML5 and jQuery - Rich Dudley

Rich covered the new Windows 8 developer preview and how to use HTML5 to craft a metro style application that can be deployed via the Windows Store.

Regardless of what you think about Windows 8 I'm really excited about the prospect of using HTML5 and CSS to layout the UI of a client application. I've always thought that Microsoft's previous attempts to handle UI layout were really poorly implemented. HTML in my mind is a more intuitive way to make a UI and I prefer working at a markup level than using a designer (yes i know you could layout xaml in an text editor too.)

It looks like Microsoft is serious about not breaking the standards based nature of the markup too, which is encouraging. Looking at the examples shown they make liberal use of the data- attributes in order to bind data and actions but all of that is standards compliant. I saw no custom metro only tags only attributes and data attributes. WinRT is implemented through a javascript layer that can be granted system level access.

A number of precautions are taken with the applications including making the developer select one of two modes, essentially net or client. Net mode sandboxes the application and it's data and prevents access to most system resources. Client mode provides system access but isolated most network calls. The apps run like mobile apps, they do not remain in memory when switched away from but instead must have their state stored and recovered when focus changes.

In short metro looks promising, especially for devs who want to build something on windows but don't want to get too far out of the comfort zone of web development.

Mastering Change with Mercurial - Kevin Berridge

So to be perfectly honest I wasn't going to go to this talk except Kevin's an old college friend of mine and I wanted to be there to support his first talk at a larger conference like Codemash. Before I left though I was completely blown away and realized I was very much being a technist like Ted Neward had described.

See there's a bit of a git / mercurial rivalry. Kind of like vim / emacs or other opposing tools. Developers love rivalries and I very clearly have fallen on the git side. Truth be told though that has more to do with Github being awesome than git itself. So i spent most of Thursday harassing kevin (jokingly) about mercurial and asking if he was going to admit at the end of his talk that git was simply better. Instead he came out swinging and knocked everything I knew about distributed version control on it's proverbial ass.

Mercurial is awesome... dammit... it pains me to admit it and then publicly post it in this blog but it really is.

So first off kevin did the best "intro to the thing I'm about to talk about" that I've ever seen. Most "advanced" talks end up spending 30 minutes doing an intro and barely ever get into advanced content. Kevin played a minute long video and narrated it and if you had any experience with distributed version control (including git) you were now up to speed. Seriously i basically never used hg but the video was all i needed to make the connection to my normal workflow in git.

He then talked about stuff like viewing and searching history, simple aliases or tricks that can make your life better, and ended with some of the coolest history management stuff I've ever seen using hgs queue's extension. I may also be convinced that hg's way of labeling branches (by default) is better than how git does it.

The plan now is to get Kevin's slides, convert them to git and then jointly present the topic at burning river devs as how to do these things in both worlds.

CoffeeScript is for Closers - Brandon Satrom

Brandon's talk was an honest evaluation of why Coffeescript is worth looking at. He made every attempt to avoid the CoffeeScript > Javascript false debate people tend to have online. Instead he made a number of points as to why, even if you stick with normal JS for your daily work, you should give coffeescript a shot. The argument that best resonated with me was that using CS and then looking through the JS code is compiles into you can get an idea of how to be a better JS programmer. CS doesn't compiled into impossible to read minified JS code, instead it compiles into very readable code that makes every attempt to follow best practices. If you're a bit of a JS noob it might be worth rewriting some of your stuff in CS, compile it and then see how it turns out.

Dealing with Information Overload - Scott Hanselman

So i went to this talk because Scott Hanselman was speaking. I really didn't even read the title or abstract. It was added as a talk kind of last minute because of some other cancellations.

Scott is a freaking great presenter, which makes sense as that's what he does. This talk could have been a keynote. It focues on real world hacks to make your life easier to handle. Things like not answering email until a set time so that you can establish the precident that you work in the morning when your most "fresh." One hack I actually did right away was setting up an inbox rule to redirect email where I am cced into another folder meaning I focus on the email that I am directly referenced on.

Be The Input - Kinect With Your Computer - Ben Barefield

Ben's talk was on the Microsoft Kinect API for windows. Ben was lead dev on a small racing game that uses the Kinect sensor to control the carts on the screen. His company, SRT Solutions, had the game on display at their booth.

The thing that most surprised me about this talk was how easy it is to get up and running with both Kinect and the XNA platform for game development.  Ben was able to build a small test app that tracked a user's hand on the screen using Kinect in about 20 minutes during the talk. A really impressive demo and now I need to learn a bit more about this platform.

Everything Else

Some of the best parts of a conference like this don't happen in the session but rather in the side conversations you have with friends, peers and strangers in the hallways. I learned about dynamic vs static typing on a more fundamental level, closures, JVM backed languages, the logistics of spinning up dynamic servers with chef and vagrant and a million more things meeting with people in the halls and chatting over beers at the evening parties.

Codemash is worth it for just the inbetweens. The 20 mins between sessions and the events that occur between Thursday and Friday. You can't possibly make it to everything but the joy of codemash is you can always go next year.

Edit: Left off the speakers for the precompilers. Sorry.