Xcode 3.2.6 is free and for Snow Leopard.
If you will be upgrading to Lion, upgrade first then follow Lion Xcode install procedures.
Do your software updates! Make sure you have the latest version of your operating system.
Have about 10 GB of space free on your hard drive prior to starting the process.
Downloading Xcode can take 30-60 minutes.
The installation wizard takes about 20-30 minutes.
After starting Xcode, go to the menu bar and select Preferences from the drop-down menu.
One can also simply press "Command-," (comma).
Change "On Start" to "Show Console"
Selecting "Auto Clear Debug Console" provides convenient cleaning between runs.
Select "Show line numbers" (which requires "Show gutter" to be checked).
In addition, I like to "Show page guide", and "Show column Position".