naming is hard

I often have trouble giving meaningful concise names to variables in the programs I write, perhaps because, until I reach for the keyboard, my thinking is largely nonverbal. I suspect that it would be less of a problem for someone more exposed to the accumulated lore of programmer culture; though perhaps not in this case:

I’m thinking of breaking up this process into multiple rounds, to obtain increasing degrees of geometric continuity. The initial nodes would coincide with the input dots but have no defined theta (tangent angle) or kappa (curvature); the first round of replacements determines theta for G¹ continuity, the next round determines kappa (the first derivative of theta) for G² continuity — and subsequent rounds may seek higher degrees of continuity by matching further derivatives.

This means that the node object, instead of exactly two fields called theta and kappa, should have a list of theta and its known derivatives (one more than the current replacement-round needs), and I’m at a loss for a good name for this list.

4 thoughts on “naming is hard

  1. Anton Post author

    The code uses nautical metaphors, so I’m calling the [theta, kappa …] list rudder. Not gonna start with empty rudders as suggested above, but I have found a couple of cases where an incomplete rudder is appropriate:

    The ends of the stroke, not having enough neighbors to define a three-point circle, initially have empty rudders.

    When a proposed replacement arc violates the pixel rule — no, I don’t think I’ll explain that here.


Leave a Reply

Your email address will not be published.