4,920 reputation
21837
bio website theslice.livejournal.com
location Olathe, KS
age 42
visits member for 3 years, 10 months
seen 7 hours ago
Just another programmer making his way in the world and hopefully helping others make theirs too.

Sep
19
awarded  c#
Sep
19
revised I have to use Visual Studio 2005. What are good alternatives to using LINQ?
added some exampleness
Sep
19
answered I have to use Visual Studio 2005. What are good alternatives to using LINQ?
Sep
18
comment C#: Explicitly defining variable data types vs. using the keyword 'var'?
That's extreme, but your company's initiative. Glad it's your "last" job, though! :)
Sep
16
revised Why might an ASP.Net website load slowly?
added a fifth via comments: viewstate explanation.
Sep
10
awarded  Yearling
Sep
4
comment Is try-finally expensive
"if the exceptional situation is rare" - well there's a tautology right there. Exceptional means rare and that's precisely how exceptions should be used. Never should be part of the design or control flow.
Aug
22
comment Instantiating Null Objects with Null-Coalescing Operator
I remember looking at the IL for each of those three forms once. The first and the second were identical, but the third was optimized in a fashion as it could assume null was a comparison.
Aug
10
awarded  Nice Answer
Aug
9
comment Should I make a variable readonly when I modify it, but I don't actually set it outside of the constructor?
The real answer is that C# should add what C++ folks call a "deep-constness" (or deep immutability) idiom. Or use the proper classes/interfaces, as the comment says. Ignorance of the framework isn't really an excuse, in my opinion. I get confused by some code I read; when that happens I research why it is what it is. Not rocket surgery.
Aug
9
answered Should I make a variable readonly when I modify it, but I don't actually set it outside of the constructor?
Jul
26
awarded  Informed
Jul
9
revised Rewriting C# Formula Calculations in T-SQL
corrected spellings.
Jul
1
comment Hide or Show singleton?
Best practice for using it, if your have to: csharpindepth.com/Articles/General/Singleton.aspx
Jun
25
comment Recommened design pattern to handle multiple compression algorithms for a class hierarchy
I would go with an Attribute-based solution. Adorn the each class with an attribute which declares what type(s) of compression it supports and then your compressor can reflect on that attribute and get the information needed to choose what compression method to use on the instance.
Jun
14
comment Why would a developer create a public class that has all static properties?
Should also be return 1.00m and return 10.00m rather than the (possibly) expensive runtime cast. the m makes it a decimal constant.
May
16
comment Multiple Interfaces in Java - Good or bad
As always, it depends.
May
15
revised Did the developers of Java consciously abandon RAII?
changed `my` to `var` in the `using` statement.
May
14
revised Did the developers of Java consciously abandon RAII?
fixed title spelling, added code syntax here and there.
Apr
25
comment Is it a good practice to create a ClassCollection of another Class?
I believe that falls under the software development mantra of "it depends". If you're talking about, for example, your FindCarByModel method, that makes sense as a method on your repository, which is slightly more complex than just a Car collection.