billroper: (Default)
I have become extremely fond of Java's enum types, because there are so many things that you can do with them that you can't do with the C++ enum types. I have managed to work around those differences, but it would be so much simpler if I didn't have to.
billroper: (Default)
Sadly, I am not sure *which* one of the suspects in the code was doing the dirty deed. It is possible that the problem was the result of a little conspiracy of errors.

However, I have fixed enough different small problems that the bug has vanished. This is encouraging.

Testing. Testing is my friend.
billroper: (Default)
I am trying to write a new bit of code to make a particular interface work, but the code that I write isn't working (or apparently called) even though it seems to have all of the necessary elements for this particular incantation.

I am annoyed.

I'll try this again tomorrow.
billroper: (Default)
So we've been trying to port our code up from Visual Studio 2010 to Visual Studio 2019 for a bit less than two years now. (I started aiming for Visual Studio 2017, but that eventually became an obsolete target.) Most of the code appeared to be working, but when it was finally tested by our QE team, an intractable bug popped up.

The intractable bug has been sitting there for some obscene length of time. In the last two days, we have spent four hours on a session with the other group in our company that is trying to talk to our code across COM in order to make this work. Today's session didn't manage to solve the problem either.

About ten minutes after the session ended, I went to my machine and fixed the problem by setting one switch in the compile.

My Google-fu is strong, but it really helps when you finally find out what is going wrong in the communications protocols.

*sigh*

We'll see if this fix sticks...
billroper: (Default)
So I've been trying to sort out a problem with one of my calculations and failing. The problem is that the calculation exists in both our C++ and Java code, but there's no UI to vary the inputs on the Java side, so it's really much more convenient to test this on the C++ side. Of course, we have no unit test framework for C++...

I ported all of the utility routines over to the Java side and wrote unit tests for them. Whenever I saw an error in the results on the C++ side, I'd go add another case or three to the Java tests, figure out what was going wrong, patch the Java code, patch the C++ code, and go run another case on the C++ side.

After a couple of cycles of this, everything worked.

*whee*

Boosted

Jul. 21st, 2020 10:32 pm
billroper: (Default)
Having spent a fair amount of time working with Java Maps, I am being inordinately annoyed by the idiosyncrasies of boost::unordered_map.

I'll fix the code tomorrow.
billroper: (Default)
I have almost sorted out the Java to C++ port of some changes that I made to one of my classes. Then I'll proofread it. And then I"ll start testing it.

*whee*
billroper: (Default)
Finished up the Java code for a fix I was making and fired things up so I could see how it was working. Opened up a model to give it a try.

It was *then* that I realized that the UI for this feature has not yet been ported to Java. It's still in C++ only.

Of course, I haven't ported my code to the C++ side yet. And one library that I was using that made it simple to write a particular routine I need doesn't have any C++ equivalent. I can write the necessary code to do what I need done, but it will take a little time to get it right.

So we'll see how this works next week.

*sigh*

It Lives!

Feb. 10th, 2020 06:57 pm
billroper: (Default)
It lives! My Frankenstein's Monster of code lives!

Now, I just need to figure out how to debug it.
billroper: (Default)
I am working on changing the way that we handle renaming of account IDs in our product. This might seem simple, but there are a great many account IDs stored in many, many different records, all of which need to be switched over to use the new system.

And when I finish doing this in Java, I get to do it again in C++.

*sigh*
billroper: (Default)
The smoke test passed today on both sides of the great coding divide (C++ and Java), so I have checked the last of that set of changes in.

This means that I can now start working on the *interesting* part of the project. In fact, I've already started coding up the new set of routines, so I should be able to figure out how they're going to work shortly.

(Yes, I know how they're going to work, but I don't necessarily know what the best *way* for them to work is yet. For example, I have a bunch of data to pass in to one of the methods. After a very brief false start -- just long enough to type the less-useful thing -- I said, "Oh! I should do this with a Map
billroper: (Default)
I have nearly finished a big change to the Java code base. Unfortunately, as I near the end of the process, I realize that I am going to need to make a similar change to the C++ code base.

Sadly, changing the C++ code base is a much more annoying process.

Ah, well.
billroper: (Default)
I spent the afternoon at work today looking at our build process in C++ and figuring out how to build additional resource DLLs in a framework that had been put together by a programmer who departed our group some years ago. Eventually, I managed to sort out a method that seems to work.

Unfortunately, there is -- at the moment -- no place to check this code in for testing.

*sigh*
billroper: (Default)
Well, my new code *almost* works.

Maybe on Monday, I can get it past the "almost" stage.
billroper: (Default)
So I'm working on a project at work where I'm porting some more C++ code to Java. I looked at the original code and said, "Well, let's see if we can streamline that." And I wrote a set of classes to support the behaviors that I wanted and which would generate the XML that I needed that C++ had been handling by writing exquisitely hand-crafted XML.

And I looked at the classes and said, "That could be simpler." And so I refactored the class structure I had written.

And I looked at the classes and said, "That could really be simpler." And I refactored the class structure into a set of Java enums.

It's a lot simpler now. :)
billroper: (Default)
I think I've gotten my current project under control on the Java side.

Now, I just need to port the code back to C++ and get it working there. :)
billroper: (Default)
So, meanwhile, back at work, I think I have gotten the last bugs out of the Java side of what I was working on. Now, I just need to figure out exactly how to port all of the fixes back to C++, where the code is "similar", but not "identical". It's that difference between the two that makes porting so much fun!
billroper: (Default)
We've picked up a highly dimensional client file for testing here and have discovered that the calculations are running a good bit slower than they were in older versions of the product. Part of this is due to the fact that I eliminated a number of direct pointers in favor of map lookups, because I was told that maps would be very, very fast in our Java code. Well, maybe they are faster in Java than they are in C++, but they are still not fast enough in either case, because the calculations are way too slow.

So I've been putting back in various bits of caching in both the C++ and the Java code. With nothing cached, the calculations were taking a minute and 47 seconds. Caching two data items cut the time to 1:25, which was respectable, but still slower than I had in mind.

I have now cached a third bit of interesting data and have cut the calculation time down to 57 seconds.

This is good.

Tomorrow, I'll finish this up and try caching a fourth and final bit of data and we'll see where we end up. :)
billroper: (Default)
I've been cleaning up one of the subsystems in our product (that I did not write) and it is now substantially faster than it was. Aside from the earlier improvements I made in it, I taught it to cache two values that my version of this particular subsystem has cached since it was written. Doing this took the execution time to retrieve and write to a text stream a grid of nearly 700,000 cells from about 35 seconds down to 19 seconds.

There's other code that's running that is still taking way too long too execute, but this particular subsystem is now running much better.
billroper: (Default)
It's back to the optimization grindstone for me after discovering yesterday that one of the optimizations that I put in that seemed to work really well was broken -- which was why it worked so well! I'm having a lot of difficulty improving the rendering performance by optimizing my code further. Of course, I've managed to improve that bit by fixing up not just my code, but some of the rendering code on our side of the fence to the tune of about a 37% improvement. This isn't good enough, but I'm starting to suspect that a good bit of the rendering delay is due to some change on the other side of the fence here. We'll see.

Meanwhile, today's early optimizations have improved the calculation speed by about 11%.

I can do better than that. I still know where the bodies are buried...

Profile

billroper: (Default)
billroper

September 2025

S M T W T F S
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 1617181920
21222324252627
282930    

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 18th, 2025 12:18 am
Powered by Dreamwidth Studios