Blog - Title

January, 2009

  • Fabulous Adventures In Coding

    Why no var on fields?

    • 35 Comments
    In my recent request for things that make you go hmmm, a reader notes that you cannot use "var" on fields. Boy, would I ever like that. I write this code all the time: private static readonly Dictionary<TokenKind, string> niceNames = new Dictionary<TokenKind...
  • Fabulous Adventures In Coding

    Things That Make You Go Hmmm

    • 60 Comments
    As you might have gathered from the number of times I make a blog post beginning with "I got the following question from a reader the other day..." I field a lot of questions about the C# language (and in the past fielded a lot of questions about VBScript...
  • Fabulous Adventures In Coding

    Future-Proofing A Design

    • 9 Comments
    Last time on FAIC a user asked for guidance on the potential pitfalls of refactoring an automatic property into a regular explicit property. This is just an example of a far more general problem: how can we design programs so that they are easy to get...
  • Fabulous Adventures In Coding

    Automatic vs Explicit Properties

    • 16 Comments
    Here's a question I got from a C# user last year, a question I get fairly frequently: User: With “regular” explicit properties, I tend to use the private backing field directly from within the class. Of course, with an automatic property, you can’t do...
  • Fabulous Adventures In Coding

    Book News

    • 6 Comments
    Happy new year all -- I hope 2008 was a good year for you and that 2009 will be better. I myself was crazy busy at the end of 2008, working on a number of at-work projects and personal projects which I'm not going to blog about at this time. I hope to...
  • Fabulous Adventures In Coding

    Long division

    • 12 Comments
    A thing that makes a reader go hmmm is why in C#, int divided by long has a result of long, even though it is clear that when an int is divided by a (nonzero) long, the result always fits into an int. I agree that this is a bit of a head scratcher. After...
  • Fabulous Adventures In Coding

    Reading Declarations

    • 13 Comments
    Wow, lots of good "hmm" moments in the comments to yesterday's post. Keep them coming! Many of these resonated strongly with me. One in particular was thinking back to the day when I finally internalized the reality that in C/C++, the declaration "int...
Page 1 of 1 (7 items)