Motorola’s Droid RAZR vs. Samsung’s Infuse 4G

I’ve had Motorola’s Droid RAZR for a few weeks now so feel comfortable commenting on the advantages and disadvantages relative to my previous phone (the Samsung Infuse 4G and Samsung Captivate).


  1. Better Bluetooth stack. I believe it supports Bluetooth 4.0. Voice dialing works with my car stereo (JVC KD-A925BT) which wasn’t the case with the Infuse.
  2. Speed. The phone doesn’t get sluggish when I have a few apps open. 1GB of RAM and a dual core processor make the user experience much snappier.
  3. Podcasts. The native music app integrates which seems to have a more recent (and larger) database of podcasts to choose from.
  4. Social Networking. The Droid RAZR supports more sites out-of-the-box: Facebook, Twitter, LinkedIn, Skype and YouTube.
  5. Verizon’s Network. This isn’t exactly exclusive to the RAZR but Verizon’s 4g network, at least at the time of this writing, runs circles around AT&T’s network. I’ve run numerous network speed tests in Seattle and Atlanta (the 2 cities I frequent) and get the same results every time. Verizon’s network is 3 to 5 times faster than AT&T’s network (4G LTE vs HSPA+). To stress how big the gap is, Verizon’s upload speeds are consistently faster than AT&T’s download speeds.


  1. Camera quality. Indoor close up shots are much sharper on the Infuse than the RAZR. I truly miss the camera on the Samsung Infuse.
  2. Software Keyboard. I make a lot more mistakes on the RAZR than on the Infuse. It’s almost as if the keyboard is optimized for 1-handed typing; the left half of the keyboard is too far to the right. I’m already on my 2nd keyboard (SwiftKey X) but still seem to have this problem.
  3. Backup Assistant. I’d like to make sure I don’t lose my contacts if I switch to a different brand of phone (especially considering how fast the android ecosystem is evolving!) so have no desire to use Backup Assistant but can’t get rid of it. This wasn’t a problem with the Infuse.
  4. MotoBlur. They’ve done some things well (exchange email support, yahoo push support) but in general MotoBlur is more intrusive than Samsung’s TouchWiz.
  5. Notifications screen. This is the pull-down screen that displays notifications. Samsung phones include a set of controls that let you toggle Wireless, GPS, Bluetooth, etc... at the top of the notifications screen. The RAZR has no corresponding functionality.
  6. No text message preview. If there is only 1 text message the RAZR displays the sender; if there are more than 1 messages then the RAZR displays the number of unread messages. I prefer Samsung’s approach which displays the sender and the first part of each message as a separate notification.

Optimistic Concurrency

I’d seen this term crop up from time to time over the past few years but didn’t know what it meant. Thanks to Wikipedia this cipher has been decoded.

The optimism in optimistic concurrency refers to the attitude towards locks. An optimistic attitude assumes that locks aren’t necessary. This is considered optimistic because it assumes that transactions typically won’t step on each other. For some situations this is true; overlapping transactions are so rare that it’s more efficient to back-off and try again on the rare occasions they occur. Since locks are relatively expensive and rare, avoiding them lets the system handle more transactions overall (in this case).

On the other hand, if overlapping transactions are common then the cost of backing off and re-trying may exceed the cost of acquiring a lock for each transaction. Of course this partly depends on the granularity of the lock. The goal of finer grained locks is to reduce contention and, ultimately, to improve throughput.

The other aspect of optimistic concurrency is the way overlaps are handled. They’re detected, usually via some “modified-last” type token. If the underlying data has been changed since the writer last read it then the transaction fails and is reattempted.

Learning about Windows Azure

To prepare for a new role I’m transitioning into at Microsoft (SDE II – finally!) I’m ramping up on Windows Azure.

For one it sounds a lot like the “distributed operating system” that was alluded to in grad school. Analogies abound. So, for instance, the relationship between Windows (or any other OS) running on a single machine is similar to the relationship between Windows Azure running on lots of machines (more specifically, virtual machines).

Windows provides a program with access to the resources of a machine; CPU, storage, memory, network, etc…

Windows Azure provides a program with access to the resources of a cluster of machines: compute, storage, etc…

The analogy falls apart if extended too far because on Windows traditional applications are single instance. That is, a user launches an executable and uses that single instance of the running process to accomplish whatever functionality the program provides.

Windows Azure, on the other hand, seems to imply an organization of work more similar to the way the Web works. To access a program on the web you enter its URL (analogous to clicking on the executable). If it’s a popular program (e.g., amazon, hotmail, etc…) then there’s a good chance that a single request can be serviced by 1 of several load balanced servers. And the next request (say, clicking on a link to your account data) might well be serviced by a different web server.

In Windows Azure parlance this maps to Roles executing in Instances. Any 1 of several Instances may provide the program’s functionality.

There’s more to it of course but the same issues that you run into moving from a traditional client program (single instance, built in semi-persistent/stateful) to a web application (multiple instances, no built in persistence/stateless) apply.

Looking up a User SID

There are a several ways to do this but so far my favorite is (from a command prompt):

useraccount where name=”XXX” get caption, domain, sid

Replace XXX with the user name (without the leading “<domain>\).
You’ll need the wmic tool installed if it isn’t already on the system.

Automatically connecting to a Bluetooth a2dp receiver from the Samsung Infuse 4G

I bought a Sony Bluetooth transceiver for use primarily in my car. Unfortunately I’ve had to manually connect to it every time I enable Bluetooth on my phone (Samsung Infuse).

Fortunately this can be configured with a little tweaking:

  1. Root your phone.
  2. Install ES File Explorer or some other Root Exploring app that lets you mount partitions in read-write mode.
  3. edit /etc/bluetooth/audio.conf. Uncomment AutoConnect=true (remove the leading #).
  4. reboot.

Thanks to the person that responded to the android bug with the solution!

Command Prompt Tip–Autocomplete similar command

Console Windows have had TAB key completion for a while now. That is, pressing the TAB key at the command prompt will insert the closest matching filename.

While this is helpful for specifying file name parameters sometimes what you’d really rather do is insert an entire command. You can go through commands recently entered with the up and down arrows.

I recently discovered another way to insert an entire command. If you type the first few letters of the command then press F8 the closest matching command in the command history will be inserted! This is a great way to cut down on the amount of typing involved, especially when it comes to long commands with lots of parameters.