I pulled my comment from another post just because I'm starting to realize that there are a lot of people out there who are starving, just because they aren't sure how to properly setup a good yielding farm. So, in an effort to help out those players, I've gone through a bit of a painstakingly long process to do up some graphics for you.
First thing to note is that each water block supports a minimum 4 block radius of crops. Since water is the "life blood" of a farm, it's important to maximize each water block to it's full potential. Therefore the best way to plant is with water in the center of your crop fields. Like so;
▓ = Water
▓= Wheat
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
OR
▓ = Water
▓= Melon Stem
▓= Dirt
▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓
Step 2 to having a farm is to ensure it's survivability. This is easily done with a coal PS stone. You get one right off the start, so I'd suggest using it to protect your farm. This is how I like to setup my farm's PS stone when I'm dealing with melons.
▓ = Water
▓= Melon Stem
▓= Dirt
▓= Coal PS Stone
▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓
But it can also be done with your Wheat farm. That said, you should put a 2x tall fence around the farm (or 3x tall with a flat roof) so people can't get in and trample it. Because the farm is only 9x9, your fence (and roof) is going to be inside the protection of the PS stone.
▓ = Water
▓= Wheat
▓= Coal PS Stone
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
With this setup you'll have no problem with food, at all. It's what I used when I first started, and within a day I had an entire chest full of food.
NOTES:
- If you CROUCH you won't damage the soil when you move across it, so no need for paths that waste farming space.
- Grow your melon stems with bonemeal to skip having to wait for them to mature.
- Be patient and spend some time just standing at your melon farm, it'll produce a melon roughly every 10 seconds.
- Stack your farms vertical instead of spreading them out across the countryside, to keep them in the same chunk.
Happy farming!