Blog - Title

May, 2010

  • Fabulous Adventures In Coding

    Cast operators do not obey the distributive law

    • 23 Comments
    Another interesting question from StackOverflow . Consider the following unfortunate situation: object result; bool isDecimal = GetAmount(out result); decimal amount = (decimal)(isDecimal ? result : 0); The developer who wrote this code was quite...
  • Fabulous Adventures In Coding

    Every Program There Is, Part Four

    • 9 Comments
    [This is part of a series on generating every string in a language. The previous part is here . The next part is here .] Remember, the point of this exercise was to come up with a device to help me test parts of my compiler. To test binary trees as we...
  • Fabulous Adventures In Coding

    Every Program There Is, Part Nine

    • 3 Comments
    [This is the final part of a series on generating every string in a language. The previous part is here .] We seem to have a bit of a performance problem here. We could slap a profiler on it, and normally I’d recommend just that. But in this case, let...
  • Fabulous Adventures In Coding

    Every Program There Is, Part Three

    • 4 Comments
    [This is part of a series on generating every string in a language. The previous part is here . The next part is here .] Suppose we want to write a grammar for a simplified C# class declaration. Let’s say that there are one-character identifiers, a class...
  • Fabulous Adventures In Coding

    Every Program There Is, Part Five

    • 4 Comments
    [This is part of a series on generating every string in a language. The previous part is here . The next part is here .] Last time: Clearly we have reduced a problem of size k to multiple problems of size less than k-1, and so this is amenable to a recursive...
  • Fabulous Adventures In Coding

    Every Program There Is, Part Six

    • 1 Comments
    [This is part of a series on generating every string in a language. The previous part is here . The next part is here .] The problem we ran into with our grammar-enumeration technique is that the recursion does not clearly reduce the problem to a smaller...
  • Fabulous Adventures In Coding

    The traveling developer

    • 4 Comments
    Hey everybody, just a quick FYI, I will be attending TechEd New Orleans this year. I'll be hanging out at Mads' sessions, manning the booth and attending as many parties as I can fit in, so if you want to stop by and say hi, please do. I'll then be...
  • Fabulous Adventures In Coding

    More Boring Metablogging

    • 8 Comments
    Hey everyone, those of you who read this blog on the main MSDN page rather than via your own RSS reader have probably noticed that the new default themes went live yesterday. I am aware that the new theme does not make particularly efficient use of...
  • Fabulous Adventures In Coding

    Every Program There Is, Part Eight

    • 1 Comments
    [This is part of a series on generating every string in a language. The previous part is here . The next part is here .] OK, first things first. Let’s assume that we have a string that contains a grammar that has already been rewritten into our “nice...
  • Fabulous Adventures In Coding

    Every Program There Is, Part Seven

    • 2 Comments
    [This is part of a series on generating every string in a language. The previous part is here . The next part is here .] Things seem to be going so well. We have a sketch of a recursive solution for enumerating all strings of a particular grammar and...
Page 1 of 1 (10 items)