Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
aavz
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
aavz
10y ago
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 enforce that your cl
2.
▲
by
aavz
10y ago
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 branches is a comparab
3.
▲
by
aavz
10y ago
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 realised it d
4.
▲
by
aavz
10y ago
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 too late that t
5.
▲
by
aavz
10y ago
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 all co
6.
▲
by
aavz
10y ago
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: stick each lev