I used the Indiana Jones method

In programming and other things sometimes you get so involved in an elegant way of doing something and it isn’t working out that well, so you just take a gun out and shoot the problem like Indiana Jones did.

That’s what I ended up doing with the hangup with reading lists I wrote up yesterday.

The right solution is what I outlined there. The other right solution is what I did after restoring to a backup I took this morning, basically unwinding all the elegant stuff and and solving the problem in the one place it came up, and to hell with the rest of it.

The problem was I needed the categories for new items I’m adding because I subscribed to a reading list. When it was first added to the database I didn’t take note of them because there was no place to save them.

But the data I need is in the outline, and I know where it is — so I read it for each new user that subscribes, and build a table of categories, and look up in the table when I need the categories the feed is in according to the list.

It adds a small fraction of a second to subscribing to a list. If that ever becomes a problem we can cache it separately.

The problem with the really right solution is that it was too far-reaching, and some of the code that needed to be modified was really tight and carefully written and I made a mistake somewhere in there, and I wasn’t into trying to figure out how it really should work, because it was too freaking hard and I was tired. 😀

Tomorrow I will work on user interfaces. I will drink coffee and be happy and glad to have this behind me.

Category:

Leave a Reply

Discover more from FeedLand Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading