HackerTrans
TopNewTrendsCommentsPastAskShowJobs

dabitude

no profile record

comments

dabitude
·4 jaar geleden·discuss
In schools, there is a lot of violence and aggressivity. Kids hit, lie, steal, call names, harass. When two kids are fighting, they frequently are both punished even if actually one was only defending themselves and was in the right. Sometimes the whole class is punished for the misbehaving of a few.

We would not accept being treated like this as adults, but yet we have no problems putting our kids through this.
dabitude
·4 jaar geleden·discuss
These are flat_map, flat_set, flat_hash_map, etc ...

See: https://en.cppreference.com/w/cpp/header/flat_map
dabitude
·5 jaar geleden·discuss
I work without exceptions, and the typical solution is to crash the whole program (using assert) if the parameter is invalid. This way you can preserve the invariant.

To avoid crashing, the caller has to validate the parameters before calling the constructor, and handle the invalid parameters at this time rather than in the exception handler, but in the end it's the same.
dabitude
·5 jaar geleden·discuss
You are not allowed to submit a web browser to the app store with your own javascript interpreter.
dabitude
·5 jaar geleden·discuss
Are real numbers uniformly spaced? Or are there clusters?