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

  • Comcast At Work

    So we went to watch some TV that we'd recorded on our Comcast X1 DVR and discovered that -- overnight! -- we had gone from less than 50% full to over…

  • Tired

    I hit the wall late this afternoon. Sleep will follow soon now, but I needed to finish going through the APBA cards for next season. In other news,…

  • It Floats!

    I was discussing some of the intricacies of floating point mathematics with Gretchen over lunch today, which eventually led to her saying, "'Field of…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded