file under misc.

stuff which doesn't fit anywhere else 

Migrating a Centralized Repository Team to Git

A useful how-to on using Git as a centralized repository.

http://toroid.org/ams/git-central-repo-howto

This a model we'll likely follow this summer at work to migrate from the current centralized version control system over to DVCS.

I think we'll still follow our current model of using feature branches to develop/refactor code while keeping the trunk consistent with the current production codebase. However, using these feature branches will become much less expensive and easier with Git. I've been using Mercurial to do the same types of tasks for almost a year and been totally happy with it.

Filed under  //   code   work  

Comments [0]

Using Variables in Velocity Method Parameter Lists

I just had to troubleshoot some problems with Velocity. The issue was related to a method in a template like this:

${messages.getMessage("thank.you", null, locale)}

In this case, the messages variable is a class implementing Spring's MessageSource interface and used for localization in the Velocity template (which is used for generating emails).

The problem was that the "locale" parameter was always null even though I was setting it in the Velocity model Map. A quick review of the Velocity User Guide and VTL Reference didn't yield any help.

I finally figured it out, though. The proper syntax for using a variable in the parameter list is:

${messages.getMessage("thank.you", null, $locale)}

You still need the dollar sign in front of the variable name. I had assumed the initial dollar sign created a variable-friendly scope to the text inside the brackets but I was wrong. My frustrations were compounded by the lack of examples on the Velocity site which used variables in parameter lists - they all have either static String parameters or no parameters at all. Meh.

Filed under  //   code   work  

Comments [0]

A Compelling Reason for Cloud Computing

This is the kind of press release cloud computing needs to get me excited. Much more valuable than all the buzzword hype flowing around the Internet.

http://oppugn.us/posts/1271781380.html

Filed under  //   code   technology  

Comments [0]