Recalling my GrandMa Beaty

August 24th, 2007

Tomorrow we say good bye to my GrandMa Beaty. My Dad's Mother. She has lived to be 97 years old. 1910... think about it. She's lived through both World Wars - Korea, Vietnam, and the Gulf Wars... she was alive when Orville and Wilbur took to the air and she's seen the creation of the International Space Station... She's seen the creation of television and the boom of cable and satellite distribution of same. Amazing life.

Lots of feeling about GrandMa Beaty... as a kid, it was the Banana Pudding that I remember most about her. She was nice and funny, and things were basically just as fine as could be. Later in life I realized that she could be stubborn, cranky, a real "tough broad". Not bad, but certainly a dimension that a little kid would not understand.

A few years ago, she broke her leg - I'd say it was running with the bulls in Pamplona, but it was probably something very ordinary. Anyway, the bone wasn't jealing right, and so she told the doctors to "...just cut it off." Can you imagine? Wild.

Anyway, she with GrandPa Beaty - gone nearly 40 years now. Sad... happy... amazed. I wonder what people will be saying about me. Given recent issues at work, there are probably plenty that will dance on my grave. But I know it's not all bad... they're just the vocal ones at work now.

Being Victimized by the Majorty

August 23rd, 2007

One of the things I read in a recent article talked about the ability of an unregulated group's majority to punish and even victimize the minority because they have the majority and people like being in power, and the majority is power, and without governance, they are capable of doing nearly anything.

Well, today I was the victim of the group of developers here at the shop. Interestingly enough, not all were the victimizers, in fact, it was their manager (whom I do not report to) that was really the instrument of victimization. But it was the fact that everyone played some interesting part in the episode that surprised me the most.

There were the people that couldn't believe it was happening and didn't day anything to try to regain sanity. There were those that thought that the ultimate goal is to have group harmony, and if it meant the pain of one for the happiness of many, then so be it. There were the vocal attackers and then there was the instrument. Very interesting now that I look back on it a bit.

Needless to say, I was not happy about the situation, nor do I think I'll ever look at these people the same way again. I have no use for people that are not pulling their weight, and while I was content to allow them to be on another project and someone else's problem, it's clear that this cannot continue. What will come of this, I do not know. But of this I am sure. There will be no more incidents when I sit and allow myself to be victimized by these people. That's simply wrong.

The Dumbest Thing I’ve Heard in Months

August 22nd, 2007

Today I was in a meeting with a few folks regarding the disaster/recovery (D/R) plans for one of my systems and two of the guys there said the singularly dumbest thing I've heard in months.

"You need to have a D/R plan for you, Bob."

OK... I understand that they are concerned about me being killed in the disaster that destroys our building by an act of God - because if it's another terrorist attack, the last thing traders are going to be doing on Day 1 is trading from home. The bloody exchanges will be closed, the airlines grounded - just like on Sept. 11. So now they are talking about the possibility that our building is wiped out by Nature and it's not big enough to really shut down markets. But I'm dead. Because if I can get to a phone, you can bet there are lots of people that are going to be looking to get ahold of me. I get calls in the middle of the night now... they are going to call me if the building burns to the ground.

Just so we have a picture of the level of risk involved.

So for this eventuality that I and not the rest of this place are killed - let's face it, if this entire place is killed, what's the worry? We're not trading because we're dead! So let's say they all survive and I die. Sad, but possible. They want me to plan D/R for me!

I got a brainstorm... how about YOU GUYS do that. How about you guys figure you how valuable I am and put in D/R 'resources' (in this case people and not hardware) and have them 'ready to deploy' (trained) so that should I 'go down' (die), there's a bloody backup. I was stunned. Amazed at their attitude and stunned. Face it guys... if I'm dead I - by definition - don't give a crap about this place any more.

Think about it before you say something so incredibly dumb next time.

Java’s Threading Tools

August 21st, 2007

There is a lot to like about the threading model in Java. It's easy to make threads, it's decently fast, and it's stable. One thing that I wished they'd put into the JVM - or at least into javac like all the other 1.5/1.6 compiler 'hacks', is the idea that synchronization on a setter can be controlled by the instance variable itself. What I'm asking for is an automatic way to have javac create thread-safe setters and getters by simply naming the ivar.

