4,542 reputation
922
bio website
location
age
visits member for 3 years, 1 month
seen Dec 21 at 19:28

Dec
18
comment How to Keep Track of Thread Safe Code in a mostly Thread Unsafe Legacy Rich C++ Code Base
the code base is too big to have a uniform standard/policy: on that logic, there's no point writing any policy on any subject for large projects. This is manifestly untrue, so just do it. If some code already has a clear seperation, codify that and improve other code to match. If not, come up with a clear standard and move to it. If you can't update some of the code, document it. The impossibility of achieving perfection isn't a reason to do nothing.
Dec
17
comment Input data type conflict causing infinite loop
The technical cause is you're not checking cin's error state and handling errors appropriately. Take a look at the documentation for basic_ios, especially the methods good, bad, fail and clear.
Dec
10
comment Why isn't software abstract on a grander scale?
When I print something to stdout, and a user complains the output is wrong, I have about 3 things to check: my code, the language's print/formatting interface, and the console/terminal responsible for rendering the output. This isn't trivial, because we still potentially have to consider locales and encodings. If I asked some external system to auto-generate a GUI for me, there's a lot more complexity to dig through (as well as much more scope for a user to complain about colour, typeface, window positioning etc.).
Dec
5
revised Early destruction of objects in c++
more general scope discussion
Dec
5
answered Early destruction of objects in c++
Nov
28
comment Using a global struct with pthreads in C
The answers on SO are at least as good already, but thanks for nudging me.
Nov
27
answered Using a global struct with pthreads in C
Nov
24
awarded  Custodian
Nov
24
reviewed Close When does implementing MVVM not make sense
Nov
24
answered Is seeing loads of merge messages in a git branch standard, or are we working incorrectly?
Nov
17
comment try/catch open/closed principle violation
I don't have time to describe it in detail now (and it's getting close to off-topic anyway), but search for "c++ ad-hoc visitor" or similar and you should find it. Might originally be from Alexandrescu's Modern C++ Design and the Loki library, but I can't check right now.
Nov
17
revised try/catch open/closed principle violation
added 1229 characters in body
Nov
17
answered try/catch open/closed principle violation
Nov
11
revised Should we add constructors to structs
fixed a typo
Nov
10
comment Finding common prefixes for a set of strings
Why must there be only a single level of prefixes?
Nov
6
answered Store an object's name in the object or externally?
Nov
6
comment Store an object's name in the object or externally?
If you only need uniqueness (and the objects are long-lived) you can just log the pointer value of this.
Nov
6
comment Store an object's name in the object or externally?
What are the semantics of these names? Are they just to distinguish different instances of the same class in the log, or do they actually have some meaning in the rest of your program?
Nov
5
comment Holding of files being edited in a text editor
Can you get back to the filename from the inode? You'd effectively have to iterate over all hard links to the inode, and I wasn't aware they were linked that way.
Nov
5
revised Holding of files being edited in a text editor
added 617 characters in body