Mapping the circle
I had to solve two problems at work that were unrelated but had one similarity that made them a little more difficult than I had expected.
1. You have 2 time intervals defined as times of day (times without dates). Does one of them contain the other? Do they intersect?
Does [10pm, 8am] contain [12am, 7am]? If they start on the same day – no. But in general, if something is scheduled for [10pm, 8am] and was in progress [12am, 7am] then – yes, it was within the schedule.
I had to write quite a bit of code to handle this stuff (and I’m still writing unit tests which I normally never do!).
2. You have an area on the map. It has the West End and the East End. You would assume that the West End Longitude is always less than the East End Longitude. But it’s not true if the map crosses the 180 degrees longitude line.
All this pain in the head is caused by some stupid property of the circle which I cannot grasp. Usually I can always trace such things back to formal mathematical concepts. But this simple thing puzzles me. It’s not about continuous mapping. It’s rather related to ordering and orientation…
I asked Prof. Wittgenstein was this not profound philosophical stuff….