January 2005

Hibernate 3.0

I sat down last night and looked at the latest offering from the geniuses working on Hibernate. I really like the new tools that are coming out for it. The Eclipse plugins, located here are really useful. I love being able to use a GUI Schema tool to build my database schema, push it into a database (via generated scripts) and then have Hibernate plugins build my POJO’s for me. That is slick. Of course, this is my personal approach to designing systems. I like visually laying out the database as my model, and working up from there. It doesn’t always work that way, but that’s how I like to do it.

I also downloaded the latest Spring IDE plugin from springframework.org. Man, I really wish I could convince my group to start working with these new frameworks, but we have built our own, and its hard to move away from something once all of your code depends on it.

So, I am making it a point in all of my personal development projects to try and use widely known, highly praised tools for my development efforts. Not only does this give me a certain level of comfort knowing that there are people out there using this thing that may be able to help if I have a question / find a bug, etc., but also that I am learning something new and fresh, with a different mindset than I am used to.

General
Java

Comments (0)

Permalink

Presentations

NoFluffJustStuff 2007

Comparing Java and Groovy
Presentation file: [Power Point]
Source Code: [Source Code]

Intro to Java Cryptography
Presentation file: [Power Point]

Implementing DSLs in Groovy
Presentation file: [Power Point]
Source Code: [Source Code]

InfoTec 2007 Talks

Introduction to Ruby on Rails
Presentation file: [Power Point]
Handout file: [Power Point]
Ruby Example Source Code: [ruby script]
Rails Demo Code: [rails.zip]

DSLs, Groovy, and You!

Presentation file: [Power Point]
Handout: [Handout RTF]
Source Code: [dsl.zip]

Central Iowa Java Users Group Talk

Entitled: Integrating AJAX into the Enterprise
Presentation files: [pdf]

Central Iowa Java Users Group Talk

Entitled: Integrating AJAX into the Enterprise
Presentation files: [pdf]

OSCON 2006 Talk

210x60.gif
Here is my talk for OSCON 2006: Open Source Performance Monitoring Tools, Tips and Tricks for Java. I had a lot of fun talking to everyone I met at OSCON. This was the biggest group of people I’ve talked to so far - around 40 people were in the audience.
[ppt file][pdf file]

It is also available from O’Reilly here, along with most other talks. That file is currently a little out of date with the one above.

NoFluffJustStuff Talk


I’ve given a talk for the NoFluffJustStuff conference series, entitled Java Performance Tools, Tips, and Tricks. The slides for this talk are available [here in pdf].

Omaha Dynamic Language Users Group

Here is the Introduction to Ruby on Rails talk I gave to ODYNUG in June 2006. This was a great talk to give, and I had a ton of fun talking to everyone about such an interesting framework.
[pdf file]

Omaha Java User’s Group (OJUG) Presentations

  • December 2004: Intro to Hibernate [link]I did a presentation on Hibernate for the Omaha Java Users Group in December, 2004. This was an excellent opportunity to meet new people, as well as learn a new topic. I had not worked with Hibernate before I volunteered to talk about it, so I had to learn it pretty quick. I feel that I gave a decent overview of what it is and what the benefits of using it are.
  • February 2005: Overview of Jython [Jython Presentation] [Code]

Other Presentations

  • February 2006: Java Performance Monitoring Tools (Bass & Associates) [link] As a consultant for Bass & Associates, I had the opportunity to give this presentation for their recruiting open house.

General

Comments (0)

Permalink

Steam is just stupid

Steam is pissing me off tonight. No big suprise there. Apparently the majority of the Steam login system is down. Again, no big suprise. I really like playing Counter-Strike and Day of Defeat. Those games still rock after all these years - even with all of the cheaters with their wall hacks and aim-bots.

But I hate Steam. Steam is Valves idiotic approach to Content/Digital Rights Management. Unfortunately it sucks. It is not user friendly, when it works. When it doesn’t work, it is just painful.

I’m just glad that I have’t bought (nor will I) any of there standlone games like Half-life 2 or Counter-Strike: Condition Zero, because even though they are “stand alone”, you have to log in to Steam (which requires internet access) to play. How stupid is that? You cannot play the game you paid $50+ bucks for unless you are on the ‘net. Wow.

I would love to have sat in on those design meetings, just to see the other boneheaded thoughts they must have come up with before settling on this one:

Designer 1: “How abouts we make the computer shock the player a certain number of times before they can play?”
Designer 2: “No, that won’t work… what if they have their shoes on?”
Designer 1: “Oh, yeah…”.
Designer 3: “I know, we won’t allow them to play unless they have logged into our servers, which we will make sure don’t work, say… 43.5% of the time”
Designers 1&2 together: “Perfect!”

Just Stupid

Comments (2)

Permalink

Working on Eclipse Plugins

Please, forgive the following rant. Eclipse is a great tool. I love it, with its myriad plugins all working like they should… unless you are on or near the bleeding edge of Eclipse releases. My day job consists of writing Web-based applications in Java, and we were tired of the cost and excruciatingly slow performance of WSAD 5.1.2, so a couple colleagues and I decided to start using Eclipse with the WTP plugin. So, currently, we are using Eclipse 3.1M4, with WTP 1.0M2, VSS Plugin 1.6.0 M2-comp, and all of th necessary Eclipse Project plugins to make those work (SDO, EMF, etc). I alos have a bunch of other plugins that I use, but those are the base.

