Reputation
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
10 25
Newest
 Nice Answer
Impact
~177k people reached

  • 0 posts edited
  • 5 helpful flags
  • 141 votes cast
Sep
30
comment Derive subset with sum between two values
With the given example, 200 questions of which 50 are to be chosen, finding all the subsets of 50 that meet the requirement and choosing one at random is an unachievable task. There are 200 choose 50, or about 454 quattuordecillion (454*10^45), possible subsets. Some will be acceptable, others not. Your computer doesn't have the capacity to find all the acceptable subsets. Even Google or the NSA doesn't have that much storage (it's not even close).
Sep
30
comment Derive subset with sum between two values
@PrestonS - So what? This comment of yours suggests you have some addition requirements that you have not yet told us.
Sep
11
comment Is there any logical reason to auto-generate code documentation?
It would have helped a lot if the question had made it clear that GhostDoc automatically generates comments from uncommented code. Having that key piece of information hidden behind a link that appears as just a four letter word is not good form.
Sep
11
comment Is there any logical reason to auto-generate code documentation?
@KyleStrand _ I stand corrected. Doxygen does not produce such nonsense. Doxygen reads but does not generate doxygen comments. Those doxygen comments need to be written by a human.
Sep
11
comment Is there any logical reason to auto-generate code documentation?
@cdorking: As far as how to tell what was auto generated, look at this page that describes a function deep within the guts of Eigen. The calling sequence is autogenerated. Much of the text below the calling sequence is hand-written. The math is hand-written LaTeX that doxygen automatically processes. The list of parameters: The names are autogenerated, but the meaning of those parameters comes from hand-written commentary. The list of functions referenced within is autogenerated.
Sep
11
comment Is there any logical reason to auto-generate code documentation?
@cdorking: You misread the question. Read it again. GhostDoc was not attempting to read the programmer's mind. That goofy phrase appeared precisely because a programmer explicitly wrote that phrase as a comment to be parsed by GhostDoc. GhostDoc doesn't know what that phrase means. Like doxygen or javadoc, GhostDoc reproduces key commentary hand-written by humans as-is (plus formatting). There is no mind reading going on.
Sep
11
comment Is there any logical reason to auto-generate code documentation?
-1. Just pretend? That might work great for a one person project that will never be used again. Some level of documentation/commentary is needed even with a one person project if it's complexity is greater than that of "hello world" and if you plan on picking up that project in six months time. In a project involving dozens or even hundreds of people, failure to document/comment can kill the project.
Sep
11
comment Is there any logical reason to auto-generate code documentation?
@dcorking _ I haven't the foggiest idea what you mean by that. Doxygen can't read the programmer's mind. For a good example of what doxygen can do, see this top-level page for Eigen, a rather popular C++ scientific computing package. Poke around! You can see some documentation that's obviously written by humans, other that is purely auto generated, yet other that is a blend of human-written and auto generated. If told to, doxygen will automatically generate fan-in (who references this function) and fan-out (what does this function call).
Sep
10
comment Is there any logical reason to auto-generate code documentation?
Actually, it's both. doxygen parses the code and the doxygen comments. Class names, parent class names, data member names, function names, argument types and names, return type: Those all come from the parsed code. What those things mean come from the doxygen comments. Doxygen complains if an item specified as a \param in the doxygen comment isn't an argument, and it can be made to complain about undocumented items. Other than these minimal checks, the problem of comment vs code mismatch is still a possibility. That said, I love doxygen. It's much better than writing an API by hand.
Aug
24
comment Solving a probabilistic problem
You're certainly done when the maximum income of all available males is less than the minimum income of all available females. There are no possible matches once this condition is reached.
Aug
24
revised Solving a probabilistic problem
added 3691 characters in body
Aug
24
answered Solving a probabilistic problem
Aug
23
comment How to avoid being forked into oblivion by a more powerful contributor?
-1. That change was made in Cocos2D-XNA, before the fork occurred. Here's the identical change in Cocos2D-XNA.
Aug
23
comment Why does void in C mean not void?
@CodyGray - Thanks! Fixed that. Code that dereferences a null pointer will compile (so long as the pointer is not void* null_ptr = 0;).
Aug
23
revised Why does void in C mean not void?
Code that dereferences a null pointer will compile.
Aug
23
answered Why does void in C mean not void?
Jul
15
awarded  Nice Answer
Jun
13
comment Public versus private inheritance when some of the parent's methods need to be exposed?
Composition should normally be preferred over inheritance. There are however times when it makes more sense to use private inheritance. See this question on stackoverflow.com: When to use C++ private inheritance over composition?
Jun
13
answered Public versus private inheritance when some of the parent's methods need to be exposed?
Jun
2
answered Theoretically bug-free programs