Bill Roper (billroper) wrote,
Bill Roper

The Perils of Positive Thinking

So there's a class that I ported over from C++ to Java two years and a bit ago as part of this project. It works fine when you convert it from C++ and you can use it for a great many things successfully. However, when you try to edit it, the class falls to pieces.

I haven't really touched the class in any significant way in quite some time, so when I looked at it, I was pretty much horrified to find that I had managed to port it in such a way that there was the ported-from-C++ array of children for each member of the class and the Java array of children that was hiding in the new Java-side base class. Only one of these was populated and it was -- naturally -- the ported-from-C++ array, which meant that all manner of bad things are happening when I try to edit the data structures.

I am now in the process of removing the ported-from-C++ array (which I will only use during serialization because I have to be able to get the data back into the C++ side of the world) in favor of the Java-side array. This requires a lot of hand editing of code in this lovely 4300 line class.


Well, at least I've learned something in the past two years.
Tags: computers, java, musings, work

  • Tick, Tick, Tick

    OVFF is coming up quickly. I am gradually trying to finish up all the things that need to be finished up before it arrives on my doorstep -- wait!…

  • Running Behind

    I am running a bit behind on things, but I have hope of catching up. I have one more box of Wail Songs masters that need to be packed up to go to…

  • Did I Mention?

    I now have seven boxes of Quest CDs in my living room. Assuming that I'm at OVFF, they'll be there too. :) (*Some* of them. I am not bringing *all*…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded