Archive for August, 2007

Odd little thing about SSH Logins

Friday, August 31st, 2007

This afternoon I was doing a little work in Coda and wanted to try the SSH Terminal access built into it. I checked my login password and tried. No good - invalid password. Now I should have known what the problem was, but I was not thinking about how SSH authenticates if you have key files on the remote end, I was thinking "login, password" - easy. Well... not really.

I tried a few more times, convinced that I had forgotten my password - something I've never done - but this was telling me that there's a first time for everything. I was sure I had it right, but the login failures were telling me that I was wrong. Also, the fact that I use ssh-agent and key files makes it so that I didn't need to login after getting the key files over. So now I was getting desperate.

I started writing a ticket to the HostMonster support and then thought - Hey... why not get to another machine without ssh-agent running and then try to ssh into the box? Of course, when I did this, it asked me for my pass-phrase, and I typed it in. Then I thought: I wonder if it's using the pass-phrase as the password? Bingo.

I had been thinking that the SSH protocol passed the real password even if the key files existed, but it doesn't. If the key files are there, it doesn't care about the password - it cares only about the pass-phrase in the key files. When I went back and tried that in Coda it worked like a champ.

I was so convinced that I had forgotten my password, but I hadn't - I had forgotten how SSH works in the presence of key files. Wow... glad that's cleared up. I won't forget it.

On the Necessity of CSS

Friday, August 31st, 2007

Here's something that I guess I really finally realized today - you really have to have CSS for even the simplest web pages if you want it to look similar on multiple platforms and browsers. Case in point: I love Coda from the Panic crew for it's clean interface and it's ability to really nicely maintain small to medium-sized web sites. I know it's got limits - it's not a Tomcat build system, for instance, but for what it can do, it does it very well. Well... I was initially looking at the features and thought "Yeah, I can use that... and that... but what's this CSS editor? Well... no harm to have it in there."

Silly me.

I was doing a little, and I mean little, page for work - basically re-working it for a new Perl interface from a very complicated PHP/Java page and wanted to add a little color to the tables of data to make them a little easier to read. So I spent a bit of time just dealing with the table tags and the attributes set there. Looked OK to me in Firefox on Linux. I checked it all in, thought myself done, and went on with my day.

Coming back into my cube later in the day I thought - Hmmm... what's it look like in IE? Ah... now we see that I had remembered from the last style changes I had made - it looks crummy in IE when using the table tags. I needed to simply give in and make the style additions to the CSS for the page and get the two platforms, two browsers looking reasonably similar. Not horribly hard, but it means making a change, then hitting the refresh on three browsers on two machines. Not rocket science, but annoying to get it all done right.

Then I flashed back to Coda... Ah... now I see the reason for it's inclusion. Most folks are doing the same thing I was doing for work and they needed to have that - even on the small sites. On most of the small sites I have I haven't cared a lot about the style on the different browsers and platforms, but I can see that this is changing and it's going to become more important as time goes on. Even the simplest pages will need to have CSS written for them to make them look the same on the two browsers. Looks like I need to spend more time looking at CSS. Not exactly what I think of as 'fun', but it's something I can see now is going to be more important for even the simplest pages.

Perl and Binary Protocols

Thursday, August 30th, 2007

Today I wanted to clean up a problem that has been sitting around for a long time. One of my price servers has had C++ and Java clients, but no Perl client. I have been holding off on the Perl client for a while because the API uses binary data for the price structures and I was worried about the complexity of dealing with that in Perl. Wow, was I ever wrong.

I took a similar API that had been written for me, and changed all the aspects of how the requests were sent, and how the data was returned. But once I had the data, I was still at a loss as to how to deal with it effectively. Then I came across pack() and unpack() in my Googling. What an incredible simplification this made for me.

I could simply point the unpack() to the start of the individual components in the fixed-length binary record and it handled all the details for me. Amazing. I was thinking that it was going to take me several iterations to get the byte order right and make sure all the numbers got passed back properly, but in actuality it took me a few minutes to get the first data type going and then a few seconds to do the others. Really quite an incredible feature.

I was then able to re-write a web page which was a PHP page shelling out to a Java program to hit the price server with a simple cgi perl script and it'll run much faster with much less load on the web server. Really outstanding. I am beginning to like Perl. It's got a lot of power that isn't obvious until you start to really exercise it.

Java Plugin for Apache, Anyone?

Wednesday, August 29th, 2007

Here's what I'd love to see: a JVM plugin for Apache, like PHP, for combined Java/HTML/PHP/etc. Think about it - this is what I don't like about using Java on a web server - you have to use Tomcat (or something like it) and then you have to set up the project with the directory structure, build it, restart it or tell it to reload itself. It's a mess. What would be better? I'll tell you, what.

Look at PHP. Not as a language but it's integration with Apache. You can place PHP files in any directory in the web server. Any directory. You can put the static HTML next to PHP - or even both in the same file. Imagine the same with Java. Wouldn't that be nice? There's the Bean Shell for the same kind of thing for CLI environments, but nothing for web pages.