For the most part, everything is great: Eclipse 3.1M4 is lightning fast, and the WTP plugin has made huge strides in relatively short time. The problems we are experiencing are due mainly to the VSS Plugin. VSS plugin is a Team Repository plugin to support Microsoft’s Visual Source Safe product. Why we use this I am not exactly sure, but it is not a bad tool. However, the plugin is has not been updated since Eclipse 3.1M2. And, of course, the Eclipse team is still refactoring the product to make it even better than it currently is. So, the framework moves forward. The plugin doesn’t. Things break.

The specific problem we were experiencing occurrs when viewing a file, and then typing something in the window. This triggers an event in Eclipse to tell the Team Repository plug-in that the file has changed. The plugin in turn asks the user if they want to check the file out. If the user clicks yes, then a white page with “Exception Running Validator Code” on it.

This is the way I usually check code out, so it became very annoying very quickly. So, I went to sourceforge and downloaded the code to see if I could modify it myself. Now, I am not familiar with CVS, nor am I familiar with the internals of Eclipse, so I had my hands full very quickly. I followed the directions on the VSS plugin site to download the code using the CVS Checkouot project wizard, which worked well. I was not prepared for the 31 Errors to pop up inside Eclipse. My first reaction was “Oh, Shit!” - I was not really in the mood to hunt down 30+ errors at that moment. I wanted to make the fix necessary to get my problem resolved and move on. Fortunately, the Eclipse log file (/eclipse/workspace/.metadata/.log) had a stack trace in it, so I was able to quickly find the exact line of code that had the problem. As I said, I am not familiar with the internal workings of Eclipse, so I was pretty much lost on what needed to be done.

Here was the original code:

final IRunnableWithProgress operation = new WorkspaceSyncModifyOperation(file) { /** * @see org.vssplugin.core.WorkspaceSyncModifyOperation#exec(org.eclipse.core.runtime.IProgressMonitor) */ protected void exec(IProgressMonitor monitor) throws TeamException, CoreException, InvocationTargetException, InterruptedException { /* Comment. This is currently not possible to do, since the current refactoring implementation * requires that no files can be changed after starting the operation and the callback to * this hook is only done a but to late. * Made a fix for the problem above.. Don’t know if this is legal to do. */ long stamp = ((File) file).getResourceInfo(false, false).getModificationStamp(); IResource[] resources = new IResource[] { file }; IPreferenceStore store = VSSPlugin.getInstance().getPreferenceStore(); Comments comments = null; if (store.getBoolean(VSSPlugin.USE_CHECKOUT_COMMENTS)) { comments = ActionUtils.getComments( VSSPlugin.getInstance().getShell(), resources, null, false); } _provider.checkout(resources, comments, IResource.DEPTH_ZERO, new NullProgressMonitor()); ((File) file).getResourceInfo(false, false).setModificationStamp(stamp); } };

The line:

((File) file).getResourceInfo(false, false).setModificationStamp(stamp);

was the problem. The setModificationStamp method was removed at some point between 3.1M2 and 3.1M4. I initially did not know what to do, so I went hunting for the closest thing I could find to setting the modification stamp. I settled on this line of code:

((File) file).setLocalTimeStamp(stamp);

Which did appear to solve the problem some of the time. We were seeing intermittent problems with that fix that I could not explain, so I went back to hunting for something else. Then I found, thanks to Eclipse’s amazing code completion algorithm, that on the ResourceInfo class, which used to have the setModificationStamp method now had an incrementModificationStamp method. So, I changed that line to:

((File) file).getResourceInfo(false, false).incrementModificationStamp();

We’ve been testing this for a couple of days now, and it appears to be working just fine.

In the midst of all this, I decided to contact the project manager of the VSS Plugin, Marcus Nylander, to offer my assistance, and to see if what I was doing made sense. You may have noticed the comment at the top of the method. That made it even less clear to me what I was doing, so I thought that getting in touch with him would be the best course of action. Marcus was quick to respond, first thanking me for offering to help, then pointing me to the right source code to look at (thankfully, no errors other than the one I was working on) and finally enlightening me a bit on what I was doing. He wasn’t sure if the code was needed at all anymore, so now I am in the middle of testing that approach. We’ll have to test it and see.

A coworker who is somewhat more familiar with Eclipse Internals that I am explained some of the concepts behind this fix. It made sense, but I am not sure I am able to explain it myself yet. If I keep helping on the VSS Plugin, I better learn this stuff.

General
Java

Comments (0)

Permalink

JKeyManager

Well, I just got done applying for project space on sourceforge, and should hear back by Wednesday on whether they approved the project or not.

It’s kind of interesting starting an Open Source project for the first time. I am not 100% sure what I am doing, I just know that it is something I have wanted to do for quite a while now. Also, I know that this project is needed, if by no-one other than myself.

General
Java
Security

Comments (0)

Permalink