Back to Work
Feb. 23rd, 2026 09:19 pmIt was back to work today. I think I've gotten a bit of coding done, but we'll see what happens when I finish writing the unit tests *and* the guys who are supposed to hook it up to the UI take a run at it.
In other news, I was pinged by one of my fellow programmers today who was playing around with the OLE compound document format that our desktop files are stored in. I showed him the set of Java code that I wrote on top of Apache POI to provide additional support for features that we're using. Then I said, "Watch this."
I bounced into VS Code and fired up Cline and told it to look at these classes in my source base and then write a code snippet that would open up a desktop file and dump out all of the custom settings from the user defined property set. Now this isn't overly hard code to write, but even so, the resulting code was very nice and took advantage of features like try-with-resources and such. I cut the code out and emailed it to my coworker, suggesting that he could put this somewhere that we could get at it. :)
It was, in any case, faster than writing it myself and certainly not bad code.
On a completely different note, if no one is interested in the treadmill, I am going to list it sometime in the next few days as available for free on Nextdoor, which is a pretty good way to get large objects to leave my home. If you *are* interested, let me know.
In other news, I was pinged by one of my fellow programmers today who was playing around with the OLE compound document format that our desktop files are stored in. I showed him the set of Java code that I wrote on top of Apache POI to provide additional support for features that we're using. Then I said, "Watch this."
I bounced into VS Code and fired up Cline and told it to look at these classes in my source base and then write a code snippet that would open up a desktop file and dump out all of the custom settings from the user defined property set. Now this isn't overly hard code to write, but even so, the resulting code was very nice and took advantage of features like try-with-resources and such. I cut the code out and emailed it to my coworker, suggesting that he could put this somewhere that we could get at it. :)
It was, in any case, faster than writing it myself and certainly not bad code.
On a completely different note, if no one is interested in the treadmill, I am going to list it sometime in the next few days as available for free on Nextdoor, which is a pretty good way to get large objects to leave my home. If you *are* interested, let me know.
Learning Experiences
Feb. 18th, 2026 10:09 pmI am working with the code assist AI at work to try to clean up our Gradle scripts. It did a magnificent job of doing so, but managed to delete some instructions from the scripts that we use and that it didn't realize were being used. Oops.
But that's no problem. I'll tell the AI to restore the missing parts from the version that's saved in our Git repository.
If only it hadn't accidentally discarded all of the changes in one of the files when it retrieved the backup copy. Oops again.
So I have the AI remaking the changes that it discarded.
And a new appreciation for knowing when to back up code changes to defend them from the AI.
But that's no problem. I'll tell the AI to restore the missing parts from the version that's saved in our Git repository.
If only it hadn't accidentally discarded all of the changes in one of the files when it retrieved the backup copy. Oops again.
So I have the AI remaking the changes that it discarded.
And a new appreciation for knowing when to back up code changes to defend them from the AI.
Look On These Works and Despair
Feb. 12th, 2026 07:40 pmI am apparently a minor deity of some sort.
It doesn't take much to be one. You just need to read the console output from the build process and then read the documentation for the Gradle build and test processor. Do these things and you can make all *sorts* of things behave properly.
I tossed a thunderbolt as a warning shot tonight. With any luck, it will get the attention of the right people.
It doesn't take much to be one. You just need to read the console output from the build process and then read the documentation for the Gradle build and test processor. Do these things and you can make all *sorts* of things behave properly.
I tossed a thunderbolt as a warning shot tonight. With any luck, it will get the attention of the right people.
Old School
Jan. 28th, 2026 09:41 pmWe have a lot of unit tests that are running fine in the JDeveloper environment that do *not* run in the build environment. This has been a source of a lot of frustration for my co-worker who has been trying to solve the problem so I set out to dig into it today.
The first thing I did was get him to confirm that the build wasn't doing anything acutely stupid, since there are multiple separate build steps that actually rely on each other in a loop. This is an annoying problem (and not correctable in any reasonable way), but you can check through the loop by hand and he did so and determined that my first guess was wrong. Oh, well.
Ok. If you can't use the debugger because the failures are in the Gradle build, you can always go old school. It was time to start modifying the code and putting in debugging statements to drop data to the console. And so I did.
I got the stack trace for the mysterious exception that was shutting down a large number of the failing unit tests and went to stare at the source. Eventually I realized that *someone* (and it may well have been me) had written a particularly stupid little class loader that will load one class in one environment and a different class in another environment -- say, for instance, when you are running your unit test in the build environment. And when the alternate class it is trying to load isn't in the build environment either *and* is the completely wrong class to be loading, well, you've hit the jackpot.
I quickly wrote the missing class to implement the interface, causing every method to throw a NotImplementedException. This was the right choice in this case, because the interface described how to talk to the database and none of the database code is present in this particular part of the build, so you can't get it to run the unit test. And now my Class Not Found exception turned into a NotImplementedException -- and I was already dropping the stack trace out so that I could see that I was attempting to load the access record.
Huh. Now the model that I was working with in this set of unit tests was one that I had initialized by hand and it normally works fine -- until you try loading a feature that requires an access record, which it then tries to load from the database, which is not present. I wrote a class to initialize the access record and tucked it into the model initialization routine and almost *everything* started running correctly.
Happy dance! Except there were still a few (like four) unit tests that were failing for some unknown reason. One of these was working with a tiny grid that I'd initialized in my tiny model. Other things were working correctly with the grid, so why wasn't this one?
I finally wrote a routine to dump the tiny grid to the console and discovered that none of the values that I'd tried to change in the grid were actually getting stored -- with the result that the unit test didn't find the expected values and promptly failed. I managed to find where the error codes were stored and they were all the same code, so I found all of the places that could give me that error code and stuck a debugging statement in, which eventually led me to the point of failure.
I was getting an exception when I tried to parse the input value of "160.1". The exception claimed that the character in the zero position was failing, but when I looked at the exception, I realized that I had cleverly just passed back a zero instead of looking to see which character in the string was the problem. Well, *that's* easily fixed. It's the character in the *third* position. It's the decimal point. Why do I believe that a decimal point is an illegal character? Could it have something to do with localization and assembling the set of valid characters based on the locale's decimal separator?
Yes. Yes, it could.
Gradle not only runs the unit tests in multiple threads, but it *reuses* threads. The LocaleTest switched a thread to the French locale, where the decimal separator is a comma, and didn't switch it back. It does now.
And suddenly, the rest of the unit tests started working. Well, except for one test where the correct files aren't present in the build environment. I commented that particular test back out as a problem for another day.
And then I pulled out all of the spurious debugging code that I'd put in. I kept the grid printing code around though.
You never can tell when you're going to need it. :)
Or to quote one of my songs:
"I want to be old. I want to be wise.
I want to be just a little bit smarter than all those younger guys."
Amazing what you can learn from experience.
The first thing I did was get him to confirm that the build wasn't doing anything acutely stupid, since there are multiple separate build steps that actually rely on each other in a loop. This is an annoying problem (and not correctable in any reasonable way), but you can check through the loop by hand and he did so and determined that my first guess was wrong. Oh, well.
Ok. If you can't use the debugger because the failures are in the Gradle build, you can always go old school. It was time to start modifying the code and putting in debugging statements to drop data to the console. And so I did.
I got the stack trace for the mysterious exception that was shutting down a large number of the failing unit tests and went to stare at the source. Eventually I realized that *someone* (and it may well have been me) had written a particularly stupid little class loader that will load one class in one environment and a different class in another environment -- say, for instance, when you are running your unit test in the build environment. And when the alternate class it is trying to load isn't in the build environment either *and* is the completely wrong class to be loading, well, you've hit the jackpot.
I quickly wrote the missing class to implement the interface, causing every method to throw a NotImplementedException. This was the right choice in this case, because the interface described how to talk to the database and none of the database code is present in this particular part of the build, so you can't get it to run the unit test. And now my Class Not Found exception turned into a NotImplementedException -- and I was already dropping the stack trace out so that I could see that I was attempting to load the access record.
Huh. Now the model that I was working with in this set of unit tests was one that I had initialized by hand and it normally works fine -- until you try loading a feature that requires an access record, which it then tries to load from the database, which is not present. I wrote a class to initialize the access record and tucked it into the model initialization routine and almost *everything* started running correctly.
Happy dance! Except there were still a few (like four) unit tests that were failing for some unknown reason. One of these was working with a tiny grid that I'd initialized in my tiny model. Other things were working correctly with the grid, so why wasn't this one?
I finally wrote a routine to dump the tiny grid to the console and discovered that none of the values that I'd tried to change in the grid were actually getting stored -- with the result that the unit test didn't find the expected values and promptly failed. I managed to find where the error codes were stored and they were all the same code, so I found all of the places that could give me that error code and stuck a debugging statement in, which eventually led me to the point of failure.
I was getting an exception when I tried to parse the input value of "160.1". The exception claimed that the character in the zero position was failing, but when I looked at the exception, I realized that I had cleverly just passed back a zero instead of looking to see which character in the string was the problem. Well, *that's* easily fixed. It's the character in the *third* position. It's the decimal point. Why do I believe that a decimal point is an illegal character? Could it have something to do with localization and assembling the set of valid characters based on the locale's decimal separator?
Yes. Yes, it could.
Gradle not only runs the unit tests in multiple threads, but it *reuses* threads. The LocaleTest switched a thread to the French locale, where the decimal separator is a comma, and didn't switch it back. It does now.
And suddenly, the rest of the unit tests started working. Well, except for one test where the correct files aren't present in the build environment. I commented that particular test back out as a problem for another day.
And then I pulled out all of the spurious debugging code that I'd put in. I kept the grid printing code around though.
You never can tell when you're going to need it. :)
Or to quote one of my songs:
"I want to be old. I want to be wise.
I want to be just a little bit smarter than all those younger guys."
Amazing what you can learn from experience.
We've been running the Fortify app against our source code and the section that I'm responsible for has been pretty clean for the most part. But there was one set of routines (that I did not write) that was being stubbornly difficult in being changed to avoid an unreleased resource leak. I tried one approach (a poor one, as it turned out) that just broke everything in the area, so I backed it out and went after it again.
This time, I refactored the code to avoid the particular construct that causes Fortify to lose its mind as it scans our code. Once I did that, the code still worked, which was good.
And it passed the Fortify scan that just finished.
Yay, me.
This time, I refactored the code to avoid the particular construct that causes Fortify to lose its mind as it scans our code. Once I did that, the code still worked, which was good.
And it passed the Fortify scan that just finished.
Yay, me.
Bits and Pieces
Jun. 17th, 2025 09:59 pmMy annual required training for work is now completed. Yay, me!
I have also fixed all of the bugs that popped up in the scan from the static code analysis tool. Also, yay, me!
And I found the bug in the compile of an older feature branch that was introduced when we mixed the new jar from their project with their fixes for the static code analysis tool with the old branch that doesn't have those fixes yet.
In other news, we decided to make superburger for dinner tonight. I had figured that we would have potato chips with it, but when I was looking for the cranberry pecan chicken salad at Sam's Club to bring back for Gretchen, I found a tub of their loaded potato salad, which includes sour cream, cheddar cheese, and bacon. It is very good.
It is also a three pound tub of this stuff. I foresee a lot of potato salad in the near future.
I have also fixed all of the bugs that popped up in the scan from the static code analysis tool. Also, yay, me!
And I found the bug in the compile of an older feature branch that was introduced when we mixed the new jar from their project with their fixes for the static code analysis tool with the old branch that doesn't have those fixes yet.
In other news, we decided to make superburger for dinner tonight. I had figured that we would have potato chips with it, but when I was looking for the cranberry pecan chicken salad at Sam's Club to bring back for Gretchen, I found a tub of their loaded potato salad, which includes sour cream, cheddar cheese, and bacon. It is very good.
It is also a three pound tub of this stuff. I foresee a lot of potato salad in the near future.
Will It Go Round In Circles?
Jun. 6th, 2025 10:13 pmGretchen spent most of the day driving a long loop to the Loop and back to pick up K after her trip to Ball State for orientation. Like, five hours, which is absurd. She was a bit late getting to the Loop bus station, but the bus was a bit late too, so it sort of averaged out. Meanwhile, it seems like all of the other drivers on the road were intent upon "interesting" maneuvers. But everyone is home safe now.
I spent time looping at work too. Happily, I was able to sort out one problem and characterize another so that someone more familiar with that particular area of the code can do the further sorting that is required.
And then on Monday, I hope to be able to code in a straight line again. :)
I spent time looping at work too. Happily, I was able to sort out one problem and characterize another so that someone more familiar with that particular area of the code can do the further sorting that is required.
And then on Monday, I hope to be able to code in a straight line again. :)
I was talking with one of my co-workers today about how to fix some particularly intractable problems with the build, when I suddenly had the "Eureka!" moment and realized how to simplify things. Better yet, not just how to simplify things for me and my group, but for all the people in my related group of co-workers on the other side of the wall.
It's nice when something like that happens.
And so far, it's testing out ok.
It's nice when something like that happens.
And so far, it's testing out ok.
Not Regressing
Oct. 3rd, 2024 09:35 pmWork is going well lately, although a bit disjointed as I jump between projects. But I think I managed to fix a long-standing problem with some of our cookie handling yesterday (with a lot of help from another of our folks who set up the environment and ran the actual tests). We're still testing to make sure there are no cases that defeat the new code, but it's working in all the cases we've managed to recreate so far. This makes me happy.
Home has been disjointed too, but I managed to sneak down into the basement and complete the final fades on a number of tracks. I still need to go spend some time playing with SpectraLayers, but it's been busy and is going to continue being busy for a bit.
Meanwhile, the Mets beat the Brewers tonight to win that Wild Card series, so three out of the four favorites ended up losing. This gives whole new meanings to the word "favorites". (Yes, I know the favorites lose, but they sure seem to be losing a lot in this small sample size of the last two years.)
Home has been disjointed too, but I managed to sneak down into the basement and complete the final fades on a number of tracks. I still need to go spend some time playing with SpectraLayers, but it's been busy and is going to continue being busy for a bit.
Meanwhile, the Mets beat the Brewers tonight to win that Wild Card series, so three out of the four favorites ended up losing. This gives whole new meanings to the word "favorites". (Yes, I know the favorites lose, but they sure seem to be losing a lot in this small sample size of the last two years.)
Coding the Node
Sep. 6th, 2024 10:23 pmThanks to everyone who stopped by Bandcamp today. I appreciate it!
Meanwhile, back at work, my co-worker and I sat down and coded up some changes that should make the project that we're working on better. Unfortunately, by the time it was built, there was no time to fire up the test environment and see how it works.
Monday! Monday will be a good day for this.
Anticipation...
Meanwhile, back at work, my co-worker and I sat down and coded up some changes that should make the project that we're working on better. Unfortunately, by the time it was built, there was no time to fire up the test environment and see how it works.
Monday! Monday will be a good day for this.
Anticipation...
Win Some, Lose Some
Aug. 22nd, 2024 09:43 pmAfter my mournful look at the Cardinals' season a few days ago, they have proceeded to grab two wins against the Brewers in 24 hours. This doesn't improve their position a whole lot, but it beats the alternatives.
I have a couple of things going here at home that involve filing forms. One worked, the other didn't. Now I need to figure out what it was I did wrong on the bad filing and whether or not it just cost me a noticeable chunk of money.
I have some code at work that looks like it's working, but the wrong thing is happening. So I need to find out why that's going awry. That will be tomorrow's problem at work.
Returning to the good news front, I did a load of laundry this afternoon and the dryer appeared to work correctly. This makes me happy. I am hoping to remain happy with the dryer, but at least I got to test it before the weekend.
And the trash has gone out, which is always a good thing. :)
I have a couple of things going here at home that involve filing forms. One worked, the other didn't. Now I need to figure out what it was I did wrong on the bad filing and whether or not it just cost me a noticeable chunk of money.
I have some code at work that looks like it's working, but the wrong thing is happening. So I need to find out why that's going awry. That will be tomorrow's problem at work.
Returning to the good news front, I did a load of laundry this afternoon and the dryer appeared to work correctly. This makes me happy. I am hoping to remain happy with the dryer, but at least I got to test it before the weekend.
And the trash has gone out, which is always a good thing. :)
Code Smarter, Not Harder
Aug. 2nd, 2024 06:47 pmOne of my co-workers had been working on a project to fix a particular bug, but hadn't made a lot of progress on it. I suggested that I should take it over and do it while he worked on something else, since I have more experience in that neighborhood than he does. He readily agreed.
I showed him some of my interim code and he allowed as to how it was similar to the approach he had taken, but that my code was a little cleaner, because I was more willing to change some things that needed to be changed as part of the fix to knock out things that were going to be weird.
After several hours of effort yesterday and today, I suddenly realized that there was a much simpler way to fix this than the horribly invasive approach I was taking. I went into the base class for the offending group of objects, added a boolean to control an option along with an alternate constructor, and then changed one line of code in that class. And then I went to one of the derived classes and used the alternate constructor to enable the option for that class.
Everything appears to work. And I revised the unit test in the neighborhood and it agrees with me.
I'll do some more testing just to be sure, but I think this particular problem is fixed. :)
It's amazing how easy some things can be once you think about them in the right way.
I showed him some of my interim code and he allowed as to how it was similar to the approach he had taken, but that my code was a little cleaner, because I was more willing to change some things that needed to be changed as part of the fix to knock out things that were going to be weird.
After several hours of effort yesterday and today, I suddenly realized that there was a much simpler way to fix this than the horribly invasive approach I was taking. I went into the base class for the offending group of objects, added a boolean to control an option along with an alternate constructor, and then changed one line of code in that class. And then I went to one of the derived classes and used the alternate constructor to enable the option for that class.
Everything appears to work. And I revised the unit test in the neighborhood and it agrees with me.
I'll do some more testing just to be sure, but I think this particular problem is fixed. :)
It's amazing how easy some things can be once you think about them in the right way.
One of the things I've learned about complex software is that the best way to describe what it does is that it has behaviors. The behaviors of the software are controlled by the rules that are programmed into it.
If you write the rules correctly and the interactions are nice and tight, then your software will be well-behaved. If you write the rules badly -- or, God forbid, fail to initialize parameters for the rules through one or more species of programming errors! -- then the software will be badly behaved and unpredictable.
All of this turns out to be harder to get people to do than you'd think. :)
If you write the rules correctly and the interactions are nice and tight, then your software will be well-behaved. If you write the rules badly -- or, God forbid, fail to initialize parameters for the rules through one or more species of programming errors! -- then the software will be badly behaved and unpredictable.
All of this turns out to be harder to get people to do than you'd think. :)
Various Forms of Brain Damage
Apr. 26th, 2024 10:38 pmIt's been that sort of day.
I spent much of the day at work trying to untangle some of my code that interacts with the Java UI. I have never worked with any of the Java UI code before last week and it is behaving in some extremely mysterious (and sometimes just outright weird) ways. I suspect I will end up sending an email later this weekend begging for an explanation of the weirdness, because I need to sort out the problem and move on. We'll see how that goes.
Meanwhile, I picked up my guitar during a compile and decided to play "The Boxer". My recollection is that playing it in the natural key of G has been causing me to bottom out on the low notes, so I dropped a capo on the neck to move the song up a full step to the key of A.
And then I proceeded to sing the whole song an octave up. Happily, it turned out that I *could* sing the song an octave up, but if I was going to do that, then why did I need the capo?
Brain damage. Clearly brain damage.
I spent much of the day at work trying to untangle some of my code that interacts with the Java UI. I have never worked with any of the Java UI code before last week and it is behaving in some extremely mysterious (and sometimes just outright weird) ways. I suspect I will end up sending an email later this weekend begging for an explanation of the weirdness, because I need to sort out the problem and move on. We'll see how that goes.
Meanwhile, I picked up my guitar during a compile and decided to play "The Boxer". My recollection is that playing it in the natural key of G has been causing me to bottom out on the low notes, so I dropped a capo on the neck to move the song up a full step to the key of A.
And then I proceeded to sing the whole song an octave up. Happily, it turned out that I *could* sing the song an octave up, but if I was going to do that, then why did I need the capo?
Brain damage. Clearly brain damage.