Fabulous Adventures In Coding

Eric Lippert's Blog

Posts
  • Fabulous Adventures In Coding

    What's the difference? Trenchcoat vs Duster

    • 8 Comments
    Today, yet another episode in my ongoing series " What's the difference? " This time, a non-computer-related topic . I am often complimented on my choice of outerwear in the Seattle rainy season, and I hate to respond to a well-meant compliment with a...
  • Fabulous Adventures In Coding

    Anonymous Types Unify Within An Assembly, Part Two

    • 14 Comments
    Last time I noted that any two usages of "the same" anonymous type within an assembly actually unify to be the same type. By "the same" we mean that the two anonymous types have the same property names and types, and that they appear in the same order...
  • Fabulous Adventures In Coding

    Anonymous types unify within an assembly, Part One

    • 14 Comments
    Back in my last post of 2010 I said that I would do an example of anonymous types unifying within an assembly "in the new year". I meant 2011, but here we are "in the new year" again, so, no time like the present. The C# specification guarantees you that...
  • Fabulous Adventures In Coding

    What is the defining characteristic of a local variable?

    • 11 Comments
    If you ask a dozen C# developers what a "local variable" is, you might get a dozen different answers. A common answer is of course that a local is "a storage location on the stack". But that is describing a local in terms of its implementation details;...
  • Fabulous Adventures In Coding

    Every public change is a breaking change

    • 16 Comments
    Here's an inconvenient truth: just about every "public surface area" change you make to your code is a potential breaking change. First off, I should clarify what I mean by a "breaking change" for the purposes of this article. If you provide a component...
  • Fabulous Adventures In Coding

    He's So Dreamy

    • 5 Comments
    Happy New Year all! It has just been brought to my attention that this blog and the Programmer Ryan Gosling photo blog share at least one reader: I admit it, I LOL'd. In the interests of total accuracy I'd like to point out that the first entry on the...
  • Fabulous Adventures In Coding

    Shadowcasting in C#, Part Six

    • 6 Comments
    OK, let's finish up this year and this series. We have an algorithm that can compute what cells in the zero octant are in view to a viewer at the origin when given a function that determines whether a given cell is opaque or transparent. It marks the...
  • Fabulous Adventures In Coding

    Shadowcasting in C#, Part Five

    • 3 Comments
    I hope you all had a pleasant Christmas and Boxing Day; we chose to not travel to see family this year and had a delightful time visiting friends. We'll finish up 2011 here with a bit more on shadowcasting, and then pick up with more C# language design...
  • Fabulous Adventures In Coding

    Shadowcasting in C#, Part Four

    • 6 Comments
    Last time we saw how many different ways there were to get the calculation of the top cell based on the top vector wrong. Today we'll take a briefer look at determining the bottom cell. We know from our discussion of last time that the right way to determine...
  • Fabulous Adventures In Coding

    Shadowcasting in C#, Part Three

    • 8 Comments
    Before we get started, thanks for all the great comments to the previous couple of posts. I'll be updating the algorithm to try to make even better-looking circles of light based on the comments. Like I said, there's a lot of subtleties to these algorithms...
  • Fabulous Adventures In Coding

    Shadowcasting in C#, Part Two

    • 15 Comments
    I hope the basic idea of the shadow casting algorithm is now clear. Let's start to implement the thing. There are two main concerns to deal with. The easy one is "what should the interface to the computation look like?" The second is "how to implement...
  • Fabulous Adventures In Coding

    Shadowcasting in C#, Part One

    • 15 Comments
    I've always loved the "roguelike" games; perhaps you've played some of them. Those are the games where you get a top-down view of a tile-based world, and have as much real time as you like to make a choice of action. The canonical plot is to enter a dungeon...
  • Fabulous Adventures In Coding

    Roguelike people

    • 41 Comments
    No technology today. Rather, some advice. I don't know if there's some sort of grifter convention going on, but I have seen four different short-con artists operating in Wallingford, the neighbourhood of Seattle where I live, in the last three days. Though...
  • Fabulous Adventures In Coding

    So many interfaces, part two

    • 9 Comments
    In my earlier article from April 2011 on interface implementation I noted that C# supports a seldom-used feature called "interface re-implementation". This feature is useful when you need it but unfortunately is one of those features that can bite you...
  • Fabulous Adventures In Coding

    What's the difference? Remainder vs Modulus

    • 37 Comments
    Today, another episode of my ongoing series " What's the difference? " Today, what's the difference between a remainder and a modulus, and which, if either, does the % operator represent in C#? A powerful idea that you see come up in mathematics...
  • Fabulous Adventures In Coding

    Why have a stack?

    • 25 Comments
    Last time I discussed why it is that we have all the .NET compilers target an "intermediate language", or "IL", and then have jitters that translate IL to machine code: because doing so ultimately reduces the costs of building a multi-language, multi...
  • Fabulous Adventures In Coding

    Why IL?

    • 17 Comments
    One of the earliest and most frequently-asked questions we got when we announced the Roslyn project was "is this like LLVM for .NET?" No, Roslyn is not anything like LLVM for .NET. LLVM stands for Low-Level Virtual Machine ; as I understand it (admittedly...
  • Fabulous Adventures In Coding

    A C# Reading List

    • 11 Comments
    Just a couple of quick links today. First: One of the questions I get most frequently is " can you recommend some good books about learning to program better in C#? " The question is usually asked by a developer; the other day I was surprised to get...
  • Fabulous Adventures In Coding

    Breaking changes and named arguments

    • 29 Comments
    Before I get into the subject of today's post, thanks so much to all of you who have given us great feedback on the Roslyn CTP. Please keep it coming . I'm definitely going to do some articles on Roslyn in the future; the past few weeks I have been too...
  • Fabulous Adventures In Coding

    The Roslyn Preview Is Now Available

    • 37 Comments
    I am super excited to announce that the Roslyn project code is now sufficiently coherent that we can start showing it to customers! But I am getting ahead of myself somewhat. What is this "Roslyn" project? Here's the deal. We've got these great...
  • Fabulous Adventures In Coding

    Insanely great

    • 8 Comments
    I've never owned an Apple product; I haven't written Mac software professionally since working on the Mac version of Visual Basic briefly in 1994. Nevertheless, Steve Jobs inspired me every day . Wanting to make "insanely great" technology is one thing...
  • Fabulous Adventures In Coding

    Async articles

    • 8 Comments
    I am pleased to announce that MSDN Magazine is doing a special issue this month on the new "async-await" feature that we are working on for the next versions of C# and Visual Basic. If this subject interests you, see my introductory article for beginners...
  • Fabulous Adventures In Coding

    Keep it secret, keep it safe

    • 20 Comments
    A lot of people really love the idea of cryptography. To computer geeks like us there is nothing cooler than the idea that computing relatively simple arithmetic on a message can enable you to communicate secretly with anyone in the world, even if there...
  • Fabulous Adventures In Coding

    Inheritance and Representation

    • 11 Comments
    (Note: Not to be confused with Representation and Identity ) Here's a question I got this morning: class Alpha<X> where X : class {} class Bravo<T, U> where T : class where U : T { Alpha<U> alpha; } This gives a compilation error stating...
  • Fabulous Adventures In Coding

    What is this thing you call a "type"? Part Two

    • 25 Comments
    Well that was entirely predictable; as I said last time , if you ask ten developers for a definition of "type", you get ten different answers. The comments to the previous article make for fascinating reading! Here's my attempt at describing what ...
Page 1 of 30 (742 items) 12345»