billroper: (Default)
[personal profile] billroper
A while back, in order to improve the general behavior of my code in the Java environment, I changed a place where I was storing hot pointers to store IDs that could be used to look up the hot pointers instead. And the behavior became much better and cleaner.

Today, I realized that the behavior might be cleaner, but any "rename" operation on the objects that were referred to by the IDs was going to fail. See, when you're storing hot pointers, you can just rename the IDs that are internal to the objects that are being pointed to. When you are storing IDs, you have to find all of the objects that are storing the IDs and update them.

Phooey.

The C++ code is now updated; the Java code will follow shortly.

At least I found this myself...

Date: 2016-07-27 01:59 am (UTC)
mdlbear: blue fractal bear with text "since 2002" (Default)
From: [personal profile] mdlbear
The other solution: immutable objects. highly recommended if you're going to be putting objects into hash tables.

Date: 2016-07-27 04:14 am (UTC)
mdlbear: blue fractal bear with text "since 2002" (Default)
From: [personal profile] mdlbear
Yeah; you get stuck with your original design and assumptions.

Heard a great talk on our internal network called "how to write a legacy horror" -- the point being that that's a good thing, because it means that your program has been around long enough, and is still useful enough, for people to be debating about whether it's better to keep maintaining it or to rewrite it.

Date: 2016-07-27 09:46 am (UTC)
madfilkentist: My cat Florestan (gray shorthair) (hex)
From: [personal profile] madfilkentist
Sounds like JHOVE. It's outlived one attempt at a total rewrite, people still use it, and it's still maintained after over a decade. I have the privilege of being its nastiest critic, since I wrote most of the code.

Profile

billroper: (Default)
billroper

July 2025

S M T W T F S
   1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20212223242526
2728293031  

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 20th, 2025 11:13 pm
Powered by Dreamwidth Studios