Reputation
4,133
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
9 22
Impact
~159k people reached

  • 0 posts edited
  • 5 helpful flags
  • 111 votes cast
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
Jun
2
comment Using single characters for variable names in loops/exceptions
I don't want to write a new answer to this old question, and this is just a comment. There's a key concept missing from the list of places where a single character variable name is acceptable, and maybe even preferable, and that's C++ templates. It's very common to see something along the lines of template <typename T, typename U, int N> ....
May
31
awarded  Yearling
May
22
comment Origins of code indentation
@DanielMahler - Browse the LISP 1 programming manual and see for yourself. Some of the example code is indented, but it's haphazard at best. Most of the example code is flush left.
May
16
comment Is a coding standard even needed any more?
That is a prototypical bad coding standard. It's too long, it raises religious issues, and most importantly, it runs contrary to modern C++ programming. For example, it precludes POD (plain old data), and its rules on exceptions range from bad to archaic. Bad: Trying to catch std::bad_alloc turns out to be a very bad idea. Archaic: The Java idea of specifying all exceptions that might be thrown and catching all exceptions thrown by called functions just doesn't work in C++. Much better is to write exception-safe code based on the concepts of David Abrahams's concepts of exception guarantees.
May
13
comment Identify this programming style
I've seen this "align on the equals sign" x in ancient Fortran code. It goes way back.
May
13
revised Identify this programming style
added 1588 characters in body
May
12
answered Identify this programming style
May
6
comment Is it bad practice to use the same name for arguments and members?
@supercat - That would be -Weverything, which is an LLVM (clang, clang++, ...) option. Even the LLVM developers don't recommend that ordinary developers use -Weverything. Too many false positives.
Apr
21
awarded  Custodian
Mar
30
revised Trouble understanding the COCOMO model
added 989 characters in body
Feb
28
answered Trouble understanding the COCOMO model
Feb
8
awarded  Nice Answer
Jan
22
comment Exception handling in a program that needs to run 24/7
If the application needs to run 24/7 there's an infinite loop somewhere and this infinite loop had better be wrapped around some construct that catches all unhandled exceptions. If that's not the case, an unhandled exception will percolate to the already existing catch-all handler that's outside of main, and kaboom! the 24/7 application terminates.
Jan
21
answered When do rounding problems become a real problem? Is the least significant digit being one off really a big deal?
Jan
19
answered What is dispatch? Does it imply dynamic resolution?
Jan
19
comment What is dispatch? Does it imply dynamic resolution?
@miraculixx - C++ does not have multiple dispatch. You have to fake it with some design pattern such as the Visitor Pattern.
Jan
17
comment Extracting data from log files
Why are you worrying about performance first? The first thing to worry about is solving the problem. Only then should you worry about performance, and only if needed. You didn't give us near enough info to help you solve the problem. As far as Python not being parallelizable, see wiki.python.org/moin/ParallelProcessing .