Code fragment to help Ruby/Python/Java developers