Exceptions have the same problem as return codes in that you need to be careful to leave things in a consistent state if a function throws an error. RAII can help to some extent in both cases, but doesn't magically…
Copying short non-overlapping chunks of memory is common in a lot of workloads (think manipulation of short strings) and it does happen in tight loops where an overlap check with two additions, two comparisons and two…
I don't really see what your peer did wrong. Sometimes you need to see the actual implementation to understand how different approaches work out. There are definitely plenty of times I've started implementing A, then…
On the other hand, if you skip code review for major or complicated changes, you end up with large chunks of code that only one person understands. Sometimes that works out fine, but other times you don't find out until…
Assuming that people will make mistakes writing code isn't distrust, it's just common sense. If someone is a good developer, I trust their first cut of code will be well thought out. I don't assume that they considered…
I'm sorry, but breadth-first-search is a simple and fundamental algorithm and straightforward to write if you understand the concept and have decent coding skills. You're just visiting a level of the tree at a time:…
Exceptions have the same problem as return codes in that you need to be careful to leave things in a consistent state if a function throws an error. RAII can help to some extent in both cases, but doesn't magically…
Copying short non-overlapping chunks of memory is common in a lot of workloads (think manipulation of short strings) and it does happen in tight loops where an overlap check with two additions, two comparisons and two…
I don't really see what your peer did wrong. Sometimes you need to see the actual implementation to understand how different approaches work out. There are definitely plenty of times I've started implementing A, then…
On the other hand, if you skip code review for major or complicated changes, you end up with large chunks of code that only one person understands. Sometimes that works out fine, but other times you don't find out until…
Assuming that people will make mistakes writing code isn't distrust, it's just common sense. If someone is a good developer, I trust their first cut of code will be well thought out. I don't assume that they considered…
I'm sorry, but breadth-first-search is a simple and fundamental algorithm and straightforward to write if you understand the concept and have decent coding skills. You're just visiting a level of the tree at a time:…