The most obvious way of making a thread-safe setter is this:


    /**
     * This is the standard setter for the temperature
     * of this instance.
     */
    public synchronized void setTemp(double aTemp)
    {
        _temp = aTemp;
    }

but the downside is that this means that if this instance is in a highly threaded environment, or there are other methods that take a significant amount of time to process, the ability to 'set' the temperature is dependent on the other synchronized methods on this class.

Sure, you can make an object to lock on and it might look like this:


    private     double      _temp = 0;
    private     String      _tempLock = "TempLock";
    
    /**
     * This is the setter for the temperature uses an
     * additional ivar - a String, to protect multiple
     * threads changing the value at once.
     */
    public void setTemp(double aTemp)
    {
        synchronized (_tempLock) {
            _temp = aTemp;
        }
    }

but then you have all these extra ivars that you have no real need for and no need to really put into the setter other than as a thread-safety mechanism.

Some will argue that if I had used a Double and not a double I could synchronize on the ivar itself. But it's not really safe doing that. You'd have to be careful of the null value and then what if you changed the reference within the synchronized block - you'd no longer be protected. No, there needs to be the ivar itself - allowing null, and then some mechanism to ensure thread safety on a more finer-grained level than locking the entire instance.

They need to have something that does the obvious things for an ivar of a given type. You want to save typing? Make something like this:


    /**
     * These create the setter and getter for the ivar
     * '_temp' because the need to lock is implied
     * on the setter and typically unnecessary on the
     * getter (unless it's a long).
     */
    public threadsafe setTemp(double aTemp) : private double _temp;
    public threadsafe getTemp() : private double _temp;
    
    /**
     * These versions would create 'protected' versions
     * of the getter and setter methods.
     */
    protected threadsafe setTemp(double aTemp) : private _temp;
    protected threadsafe getTemp() : private _temp;

    /**
     * This creates both setter and getter for the ivar
     * '_temp' because the structure to create the two
     * is clear from this information alone.
     */
    public threadsafe accessors Temp : private double _temp;

The information to build the code for the setter and getter is clearly specified in the above examples. In the first set, the ivar _temp is clearly private, a double and the names of the methods to build are clear. There's even the argument type - which is really redundant, if you think about it.

A possibly even simpler solution would be to combine the definition of the ivar and the scope of the setter and getter in one statement - like the last example. That way, you would know the ivar's name, type, scope, and then the scope of the setter and getter. You could even allow one to use a PropertyChange system with listener registration, etc. This is not that hard, and I've used it in tons of classes. The clutter it'd save would be far far more than the collapsed for-loop.

Anyway, today I did a lot of the 'mutex' variables because I needed to remove as many synchronized methods as possible on a class I was working with. Virtually every one of them was a setter, and it was annoying to think that they made a goofy collapsed for-loop in 1.5, but they left this little nugget out.

Amazing. I think it shows to me that defensive programming is not heavily exercised by the Java Developers. Otherwise, they too, would be sick of making thread-safe but not lock greedy accessor methods.

Finally a Web Page for frosty

August 21st, 2007

I finally got around to putting up a very simple web face to frosty, my iMac G4 that used to be my Mom's until the hard drive died and I got her a new 15" MacBook Pro as a replacement. It's nothing fancy, in fact, it's pretty much the same web site I put up for all my machines. It's clean, simple, and just enough to look decent.

Ah... that feels better.

Working at the Speed of Mistakes

August 20th, 2007

Normally, I like the fast-paced environment that I work in, but every now and then it becomes clear to me that there's someone asleep at the wheel. Meaning, they are so focused on the next six weeks (for instance) that they forget to look past that and realize that as soon as this short-term thing is done, it's not going to stop the problem, it'll only make it worse. Take 24hr processing.

