Going to Sleep

I got the fun assignment of implementing some object locking mechanisms. That is some good stuff. Me and another developer debated the design. When we were done, I was off to the races to code.

Now the general idea was to check whether there were other locks, and if so, wait a while before checking again. A little while made me think of sleeping and giving up my thread until a certain duration had passed.

My instinct told me to call the sleep() function, passing it the number of milliseconds I wanted to wait. The compiler did not recognize sleep(). Okay. I just need to find the correct header file to include. Was is ? No. that one is only valid for UNIX. I am on Windows XP. Then I figured out the error of my ways. I already included . However that header file has you call Sleep() instead. Notice the capital S.

Now I am unit test the basics of my implementation. My virtual machine is super slow. Perhaps it is time to call it a day (and a week).

Angry Customers

My boss told me to go help out my old team. They were down on resources but were getting a lot of work. These guys were overworked. I protested a bit because I am busy with my new team. However the manager makes the final resource allocation decisions around here.

I wanted to take care of one of their problems that relates to my new team. My manager threw me on a high priority problem their customers were having. I gathered some logs and screen shots. Then I found some problems in the code immediately. My manager set up a conference call with a lot of the customers.

On the call I presented my findings. Then I walked the customer through some of the causes in their production environment. I heard a few things loud and clear in our conversation. The customer repeatedly said that the application behavior was unacceptable. Luckily my manager had prepped me with the info that these customers were livid. I tried to keep my cool. Then I presented some options on how we could fix their problems. Their answer was to just fix the damn thing, and let them know when it was done. Damn.

Developers Locked Up

I got a call from some developers on my old team. The customer was having a problem with the applications. The devs traced it back to some home grown locking code. They were confused about some Pro*C code that executed what looked to be an EXEC SQL AT followed by a table name.

Luckily I had traced through this very code about a year and a half ago. In fact, I blogged about it on my Oracle Development Blog. We did not need to consult my blog. I remembered enough about it to explain it to the boys.

This is a construct in Pro*C to execute a SQL statement under a different database connection (session). One usage of this is to do some SQL and commit the changes without affecting any of the ongoing SQL in your current session. That might be needed for some logging, or in the case of my old dev team, if you want to do your own locking.

Previously I had thought that the lack of such knowledge could be fixed by some training. But one of the devs on my old team had gone through Pro*C study and training. When I explained what the SQL did, he seemed to recall a bit of it. I guess training might help you out sometimes. However there is nothing more valuable than hands-on experience.

Unit Test to the Rescue

I inherited a subsystem to maintain. Made some changes for the next major release. This code is a pain to test. You have to have very specific data to excite all the cases. At first I was manually updating data using SQL commands. However I found it way too tedious.

Luckily I decided to put a bunch of code into a database package that generates test data at will. I spent a lot of time creating that test data generation code. Then I had to debug the test generation code. However now I am benefiting big time.

I had to do a last minute move of some setup data from one script to another. Then I was able to generate unit test data with one call to a stored procedure. Check. Later I removed a bunch of debug code from the main database package. Does the code still work? I used the test generation code to set up some more test data in about a minute. We are good. Now before moving on to the next job, I am going to make this unit test generation program even more flexible. Good stuff.

End of the Pattern Club

I remember a new application our team needed to implement a long time ago. There was a young group of developers eager to do well. They were also led by a young guy. These dudes had a number of ideas about how to solve the problems for the customer. One of their main techniques was the use of design patterns.

Now I am all for using a pattern when the situation calls for it. However these guys were pattern crazy. Everything was going to be implemented as part of a pattern, whether it fit or not. They had a tough time coming up with the need for the singleton pattern. They ended up trying to force it in two places in the application. What a sorry state.

Recently I heard that patterns have become vogue. This is because they have essentially been a failure. Developers really don't know patterns well. Sure they can name a few. But they cannot spot the right place to use one of the many patterns out there. This is a generalization. However I think it holds true. The only reason to know patterns now is to pass an interview where they ask you about some pattern basics.

Tough Job Market

Saying the current job market is tough would be an understatement. People stay unemployed for a long time when they lose their jobs. That makes them desperate for anything. We interviewed a dude that had a lot of experience in the specifics we were looking for. The guy seemed like somebody I wanted on my team. I told my boss point blank that we needed to hire this guy.

Turns out the poor dude was looking for work during the last nine months. How can a guy like that stay unemployed for so long. We got lucky and hired him before anybody else realized that this man would be a producer. In fact I think we did not pay him the going rate. I am concerned that if the economy improves, somebody else will steal him away. Now my recommendation to my boss is to give him the big bump up in compensation during his next review.

This story is not uncommon. I have heard that people with great skills and outstanding resumes are having trouble finding jobs. It does not seem to help even if people provide you with great references. I guess the old school method of getting jobs will work best. Get in contact with the people you know. Have them help you out. It is rough out there. You need every edge you can get. And if you have a job right now, hang on to it. I know I am.