Archives / 2008 / April
  • Thoughts on Twitter

    Homer: 'All right, Herb. I'll lend you the 2,000 bucks. But you have to forgive me and treat me like a brother.' Herb: 'Nope.' Homer: 'All right, then, just give me the drinking bird.' I like Twitter. The idea behind it is you post a short message about what you are up to and it then appears to anyone who has subscribed to your updates. It takes my favourite feature of Facebook, status updates, and then removes all the other crud.

    The nice thing about updates (or "tweets" if you want to look like douche) is that they are passive. They don't fill up an inbox like email so you can let others know about something you are up to that is interesting, but is perhaps not worth spamming your entire address book with, e.g. "Working on my first MVC application. Looking at getting started guides." It is a great way to start conversations that never would have happened otherwise.

    Twitter is a nifty service but it ia not perfect. The Twitter website is flaky (perhaps not the best showcase for Ruby on Rails) and the web UI doesn't handle subscribing to a large number of people particularly well. I think at the moment the place where Twitter shines is with small communities.


    p.s. I have added my Twitter status to the blog (look to the right). A great example of a useful JSON API [:)]

  • Mindscape WPF Elements

    I stand by my racial slur.

    The guys at Mindscape have released another WPF product call WPF Elements. This time it is a set of WPF controls aimed primarily at line of business apps: masked textboxes, numeric textboxes, date time pickers, a multi-column treeview, and more.

    I have used a product of theirs call Lightspeed on a number of projects and Mindscape has always been really prompt when responding to queries. If you are developing business WPF applications then Elements is well worth checking out.

  • Json.NET 2.0 Beta 3 - Turkey Test Approved

    I've just enrolled in a screenwriting class. I yearn to tell the story of an idealistic young Hindu, pushed too far by convenience store bandits. I call it 'Hands Off My Jerky, Turkey'. This post on handling different cultures in .NET really caught my imagination a couple of months back. Today I can proudly say that Json.NET passes the Turkey Test!

    Aside from poultry, the main focus of this Json.NET release has been fixing all the little issues in the LINQ to JSON objects (JObject, JArray, JValue, etc). NCover has been a great help highlighting methods that didn't have any tests over the top of them. Test coverage has improved significantly in this release.

    The JsonSerializer has also seen some changes. All reported bugs have been fixed and a couple of new features have been added. The most significant new feature is the JsonObjectAttribute. Placed on a class the JsonObjectAttribute lets you control whether properties are serialized by default (e.g. XmlSerializer behaviour) or whether you must explicitly include each property you want serialized with the JsonPropertyAttribute (e.g. WCF behaviour).

    public class Person
      public string Name { get; set; }
      public DateTime BirthDate { get; set; }
      // not serialized
      public string Department { get; set; }

    The default behaviour for classes without the attribute remains properties are serialized by default (opt-out).


    • New feature - Added JsonObjectAttribute with ability to opt-in or opt-out members by default.
    • New feature - Added Skip() method to JsonReader.
    • New feature - Added ObjectCreationHandling property to JsonSerializer.
    • Change - LOTS of little fixes and changes to the LINQ to JSON objects.
    • Change - CultureInfo is specified across Json.NET when converting objects to and from text.
    • Change - Improved behaviour of JsonReader.Depth property.
    • Change - GetSerializableMembers on JsonSerializer is now virtual.
    • Fix - Floating point numbers now use ToString("r") to avoid an overflow error when serializing and deserializing a boundary value.
    • Fix - JsonSerializer now correctly serializes and deserializes DBNull.
    • Fix - JsonSerializer no longer errors when skipping a multi-token JSON structure.
    • Fix - Clone a JToken if it already has a parent and is being added as a child to a new token

    Json.NET CodePlex Project

    Json.NET 2.0 Beta 3 Download - Json.NET source code and binaries

    kick it on