If we have one system that's 24hr, then they're going to say "Hey, nice, but we can't blank, and we have to be able to do that!" So solving one problem by making it available 24hrs is not really solving anything - it's causing the next thing to become the 'problem'. Then, when they have that second thing, the users will say "Yeah, that's better, but what we want is blank." and it'll continue until everything runs 24hrs a day and had they just stopped and realized that in the beginning, then we could have saved a lot of time and trouble by designing the solution that will make everything work that way.

Trying to do this piecemeal is not the answer. Everyone involved would agree if they stepped back enough to look at the issues really driving these decisions. But they won't. It's enough to say "They asked for x, we'll give them x." and then move on.

So it's going to be a messy year as more band-aids are applied to systems that don't really need them if the systems driving them were working 24hrs, and they'll eventually have to because the users will pick them off one by one until they have them all running that way. But they won't fess up that's what they want, so it's band-aids.

Yeah... it's going to be ugly for a while.

SSHKeychain Goes to 0.8.1

August 20th, 2007

One of the things that I've wished I had was a good version of SSHKeychain. The problem with the 0.7.1 version (aside from being PPC-only) was that it didn't allow for X11Forwarding and I use that a lot on the connections to my unix boxes. Interestingly enough, it's not just the graphical apps - Vim checks to see if you have X11Forwarding on and if not, then it complains a bit. A hassle, yes, but so easy to include when you can configure your ~/.ssh/config file to suite your needs and hosts.

So I got the 0.8.1 version and I sent off the question about the X11Forwarding to the author to see if it's there now, or if not, can it be? I'm guessing that it's likely that since he doesn't use it, it's not in there. But maybe he'll take my suggestion and put it in there. If that were the case, then I'd gladly drop my scripts to start ssh-agent and stop messing with that. It's a hassle and I'm worried that Leopard will break it again. Hard to tell. But it's great that he's back at the coding on SSHKeychain... maybe I'll get what I need yet.

UPDATE: I read this off Daring Fireball this morning about SSHKeychain. Seems there's a new developer on the project and he's a little more security conscious and the setuid on the tunnel app and the way the SSH pass phrase is stored in the KeyChain is not very secure at this time. He's hoping to change that, and the work-arounds are reasonable for the tunneling - which I don't do, but the suggestion for the pass phrase is to not put it in the KeyChain - which defeats the purpose of the app, in my opinion. There's still the outstanding issue of the missing X11Forwarding which I need to have. He sounds like he's going to get to these things, but it'll be a few releases before I can stop using ssh-agent.

FreeTDS and jTDS

August 17th, 2007

Back in late 1999 I was doing a little work at First Chicago NBD (BankOne) on linux as the development platform of the future. I had made a position as the Head of the Technical Architecture Group in Capital Markets that Java/CORBA/Sybase with a bean server like Jaguar CTS would be the way to create apps in the future. In order to prove my point, I got a nicely powerful box (at the time) and started doing some work for a project in the commercial card services division. What I found was that there were a few things that needed to be done in order for the linux desktop to fit into the Bank's infrastructure easily.

Most things worked pretty well right away. Email, at the time, was SMTP/POP3 so that wasn't a problem... the only biggies were source code repository and database access. We were using Microsoft Visual SourceSafe, and there turned out to be SourceOffSite that runs on linux and accesses the Visual SourceSafe repository just fine. The final step was access to Sybase at the C library level.

FreeTDS was a great open-source project that did most of the TDS spec for Sybase and SQL Server. It wasn't 100%, but it was all that was necessary to get the job done, and that meant that I could get access to the Sybase databases from my linux box. I used it and didn't have to look back. With it, I was able to build SQSH, and the access from apps was pretty simple.

Fast-forward to this morning and I was talking to a friend about something completly unrelated and another guy stopped by asking about the JDBC URL for jTDS.

"jTDS?" I asked.

"Yeah, it's a JDBC driver based on the TDS protocol for Sybase - by the guys that wrote FreeTDS"

Wow! I talked to him about my previous experience and we laughed about how things come around again (and again). Turns out, in his tests, and he's not alone, jTDS outperformed Sybase jConnect by a factor of better than 2! That's impressive. So, after I was done with the updates we were talking about, I went back to my cube and got jTDS and tried it. There were a few little changes to my code - mostly because the URL is different and I wanted to make it optional to use jConnect or jTDS. But in about 15 mins. I had something working and the tests looked great. Amazing.

