Reputation
1,224
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
9 12
Newest
 Yearling
Impact
~31k people reached

  • 0 posts edited
  • 5 helpful flags
  • 1,380 votes cast
Jan
10
awarded  Yearling
Oct
1
comment How to effectively cooperate in a team having mixed background/mindset regarding OOP?
"I believe [..] a reusable, layered OOP C++ product can get within 10% of the performance of a C-only monolithic product, [..]." While that might be good enough for most fields, "within 10%" is not good enough in high-performance finance: Fastest takes all. As a result, a single virtual call at a top-level is okay, a virtual call inside an inner loop most likely is not. Rather spend seconds setting up data-structures during start-up than one millisecond when responding to an event. Duplication of data is encouraged if it prevents a cache-miss. It really is a different way of thinking.
Oct
1
comment Should I stop using the term C/C++?
@munificent An example of a program that can be compiled in three languages - C, /bin/sh, and f77 - is the applin.c entry to the IOCCC 1986. According to your definition, the tag C/Fortran/sh makes sense now?! ioccc.org/years-spoiler.html#1986 .
Jul
22
revised Is cyclomatic complexity density a good software quality metric?
added 42 characters in body
Jul
22
comment Is cyclomatic complexity density a good software quality metric?
Reworded my answer, made the 'no' explicit, and added a reference.
Jul
22
revised Is cyclomatic complexity density a good software quality metric?
added 645 characters in body
Jul
22
revised Is cyclomatic complexity density a good software quality metric?
added 645 characters in body
Jul
22
comment Cyclomatic complexity for 2 IFs - why not just FF or TT?
"Consider a bug that requires that f1() be called before f3()." TF will not expose that bug as f3() is never called. Only FT will expose this bug.
Jul
22
comment Is cyclomatic complexity density a good software quality metric?
@GlenH7 Yes, the suggested metrics are weak - that's exactly the point of my answer! If you know any better ones, let us know in an answer.
Jul
22
comment Is cyclomatic complexity density a good software quality metric?
@gnat The answer is stronger than the question: The question asks whether a particular metric is a good one; The answer states that no metrics are good (which includes the mentioned one).
Jul
21
answered Is cyclomatic complexity density a good software quality metric?
Apr
3
awarded  Pundit
Mar
19
comment Optional Member Data
The advantages of this hasFavoriteColor() is that it allows the getFavoriteColor() to return a reference instead of a pointer - by adding a precondition that the caller is responsible to check hasFavoriteColor() before calling getFavoriteColor() - while backing storage isn't duplicated. (of course, a decent implementation of getFavoriteColor() will include an assert to check this precondition).
Mar
19
comment Optional Member Data
There is a difference between 'empty' and 'not present'. Second, if it's a more complicated class, there might be no 'empty' representation.
Mar
19
comment Optional Member Data
Small point: "You may setFavoriteColor( "Blue" ) then be surprised when your XML output doesn't show Blue because you forgot to setHasFavoriteColor( true )." Solution: add a mHasFavoriteColor = true; in the setFavoriteColor() function. The advantage of setters over direct member access is that functions can maintain class invariants.
Feb
20
comment Typedefs to convey relations between classes
While I agree with your approach and the answers, I would suggest to use just Index. In practice - as demonstrated by your code - you'll have to prefix it with the class name anyway: ModelNode::Index, AABB::Index ...
Jan
30
comment Tips for understanding big project fast?
Visual Studio has a "show definition" functionality. Try right-clicking on the name and look at the pop-up menu. I've witnessed problems with it, but it usually is better than using ctrl-F.
Jan
25
answered What is the point of making a syntactic distinction between standard and user-defined types?
Jan
20
awarded  Nice Answer
Jan
15
awarded  Nice Answer