Category Archives: Dev

Error Messages: “We Dunno”

When you write software, you try to make the error messages as informative as possible. You want troubleshooting to be easy – you’ll probably have to troubleshoot the problems! However, you always end up with the misc bucket. The “This error couldn’t possibly arise” error. The “We Dunno” error.

I’ve been working with SqlServerCE on a project at work. (I’m impressed with it so far – it’s a tiny relational DB in a very small footprint.) I hit the SQLCE “We Dunno” error. First sign was the informative message: “An internal error occurred. [ ID = 2034 ]”. Native Error 28574.
My SQLCEResultSet was behaving very strangely: A call to results.GetName(0) gives me the expected name of “Apples”, results.GetName(1) gives me “Oranges”.
Calling results.GetString(0) throws the error, and results.GetString(1) gives me “Granny Smith”. Odd!

A little digging on the MS SQLCe Books online gave me this:

If you experience any errors with the prefix “Internal error” while you use SQL Server Compact Edition, try the operation again as the error might not reproduce. If the error appears again, you should immediately contact Microsoft Product Support Services. The internal errors cannot be resolved by common troubleshooting techniques.

In other words, “We Dunno” – but we’re sure interested in how you got there….

Microsoft is creating a REST based toolkit!

Given the wild success of sites like Del.icio.us, flickr, et-web-2.0-cetera, it’s great to see Microsoft releasing a REST toolkit. I’ve had arguments with folks at work on the definition of a web service.  They argue that it has a specific meaning within the developer community, I argue that in general usage people think of it as anything with an API.

REST based services are much more mash-up friendly because they don’t require special toolkits to use. They are much easier and faster to develop against for well formed data. Now, hopefully I can get some of that magic going where I work. I think of all the exports and such that could have been done so much faster if we had a REST base for them to hit…

Microsoft Project Codename “Astoria”

The goal of Microsoft Codename Astoria is to enable applications to expose data as a data service that can be consumed by web clients within a corporate network and across the internet. The data service is reachable over HTTP, and URIs are used to identify the various pieces of information available through the service. Interactions with the data service happens in terms of HTTP verbs such as GET, POST, PUT and DELETE, and the data exchanged in those interactions is represented in simple formats such as XML and JSON.

To see what I’m talking about, check out the sample REST data sources they’ve exposed….

DD-WRT Router Slowdown solved

My apartment is wireless. Really wireless. No cable, no phone. But I live in the future, where the internet is involved in anything you do. So my neighbor has a wifi router that we’ve put DD-WRT on. It’s really much better than the original firmware that comes with your router, for a number of reasons. We’d been noticing a slowdown though. The router would, over the course of a few days, get slower and slower. The key symptom was that DNS lookups would be really spotty.

Turns out that bittorrent clients open up a lot of ports, especially if they are using dynamic hash tracking (DHT). The limited number of ports the router was allocating were being filled up by DHT and not released.

Router slowdown solution, from the dd-wrt wiki: increase the max number of ports and then decrease the timeout delay for those ports. I put this solution in on Tuesday night, and it’s been fine since then.

We are hiring

My team is hiring developers again. If you or someone you know wants to work in midtown in the financial industry, get in touch.

.Net, C#, Web Service, SQL, XML, ADO.NET, Object Oriented, Design Pattern, Excel programming is a plus
You’ll be talking to customers, so be able to speak well. In other news, I’ve been racking my brains for a way to screen resumes for team players without having to look for the words “Team Player” – I think you just have to find that bit in the interview.

Prosper.com/Tools is here!

Prosper has revealed their lending API/Tools section . Right now it is just a dump of data from their db, but the api section promises webservices coming soon.

What’s cool about this? Now you should see smart folks like me building tools to analyze and pick through prosper loans, flagging good stuff and dissing bad loans. By opening up the data like this, prosper is letting interested people create tools for themselves and others to get better results for their systems.

This kind of openness will be good for their business as reliability goes up and people can make better informed decisions.

Design: Paradox of Choice

Here’s a simpler explanation of the usability design principle of avoiding choice.
Joel from Joel On Software just wrote a great and simple explanation of the Paradox of Choice.
It all centers on what is wrong with this picture. Why are there that many options to choose from when you want to shut down?

Every choice presented to you is something you have to evaluate. That evaluation takes time and brain power. Whenever possible, we should make the choices very very easy and few for the user. Things should “just work”.

It is true – the iPod, a battery powered device, doesn’t have an off switch. Why are there so many ways to shut down my computer? These choices require 3 separate clicks – Start -> Little Arrow -> Actual Choice.

Joel argues for reducing everything to a “B’Bye” button. One click and it prepares the computer for you being away. And it’s just that simple. The task is “I’m trying to leave my computer.” Therefore the design should not force the user to interact more with their computer!

I’d only complicate this by putting in a place in the control panel where you can configure this behavior if you care enough to do it.

As I write more on user experience, I’ll put these posts under the label “User Experience”. If that’s all you are interested in, you can go here for just user experience posts.

User Experience Principles: Avoid Choice but Allow It

Just had a long user experience discussion with coworker Marc about concurrency problems in settings.
His argument:
Everything on a screen should be atomic.
My argument:
Concurrency should be resolved as often as possible without forcing the user to make a choice.
Alice opens up our settings application.
Bob opens up our settings application.
Alice changes the background color on the “Quantity” column in column view “Alpha” and then save it up to our server.
Bob reorders all of the columns in the Alpha column view to the order he thinks is appropriate for their group.
Bob saves the column view up to our server.

Marc argues that Bob’s settings should be rejected and he should reload in Alice’s settings, then redo his work and save up to our server.

I argue that Bob’s settings don’t conflict with Alice’s because column order is a property of a column view, not of the columns themselves in the column view. Caption is a property of the individual column.
Consider that column order has no meaning for an individual column outside of a column view collection – this is true no matter how you represent these entities in a database.
Bob doesn’t care about Alice’s caption change, and we should avoid bothering him about it.
If he’s changed the caption of the column as well, then we have a conflict. Bob should get notified that Alice made a conflicting change, we should tell him why it conflicts, and then he should get a choice to either abandon his change and accept hers or overwrite her change with his.

Bob wants to change the order of the columns in this column view. Alice wants to change the caption of a column in that column view.
Because what they want does not conflict, we should not get in the way of what they are trying to do. We should just get it done, and let Bob know that Alice has updated some settings.

Great news for you – more work for me

I’ve made the switch to blogger beta, mainly because I love tags.
The tags are up there on the upper left corner, and I’ll be going through the old posts and making sure things are tagged appropriately.

Why is this good for you, my loyal handful of readers?
As Jen W put it, I have an awful lot of “weird whacked out computer programmer drama that flies over her head”. She’s a pal of mine who doesn’t care one whit about that stuff.
I’ve got good news for you, Jen. Now you can only see stuff related to me and my pals.
Change your bookmark to point to just my posts tagged “pals”.

And there are some programmer types who frankly couldn’t care less about what a nice time I had snowboarding. They want to only see my developer stuff.

There you go. Get the stuff you like from me without the stuff you hate.

I’ll be toying around with the template a little bit over the next week or so to make it my own again after switching to this new format.