509 reputation
35
bio website
location
age
visits member for 3 years
seen yesterday

Nov
26
comment Should I accept empty collections in my methods that iterate over them?
Rather than use yield returns, it might be preferable to extract a method for converting a single Node to a TransformedNode and replace your utility method with LINQ collection.Select(TransformNode) calls.
Nov
21
comment Name/Fix for Production Code Whose Sole Purpose is to Facilitate Testing?
I don't know that I agree the injection constructor is a problem which requires hours of effort to change/test, but I would fix the empty constructor to overload properly: public MyClass() : this(new Something()) { }
Oct
31
comment Is this extension method any better than just casting to an int?
@Snowman you get the type-checking benefits of the GetInt32 call without the extra hit of calling GetOrdinal columns * rows times
Oct
31
answered Is this extension method any better than just casting to an int?
Oct
2
comment Should I denote that a method satisfies an interface?
quite the opposite: StyleCop has a specific rule about avoiding regions
Sep
22
answered Distinct Log and Trace for each object in .NET
Sep
16
comment Static typing vs. dynamic typing
Type inference != dynamic typing. For example, many (most? all?) functional languages use static type systems, but they also mostly use type inference.
Sep
10
answered Should the Presenter depend on the View or the vice versa?
Aug
13
comment Has there really not been one thing in the past 20 years that provided huge software development gains?
@user61852 also keep in mind that coding software is roughly equivalent to the design phase of other professions. Being overtime and overbudget is common. For example, just look at any new aircraft (notable and recent: the F-35).
Jul
18
answered Organizing solution / project structure and classes for Line of Business Application (LOB)
Jul
8
answered Why isn't there a next operation on enums?
Jul
3
comment Implement Generic DataSet Builder with C#
You could take a look at the System.Data.Common.DbProviderFactory class to create connections, commands, and data adapters, and use the base System.Data.Common objects instead of using Ole* objects directly.
May
28
comment Data structure for grid with negative indeces
Yeah, the declared type is coming from the type parameter on the class definition. I tossed it into a quick console project to confirm. The only change I had to make was replacing this(int index) with this[int index].
May
28
comment Data structure for grid with negative indeces
There's no need to use Activator. It is perfectly valid to use new List<T>(); within the constructor. The casts are unnecessary as well.
May
13
comment Tree View Children condition indicator on topmost un-expanded parent
I'm not sure there's a good reason to remove the indicator upon expansion. If multiple nodes are expanded, only one of which contains a child satisfying your condition, it's much easier to see which path in the tree contains the node you want if the indicators are still present.
May
7
comment Project Organization
+1 for the last paragraph. Splitting up the projects adds complexity to project references and deployment, increases build times, and (in general) increases the total application/library size. This is a case of YAGNI - it's easy enough to split the projects later if necessary, but you are better off not doing so until it is.
May
1
comment How to (or should I) have one assert per test with object comparisons?
+1 It may also be worth implementing ToString, since many testing frameworks will print out value.ToString() for the expected and actual values when the assert fails. Additionally, as a general rule, I implement IEquatable<T> whenever overriding Equals()
Apr
25
comment Why do C# developers newline opening brackets?
@Craig If you could, would you mind adding links to full/abstract versions of the brace studies you mentioned? All I have ever seen with regards to brace styles are holy wars, and a quick search turned up nothing more informative than a listing of different styles :(
Apr
16
comment Testing C# Eventhandler Subscription
You should be able to do with this Ninject and a mocking framework. One option is to use something like ninjectObject.Bind<INeedToBeMocked>().ToConstant(mockedObject); during your testing.
Apr
15
awarded  Yearling