6 ms·
Worked with a coder who thought the correct return value from a DB with no data was the literal string vallue 'null' and so had tests for != 'null' coded everyw
by ggm 5y ago
Worked with a coder who thought the correct return value from a DB with no data was the literal string vallue 'null' and so had tests for != 'null' coded everywhere, alongside != '' and != None cases.
I totally get it, when you've only ever seen DB responses via the command prompt which promotes null/nil fields to words, without any symbols to show its a textual reference, not the literal DB state.
And yes, we wound up with DB rows having the word 'null' written back into previously nil/null values.