I understand it's possible to install Ubuntu first, and later Windows or to install Windows first, and then Ubuntu, but assuming I have the freedom to do either, which is the better, easier, and more reliable installation order?
It is significantly easier to install Ubuntu after installing Windows. The Windows installation process has no option for installation alongside another operating system, so doing so involves manually resizing partitions and fiddling with your master boot record. While this is certainly doable, the process is less "on rails" and leaves more room for user error.
Installing Ubuntu second is as simple as the following screen:
Did you consider virtualization ?
You'll have no more risk to wreck your Windows install. And you can run both OS at the same time.
If you just need an execution environment for command line unix tools (programming), virtualization is great. Compatibility is absolute.
You can use Virtualbox which is free, or vmware server, which is also free.
As for myself, I'm doing web development with ubuntu server 10.4 LTS virtualized with vmware/Win7. I'm a huge fan of this solution.
I agree with the above, if you absolutely must dual boot, install Windows first for the reasons given, but there is another way, install Ubuntu, then create a VM for your Windows install in Virtualbox.
Once you realize that you haven't used Windows for over a year, simply delete the VM and free up the space.
I've gotta chime in here. I've managed dual/triple/quad boot systems for many years. After all I've experienced what I've discovered is that if you can afford and manage the technical process of installing two drives into your computer that will be the best way to have dual boot. It's pretty simple when you think about it.
Install two harddrives, doesn't matter what speed or size they are. They can vary. However they still must meet the minimal requirements of each operating system (greater than 4gb which is ultra common these days).
Doesn't matter which OS you install first, but the key is to only have one drive powered up when installing the OS's. So lets say you choose to do Windows first. You will unplug the other drive that will be used for Linux. This way during boot there is no way that Windows can detect that there is another drive. After installing windows onto that drive, do the exact opposite. Unplug the windows drive (obviously power down your machine between harddrive configuration), and plug in your linux drive. Commence installation of Linux and there will be no way for Linux to know about your Windows drive and viola. Two independent boot records and two independent installations. No messy boot loader stuff that can fail on you. No messy partitions that can fall apart. No trying to manage two different file systems on the same physical disk.
Now for the extra technical part. When you plug both your drives back in the motherboard will have a setting as to which drive it should try to boot from (go into your Bios to adjust this). Which ever OS you plan to use more often is the drive you want to set as default (mine is currently Windows Xp, but I have win7 and Ubuntu 10.04 on there as well). When I want to boot into a different OS I simply hit F11 (this will vary from motherboard to motherboard, but usually each motherboard has a way of booting from a different device at boot time, you shouldn't need to go into the Bios everytime to adjust this) and up comes a boot menu. I simply pick which Drive I want to boot and viola! Multi-OS machine with out boot loaders and partitions.
With linux you can even just straight up take your harddrive out and pop it in another machine with different hardware and there is a good chance Linux will be smart enough to adjust it's hardware settings to match the new machine.
Using Windows nagware "OSL200" ($24.90 to bypass the nag), you can install Windows 7 anytime. I always make the first partition (<20GB) of the hard disk available for Windows. The many 'buntus (gparted, or other partition managers) allows you to 'move' your other partitions anywhere,anytime, provided you don't multi-task the Linux operating system too much.
Windows also has other boot-assistants (Boot-us 3.0.2, Gag4.10, Plop Boot Manager 5.0, Smart Boot Manager & many others), but I have no consistent success with these.
On my Desktop replacement (HP Pavilion DV7), each of my two HDDs has a 20GB Win Primary partition.On each I have one Primary partition (10GB) at the end of the two HDDs for soft-RAID0, which only Linux allows.
All other partitions: DATA, ARCHIVES, multiple Linux-op-systems, ... are in the Extended Partition on each drive. All DATA, ARCHIVES are Win7-NTFS compressed partitions. All others are EXT4.
After the Windows nagware, I have about 10 to 16 operating systems from which to boot. This includes all the 'backports' of the latest installed operating systems. The 'buntu op sys's will kernel-update (if you permit it), but also allow access to previous kernels.
Occasionally one of my 'buntus allows install of Grub2, which then somehow lets me bypass Windows OSL2000. But then I 'realtime' install another Linux variant, which then removes the Grub2 setup.