Tuesday, July 29, 2008

Where have I been?

It's been a busy time lately. At work I've been consumed with updating RAD 7. It seems that JSF applications did not work correctly after the upgrade from RAD6 to RAD7. All I have to do is install these few fix packs. Unfortunately, they didn't install correctly and I had to re-install RAD. That has taken 4 days of installing, without being able to work on the code that's most important to this project.

I've also been busy making changes to the Custom IE toolbar. This is a fun task that lets me use C#.Net to make things happen. I have to integrate with some COM components and with the web page that is being viewed. The code is fun and challenging. Since it's not solving the same problem as normal there has been a lot more outside the box type of thinking that I have had to do. I started with the code from "Extending Explorer with Band Objects using .NET and Windows Forms" at Code Project.

My home life has been busy and keeping me from playing online as much as I'd like. I've made July a month of exercise that I have really enjoyed. I'll be switching it up in August to focus more on tech endeavors. It's time for me to start taking my practice tests and earn my Java Certification.

Tuesday, July 15, 2008

Ode to RAD 6

RAD 6, RAD 6. I never liked you.
RAD 6 RAD 6 You were slow and clunky,
RAD 6 RAD 6 Your short cut keys were as hideous as emacs.
RAD 6 RAD 6 Where have you gone, I miss you so.

I installed RAD 7 last week. In general I like it. It's got a few new features that I know of that are nice, but it has some HUGE annoyances.

1. The folder layout changed in the package view. It used to list one package at the deepest level that was common and then expand a tree view for the subpackages. For example. com.mytest.business would be the folder, then under it would be "utilities", "test"

Now, I see com.mytest.business and com.mytest.business.utilities and com.mytest.business.test

RAD 6 had a test server environment that ran locally, it was fast. I loved it. A restart took 4 minutes, and changes to JSPs, Javascript, and CSS were done instantly with just a refresh to the browser. RAD 7 no longer has this test environment, instead I have to use a full server running locally. This manages to somehow take up less hard drive space than RAD 6, but changes are much slower. The server must republish everytime I make a change to those files, which takes 3 and 1/2 to 4 minutes (I've timed it). I accidentally restarted the server today instead of publishing and it took nearly 13 minutes. Developing in RAD 7 for the Portal, or any web page changes has become very tedious. I hope IBM has remedies most of this with RAD 7.1.

Tuesday, July 08, 2008

A bad design with a webservice call.

We noticed at work the other day that a web service seemed to have a strangely high number of hits to it. I started looking into it the logs and found that the same user would hit the web service over and over. I could easily see that it was more than 40 times within the same second. This was curious. The developer who worked on this is not here any longer and nobody was sure why it would need so many hits.

I was off, searching through code trying to find the place where the web service was being pounded and the reason for it.

I found it.

public static string GetInfo()
   ArrayList u = new ArrayList();
   for(int x=1; x<100; x++)
      u = WebServiceCall();
      if(u ==null)
   return u;

If you are like me you looked at this code and went "Huh?"

Sadly though, there is no notation anywhere that states what the original problem was. I doubt that this crazy loop was only put here for the heck of it, something strange was probably happening and this was only part of the debugging method used to find the issue, but it was never removed and it was not documented. I am left with an application that hits the same web service 100 times and ignores the results of the first 99 attempts. This causes tens of thousands of unnecessary hits to the web service daily.

I have two suggestions for you. First, if you ever put something crazy like this into your code, add a comment explaining the craziness. Second, if you are really ignoring the first 99 results, then most likely this is some kind of business decision, you are trying to wait a certain amount of time for something. Put that business logic into the back end where it belongs.