Mysterious Double Instance Hampering Performance - I study the existing code base. Confer with a colleague. Then I determine the optimal plan to change the functionality to load only a slice of all the dat...
This is my practice for C++. Therefore I am using the STL to get more experience with it. Store all substrings in a vector. Write a function to determine if a string has any dup chars using a map. This works for most of the one thousand test cases. But there are a few where LeetCode says my solution took too long.
LOL wut? Some test cases pass in a massive amount of text. I am enumerating all combinations of substrings in there. After I tighten up my code, I guess that my dup detector is just taking too long. Therefore I get rid of the STL map from it. Code is up with straight C arrays. Works fine.
At first I tried to just change my variables from int to long. Nope. Not good enough. Then I tried long long int. Figured they might be testing up to that. Nope. They were dealing with huge numbers. I did not want to implement a big number library. Should not have been a need to copy and paste the code for such a library too.
Then it dawned on me. They were providing the input numbers in a weird linked list format that encouraged the use of big number addition. I did not need to implement the whole big number library. Just needed to be able to add two digits, and determine if there was any carry over to the next place.
These LeetCode problems are tricky. And I have not gotten to a Hard problem yet.
So I created an account. Seems like I could proceed without paying for a developer subscription. I went to problem number one. The site was preconfigured to use C++ as the programming language. Does the site just use that because it is a popular language? Or did it figure out I know C++ from my profile?
Had some trouble getting my first entry to compile. The error messages were a bit cryptic. No trouble. I know how to debug, isolating the faults. Got my code to return the correct result for the sample inputs. Then I submitted my solution.
Was a bit disappointed that, although my solution was accepted, 95% of the other solutions executed faster than mine. Nobody told me we would be graded on speed. Next time I will have to optimize my solution.
There was just a lot of pain helping out here. I got the hostname of the server from the tester. But I could not seem to resolve that hostname. I connected to another server, and it somehow could translate that hostname to an IP address. I logged into the server and found the directory where the job was running from.
I knew what the username of the database account was. So I searched all the files and found one property file that had the username and password. Then I took a while to track down somebody who knew the new password. The weird thing is that we store some sort of encrypted version of the password. How am I supposed to generate that?
Turns out there is a Java program on the server that will encrypt your password. I don't know what algorithm or parameters are used for the encryption. But I don't need to know if I have this program. The password had some weird symbol in it that initially prohibited me from providing the password to the encryption program.
I thought I was home free. Tried to update the property file with the new encrypted password. Nope. The property file was read only for everyone except the owner. And I don't have the password for the owner account. Man. Makes you want to just give up. I told the tester to go get us some help from some system administrators that would have access.
I was assigned a tricky problem to work on. Some of the data was missing in our production environment. Everything seemed to work fine in development and test. Trouble is, I did not have access to the production environment. I got someone to run some queries on my behalf.
The source data was correct. The target tables had records inserted. But they were missing key fields. This was quite the mystery. I had to back up and look at the big picture. Normally this is not needed. But in this case, it was crucial.
We have some main data loaded into some staging tables. Then some processes run after the initial load that collect all the data and stuff it into a couple main tables. Then those main table are copied to the reporting machine. It is here that my jobs run to mine the main tables to update the reporting tables.
Turns out the copy to the reporting machine is delayed every so often. Wouldn’t you know it? My jobs are not actually scheduled to wait until the copying of source data is completed. Usually it happens way before my jobs run. But not always.
The fix is to add in the dependency, and fix all those records that got loaded with blanks. The hard part of this problem was figuring out the source of the problem. Wasn’t really a coding issue. More a timing issue.
Luckily, any time I do work on a ticket, I enter a note in our ticketing system. I had seen all these tickets before. I researched them and determined a level of effort for them. However none of them got scheduled for a release yet. So the work to resolve the tickets has not even started. Of course they are going to fail if someone tests them now.
I reported what I knew about these tickets. Nobody should have been testing them. The manager said he wanted testing to check the actual state of the problems in the system. Fair enough. But these are not failures. They are in a state where the work has not even started.
At least I am not on the testing team. It is no fund to spend your time testing fixes that have not even be done yet. The good news is that the testers should be ready to verify these as soon as there is a fix. Who knows when that will be?
After given the green light, I tried to download the update. Too many people were doing that. So I got put into a queue. I was number 14, and then 13, then 12. This lasted all afternoon and evening. My position in line got updated once a minute.
Then midnight struck. The updates every minute stopped. Apparently the queue could not handle the transition at midnight to the next day. It got confused and thought instead of an update in 1 minute, it would give me an update 21 hours later. Nope.
I killed my download and started again. This time it work. By the next morning, the software packages had downloaded. They asked me if I agreed to uninstall the old versions. I concurred. Then a reboot was required.
I checked my software. Old versions were gone. Next versions nowhere to be seen. I dialed into a huge conference for help. They were of no help. Some other guy on my project noticed my problems and told me to start again from the beginning.
Well I knew to wait until after midnight to start up the download. This time it went by faster. The software got installed. But when I tried to run it and access some code, it complained that it could not connect to the license manager. I will stop here. There was a lot more pain. Basically a fail. And I hear they want to switch to some other software later this year.