Simple Flow Control Made Easy

We are currently working on a product that utilizes a long-range and low-bandwidth network. Moreover, the devices that are being communicated with are severely limited with regard to memory availability and CPU cycles. Given these constraints, it’s important that the network and devices are not overwhelmed with traffic. Recently, we encountered an acute problem where […]

Floating Point Numbers & Currency Rounding Errors

A reminder to those who learned this lesson long ago, and a warning to those that have not learned it for themselves: Don’t use floating point numbers for money. When doing any kind of calculation with currency, accuracy is extremely important. And floating point numbers (floats and doubles) don’t have an accurate enough representation to […]

Guice AOP and the Java Persistence API

The Java Persistence API provides a programming language framework for managing relational data through entity management and ORM APIs. Libraries like Hibernate and Guice Persist implement the services defined in the JPA specification. The result is an abstraction layer that manages the underlying concerns of a relational database while providing a consistent API that doesn’t […]

The UDP Firewall Punching Technique Explored

I recently read an article on The H entitled The Hole Trick: How Skype & Co. Get Round Firewalls. This article does a great job of explaining the technique of punching holes into firewalls — with an emphasis on how Skype does it. The need for “firewall punching” arises when two clients that are behind […]

Toolsmithing Java with JRuby

JRuby is my favorite Java tool. It lets me wield the power of Java libraries while building tools and abstractions to speed development. On a current project, I’m using JAXB2 to bind a large set of deeply-nested XML Schemas into Java classes. I have a Rake task to create the classes from the xsd files […]