3 ms·
I still think of null as undefined, which is very different from zero. When you average, for example, nulls are ignored. If you replace null with zero, you get
by mirimir 10y ago
I still think of null as undefined, which is very different from zero. When you average, for example, nulls are ignored. If you replace null with zero, you get incorrect averages.
- TorKlingberg 10y agocolejohnson66 was referring to NULL pointer in C, which you would never average. Are you thinking of NaN values in floating point?
- mirimir 10y agoWell, the parent article isn't about programming per se, but rather how to handle digital-mapping errors. My point is just that setting unknown or malformed values to zero may have unwanted effects. Although it's cute to point people to Null Island, or that farm in Kansas, maybe it's more useful to tell them that there's been an error.