RockyCode

6 results for author, Ted Jenkins...

Groovy 1.7 power asserts

posted by Ted on 06 Aug 2010

Asserts were a breath of fresh air sweeping over the JVM landscape with Groovy. Now, feel the power of Groovy 1.7's power asserts!

Stopping the dreaded double-form submission with jQuery

posted by Ted on 02 Aug 2010

When developing forms, we web developers always have to guard against the dreaded double-form submit, when impatient (or even patient) users, depending on the latency of form submissions, hit the “submit” or “enter” button multiple times, causing havoc to the application.

What's REALLY going on in that HashSet.contains() method

posted by Ted on 02 Aug 2010

We all know that contains() is a handy way to check for the presence of an item in a HashSet. The java docs state: "Returns true if this collection contains the specified element. More formally, returns true if and only if this collection contains at least one element e such that (o==null ? e==null : o.equals(e))." So, you just need to override equals() the way you want, and everything's hunky-dory, right? Wrong!

Submitting a form from an a href link using jquery

posted by Ted on 20 Jul 2010

Okay, Okay, I admit it. I'm javascript challanged. As a Java developer, I've looked down my nose at paltry javascript, treating it as a "me-too" technology trying to cash in on the hype surrounding java all these years.
As a result, I've missed out on a lot of js goodies. And, with javascript entering a renaissance of sorts, combined with the wildfire-like buzz surrounding libraries such as jquery, it's high time I learn some.

How to uninstall a .deb package (Ubuntu)

posted by Ted on 20 Jul 2010

New version of virtual box. Problem was, I needed to uninstall the old version first.

The power of Groovy closures

posted by Ted on 19 Jul 2010

In the Java world, we don’t get closures until Java 7. Groovy already has them. Here's what I’ve learned about these important programming structures, and why they're powerful.