Archive for November, 2007

AT&T Tilt — Dutty TouchFlo Unlock Screen

This may be one of the most usable new parts of the Dutty TouchFlo cooked ROM for my new AT&T Tilt:

Tilt Unlock Screen

Those of you familiar with Windows Mobile 5 or Windows Mobile 6 will remember the “Unlock” button the center-right portion of the screen that you had to tap with a stylus (or, much less effectively, with your thumb while you are driving – ugh).  The new lock/unlock mechanism on this cooked HTC TouchFlo ROM works like this:

  1. To lock, simply press the hard power key on the right side of the phone.
  2. To unlock: press the hard power key to “wake up” the display, then SLIDE this button you see above from the left to the right.

Sliding is so much easier than the old “button press” method there’s really no comparison.  You can do it with your eyes closed, and it works way more often.  Locking is easier too: the old “scroll down on the home page” method is gone, replaced with a hard key.

Facebook Beacon modified due to protests

Beacon now requires explicit opt-in. It’s not an unconditional victory, as there is still no global opt-out (or better, opt-in before it even starts doing anything), but it’s a nice step and a win for the rabblesphere.

Facebook announces modifications to Beacon advertising program

AT&T Tilt – Custom ROM

I couldn’t be happier with my new AT&T Tilt. It’s an upgrade to my old Cingular 8125, and it’s:

  1. Fast
  2. Sleek
  3. More user-friendly

More on “user-friendly” in a moment. But first, I want to share my experience flashing a custom or “cooked” ROM, which I learned about via the xda-developers forum. The ROM I chose was “Dutty’s TouchFlo ROM Final 2 [Fixed]” — these things rev faster than just about anything I’ve ever experienced — and it’s a mind-blower. First of all, it has the HTC TouchFlo-style interface with finger gestures, including the Cube interface. This is somewhat similar to the iPhone and is spectacular. Second, it’s fast. Third, it looks very, very cool. Fourth, it’s even more usable than the default WM6 interface, which I was used to with my old phone.

Here’s a screenshot of my new phone home page:

ATT Tilt Dutty TouchFlo ROM

The installation was surprisingly easy. There were basically only three steps:

  1. Flash HardSPL to the phone. This is (in the words of pof):

    Same features as SSPL, but flashed on the phone and with bootloader version 1.04 (hex edited to be shown as 1.10.Oli), that is:

    • Ability to bypass signature in NBH files (friendly for cooked roms)
    • Ability to access radio bootloader (no more corrupted CID bricks)
    • Shows itself as SuperCID when doing a rom upgrade (but it internally isn’t)
    • Can be uninstalled by just reflashing a shipped SPL, so no warranty is lost

    …which of course I don’t understand. It’s basically a way to ensure safe loading of cooked ROMs. It also allows you to get back to the “stock” AT&T ROM should you ever need to return the phone.

  2. Install the cooked ROM. This comes from a 51 MB .zip file you can get from the forum link I mentioned above.
  3. Install a quick 21 KB update to fix some keyboard mapping issues. This is specific to the AT&T Tilt, from what I gather.

A couple phone hard resets (which happen automatically), and presto! you’re in business.

Let me get back to the “user-friendly” part I mentioned above. The Tilt has more buttons than the 8125, and they are grouped at the bottom, not spread out on top and bottom. It also has a scroll wheel on the left side, similar to the Blackberry, and is very usable.  It has not one, but two OK buttons — one on the front and one on the left — which is great and helps usability without the stylus.  I can’t say much yet about the actual tilting feature for which this thing was named, but at worst it’s a wash.

Next posts will deal with my experiences setting up tethering for the occasional time I might need to connect where there is no WiFi available; setting up GPS; playing with the music & video features; and hopefully much more.

Oh joyous day!

Windows OneCare interfering with AT&T Tilt connection

I just received my AT&T Tilt in the mail last night. I was able to configure it fine on my laptop (which does not have Windows Live OneCare), but when I brought it home to partner with my desktop, it wouldn’t connect. No obvious error messages, just no connection in Windows Mobile Device Center.

I uninstalled and reinstalled WMDC 6.1 with no success.

Then, I came across a help topic that said:

If Windows Live OneCare is installed on your machine, it may be blocking the device connectivity. Please click here for the steps to configure Windows Live OneCare to allow the device to connect.

This pointed me here and I was able to follow the steps and get my device partnered properly. Yay!

Is Google racist, or is CNN?

Or neither?

Check out the attached article screenshot (click the picture) and pay attention to what ads Google is serving up at the end of the article.

Rodney King CNN Article Nov 29 07

Draw your own conclusions.

C# 2.0 NULL Coalescing Operator

OK, I’m a little behind the times, but I just found out there was a neat way to sidestep 90% of the null checks I do in my ternary operators:

output = (value == null) ? "NULL" : value;

becomes

output = (value ?? "NULL");

(h/t R. Aaron Zupancic)

Using SSPI in connection strings vs. a named SQL Server user

Just ran into a little problem, thought I’d share:

