3 ms·
As a programmer in northern California I would much rather NorCal be called NoCal, to be consistent with SoCal. Or change SoCal to SouCal. Pick one or the oth
by dheera 6y ago
As a programmer in northern California I would much rather NorCal be called NoCal, to be consistent with SoCal.
Or change SoCal to SouCal.
Pick one or the other. I hate naming inconsistencies.
How would you like if I wrote code like:
for pixel_x in range(image.width):
for pix_y in range(image.height):
...
- asveikau 6y agoI would say it's better to iterate on y first because line at the time is more sequential access than column at a time. I noticed that before the naming inconsistency.
- dheera 6y agoEh it depends on what you're doing with it. If you're doing some kind of convolution type thing that is going to access a whole lot of nearby pixels in all directions, it doesn't really matter. Also there are times I like to store "images" such that accessing image[x,y] yields (x,y) as if the image were placed in the 1st quadrant, which makes code easier to read and more intuitive. In that case the outer irritation being x-wise and the inner irritation being y-wise is faster. I absolutely hate those irritating image[height-y, x] type bullshit appearing all over my code. If you want readability image[x, y] should be (x,y) with the origin at the lower left as it always is in grade school. (I hate the people who invented matrices for putting 0,0 at the top left and inverting the y-axis.)
- remolacha 6y agoBut when speaking, having phonetic distance between related words helps prevent confusion. In a noisy environment, you can mishear just the first consonant in "NoCal" and get "SoCal". With "NorCal", you have to mishear multiple phonemes. This phonetic distance/information redundancy is built into the NATO phonetic alphabet. It's also one way that linguists explain "chain shifts" in speech sounds.