Today was a bit of a write-off. No real progress on Trend Bet due to a couple of items and this had me feeling depressed that there wasn't any progression in getting to what I've chosen as the finish line for the project. As such, I've started this blog so I can look back over a given week and feel relaxed that although I might not be able to see any progress in a project, that learning and/or invisible steps have been made in the direction of the finish line.

iOS doesn't receive HttpStatusCodeResult messages

I found out that it would seem you cannot rely on an HttpStatusCodeResult's description or text making it to the browser. Consider this controller action;

public ActionResult Fail()
{
    return new HttpStatusCodeResult(HttpStatusCode.BadRequest, "My helpful message");
}

I found that on iOS, the message never makes it to the browser, so there's little point in setting it, or indeed using HttpStatusCodes at all for specific application errors. Instead I've extended the response model to include detail regarding whether the request was successful and then I act on that data in Angular's $http successful promise function,  rather than the fail function.

I posted a posted a stackoverflow question with further info.

Too many AngularJs bindings

I'm using way too many bindings in TrendBet.  This is my first AngularJS application, and the entire frontpage is built by directives that cascade and drive the bind count up.  Each trend listed has at least 10 bindings (not including the betting buttons) and there's 60 trends on the front page.  Because Angular uses a digest, every time one's triggered those 600+ bindings get computed/checked again.

This doesn't cause much issue on my laptop, but tapping bet buttons on iPad/iPhone results in a noticeable < 1 second delay before you can register another tap on it.  Not good for spam betting.  Doesn't seem to kill desktop at the moment though, so i'll be ignoring this problem for the meantime.