Reputation
Next tag badge:
301/100 score
13/20 answers
Badges
10 50 79
Newest
 Guru
Impact
~679k people reached

Jun
17
comment What's the point of implementing a Stack using two queues?
The more usual problem is to implement a queue using two stacks. You might find Chris Okasaki's book on purely functional data structures interesting.
Jun
16
awarded  Guru
May
29
comment Is it good that testers are competing to see who opens more bugs?
A number of answers suggest that the job of testers is to find bugs; this mindset is what produces the problem you've identified. The job of quality assurance is to accurately determine whether or not the product meets a stated quality bar. I don't care if a tester is producing bug reports; I care whether a tester is producing an accurate, customer-focused analysis of the quality of the product. That's the thing that should be incentivized.
May
27
comment Design: Bridge Game
@RobertHarvey: "all the game-related code is in BridgeConsole but I've been told it's too long" sure sounds like a likely violation of the SRP.
May
25
awarded  Nice Answer
May
24
comment Can you implement “object-oriented” programming without the class keyword?
As others have noted, this is a perceptive question about OOP. I'll take this opportunity however to note that this is not at all how real banks represent bank accounts. Banks do not have a mutable "account" object that changes when you debit and credit it; they have write-only list of transactions, and then compute the balance from the list of transactions. As a good exercise, try implementing that mechanism in various languages.
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