Author Archive

Spring and Jython — what a combo!

Dec 12th, 2007No Comments

I’ve been thinking off and on for a few month that using Spring inside of Jython would be a magical thing. You could just get a Spring ApplicationContext, call “getBean” and Jython (who doesn’t care what kind of object it is) would happily go on it’s way.  No importing a ton of object — just magic.  Surely it’s not that easy.

Well, this weeks I finally got an opportunity to do so. I’m working on a Spring-based application and I needed to write a script to setup some test data for my stuff.  So I broke Jython out and away I went.  But was it that easy?  Why yes — that was all I had to do! 

Of course, this isn’t Jython-centric.  Any of the JVM-based dynamic languages would have this.  Groovy, JRuby, Beanshell . . .

I’m sure others have already done this before, but I think it’s really cool.

Powered by ScribeFire.

I chose Google Desktop, and dumped Spotlight and Quicksilver

Dec 10th, 2007No Comments

Okay, you read the subject, here is what I was thinking:

1. Spotlight is sloowww. At least for me.
2. I only use QuickSilver to launch apps. It does lots of other cool things but, overall, I personally only use it for launching apps.
3. Quicksilver takes a long time to appear. And crashes randomly. For no reason and/or warning.

I read about a new Google Desktop for Mac and decided to give it a shot. [I watched the video](http://desktop.google.com/mac/) and decided to give it a shot.

The install was nice and the results were nicer. Quick to come up, and quicker to find my applications and documents. So I [disabled Spotlight](http://aplawrence.com/foo-mac/remove-spotlight.html) and things were running faster. When I dragged Quicksilver to the trash, I felt a bit liberated.

Does this mean I’m a Mac weenie? Perhaps. But I have immense respect for a machine I can configure and run *my way*.

And, when I upgrade to Leopard (which will not be for a while) than I may re-enable Spotlight since [it seems to work better there.](http://aplawrence.com/MacOSX/leopard_spotlight.htm) But now, in my Tiger world, I’m on Google Desktop

How ’bout we . . .

Dec 8th, 2007No Comments

I wasn’t looking forward to shoveling the snow on Thursday night. It was already cold and dark when I got home, so that didn’t help. I was with alone with Leah, because Gina was working. I knew that Leah would want to “help” — which means that the job would take even longer. I was willing to wait until Gina got back from work but then I remembered that I had an errand to run at about 8:30. So I sighed and said, “Leah, I’m going out to scoop snow.”

And then she said the inevitable “I want to help!”

So we spent ten minutes trying to get dressed and then we got to the garage. We don’t really have a snow shovel that is a good size for Leah. And I couldn’t find Leah’s garden shovel, so I gave her my garden shovel — I figured she would probably get as much scooped with that than with her shovel.

And then we set out to tackle the driveway. I was doing fine with my shovel but Leah, as expected, was struggling with hers. I heard her say, “How ’bout we trade shovels?”

“No, Leah, this is Dad’s shovel.”

“Um, how ’bout I use your shovel and you use mine?”

About two minutes of this and I finally relented. She found that using my snow shovel wasn’t any easier. I finally got her to trade me back.

Again she said, “How ’bout I . . .” And I waited for it.

“jump in your snow pile.”

I said, “That would be fine.” And my frustration turned into delight as I saw Leah jump feet-first into the snowbank, squealing with delight.

Soon Leah found her sled in the garage and I helped her get it out and she slid down the hill by our driveway while I finished shoveling, and a lot of burden of shoveling was lifted.

The Gatekeeper War

Dec 7th, 2007No Comments

I was brought in on a new project last month.  Well, it was anew project for me — a couple of people had already been gathering requirements for four months and then spent three weeks writing some code (one “sprint”, in the terms of Agile Development).  One person is even the lead — they have met with the users to understand the business problems we are trying to solve and how they want to fix it. We will call that person the Gatekeeper, because they hold the only way into the requirements for this project.

When I got started on this project, I had thought that the requirements were known and all I had to do was read them.  Then maybe have a few meetings, and the get the two other developers input on a few simple matters.  But, boy, was I wrong.  You see, the Gatekeeper doesn’t want to share the way into the gate — they want to keep it only for themselves.  Which makes it hard when you are new and need to be productive right away.

I should have been warned when one of my first assignments was to make a process out of our BPM software.  I asked the Gatekeeper if they had the document of what this process was supposed to do.  They looked at me incredulously — “That’s for you to define!”  Oh, great. So you have been talking to customers and subject matter experts for months and now I’m expected to talk to them, too?  And do you think I even got a list of people to talk to?  No!!

So, instead of working on BPM, I did some coding.  And I had to pry around for the business rules for that, too.  I got little snippets here and there and formed some idea of what I was supposed to do. And then I’d ask a simple question and then get a long spiel back that not only answered my question, but also caused me to ask many more. It seems that the Gatekeeper is only interested in giving as little information as possible as to look smarter. Or to be the One Source of All Knowledge.  It’s crap, of course — we’re a team and if the project fails, we all fail.  If it succeeds it’s because we all worked together — not because one person had all the information and doled it out when they saw fit.

In the midst of the coding, I put pressure on to get a Visio of the business process I needed to make.  I told them I need a node-to-node relationship, but a general idea on things should work. And I got a four-page print out of the process in all possible states. On closer inspection, though, there are sections of “TBD”.  Okay, fine, I’ll ignore those until the Gatekeeper determines to share that knowledge.

Then, finally, I have a code review on my coding task. Ever had a code review where there is a greedy Gatekeeper?  It’s ain’t pretty.  The Gatekeeper gleefully informed me on what I was doing wrong and I shot back, “How was I supposed to know?”  At one point, the Gatekeeper asked, “Why did you do that?”  I retorted, “Because you told me to.” and gave them the day we talked about it.  The response: “Well, I misunderstood you.”  Therefore, I came out of the code review feeling like an idiot but I consoled myself that it’s the Gatekeeper’s game. They want to feel like they are in charge and will only give out the requirements when they feel it is necessary.  Well, that is a game I can’t just simply sit quietly and play along.

We have a wiki where we are supposed to put our technical documents, etc.  And the Gatekeeper ignores it’s very existence.  So I sent out one plea to say, “Let’s try to put our docs on the wiki, then everyone can know this.”  I got a lame email back from the Gatekeeper, saying that they used to but suddenly stopped for one reason or another.  But I didn’t send that email out expecting change — I sent it out as a warning shot.

Now, whenever the Gatekeeper sends out their long email filled with business rules, I copy-and-paste it into the wiki. I then do a Reply To All and say “I copied-and-pasted this email into the wiki at . . .” and give the address.  Nope, it’s not subtle and it’s not meant to be. It’s meant to send a strong message that says “We are supposed to share this information with the whole team.” Instead of complaining about the lack of information, I’m putting whatever I get from the Gatekeeper (and anyone else) on the wiki and let them know that I did it. It’s a bold move and makes me stand out.  But, dang it!  It makes no sense in keeping all the information closed off to the people who need it

So will I win the war with the Gatekeeper?  I don’t know and I’m not sure that I care.  What I’m really trying to do is to make sure that the project succeeds.  And that won’t happen if one person has closed off all the information.  If the Gatekeeper gets all the credit, that’s fine.  But who’s name will be on the wiki pages saying that the wrote those documents?  Mine — not theirs.

Powered by ScribeFire.

JDEEand Emacs

Dec 6th, 2007No Comments

I use Eclipse for my daily Java Coding.  It’s nice — it takes a lot of the stupid Java crap away from you and does it for you.  Or, at the very least, offer you it’s help in that regard.

This week I’ve been using our corporate-approved BPM solution.  It supports putting Java code into it (in which I call our real logic).  But their editor is, uh, lacking.  The only thing that makes it better than Notepad is that it has syntax coloring. But I’m not even sure it’s better than Notepad.

Luckily, you can specify your own editor and, if you know me, that editor is Emacs.  It was simple to point it to “gnuclient” so a new Java file will open up in my same Emacs window.

Emacs doesn’t have some of the nice features Eclipse has, like auto-assist, code templates, etc. Oh wait! It can!  It’s called JDEE and setting it up is not for the faint of heart, but worth the effort.

To start with, I’d use the install script — that will automate the downloading, unzipping, and byte-compiling.

There isn’t any real directions on what you should put in your ~/.emacs file.  This is what I found worked:

(load-file (expand-file-name "~/emacs/cedet/common/cedet.el"))(add-to-list 'load-path (expand-file-name "~/emacs/cedet/common"))(add-to-list 'load-path (expand-file-name "~/emacs/cedet/semantic"))(add-to-list 'load-path (expand-file-name "~/emacs/cedet/speedbar"))(add-to-list 'load-path (expand-file-name "~/emacs/elib"))(add-to-list 'load-path (expand-file-name "~/emacs/cedet/eieio"))(add-to-list 'load-path (expand-file-name "~/emacs/jde/lisp"))(require 'jde)

Then you have to customize stuff.  Since this project is the only one I’m going to edit in Emacs, I added all the dependent jars in the Global Classpath.

It starts up when you load a Java file — or, as I did, hit the “Edit” button.

Most of the commands have the weird prefix of ‘C-c C-v”.  “C-c C-v .” tried to autocomplete the method call you are on.  “C-c C-v C-z” imports the object type your cursor is currently on.  It uses Beanshell on the backend but, really, you don’t have to worry about it — it just works.

So, does JDEE replace Eclipse?  Hardly.  The install is hard, the configuration is intense, and heck, it’s not Eclipse.  But this setup is  still useful when you are forced into an environment without your favorite IDE.

Powered by ScribeFire.