9,896 reputation
1039
bio website
location
age
visits member for 2 years, 6 months
seen Apr 10 at 6:00

Feb
26
answered Fail-fast design
Feb
24
comment Apple eating problem
@PieterB: Consider the Stefan's example. In that the winning strategy is to take the 900 g apple, because it has higher weight than the three remaining combined. It's not necessarily the one who takes the last that wins.
Feb
24
comment Apple eating problem
@Phoshi: It's only the total weight that counts, but the weight has to be combination of weights of the individual apples and the player who gets better combination wins.
Feb
21
comment Why are scientific programming languages so weird?
Nothing of that is weird. It's just different. Because there is no particular reason to choose one syntax over the other except what the specific author of the specific language is used to.
Feb
21
comment Programming conundrum - most efficient path
@JohnR.Strohm: He's getting eaten alive by the complexity. Recursive function asking it's neighbours is clearly a brute-force and O(2^n) is not going to fly even for |V|=100.
Feb
21
answered Building a site with internalization support
Feb
20
revised Is array dependence on previous terms considered recursive?
added 113 characters in body
Feb
20
comment Is array dependence on previous terms considered recursive?
@JörgWMittag: Actually I initially had another version that was recursive, but not tail-recursive, but that would not qualify as bottom-up approach. The accumulator tail-recursive transformation of the loop fits that better. And while editing the note about tail-recursion slipped through the crack.
Feb
20
revised Is array dependence on previous terms considered recursive?
various recursive and non-recursive implementations
Feb
20
revised Is array dependence on previous terms considered recursive?
added 427 characters in body
Feb
20
answered Is array dependence on previous terms considered recursive?
Feb
18
revised Should front-end integration tests make HTTP requests?
added 205 characters in body
Feb
18
revised Should front-end integration tests make HTTP requests?
added 205 characters in body
Feb
18
comment Should front-end integration tests make HTTP requests?
This is the correct place for the question.
Feb
18
answered Should front-end integration tests make HTTP requests?
Feb
14
comment GPL: does one line of GPLed code make program a “derived work”
@BMH: A binary is derived work of the GPL code even if it is unmodified an then GPL applies to all sources that were used to create the binary. The sources themselves are not covered and you can distribute them by themselves under another license, but whenever you distribute binaries, you have to provide the sources under GPL if asked.
Feb
5
comment C API in C++ with RAII, two alternatives to implement error handling (Exceptions)
@jrk: Then simple separate wrappers are probably the best way to go. The user needs to know how to handle the errors and has to not get it wrong by mistake.
Feb
5
answered C API in C++ with RAII, two alternatives to implement error handling (Exceptions)
Feb
5
comment C API in C++ with RAII, two alternatives to implement error handling (Exceptions)
What does the variant without error overload do if the error happens?
Feb
5
comment C API in C++ with RAII, two alternatives to implement error handling (Exceptions)
Careful there with the shared_ptr! If it's a C API, the object it returns was allocated with malloc and therefore must be deleted with free. If you just delete is as shared_ptr does by default, it will explode on some platforms. shared_ptr can get a custom deleter, pass it one that releases using free.