HDE Code Sum of Squares by Using Ruby