21,232 reputation
104978
bio website ericlippert.com
location Seattle, WA
age 42
visits member for 4 years, 7 months
seen 2 days ago

Eric Lippert develops C# analyzers at Coverity (which is now a division of Synopsys). During his sixteen years at Microsoft he was a developer of the Visual Basic, VBScript, JScript and C# compilers and a member of the C# language design committee; he is now a C# MVP. He is on Twitter at "@ericlippert" and writes a blog about programming language design and other fabulous adventures in coding at http://ericlippert.com.


May
14
revised What is meant by Scope of a variable?
added 239 characters in body
May
2
awarded  Good Answer
Apr
15
comment override resolution behavior in c#
You should have gotten a warning when you compiled this code that explained the problem; did you ignore the warning? Compiler warnings are there to tell you that your program is probably wrong, and where it is probably wrong; read them!
Apr
14
revised How much work should I place inside a lock statement?
added 274 characters in body
Apr
14
answered How much work should I place inside a lock statement?
Apr
1
comment Does path coverage guarantee finding all bugs?
Suppose the program has a feature which displays a map of time zones, and the map shows Taiwan as not being part of China. The bug is that now the program cannot be sold legally anywhere in China. In any product I've ever worked on that would be a priority-zero 100% ship-killing bug; the product release would be delayed to fix it. Explain how complete code coverage by test cases discovers this bug.
Apr
1
comment Best way to define, start and stop threads in C#
@Skaidar: This is the third time I've seen this very question in the last three days. Do not use Thread.Sleep, it is almost always the wrong thing to do. You wouldn't hire a worker and pay them to sleep, so don't do the same with a thread. If your thread is out of work to do, let the task parallel library put it back in the thread pool. If your thread needs to wait asynchronously for information from another thread or an IO completion, then use await. If your thread needs to delay then do an await Task.Delay(....) so that the thread can continue to work while it waits.
Apr
1
awarded  Nice Answer
Apr
1
answered Best way to define, start and stop threads in C#
Mar
27
awarded  Good Answer
Mar
24
awarded  Nice Answer
Mar
23
comment Why aren't field-like events implemented as a list of delegates?
The problem of creating all of the empty lists can be easily solved with a "null object pattern" -- make a singleton object for each delegate type which is the "null" delegate. But you still have the problem of initializing all those fields to the "null object". That initialization is either potentially expensive, if done automatically, or error-prone, if done manually.
Mar
23
revised Method extraction vs underlying assumptions
added 547 characters in body
Mar
23
answered Method extraction vs underlying assumptions
Mar
9
comment The dream of declarative programming
Well, this question is easily answered. Attempt to implement such a system. What stopped you from doing it successfully? Odds are good that whatever stopped you has stopped everyone else.
Mar
5
awarded  Nice Answer
Mar
2
comment Do you memorize the classes of your frameworks?
It's not that crazy. :-) And I am with you; I certainly do not know anywhere close to the whole .NET framework.
Feb
26
comment Is it worth even checking to see if Guid.NewGuid() is Guid.Empty?
@ArturoTorresSánchez: For the answer to your question and many more fun facts about GUIDs, see my series of articles which begins here. ericlippert.com/2012/04/24/guid-guide-part-one I note that Luke already linked to part three for your convenience. Short answer: Version 4 GUIDs always include a 4.
Feb
25
comment Is it worth even checking to see if Guid.NewGuid() is Guid.Empty?
That code is there to keep the alligators away. Are there alligators where you write code? No? Then obviously it works!
Feb
22
comment Does Oracle reap economic benefits by maintaining Java?
A similar question of historical interest is "why did Sun, a company that sold expensive hardward, design, implement and heavily promote a language designed to make hardware choice less relevant?" It seems to work directly against their interests. Joel Spolsky, who runs this site, wrote an article about that back in the day, and I have yet to hear a sensible answer to that question.