A page for wheat, carrot and potato farms, because they are structurally the same.
What happens on a random block update Edit
Every tick 3 blocks are randomly selected from each loaded chunks, and recieve a random block update.
When a crop recieves a random block update it will first check whether it isn´t already fully grown, and it makes sure the light level of the block above it is greater or equal to 9. Note, that if the block above the crop is an opaque block, the light level will be of course 0, making crop growth impossible. If all checks return true, the crop will calculate it´s growth rate and growth probability, and grows with a probability of growth probability. The growth probability can be calculated with the formula: GrowthProbability = (25/GrowthRate) +1. The division is an integer division, which means it the results gets rounded down if it´s a fraction.
A crop on unhydrated soil has a growth rate of 2 (--> Growth Probability: 1/13), and a crop on hydrated soil has a growth rate of 4(--> Growth Probability: 1/7). Additionally the crop gets +0.25 growth rate for every unhydrated farmland block in a 3x3 grid centered around the block the crop is on, and +0.75 for every hydrated farmland block around. A crop on the center of a 3x3 grid of hydrated soil has therefor a growth rate of 10, and a growth probability of 1/3. After that the crop will check, whether there´s the same type of crop diagonally to itself, or whether there are crops of the same type directly next to it along two different horizontal axes. If any of those two checks should return true, the growth rate gets halfed. Other types of crops don´t affect the growth at all.
Here is a great design done by UnaryBit that is fully auto for Potatoes/Carrots: https://www.youtube.com/watch?v=VB1n_2bLk4o
The fastest "field" for crops is alternating rows of 2 or more crops, with a water block in the center of each 9^2 area, because each crop grows faster when it's farmland is hydrated, but is slowed by having it's own type diagonally to it or adjacent in both x and z axis, but not other types. Using a few bonemeal, you can skip the stages of growing.