3 ms·
It probably makes me rather pedantic, but if you write about programming style, I expect you to format your code consistently. It's either `if(record == null) {
by troels 8y ago
It probably makes me rather pedantic, but if you write about programming style, I expect you to format your code consistently. It's either `if(record == null) {` or `if (result != null) {`. Make up your mind (I know which one I prefer, but at least be consistent)
- mort96 8y agoI'm not sure if it's that simple. Sometimes, you want to guard your code with an early return, which means `if (x == NULL) return errorvalue;`. However, if the function should handle both cases, I prefer to start with the "happy path", which usually means `if (x != NULL) { happy; } else { handle_sad_case; }`.
- troels 8y agoYeah, I was addressing the inconsistent space between "if" and opening parentheses.