Andrew Arnott

News from my corner of the Visual Studio Project & Build team, programming tips, and solutions to common programming issues.

Browse by Tags

Tagged Content List
  • Blog Post: So many exceptions… but only one can throw

    When a method may throw for more than one reason, the thoughtful programmer might ask “which exception should be thrown?” Consider a method which performs argument validation, is cancelable, and also might throw based on the state of the object. What order should these validations occur so that the best...
  • Blog Post: Immutable Object Graph updates

    In my last post , I introduced a T4 template that constructs efficient and quite capable immutable objects based on the simplest mutable type definition. I also mentioned that the published sample is (necessarily, ala T4 style) open source and hosted online . Two outsiders have already submitted pull...
  • Blog Post: Simple immutable objects

    We’re all familiar with immutable collections now. But immutability is only as immutable as it is deep. And an immutable collection of mutable objects may not provide the depth you’re looking for. So how can one create an immutable object? Suppose you would define the mutable version like...
  • Blog Post: Immutable collection algorithmic complexity

    I received some feedback from my recent BCL blog post on the prerelease of the immutable collections that my algorithm complexity table left a few important entries out. Here is the table again, with more data filled in (particularly around list indexer lookup and enumeration):   Mutable (amortized...
  • Blog Post: The cost of context switches

    Context switches are not free. But how expensive are they? I wrote a small program to find out, and I’m sharing the program and its results here. I focused on purely context switches (no work is actually performed between context switches). So it’s not a real-world scenario, but it really brings out...
  • Blog Post: Immutable collections now available

    In previous posts , I discussed immutable collections. I’m pleased to say they are now available. Read my announcement on the BCL blog .
  • Blog Post: Immutable collections with mutable performance

    In my last post , I detailed the differences among read/write, read only, frozen and immutable collection types.  I described how immutable collections come with a hit to the garbage collector due to the garbage they generate during mutations.  I have a very positive update on that topic. My...
  • Blog Post: Read only, frozen, and immutable collections

    [Update: a more recent post with new data on attainable performance of immutable collections ] The topics of immutability and functional programming has fascinated me lately. Mostly because of my work on the Visual Studio Common Project System (CPS) which is a large, highly multi-threaded code base...
  • Blog Post: GZip encoder for Compact WCF

    The GZip encoder is not included in NetCF as it is on the desktop WCF, but it isn't hard to build yourself and in fact we have released a sample of exactly how to add your own GZip encoder to NetCF: http://go.microsoft.com/fwlink/?LinkId=108652 So many people have asked me for it lately I thought I'd...
  • Blog Post: OpenID and ASP.NET web sites

    If you are a web developer I hope you've considered accepting OpenID credentials for logging in your users.  If you have an ASP.NET web site, the process of adding OpenID support to your web site couldn't be easier when you use the free C# DotNetOpenId library.  Supporting OpenID is a great...
  • Blog Post: Workaround for XmlSerializer T[] and List<T> bug

    The XmlSerializer in NetCF 2.0 has a bug where if a single serialization requires reflecting into types that use a mixture of Collection<T>-like types for the same T the XmlSerializer will throw an exception.  Here an example where CF 2.0 would crash: public class SerializingType1 { public...
  • Blog Post: What do you think of the new WCF 'Store and forward' Mail Transport?

    With the .NET Compact Framework 3.5 release which comes with Visual Studio 2008, a new Windows Communication Foundation transport is introduced that uses email as the communication mechanism. Others have already blogged about this new transport including Roman Batoukov and David Kline . I'd like to take...
  • Blog Post: Calling WCF services from NetCF 3.5 using Compact WCF and NetCFSvcUtil.exe

    The .NET Compact Framework 3.5 adds a subset of the Windows Communication Foundation (WCF or "Indigo") to smart devices, allowing them to communicate with desktop WCF components with all the flexibility of multiple, interchangeable service bindings and endpoints. Although it ships out of the box only...
  • Blog Post: Power Toys for .NET Compact Framework 3.5 CTP released

    The .NET Compact Framework team just released the Consumer Technology Preview (CTP) of the Power Toys for .NET Compact Framework 3.5. These Power Toys are tools to help you build, debug and optimizie your NetCF 3.5 applications. My personal favorite is the NetCF ServiceModel Metadata Tool (NetCFSvcUtil...
  • Blog Post: How to (not) write an especially precarious app on .NET (Compact Framework)

    As the .NET Compact Framework developers work to add features, fix bugs, and refactor code, we often have to determine whether a given change could break existing customer code. The ideal is that NetCF 3.5 will run all apps that ran on NetCF 2.0 and 1.0. We run hundreds of apps and many, many tests before...
Page 1 of 1 (15 items)