Practicing on LeetCode

I have been reading the Computer Science Careers subreddit recently. There is a lot of talk about how to prepare for job interviews. Many people mention doing problems on LeetCode. I have never heard of that site. I want to interview for another job. Maybe I should be doing practice problems on there too.

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.

Password Change Causes Troubles

A tester tried to run a data load operation. It failed with some password error. My team mate asked me to help resolve the issue. Apparently somebody changed the password of an account that is used during the load process. Initially I got a hint that the password might be stored in a file somewhere on the server.


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.

Timing is Everything

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.

You're Doing It Wrong

I got on a conference call for our latest software release. The new project manager asked the test team to verify a bunch of tickets. A bunch came out failed and ended in my queue. The manager asked me if I had any insight on these tickets.

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?

Softare Upgrade Rumble

We use some software from the same vendor for issue tracking and source code control. The customer has declared that we will be upgrading to a new version of both of these clients. From past experience, I expected this to take about a week to happen.


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.

Good-fast-cheap. Pick two.

I got invited to a meeting with the customer today. There was a problem in production. And the customer wanted answers. When it came time, I explained what was going on. Our new system used the same data source as the old one. But we were not doing the exact same transform of data. Therefore they saw different values in the reporting system.

I said we could fix this by updating the function that loads the data. We could apply this transform there. We could also write a script to correct all the wrong data loaded so far. Should close the case. The customer understood that. But then they asked if we could be proactive and prevent this type of problems.

Immediately I saw through the request. I said we could take the action to find out other times when the old system does a transform, and make sure we have those transforms present. However no, I could not do anything to make sure everything was being done 100% correctly. This is a huge system with non-trivial software involved. There are bugs in there.

Essentially I responded that no I could not do anything to make the reporting results 100% correct. It is just not feasible. This is an application of the good/fast/cheap management trifecta. They only get to pick 2 of those. The third one will suffer. In our scenario, the schedule is fixed, and the cost is fixed. Therefore you get the quality that you get. No way to increase that without more money or longer schedules.

Trouble with Technical Books

I self-register as a PL/SQL Oracle database developer with my company. So it came as no surprise when I got a targeted email from my company. It highlighted the book Mastering Oracle PL/SQL: Practical Solutions.

This book is ancient. It was published back in 2004. The funny thing is that most of the information is still relevant today. I checked on Amazon. There seems to be an update to the book from 2013. But it is selling used for $800. WTF?

I went through the introduction section of the book. It had me set up auto trace in my Oracle database instance. Also read up on sql trace and using tkprof. Not bad seeing how I have not even made it to Chapter 1 yet.

The only downside is that the book is made available to me through the Books 24x7 web site. My company has some sort of bulk license with them. The web user interface is painful. I had to go through each page. But the pages do not fit on my screen. So there is a lot of scrolling with their custom controls.

I tried to print out a copy of the book. I have the ability to print to a file. Unfortunately the Books 24x7 site intercepts print requests. All I got in the output was a page with copyright information on it. How useless.

So I went through the whole book, copy and pasting the pages into Word documents, one per chapter. Now I can read in my leisure. I could buy myself a copy from Amazon. New ones go for $19. I can also pick up a used copy there for under $8. Could be a good investment.