I agree with Ravellion if you have rationalism, Statue of Liberty and Commerce (or any two of the three). Otherwise, the TP.
The farm only lets you support the pop working the hex, increasing unhappiness, and doesn't really generate anything but an increase in science due increase population. The gold at least pays for something and slows down the population increase to help keep unhappiness under control. Plus you can switch it to the 1 hammer production if needed.
And if your own the right side of Freedom, a specialist gives you half the unhappiness at half the food cost anyway. Which means the 1 hammer production is a better deal unless your really hurting for gold.