Reputation
465
Top tag
Next privilege 500 Rep.
Access review queues
Badges
4 15
Newest
 Yearling
Impact
~10k people reached

Aug
27
comment How to implement a property on class A which refers to a property of a child object of class A
I'd say there's never a case when "do not throw NullReferenceExceptions" dodesn't apply, and I can't really think of a valid case where throwing from a property would be correct either. A nullref exception from your library doesn't help anyone using it, I'd always consider that a bug in the library itself.
Aug
26
comment Is catching general exceptions really a bad thing?
Interesting, as log4net explicitly doesn't want to stop the app just because logging fails. And i think it depends on what you're logging; security audits, sure, kill the process. But debug logs? Not that important.
Aug
25
comment How to implement a property on class A which refers to a property of a child object of class A
Properties generally shouldn't thrown exceptions; instead of a setter that throws ArgumentNullException, provide a SetClient method instead. Someone posted the link to an answer regarding this on the question.
Aug
25
comment How to implement a property on class A which refers to a property of a child object of class A
Points B & C are good; RE: a, its a convenience method, and the fact that room has a reference to Client might just be an implementation detail (it could be argued that Client should not be publicly visible)
Aug
25
comment How to implement a property on class A which refers to a property of a child object of class A
@Ben Disagree; MS guidelines explicitly state that property getters should not throw exceptions. And allowing null refs to be thrown when a more meaningful exception could be thrown instead is just lazy.
Aug
25
comment How do you approach transitive dependency conflicts that are only known at run-time?
In the .Net world I solve this problem just be installing the packages into my main application project. While no application code actually uses the plugin libraries directly the .Net compiler ensures the DLL is in the right spot during build and thus deployment.
Aug
24
comment How do you approach transitive dependency conflicts that are only known at run-time?
Are you talking about something like the DI container isn't properly setup to know that for IFoo use IFooImpl?
Aug
15
comment How do I manage the technical debate over WCF vs. Web API?
@SaeedNeamati compression makes that moot
Aug
15
comment Can I turn off Visual Studio white space at bottom of code files?
Just don't scrool that far.. i like it because i can move the last lines of a file to mid screen, which is eye level.
Aug
11
comment Why not just make non-parameterized queries return an error?
@jwenting it could be a connection option that must be explicitly enabled or disabled.
Aug
11
comment Identity Design ASP.NET
If you authenticate against users in Active Directory, I believe you'll need a CAL license for each account. Thus if you allow people to connect from the internet and create accounts, you'd have to pay for each account if you create them in AD. If this is an internal organization site, they'll probably have AD accounts anyway and thus you'd be fine.
Aug
7
comment Modern.IE VM license
Community edition license is a bit different than MSDN licensing. This might help. msdn.microsoft.com/en-us/subscriptions/cc150618.aspx The fact is though the VM license explicitly says you can use the VMs for testing. I don't think you can just throw out that clause due to the commercial use clause. Otherwise anyone could make a contract and then bury in it elsewhere "just kidding, all that stuff previously was a lie." To balance your answer, a previous employer had someone look into these VMs and said it looked fine for us to use.
Aug
6
comment Modern.IE VM license
So, what exactly would be the point of MS releasing these VMs if you weren't allowed to use them on your local machine to test how your website works in them? I think your licensing guy doesn't know what he's talking about, as the same terms apply to MSDN downloads as well. As long as the VMs' only use is testing your website, you're abiding the license.
Aug
2
comment Are #regions an antipattern or code smell?
@EricKing The problem is i can't remember the last time i've heard it used properly. Code smell directly translates to "i'm repeating something i read on the internet without really understanding it."
Aug
1
comment Are #regions an antipattern or code smell?
@EdS. So go into your options in vs and turn off regions. Problem solved.
Aug
1
comment Are #regions an antipattern or code smell?
@EricKing sorry, but poor use of a metaphor does devalue it. At this point if someone says code smell to me i write them off.
Jul
31
answered Sacrifice server validation in pos of performance with Rich Client validation?
Jul
29
comment Removing hard-coded values and defensive design vs YAGNI
rates changes, which is usually handled by just copying the rate to the relevant record. No admin screen is needed at this point, the system can then handle when the rates change, and it will be simple script to change them. None of this should be more than a few hours, but will prevent the basement from flooding next year when the putty fails.
Jul
29
comment Removing hard-coded values and defensive design vs YAGNI
@BerinLoritsch But this particular design decision is akin using substandard parts saying "I can use plumbers putty to plug this leaky pipe, that's your cheapest option!" The rates WILL change. Its a given, and its irresponsible for a professional to build a system that doesn't allow it. And the savings are probably negligible in the grand scheme of the cost of the project. Put the data in a table; the code that gets the lookup data is slightly different, the logic figuring out which rate to use is the same either way. The only other decision is how to handle historical data after the...
Jul
29
comment Removing hard-coded values and defensive design vs YAGNI
Let me install this substandard value so when it most certainly breaks in a year I get repeat business. That sounds shady, because it is.