Apr 202006

WebWork2 contains ftl and js files inside the webwork JAR and these two types of files make up a template for a theme. Anyways, customizing the ftl files is covered in the wiki but making custom js files is not covered. I figured out how to do this though by walking through the WebWork2 filter code. Here’s the quick solution:

If the the resource is (for example)

place your custom version into

Really quick, here’s why. WebWork is lopping off the /webwork part of the URI and then adding a bunch of different prefixes until it finds the resource in the classpath (using ClassLoader.getResourceAsStream). The first one is some crazy package name like com/opensymphony/webwork or something. The next one is just template. Therefore, placing just about any static resource like JavaScript files in the WEB-INF/classes/template directory will allow WebWork to locate them.

Apr 192006

I totally spaced putting this picture up. Steve Loethen from MS sent this to me from last years MTS. That’s me and Brett up front (I’m the idiot in the picture as always haha) and a few other developers. You can also spy a few other notorious Java folks in the background. First person to identify anyone else in the booth directly behind me wins the “Most hardcore Java geek award”. Email me or leave a comment with your guesses.

Apr 182006

I’ve been trying FC5 on my laptop to see if it fixes any of the software and libraries that were keeping me from running the latest stuff on Ubuntu. I found that it does fix a lot of libraries and also fixes the Intel 855 video driver issue that I was having and now my cards able to be accessed via DRI and OpenGL actually works. Anyways, here’s my summary of FC5 installation:

1. Get the 855resolution from yum or apt or source and install it.
2. Add this line to your /etc/rc.local file:

3. Download the Intel Pro wireless firmware version 2.4 from this website: http://ipw2200.sf.net. There is a firmware link at the top. And you MUST use the 2.4 firmware.
4. Un-tar this into /lib/firmware
5. Reboot

This should be everything you need to do in order to get the widescreen resolution to work and the wireless to work. You still need to configure the wireless setup in the System > Administration > Network application. You will need to create a new device configuration that is a wireless configuration. You will also need to ensure that the firmware was loaded correctly by looking at the “Hardware” tab. The IPW should be listed as a wireless device and not a wired (ethernet) device.

If you get totally sick of yum, because it totally sucks, I would install apt. There is a summary of how to do this here:


Apr 122006

LINQ is a query language built into C#. For C# 3.0 Microsoft has added a large number of keywords into the language that allow a developer to query into objects in a SQL fashion. This can also be used to select from a database when the Object being queried is a DB mapping object. Like Hibernate, they have an ORM mapping from a database to a class and a session (called DataContext) that is used as the glue. Nicely, for the RAD folks this can all be auto-generated or done by hand for those who don’t like generation. Very rails like in concept when considering the generation, the database is defined and then the code created by a tool. Rails does this at runtime, but the concept of database creation first and by hand is the same.

Unlike Java and rails, you don’t need to use the full blow Objects for result from LINQ. Instead you can create structs on the fly that contain only the fields you have selected. You can unit test this by mocking out the struct by hand. Although interesting, I’d think that this would only be useful in select cases considering that design by contract makes most sense on the domain of the application rather than an anonymous class created by the language at runtime. For distinct DB code snippets where performance is necessary and the data is confined, these structs will be ideal.

In terms of performance, Microsoft stated that LINQ does not cache at all and leaves this to be done outside of LINQ. Cache, distribution and the like are difficult and it does seem like they have punted on this instead of addressing it. Considering that hibernate and most other tools provide this and will handle distribution if the correct caching provider is supplied as well as handle no caching with simple configuration makes me think that LINQ just didn’t have time or didn’t want to try.

LINQ handles transactions as expected. Programmatic transaction can be done via the DataContext. If you have a distributed transaction then LINQ will participate in that transaction. If the backend doesn’t support transactions then it is not supported by LINQ because internally it goes directly to the data source during any execution statement.

My main concern with LINQ is that they have add to the keyword namespace of the language and reduce the user namespace, which will no doubt make old code break everywhere or reduce the chance for upgrades. This doesn’t bother me too much I guess when considering that this release is a major release (3.0) and Java suffers from the inability to add keywords that would make life easier for developers simply because they refuse to break old code. Still, the reasoning behing using keywords is not clear and Microsoft did not provide a distinct reason they used keywords rather than a block. The also had no idea off hand how many keywords LINQ uses up. They tried to use the blocks are ugly argument, which is not true considering that ruby does this nicely with 3 distinct characters and 4 total characters.