Compiling things on Ubuntu Linux the Easy Way
Let's say you are a moderately experienced Linux user, and you want to install an application off the Internet but it doesn't have a nice package that works on your system. A lot of users, even quite experienced ones, have issues with going from the tarball to the installed program because they just don't know the fairly easy steps required to get the job done. But it's only easy if you already know how to do it! So, here's a quick guide how to install stuff from developer sites.
Step 1: Prep your system for building packages
By default, Ubuntu does not come with the tools required. You need to install the package build-essential to work with most of these packages. And since you may want to get code some projects with no released version, you should install the packages cvs and subversion as well if you think you'll need them. You should then build a common directory for yourself where you'll be building these packages. I recommend creating /usr/local/src, but really you can put it anywhere you want. Make sure this directory is writable by your primary user account, by running sudo chown username /usr/local/src and just to be safe sudo chmod u+rwx /usr/local/src. After you've done this, you're set up to start getting the programs you need.
Step 2: Getting the software you want
Most of the software you'll generally want comes from released tarballs. These are just compressed archives in the form of .tar.gz or .tar.bz2 -- they are just like .zip files on Windows or .sit on MacOSX if that analogy helps you. If the program you want to install comes in this form, you should download it into the /usr/local/src directory we made in step one. If your tarballs is a .gz to extract the files you'll run "tar xzvf tarballname.tar.gz" and for bz2 the similar "tar xjvf tarballname.tar.bz2" command.
In the rarer case of getting a program from a cvs or subversion repository, the developers will generally provide instructions on how to do this on their website. If you already installed the packages listed on step one, you just need to change to your /usr/local/src directory (cd /usr/local/src) and run the commands that are listed. The procedure will vary from program to program, so I can't help you here but with the given packages the instructions they prove should work smoothly.
Step 3: Resolving Dependencies.
One nice thing about modern Linux distributions is that they take care of dependencies for the user. That is to say, if you want to install a program, the apt-get program will make sure it installs all the libraries and other dependant programs when you do that, so installing a program is never more difficult that just specifying what you want and it does the rest. Unfortunately with tarballs this is not the case, and you'll have to do it manually. It's this stage that trips up even some fairly experienced users who often give up in frustration for not being able to figure out what they need to get.
To prepare, install the package apt-file, and then run sudo apt-file update. This will download a list of all the available packages and all of the files those packages contain, which as you might expect can be a very large list. The apt-file program has some interesting functions, the two most useful are apt-file search which searches for a particular filename, and apt-file list which lists all the files in a given package.
To check the dependencies of your program, change into the directory you created in step two (cd /usr/local/src). Extracting the tarball or downloading from cvs/subversion will have made a subdirectory under /usr/local/src that contains the source code. This newly-created directory will contain a file called "configure", which is a script to make sure that the program can be compiled on your computer. To run it, run the command ./configure See footnote  below. This command will check to see if you've got all the programs needed to install the program -- in most cases you will not, and it will error out with a message about needing a program.
If this happens, the last line of output will be something like configure: error: Library requirements (gobbletygook) not met, blah blah blah stuff we don't care about. But right above that it will list a filename that it cannot find, in my experience most cases will list a filename ending in ".pc". What you need to do then is to run apt-file search missingfilename.pc which will tell you which Ubuntu package the missing file is in. You can then simply install the package using sudo apt-get install requiredpackage. Then try running ./configure again, and see if it works. If you get to a bunch of text that finishes with config.status: creating Makefile followed by no obvious error messages, you're ready for the next steps.
Step 4: Build and install.
If you got this far, you've done the hardest part already. Now all you need to do is run the command make, which does the actual building (compiling) of the program. If it's a large program or if you've got a very slow computer, go and get a cup of coffee or something. When you're done, run sudo make install and it will do the final stage of installation for you. When finished (it shouldn't take long), your application will be installed to /usr/local/bin and you should be able to run it without problems.
Step 5: Postscript
If this all seems way too hard for you, don't fret. You're using Ubuntu Linux after all, and it has all of the programs that you actually need to get your work done already packaged for you. If there isn't a package out there, the odds are that you really don't need the program and that within a few months someone will have packaged it for you anyhow. The only programs you actually need to build and compile like this are programs that are new and perhaps not yet stable or ready for your destkop -- if you think this procedure is too hard well maybe you ought to reconsider why you want to do this and just wait a few months for the next stable release.
If your desired package is quite important and you think it deserves to be in Ubuntu properly, perhaps contact the [WWW] Masters of the Universe and see if they can do the hard work for you -- if they package something than anyone can install it without having to go through this procedure. But if you can get through all this, you're well on your way to becoming an expert Linux user -- you'd be surprised how easy all this seems after you've done it just a few times. Good luck!
Notes: Easy meaning "easier than tearing your hair out and then screaming about how much Linux sucks while running around the room". Not actually easy.
 if you run ./configure without any options, you will use the default settings for the program. Most programs have a range of settings that you can enable or disable, if you are intersted in this check the README and INSTALL files, check the developer documentation and many cases ./configure --help will list some of the key configurations you can do. A very common options is to use ./configure --prefix=/usr which will install your application into /usr instead of /usr/local as my instructions do.