Verse Of The Day

Thursday, December 29, 2005

Easy Long Island Iced Tea "Mix"

New Year's Eve is right around the corner, so I figured I would share my recipe that makes perfect Long Island Iced Teas easy. Pre-make the mix and refrigerate, then just add the ice and Coke when ready to serve.

1. Fill an empty 2 liter pop bottle with 1+ cup each of Vodka, Gin, Tequila, Triple Sec, Rum.
(If you are watching carbs, cut back on the triple sec. )
2. Add one canister of Crystal Light Lemonade mix.
3. Fill rest of way with water and shake until all lemonade mix is dissolved.
4. Refrigerate until ready to consume.

To serve:
Fill glass with ice and pour mixture over ice, leaving room in glass to top off with Diet Coke. If you choose, you can garnish with a slice of lime or lemon.

Monday, November 07, 2005

Regular Expressions Are Your Friend

Once you overcome the cryptic nature of regular expressions, they can accomplish a lot with a little bit of code.

For a great overview, visit the Tao of Regular Expressions (

Using RE within Java is simple. One of my projects is a Struts web application, and I wanted to give the user the option of uploading a comma-separated CSV file to run batch updates. The upload piece was easy using Jakarta commons-upload. The interesting part was correctly parsing out a CSV file into VO's, allowing for quoted or non quoted values, some of which may have embedded commas. I found this regular expression in the Java Cookbook by Ian Darwin.

You can get more detail on the java.util.regex package from the JavaDoc API documentation online. The difference between m.find() and below is basically that m.find() will point at the next match if there is one, where will actually return the value of that match. It's kind of like the difference between list.hasNext() and

import java.util.regex.Matcher;
import java.util.regex.Pattern;

String CSV_PATTERN = "\"([^\"]+?)\",?|([^,]+),?|,";
Pattern _csvRegex;
String input;

_csvRegex = Pattern.compile(CSV_PATTERN);

// read in your file or whatever into 'input'

Matcher m = this._csvRegex.matcher(input);

while (m.find()) //attempts to find next match
String field =;//get the last match
// do something with field ...

Tuesday, September 27, 2005


Every piece of crap on the internet has a blog now, so why should I be any different?

Who am I?

I'm a software engineer from upstate New York, currently working mostly in a server-side Java/J2EE environment, talking to Oracle databases, and interfacing with legacy systems via SOAP, Websphere MQ, and custom connectors.

I love the outdoors. I've been hunting and fishing for as long as I can remember. I also like to go four wheeling in my Jeep Rubicon. I mostly hunt in upstate NY and Pennsylvania. I got a chance to hunt Caribou in Alaska a few years back, and I'm going on a fly-in fishing trip in Canada next year.

I'm married with two beautiful daughters and an Airedale Terrier. We own a house out in the country, backing up to an abandoned apple orchard. The barn makes for great storage and a dream workshop -- plenty of room for the Jeep and my workbench, air compressor, welder, etc.

Boring introductions out of the way, now I can focus on adding content that nobody will ever read.