There are J2EE/JBoss fans that will say how easy it is to make a simple web site with JBoss, etc. But I have to laugh at them. Make something like the JSP pages but with the CLASSPATH specified in some config file or as an option in the tag that starts the Java code section of the page. Then you can simply Page.out.println() the HTML you want. Sure, it's not the same as Tapestry, but a lot of the time I don't the complete MVC for a web page. Many times what I want is a simple (and I mean simple) web page that accesses a service/server from within Java. Simply make a connection to a server, get the data, and make a page of it and then quit. Nothing complex. But it's Java.

It's interesting that PHP has the classes, the add-ins, the connections to databases, etc. It's got all that you'd need for simple (and maybe not-so-simple) pages. But you can drop the pages anywhere you want and you can edit and view immediately. No need to rebuild, restart, etc. I wish there was something for Java like PHP.

I don't want to re-write a different version of the Java classes into PHP just for a few simple pages. I can make that happen a lot of different ways - calling out to a Java app is one simple way to do it. Likewise, I don't want to set up a Tomcat/Tapestry instance just to vend a few pages. That's the key - just a few simple pages. No major web app. Just a few pages.

The RockStar Makes More Friction

Wednesday, August 29th, 2007

cubeLifeView.gif

As an update to the RockStar programmer that I've mentioned previously, I've been hearing other folks complaining about him and his desire for change in order to show his worth at the shop. And to an extent I can understand his dilemma - if you're a highly paid developer and you're not changing something then you might begin to wonder if they think they need you - as opposed to a junior developer. And that's the big mistake. It's not about your perception of your value - it's how the business values you. Much of the time they can be out of skew with the business valuing you less than you think, but it's just as bad if the reverse is true.

Bad plays are made by desperate people. If you're feverishly trying to show how valuable you are by instituting change so that you can point to your list of accomplishments at review time then you may actually be making things worse for yourself than doing nothing. Take the guy that's changing code simply because it's not Java 1.5-like. This guy might very well miss a few of the subtleties of the existing code and then the converted code may look like new Java code, but it's not working in the same way as the previous version.

This has happened to our RockStar. He's also gotten a few folks cross with him because he doesn't like the fact that testing is not using JUnit for testing. But that's just a tool, and the real issue is not if you're using that tool, but is proper testing being done. Let's face it - long before Java came along, good testing was being done. So was bad testing and no testing and everything in between. But it seems that RockStar, like so many Java fanboys, believe that if you're not using the standard tools then there's something wrong and it needs to be fixed.

It's sad, and I want to tell him to look at what he's doing, but I know that he's not interested in listening to me. Maybe someday when he gets enough experience in this environment he might see that it's really different than he thought, and maybe he'll ask. But if he does he'll be the exception to the rule as most of the Java fanboys I've known simply write this place off as wrong and get a job where more fanboys work and they get to do it the way they want.

When it’s Not the Thought that Counts

Tuesday, August 28th, 2007

Well... as an interesting follow-up to the Victimization by the Majority I was talking to a few folks, including my boss, about this today. What I came away with was that the way I work - with high expectations for myself, and lesser, though still better-than-average expectations of those around me, was the real issue. It wasn't that I'm a mean person. I don't try to make people feel bad, but by being as intense, and demanding of myself, I create a 'gulf' between what others want to provide and what I think they should.

Most importantly, to me, is the fact that the reason that I expect a lot from myself is that this industry pays exceptionally well. And if a developer is getting six-figures, when their same skills in any other similar industry would be worth 30-50% less, then I think they should realize that the premium they are getting paid is not because of the generosity of the employer, it's because they expect more - and that more is effort.

There are literally hundreds of developers in this market that can do this job. It's not rocket science, after all. The premium we are getting paid is because we are expected to respond at all hours, go the 'extra mile' when needed, and we are expected to make fewer mistakes, write better code, faster, and with more of an eye for the future. They aren't paying more just because they want to... they are really expecting more. I agree with their assessment, and am surprised when I've talked to new developers coming into the shop surprised and slightly offended by the mere idea that they should be available any time of day. What did they think they were getting more money for? Their good looks? Please.

So some times, it's not the thought that counts. It's just the actions. My actions are off-putting and aggressive to many and they don't like it. So be it. There are as many that have come up to me in recent days and said that what I'm doing is the right thing and the others need to grow up and realize that they are in a business, and that business is in the business of making money, and for better or worse, I help them make more money than the whiners. So I guess I'm just going to have to try harder to keep my mouth shut, my opinions to myself, and ask people "Are you really sure you want to know what I think?" before answering their questions. If they say "Yes", then I at least gave them an out, and they can't say I didn't warn them.

Added Simple BKTable Math to BKit

Monday, August 27th, 2007

xcode.jpg

Today I finished up a lot of little things at work... got some hardware re-tasked so that we can decommission some, got a few little things updated, etc. Then this afternoon I spent some time adding in some simple mathematical operations to the BKTable - add, subtract, multiply, divide, transpose, inverse - enough so that I could then add these methods to the BKJEP parser and then tables could model matrices and do some simple linear algebra.

Nothing amazing, I'll agree, but it's nice and it adds a level to the JEP parser that has been missing up to now.

Recalling my GrandMa Beaty

Friday, 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

Thursday, 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

Wednesday, 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.