My connection string is set up to use a Trusted Connection, with this value set:

integrated security=sspi

However, there are two situations where this fails or becomes problematic:

  1. In production, when web and database are on different physical machines
  2. Running unit tests locally

#1 is described here. #2 is more, um, “crampy” — you can easily enough add your local user account (in my case, <machinename>\Anthony) to the SQL Server db_owners group for your database, but is that really the best way to do it?  I suppose that in most cases the dev user account will be a local admin, and thus already have all the required permissions without any manual intervention, but that’s why I made up the term “crampy” — maybe it doesn’t feel quite right, but it won’t kill you either.

If you keep SSPI but either (a) don’t login as a local admin or (b) don’t add your local account to db_owners, you get this error:

System.Data.SqlClient.SqlException : Cannot open database "cdb" requested by the login. The login failed. Login failed for user '<machinename>\Anthony'.

A different vendor I work with doesn’t use trusted connections, but rather sets up a distinct user login in SQL Server. With that route, the problem becomes one of encrypting the password in your machine.config / web.config file. We used to do it that way, but without any encryption, thus getting the worst of all possible scenarios.

I may opt for the named-user-with-encryption approach. More later.

Unit Testing with HttpContext

I am starting to implement some unit tests for my custom DataSourceControl / DataSourceView classes and immediately ran into the problem of not having a valid HttpContext against with to instantiate my objects.

Googling, I found the following helpful links:

http://weblogs.asp.net/jeff/archive/2004/05/31/145111.aspx

http://haacked.com/archive/2005/06/11/simulating_httpcontext.aspx

http://thewebfarm.com/blog/archive/2006/04/28/402.aspx

I was also digging through some old source code and found this link as a reference, but it appears dead:

http://righteousindignation.gotdns.org/blog/archive/2004/04/13/149.aspx

Have you ever wanted a muse?

Someone you could ask, “what do you think about X or Y?” and their response is, “well, have you considered Z?” — and a big EUREKA moment pops into your head.

How to Accomodate Variable Test Data Volume

Two truths:

  1. Developers hate waiting for local builds to complete.
  2. Developers need to smoke test local builds using realistic data.

Consider the following simple ERD:

Sample ERD

Very simple. A person has [0..n] orders, an order has [0..n] items, each item represents one product.

Let’s say that part of your developer’s responsibilities are to make sure that their nifty new GridView-inspired widget doesn’t break with a large volume of data in the database. Therefore, you want to have some mechanism to insert that data on local dev databases.

However, some large percentage of time, developers are testing functionality that isn’t very dependent on the volume of test data (simple example: product detail page).

Developers don’t want to rebuild with full data all the time, because it slows things all to hell and isn’t really necessary anyway. How do you accomplish that?

Well, I haven’t been doing a great job at this so far. My system, developed over the past 4 years or so, works great, and DB builds are effective and repeatable and auditable and all that, but I don’t (yet) have a great answer for the “limited data set” problem (more precisely, the “switch sets as necessary” problem). My preferred mechanism to date has been to create a hierarchical directory of SQL scripts, which have to be manually tied together and tested to make sure that the “most dependent” data inserts (in this case, the order items) have all the FK dependencies in the database first. The hierarchy is not a problem; it actually works pretty well. What IS a problem is that I don’t see a great way to take just a portion of that data (from top to bottom) in order to speed up the “everyday” dev builds.

Consider the following two diagrams:

Sample Order Tree Sample Order Tree Data Slice

Both diagrams represent a hierarchical arrangment of Person, Order, and Order Item data, from top to bottom. Consider the topmost node as a “ghost” node. So we have three people who have placed six orders, and there are nine order items.

What I’d like to do is take a “slice” of that larger data set — the orange shaded section in the second diagram — and use it for “everyday” dev builds. So I would have one person, two orders, and three order items in my database after the dev build completes.

Off the top of my head, I see a few ways to do this:

  1. From a full data set, write queries to recursively build INSERT statements based on a limited set of topmost (Person) data. The pseudocode would be something like this:
    SELECT TOP 1 * FROM person ORDER BY name;
    SELECT * FROM order WHERE person_id IN (SELECT TOP 1 person_id FROM person ORDER BY name);
    SELECT * FROM order_item WHERE order_id in (SELECT order_id FROM order….) etc.
  2. Manually build the data by hand
  3. Create C# modules, perhaps called from NUnit or TestDriven.NET, that build a consistent set of limited data in your database?
  4. Use XML or Excel or some other tabular format to provide a quick-entry way to populate the database.

To be honest, none of those look that great. Remember what I’m trying to achieve (and avoid):

  1. Short build times
  2. Two data sets, both realistic: “small and quick” and “full and complete”
  3. Zero-maintenance
  4. One-click deployment of test data

At this point, I think I’ll go do some Googling and see what others have done to get past this hurdle.


TwitterCounter for @anthonyrstevens
Add to Technorati Favorites

RSS Feed

View Anthony Stevens's profile on LinkedIn