Highly recommended.

DataGraph Update, Registration, and Request

August 16th, 2007

Today I noticed that DataGraph had gone to version 1.4 and there was a new forums site. So I decided to register a version, get the Framework, and request the features that I've wanted to have for a long time: contour and heat graphs. 2D graphs, but based on 3D data. These would be the types of graphs that I really want to put into my Potentials code that I started building a long time ago. The simplicity and design of DataGraph is really quite amazing. While it's not exactly what I would have done, it's certainly a new and interesting take on the data plotting application and it's got everything that you could ask for in 2D plotting - save these two graph types.

Certainly, something like VantagePoint would be great, but that's Java, and it's $25,000 for a license. Additionally, there's no application with VantagePoint - you have to code up everything yourself. Now, I've gotten pretty good at using VantagePoint, but still... it's not the easiest thing for creating new plot types as you have to build an entire testing framework to see if you have the parameters set right for the graph you want. It's got great documentation, but still... to have an application would be a plus.

That's what I was hoping for with DataGraph. We'll see if he's interested in making DataGraph Plus and charging $200 or so - making it fall between the $30 DataGraph and the $1200 DataTank. While DataTank would be nice, I'm just not doing that much visualization to justify the cost. It'd be nice to be able to make a few big improvements in the output visualization of the fields. That would be a lot of fun.

What Kind of Weird Universe is This?

August 16th, 2007

I had an almost surreal experience this morning. To set the stage a bit, I know that good developers are seemingly harder and harder to find. It's been tough given the list of folks we've been interviewing. Now layer on the Rock Star I've talked about in the past and you have to wonder what can really be done about this?

So here's what happened...

I got a chat from Rock Star about the possible values for a field from a data provider we use for Market Data that is pretty much known for it's lack of documentation in the industry. I've worked with this provider for several years, and the people you deal with are nice, and want to help, but the documentation you get is just very bad. No two ways about it. But given that, you learn that the best way to find out what a field is, is to call it with known (expected) output values and see over the course of a few dozen tests if it's what you think it is. If it looks like you're on the money, then you set up bigger tests, and if it holds, you can assume that it's what you thought it was. It's not efficient, it's not even fun, but when you have little documentation and a phone call to the provider yields "I dunno... have you tried it?", you learn that it's better to figure some things out on your own.

But not for the Rock Star, oh no...

"Where's the documentation for these fields? What are the valid return values?" he asks.

"Here's what we have, and that's all there is." I reply.

"That's unacceptable."

OK, that may not be what you want, but you'll accept it because that's all there is. It is, by definition, acceptable, because that's all they are going to give up. I had to actually laugh at Rock Star and ask him Who do you think you are?

I ask him if he's tried the field on a few instruments to see what he gets back - explaining that this is exactly what I've had to do in the past for anyone that needed to know what was what through this API.

"That's unacceptable."

I can't believe this guy. I'm giving him the way to answer his own question and he's refusing to do it because he thinks there has to be a better solution. I get a little upset and simply tell him I'll talk to the provider and see what they say, but that's it. He starts to say more and I simply answer with "Stop talking and walk away." I was getting upset, and didn't want to get to the point that I'd be unprofessional with this guy even though he was clearly being unprofessional in his refusal to even try the approach I suggested.

So I have to wonder - Is this what my beloved industry has come to? Are we to the point that prima donnas, Rock Stars, are the best we can get if you want someone with any real experience? What's happened to all the people that are good at their job, not interested in using new technologies simply for the sake of padding their resume, and are willing to hunker down and solve the problems as they present themselves - not giving in and working with what's available? Are they all gone? Or are they just so well established in their current positions that the only real turn-over is the remainder?

I don't know, but I certainly need to be smarter about cutting off Rock Star when the conversation degenerates to what it was this morning. It's not helpful for anyone. If he's upset with the answers I give him, I'm going to have to tell him to take it to Management. If they back Rock Star, then so be it. But I think I can make a convincing case that me experience in these providers trumps his silly little assertions of unacceptability.