5,029 reputation
724
bio website
location Netherlands
age 41
visits member for 4 years, 6 months
seen 3 hours ago

May
21
comment When NOT to use virtual destructors?
@Yakk: Obviously you can't have a recursive function in such a system. More importantly, the function type now depends on the implementation and not just the signature. How would you define pointers to functions?
May
21
comment When NOT to use virtual destructors?
It's also nonsense that dynamic memory cannot be used in hard real-time systems. It's fairly trivial to prove that a preconfigured heap with fixed allocation sizes and an allocation bitmap will either allocate memory or return an out-of-memory condition in the time it takes to scan that bitmap.
May
4
comment Should we define types for everything?
"strings often become the 'universal' data type" - that's the origin of the tongue-in-cheek "stringly typed languages" moniker.
May
4
comment Should we define types for everything?
I'm not sure where the idea comes from that C++ has an overhead on types. With C++11, none of the compiler makers saw a problem in giving each lambda its own unique type. But TBH you can't really expect to find a lot of insight in a comment about the "C/C++ type system" as if the two share a type system.
Apr
29
comment Should I validate a method call's return value even if I know that the method can't return bad input?
Why are you focusing on just one problem (Null)? It's probably equally problematic if the name is "" (not null but the empty string) or "N/A". Either you can trust the result, or you have to be appropriately paranoid.
Apr
16
comment Is directly using Make considered obsolete?
@MilesRout: Of course I know that most C compilers have an option to parse dependency info for make. That's not my point. My point is that in hindsight, a better design would have been possible.
Apr
15
comment Is directly using Make considered obsolete?
@MilesRout: The awkward and messy part is the graph construction. The traversal is elegant enough. But just take the single most common example of the messy part: C header files. Each #include is an edge, but make cannot parse C files. Still not a problem, because make could store these edges with the next node (the *.o file), but it doesn't do that either.
Apr
15
answered How can I Identify which condition satisfied the if statement?
Apr
10
comment Why server-side repository merge is a terrible idea in git?
@gbjbaanb: Note that this really is a git design fault. It introduces an artificial global state of the database, which means every change needs to be serialized in relation to all other changes. By manually breaking up the repository, you work around this global synchronization. but this is the 21st century, we shouldn't be needing such workarounds anymore. That said, the Facebook solution is a hack. The proper fix would inside git, where it's possible to find dependencies within the pipeline
Mar
31
comment Does path coverage guarantee finding all bugs?
@PaŭloEbermann: Intentional or not, if an exception path exists then that's a path which has to be considered in determining the % path coverage. That points at another problem: path coverage tools should only account reachable paths, and those are generally state-dependent. If you have code like if(a) pre(); foo(); if (a) post(); you cannot trivially prove whether a changes in foo and thus which paths are reachable.
Mar
31
comment Does path coverage guarantee finding all bugs?
@PaŭloEbermann: Exceptions are a code path. If the code could throw but with certain test data doesn't throw, the test does not achieve 100% path coverage. This isn't specific to exceptions as an error-handling mechanism. Visual Basic's ON ERROR GOTO is also a path, as is C's if(errno).
Mar
16
comment Is there accepted decimal-based Unicode notation for technical audiences?
Well, how many bases would you need for feature completeness? There's one canonical base, and that's hex.
Mar
16
comment Is there accepted decimal-based Unicode notation for technical audiences?
@Ehryk: You can write wchar_t(123) when you mean U+007B. But that's a single character, not part of a string.
Mar
16
comment Using scoped enums for bit flags in C++
The ISO C++ committee found option 1 important enough to explicitly state that the value range of enums includes all binary combinations of flags. (This predates C++03) So there's an objective approval of this somewhat subjective question.
Mar
16
answered Data padding for different hardware support?
Mar
11
comment How would you design a user database with custom fields
@Andy: Guess what? The situation will be even more unmaintainable if you mix a thousand different schemes into a single table ! And yes, you probably do need custom code for custom fields. Again that is simpler, not harder, if each customer has a clean, separate table. Trying to pick company X's fields from a thousand others is a bloody mess.
Mar
11
answered How would you design a user database with custom fields
Mar
11
comment Can neural network discover rng patterns
This answer seems to mix seed, state and outcome of a RNG. In general, the initial state is a function of the seed, state evolves by repeatedly applying a function to it, and the outcome is determined by yet another function to the state. In a good RNG, the state space is a lot larger than the output domain, so one output can be the result of many different states. In turn that means you can't predict the state nor the next outcome from a single outcome.
Mar
10
comment Why is there only code review?
When I worked at Lucent, I think we had 4 level of reviews in our department alone: Requirements, High-level Design, Low Level Design, and Implementation. Business probably had more than one layer of reviews as well.
Mar
10
comment The dream of declarative programming
Just define the language itself declaratively: Language(L) is defined by L in programming languages && declarative(L).