422 reputation
310
bio website
location
age
visits member for 2 years, 7 months
seen 16 hours ago

May
22
comment The coding monkey dilemma - any practical advice or strategies?
The only thing that's going to die is your career....or possibly your soul...
May
15
comment Is micro-optimisation important when coding?
Those papers have proven to be EXTREMELY helpful in optimizing massive data processing (think image processing / machine visioning).
Apr
15
comment Two way communication between Form and plugins
When the user control gets focus (or some other trigger), the user control can raise a custom event and pass a data structure representing the menu items up to the parent. The user control will tell the main form what to place into the menu.
Apr
14
answered Two way communication between Form and plugins
Mar
12
awarded  Yearling
Mar
11
comment Is logging next to an implementation a SRP violation?
@Aitch To answer your question about unit testing: Do you mock the logger?, that is PRECISELY what you do. You should have an ILogger interface that defines WHAT the logger does. The code under test gets injected with an ILogger that you specify. For testing, you have class TestLogger : ILogger. The great thing about this is the TestLogger can expose things like the last string or error logged. The tests can verify that the code under test is logging correctly. For example, a test could be UserSignInTimeGetsLogged(), where the test checks TestLogger for the logged.
Mar
11
comment Value of unit testing property setters to check events
@RobertHarvey I use a lambda for the event handler on my class under test, and store PropertyName from the PropertyChangedEventArgs in a local variable. The assert compares the property name that is expected to the property name that got passed.
Mar
11
comment Value of unit testing property setters to check events
Personal experience: I spend the better part of a day tracking down a faulty PropertyChanged event, due to a misspelling in the magic string. All properties that raise PropertyChanged now get tested. When in doubt, write the test.
Mar
6
answered If Else - Repeated Code Logic
Mar
6
comment If Else - Repeated Code Logic
The control flow diagram shows all control going through filter_C, but the conditional statements indicate that control flow can go around filter_C. Is filter_C optional?
Mar
3
accepted When to create a custom exception in C#
Mar
3
awarded  Curious
Mar
2
asked When to create a custom exception in C#
Feb
19
accepted Is checking that a property doesn't throw an exception a valid unit test?
Feb
19
asked Is checking that a property doesn't throw an exception a valid unit test?
Feb
2
awarded  Revival
Dec
17
revised Separate methods or single method with if statement?
Fixed grammar.
Nov
17
comment Program Compatibility - OS That Can Run Anything?
Macs used to use PowerPC, but switched over to x86 in 2006.
Oct
13
comment Efficient Code Design for Pattern Search
What kind of stream are you looking at? Character? Binary?
Sep
26
awarded  Yearling