|
|
|
|
|
by janjan
5410 days ago
|
|
I use some kind of Hungarian notation in which I do not describe the type of a variable in its name but instead its unit. Since I do a lot of medical image processing I have to deal with a lot of different coordinate system. For example, one is the "real world" which is measured in mm and one is the image as an array which unit is given in pixel. By appending _pix and _mm to variable you can see that some things are just wrong. For example pos_x = curr_pos_x + diff_pos_x
is not clear, but from pos_x_mm = curr_pos_x_mm + diff_pos_x_pix
it is clear that something is very wrong in this line.edit: I just saw that this is basically what [1] is about. [1] http://www.joelonsoftware.com/articles/Wrong.html |
|