I'm proud to say I haven't coded any new functionality in the last week. I've been exclusively redesigning and tinkering with old code. The code is looking a lot better, I think, but there are still design problems I don't feel equipped to solve. I have this one case where I can't figure out an elegant way out of a circular definition. I have a sort of abstract factory class Synchronizer which has two subclasses, ResourceSynchronizer and CollectionSynchronizer. As they are separate AMD modules, the subclasses need to import Syncrhonizer in their "define" statements. But then there's no way for Synchronizer to have a getSynchronizer() method that will return an instance of one of the two subclasses. In order to have such a method, it would need to either import the two subclasses in its define statement, completing the circle, or return a Promise to return a subclass, which would make getSynchronizer() undesirably asynchronous.
Another problem I've run into is when I try to separate out a logical chunk from a bloated module and it turns into a seesaw and goes out of control. I'll be happily migrating things and then realize that I've gradually moved everything into the new module. Then I start to wonder if the separation was a good idea in the first place or if the code is just experiencing separation anxiety. On the other hand, the seesawing also doubles as a sifting process; as I move the code back and forth, it seems like it gets cleaner. Maybe if I do it enough, the code will disappear and everything will still work.
I think something's wrong with my tongue. There's a spot on the left side, roughly a centimeter in diameter, that's behaving like it's been severely burned, producing a numb tingly feeling when under the slightest pressure, and hurting when I bite it as hard as I can. I've studied it in a mirror and I think there might be a tiny alien trying to claw its way out. It looks cracked like parched land, and generally unwholesome. Maybe I'm allergic to something. Maybe it's not my tongue at all and it's actually someone foot with athlete's foot.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment