Almost lifelike
Feeling somewhat blue; also tired, sore of back and shoulders, snuffly and badly-digesting. I shall go to bed as soon as I've posted this.
The picnic (with Princess on Sunday) turned out to be a glass of beer and a Wurst in a bun at the Bärenschlößle by sunset, quite pleasant; followed by a falafel and ice cream downtown. Bats were out hunting, fluttering low over the lakes; that was the first time I've seen them this year.
I had a breakthrough on a database issue that had been nagging at me since early January. A customer asked how to delete the demo data that we supply to illustrate how the database works, and I had to admit that there isn't presently any convenient way to do this. The process is in fact very inconvenient, because the interlocking consistency checks (can't do X unless Y has already happened) prevent the user from just zapping the data away. I'd been thinking off and on for several weeks about how to solve this, inventing and discarding increasingly complicated ways of identifying or logging new and old data, but couldn't find a really convincing solution that would be certain to leave untouched any real data that the user had entered during evalution. An extra complication is that the solution must be safe to use on existing databases, whose records obviously would contain none of the clever identification or logging.
The answer occurred to me while I was thinking about something entirely different: the database "knows" when the user installed it, and each record "knows" when it was created. (Proof again of how good my on-the-job training at the Great Big Computer Company was: I did the right thing out of habit, without knowing what use it might be.) By definition any data created before this point was not created by the user. Having realized that, the implementation is easy. This points up one of the great advantages of being self-employed: I could allow myself the luxury of not solving the problem until I knew that I had found the right solution. If I'd been a cubicle dweller, my manager would have pressured me to do something about it long ago; and would have to deal later with the lost-data-equals-unhappy-customer consequences of making a hasty decision.
The downside of this discovery is the realization, the proof positive, that the database has grown too large: I myself cannot keep track of all that's in it. What to do? "Simplify, simplify" as the poet said—but how?
Labels: miscellany, work
0 Comments:
Post a Comment
<< Home