Reputation
633
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
8 14
Newest
 Nice Answer
Impact
~16k people reached

Mar
20
awarded  Nice Answer
Mar
14
comment Why have private fields, isn't protected enough?
@detly That wasn't what I was looking for. The one I was thinking of had Eric advocating for sealing up entire classes because once you let anything be changed by an inheritor you can't trust any bit of the internal state to not be screwed up in any of your functions.
Mar
11
comment Why have private fields, isn't protected enough?
I can't find it now, but I remember reading a well written answer from @EricLippert about why MS sealed big parts of .net's library and IIRC why he'd've liked to've locked the rest up. The moment you allow 3rd party inheritors to start touching internal values you need to add a huge amount of validation/sanity checks to every method because you can no longer trust any design invariants about the objects internal state.
Mar
11
awarded  Yearling
Mar
10
revised Is a big boolean expression more readable than the same expression broken down into predicate methods?
added 1 character in body
Mar
9
answered Is a big boolean expression more readable than the same expression broken down into predicate methods?
Feb
23
comment Arguments against error suppression
thecodelesscode.com/case/224
Jan
27
comment What's the point of running unit tests on a CI server?
That's one of the reasons I love CI. Finding about and fixing your own ooopses is much better than having someone else find them for you.
Jan
27
comment What's the point of running unit tests on a CI server?
I've seen more oops I forgot to commit that CI failures that I care to admit to.
Jan
19
comment Specify optional parameter names even though not required?
I tend to agree; and have generally taken to using enums in my new code if there's any vaguely chance that the conditions will be expanded in the future. Replacing a bool with an enum when something becomes a tri-state ends up creating really noisy diffs and making blaming code a lot more tedious; when you end up having to retrofit your code again a year down the road for a 3rd option.
Jan
6
comment Should I avoid using unsigned int in C#?
@Panzercrisis It might be an overly strong phrasing; but I'm not sure if I've ever used unsigned types in C# except when I was calling down to win32 apis (where the convention is that constants/flags/etc are unsigned).
Nov
10
comment Two structs with the same members but different naming, is it a good idea?
@Sidney Unless you absolutely need the functionality I wouldn't. You need to do a sin/arcsin operation to convert between the two representations. This is going to introduce a bit of bitrot in the least significant bits every time you do the conversion. I'm almost certain you'd end up with similar pain to what I went through trying to deal with a class that provided both an event frequency and a time between events (x and 1/x) representation of something. Tracking which representation is cannonical in the class and dealing with all the rounding headaches isn't something I'd want to do again.
Oct
15
comment Is it normal to spend as much, if not more, time writing tests than actual code?
@simbabque are the install time tests just to verify that the install succeeded/all dependencies are present, or am I completely off base about why tou do them?
Oct
1
revised Should I stop using the term C/C++?
fixed spelling errors/typos
Oct
1
suggested approved edit on Should I stop using the term C/C++?
May
28
comment Is it good that testers are competing to see who opens more bugs?
@amon that TDWTF was a derivative version of the original: dilbert.com/strip/1995-11-13
Feb
1
comment What is best practice to handle whitespaces when letting the user edit the configuration, the name=value pairs?
@mainma That oversized equals sign renders perfectly on my win7 box in everything I've tried that's unicode aware.
Jan
30
comment Leaving intentional bugs in code for testers to find
The first thing that jumped to my mind was Wally's going to code someone else a minivan this afternoon
Jan
8
comment How are financial organizations planning for the degradation of old programming languages such as COBOL?
+1 for "But as long as there are money to be earned, people will learn necessary skills." And because very few people graduate school saying "I want to be a COBOL developer", companies that need them have to offer a salary premium to recruit staff. Put enough money into it and you can get some people to do almost any otherwise less appealing job.
Dec
4
comment How to test when arranging the data is too cumbersome?
Something I've done in cases where the parser itself is an expensive operation (eg reading data out of Excel files via com interop) is to write test generation methods that run the parser and output code to the console recreate the data structure the parser return. I then copy the output from the generator into more conventional unit tests. This allows reducing the cross dependency in that the parser only needs to be working correctly when the tests were created not every time they're run. (Not wasting a few seconds/test to create/destroy Excel processes was a nice bonus.)