Marcelo's WebLog

Improving the world one entity at a time (now tweeting on @mlrdev)

Browse by Tags

Tagged Content List
  • Blog Post: datajs formats for OData flavored with simplicity

    Alex has just uploaded the intermediate formats on the datajs CodePlex Wiki . These describe the shape of results provided by reading OData as well as the expected format to send data back to the server. Like I mentioned before , these values do not have any classes or prototypes associated with them...
  • Blog Post: Math is hard, let's go shopping

    For better or for worse, the phrase "Math is hard, let's go shopping" is one that I use every now and then during design meetings. There are typically two situations that will prompt this. We're about to do something hard to implement that's not worth it. Sometimes adding just a bit more of...
  • Blog Post: Design style for OData in datajs

    The datajs source code is out there for the world to see. Today I wanted to share a bit about what style we use and why we decided upon it. After years of writing for the .NET framework, one of my first impulses is to start thinking in terms of objects. However there are a few variations on how you...
  • Blog Post: API Design: how to lie less

    So I wrote a bit last week about the importance of not lying through your APIs , but I didn't offer any examples on how to improve the examples I gave. Let's take one at a time and consider how they might get improved. The first case we had was the mis-named API. public static void WriteToFile( Customer...
  • Blog Post: Design evolution

    Today is the last post from a couple of design thoughts I've been writing down, and it addressed what happens with components over time. The natural tendency of systems is to gain more capabilities over time. The path of least resistance is often to extend the existing components by making them do more...
  • Blog Post: Abstraction levels and dependencies

    As a follow-up from yesterday's post about not lying , I wanted to discuss a bit some thoughts on abstraction levels. At first, it would appear that high-level methods lie a lot. When you ask a SqlConnection object to Open, it actually does a bunch of work: look at the connection string, possibly using...
  • Blog Post: API Design Rule: First, Don't Lie

    Today's post is about a very simple rule for API design: don't lie. This seems relatively straightforward, but there are a number of ways in which APIs may end up lying or misleading their consumers. What do I mean by lying? The obvious case is an API that doesn't do what it says it will. Sometimes you...
  • Blog Post: Time categories with WPF and Exchange

    Today and tomorrow I will present a short app I wrote for myself that others may find useful as a starting point. Here at Microsoft, the use of Outlook and Exchange are of course ubiquitous (thanks WLW spell checker). So it’s no surprise that I have a vast amount of information stored in my folders for...
  • Blog Post: Some Performance Notes on Enumerable LINQ Operators

    This post is the continuation of Layering enumerators ; I wanted to have a much shorter post, but it seemed to me like this would be much more useful if I had all the notes in a single post. First, some caveats. This post deals with the LINQ operators and friends as they work on IEnumerable<T>...
  • Blog Post: Layering enumerators

    Now that I've touched upon XmlReader and how it can be used to stream data while allowing clean layering at the same time, I want to touch on the layer-able interface by excellence in the .NET Framework: IEnumerable<T> . You may have also seen the term 'composing' enumerables, but I tend to...
  • Blog Post: Catching streaming exceptions with streaming readers

    About two years ago, I put up a post discussing how exceptions are streamed in WCF Data Services (called ADO.NET Data Services at the time). Today I want to continue from yesterday's post and discuss how the client implements support for this, but first a quick note. I'd like to make sure I clarify...
  • Blog Post: Layering XML readers

    If you've spent any time looking at the new Open Data Protocol Client Libraries on CodePlex, you may have run into the internal XmlWrappingReader class. I'll look into why this was a useful thing to have and what important OData processing aspect it helps with in the future, but for today I want to touch...
  • Blog Post: Immutable instances and deferred references

    This will hopefully be the last post on the subject of building immutable circular references subject (but I make no promises). In today's post, we'll examine the use of deferred references to build circular references for immutable objects. First Solution The way this is typically accomplished...
  • Blog Post: HashSet, equality and identity

    I'm taking a short intermezzo from the mutability / circular reference series, to post a short public announcement-type. You may have noticed in the sample from my last post that I used a HashSet to keep track of which of the two instances I had visited before. This is of course overkill when you...
  • Blog Post: Immutable instances with circular references

    This post is a continuation from Mutability model for ResourceType and friends . At this point I'm just going to geek out on design options - this doesn't really apply to the WCF Data Services API. The problem is this: let's say we want to have two immutable values that reference each other. /...
  • Blog Post: Mutability model for ResourceType and friends

    If you've read the post on the new types available in the System.Data.Services.Providers namespace , you might have jumped in and tried to write your own metadata provider for some not-quite-there interesting data model. Not for the faint of heart, but certainly an exercise that will increase your understanding...
  • Blog Post: Working with obscure arguments - finale

    This post continues what we started with what the problem is and how to avoid it with C# 4 , and followed with how not to get into trouble when writing a library . Let's say that the API is already written. It's from a library that you don't control, or can't change without risking backward compatiblity...
  • Blog Post: Working with obscure arguments without C# 4

    From yesterday's post , I'm sure you're itching to switch to the latest and greatest in tooling and languages for all future projects, and might even be considering upgrading some of the systems you currently have around. But if you're supporting previous languages and runtimes, do not despair: the...
  • Blog Post: Increased readability with C# 4 named arguments

    If you've read ScottGu's recent post , you'll know that C# 4 will include support for optional parameters and named arguments. Now, this enables some interesting new scenarios for usability, but the thing I'm concerned about here is something very simple: not to make the code more terse or elegant...
  • Blog Post: Blue Books and high return-on-investment activities

    J.D. Meier recently posted a summary / impact statement on the Microsoft Blue Books, and I thought I'd add a thought from my experience. Recently I was engaged with a customer who was considering updating their solution stack. They had decided to update their database servers to leverage some of the...
  • Blog Post: Alex on hiding lower-level APIs

    Interesting thoughts over here - I'm always up for discussing what goes into making design trade-offs, and if you've ever had a discussions as to whether a "lower level" component ini your system should be made public or not, Alex has something to say when the "test effort" argument is thrown in. ...
  • Blog Post: Debugging and PDBs

    Debugging is hard. There are many things we do to make it easier on ourselves. Feature-level things like building tracing and logging capabilities. Design-level things like having clear points at which state is checked for consistency (internal or parameters passed in, for example), so we narrow...
  • Blog Post: Abstraction, simplicity and predictability

    As a short follow-up to my last post on reasoning about code , I wanted to touch upon abstraction in general - meaning "information hiding" in the general sense, and not necessarily a particular programming mechanism such as polymorphism or some such thing. Abstraction buys us a number of good things...
  • Blog Post: Reasoning about code

    When we have conversation about API design, or more generally about fragments of code that we write or we think customers will write, we often talk about reasoning about code . We typically mean that someone reading the code will be able to understand the implications of making an API call for example...
Page 1 of 1 (24 items)