Sign In
Fabulous Adventures In Coding
Eric Lippert's Blog
Options
About
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Tags
Aargh! (8)
accuracy (6)
anonymous types (3)
Arrays (8)
ASP (11)
AStar (5)
Async (15)
bad jokes (14)
Begging the question (4)
Benford's Law (3)
Best Of FAIC (12)
Big Words (5)
Books (22)
Breaking Changes (24)
Brittle Base Classes (6)
C# (322)
C# 4.0 (39)
C# 5.0 (10)
Cargo Cult Programming (4)
cast operator (3)
Channel 9 (6)
Charts (6)
closures (3)
Code Generation (10)
Code Quality (29)
COM Programming (57)
Conditional Operator (3)
Continuation Passing Style (11)
Conversions (16)
Covariance and Contravariance (22)
customer service (4)
declaration spaces (5)
definite assignment (3)
Dialogue (14)
English Usage (11)
exception handling (9)
Floating Point Arithmetic (15)
grammars (9)
graph colouring (5)
Hashing (8)
High Dimensional Spaces (5)
Immutability (27)
integer arithmetic (5)
Interviewing (8)
Introduction (6)
It Hurts When I Do This (5)
Iterators (10)
JScript (93)
JScript .NET (29)
keywords (4)
Lambda Expressions (20)
Language Design (59)
local variables (3)
localization (3)
Mathematics (17)
Memory Management (13)
Metablogging (9)
Mistakes (6)
Music (6)
myths (7)
namespaces (5)
Non-computer (37)
Optional arguments (5)
Overload Resolution (9)
Pages (25)
Performance (48)
precedence (4)
precision (7)
protected (7)
Puzzles (48)
quotable quotations (4)
Rants (51)
Rarefied Heights (52)
reachability (4)
Recursion (26)
reference (4)
Regular Expressions (13)
Relationships (4)
Salt (4)
Science (12)
scope (5)
Scripting (189)
Security (46)
shadowcasting (6)
SimpleScript (30)
Software development methodology (13)
Static Methods (6)
Threading (18)
Topological Sort (4)
Type Inference (17)
type safety (4)
unsafe code (4)
Value Types (11)
VBScript (80)
Video (12)
virtual dispatch (9)
VSTO (10)
warnings (5)
What's The Difference? (11)
Zombies (4)
Archive
Archives
March 2012
(1)
February 2012
(7)
January 2012
(5)
December 2011
(9)
November 2011
(4)
October 2011
(3)
September 2011
(3)
August 2011
(2)
July 2011
(5)
June 2011
(3)
May 2011
(7)
April 2011
(6)
March 2011
(9)
February 2011
(8)
January 2011
(7)
December 2010
(4)
November 2010
(8)
October 2010
(11)
September 2010
(8)
July 2010
(7)
June 2010
(7)
May 2010
(10)
April 2010
(9)
March 2010
(10)
February 2010
(8)
January 2010
(8)
December 2009
(5)
November 2009
(9)
October 2009
(9)
September 2009
(8)
August 2009
(9)
July 2009
(9)
June 2009
(12)
May 2009
(9)
April 2009
(9)
March 2009
(10)
February 2009
(4)
January 2009
(7)
November 2008
(2)
October 2008
(5)
September 2008
(4)
August 2008
(1)
July 2008
(2)
June 2008
(3)
May 2008
(11)
April 2008
(3)
March 2008
(2)
February 2008
(5)
January 2008
(5)
December 2007
(7)
November 2007
(5)
October 2007
(13)
September 2007
(3)
August 2007
(6)
July 2007
(2)
June 2007
(7)
May 2007
(4)
April 2007
(9)
March 2007
(2)
January 2007
(5)
November 2006
(3)
October 2006
(1)
September 2006
(1)
August 2006
(1)
July 2006
(2)
June 2006
(4)
May 2006
(5)
April 2006
(3)
March 2006
(4)
January 2006
(1)
December 2005
(7)
November 2005
(7)
October 2005
(9)
September 2005
(8)
August 2005
(9)
July 2005
(7)
June 2005
(7)
May 2005
(7)
April 2005
(12)
March 2005
(7)
February 2005
(6)
January 2005
(13)
December 2004
(9)
November 2004
(3)
October 2004
(5)
September 2004
(7)
August 2004
(14)
July 2004
(10)
June 2004
(11)
May 2004
(20)
April 2004
(26)
March 2004
(32)
February 2004
(14)
January 2004
(16)
December 2003
(7)
November 2003
(13)
October 2003
(32)
September 2003
(36)
MSDN Blogs
>
Fabulous Adventures In Coding
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Fabulous Adventures In Coding
Why are local variables definitely assigned in unreachable statements?
Posted
3 days ago
by
Eric Lippert
20
Comments
You're probably all familiar with the feature of C# which disallows reading from a local variable before it has been "definitely assigned": void M() { int x; if (Q()) x = 123; if (R()) Console.WriteLine(x); // illegal! } This is illegal because there...
Fabulous Adventures In Coding
The C# 5.0 beta release is now available
Posted
8 days ago
by
Eric Lippert
16
Comments
I am super excited to announce that the beta release of Visual Studio version 11 (which includes the .NET CLR version 4.5, Visual Basic version 11 and C# version 5) is available for download right now. As you know if you've been following our CTP releases...
Fabulous Adventures In Coding
The Solution To The Simple Puzzle
Posted
10 days ago
by
Eric Lippert
8
Comments
The first time I ran my histogram visualizer I asked for a Cauchy distribution with a minimum of -10 and a maximum of 10, and of course I got a graph that looks much like the one from my article of last week: Looks perfectly reasonable; I guess my program...
Fabulous Adventures In Coding
A Simple Puzzle
Posted
13 days ago
by
Eric Lippert
23
Comments
My original version of the histogram-generating code that I whipped up for the previous episode of FAIC contained a subtle bug. Can you spot it without going back and reading the corrected code? private static int[] CreateHistogram(IEnumerable<double>...
Fabulous Adventures In Coding
Generating Random Non-Uniform Data In C#
Posted
16 days ago
by
Eric Lippert
13
Comments
When building simulations of real-world phenomena, or when generating test data for algorithms that will be consuming information from the real world, it is often highly desirable to produce pseudo-random data that conform to some nonuniform probability...
Fabulous Adventures In Coding
Bad Metaphors
Posted
24 days ago
by
Eric Lippert
35
Comments
The standard way to teach beginner OO programmers about classes is to make a metaphor to the real world. And indeed, I do this all the time in this blog, usually to the animal kingdom. A "class" in real life codifies a commonality amongst a certain set...
Fabulous Adventures In Coding
What is "binding" and what makes it late?
Posted
1 month ago
by
Eric Lippert
13
Comments
"Late binding" is one of those computer-sciency terms that, like "strong typing", means different things to different people. I thought I might describe what the term means to me. First off, what is "binding"? We can't understand what it means to bind...
Fabulous Adventures In Coding
What's the difference? Trenchcoat vs Duster
Posted
1 month ago
by
Eric Lippert
17
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
Posted
1 month ago
by
Eric Lippert
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
Posted
1 month ago
by
Eric Lippert
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?
Posted
1 month ago
by
Eric Lippert
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
Posted
1 month ago
by
Eric Lippert
17
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
Posted
2 months ago
by
Eric Lippert
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
Posted
2 months ago
by
Eric Lippert
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
Posted
2 months ago
by
Eric Lippert
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
Posted
2 months ago
by
Eric Lippert
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
Posted
2 months ago
by
Eric Lippert
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
Posted
2 months ago
by
Eric Lippert
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
Posted
2 months ago
by
Eric Lippert
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
Posted
2 months ago
by
Eric Lippert
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
Posted
3 months ago
by
Eric Lippert
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
Posted
3 months ago
by
Eric Lippert
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?
Posted
3 months ago
by
Eric Lippert
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?
Posted
3 months ago
by
Eric Lippert
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
Posted
3 months ago
by
Eric Lippert
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...
Page 1 of 30 (749 items)
1
2
3
4
5
»