1,085 reputation
518
bio website yourcodeisshowing.wordpress.c…
location Quebec City, Canada
age 36
visits member for 3 years, 5 months
seen Mar 18 at 13:52

Developer with 8 years experience. I work with J, C, C++, C#, SQLite, MySQL, VBA, and a bunch of other odds and ends.

On Twitter: @MPProg


Feb
23
comment Constructor parameter validation in C# - Best practices
@ChaosPandion: Maybe not specific, but definitely strongly biased. Tagged nonetheless as suggested.
Feb
23
comment Constructor parameter validation in C# - Best practices
@S.Lott Updated. I think you've hit something on the head there. The more I think about it, the more that specific context was necessary. Thanks again for clearing things up!
Feb
23
revised Constructor parameter validation in C# - Best practices
added 563 characters in body; edited tags; edited title
Feb
23
comment Constructor parameter validation in C# - Best practices
@S.Lott What @Chad said. There were two cases of the validation in the calling class, which were identical. Even if they were combined, the rule for the class is that the argument cannot be null. It made sense to suppose that the class itself should manage this. Now it's encapsulated, nearly forgotten.
Feb
23
comment Constructor parameter validation in C# - Best practices
@S.Lott For my defense, the pre-validation bit wasn't my creation :) I just raised an alarm because it was duplicated.
Feb
23
comment Constructor parameter validation in C# - Best practices
@S.Lott I see. Forgive me for not understanding what you meant. The alternative which incited me (I wouldn't say forced) to ask the question is that the parameters were pre-validated, before instanciation. On failure, a message would be shown, and the constructor was never called.
Feb
23
comment Constructor parameter validation in C# - Best practices
@S.Lott For fear of repeating myself, I was open to the possibility of there being some other approach, which I did not know. I believe I'm not all knowing, that much I know for sure.
Feb
23
comment Constructor parameter validation in C# - Best practices
@S.Lott I'm a humble programmer, I know there's always something else to learn, so that I'm open to the idea of some other doodad for this sort of thing, even if seemingly unlikely. I actually read somewhere that constructors should never fail (which is admittedly bull...)
Feb
23
comment Constructor parameter validation in C# - Best practices
+1 for the confession alone :)
Feb
23
asked Constructor parameter validation in C# - Best practices
Feb
20
answered Are there any downsides of 2 developers getting married?
Feb
1
awarded  Commentator
Feb
1
awarded  Teacher
Jan
18
comment Project Manager that wants to lock in time estimate with a signed contract
I was thinking of a similar clause: any feature change invalidates all time estimates and require a complete reevaluation. But that would just be more work. In either case, would a certified PMP be stupid enough to sign this? Of course.
Jan
15
answered Where do you draw the line for your perfectionism?
Dec
11
awarded  Quorum
Nov
26
comment UI design and confirmation paradigm
Obviously there's degrees here. For example, you absolutely want your "Delete all tables, files, and settings irrevocably" option to have a solid confirmation. Yet cosmetic changes, or ones easy to rollback, could be done silently, even if there's no direct undo for some.
Nov
26
awarded  Editor
Nov
26
revised UI design and confirmation paradigm
added 102 characters in body
Nov
25
awarded  Student