My dad would like to encourage me to learn how to program in C++, but he doesn't want anything that could possibly go wrong with any of the computers that we own while I am doing so to affect any of the data associated with their other user accounts. As such, he would like to give me an external drive for me to use as an isolated programming environment. This would be relatively straightforward to set up, but I was wondering if I could install OS X on this drive in such a way that I could boot it no matter which one of my family's computers it was hooked up to so that I could use whichever one is available as they become so. Is it possible to do this at least for a late 2007 aluminum iMac and a 15-inch MacBook Pro that my dad bought late in the summer of 2011?
Yes it is quite easy.
For example, my MAC had a bottle of Champagne poured on it (long story, short) and I removed the hard drive and placed it in another machine. I also later took that drive and placed in an external enclosure and booted from it by using the "OPTION" key when booting. This brings up a list of all accessible drives INCLUDING NETWORKED DRIVES if accessible. So you could configure your DEVELOPMENT drive on your network and boot from it HOWEVER unless you have GIGABIT network it would be slow.
So to create an external bootable self contained OSX drive I recommend the following tutorial, BE ADVISED it will clear off any data on the external drive and your doing all of this at your own risk.
In general, no. Apple maintains a list of minimum builds that guarantee for a specific hardware model, the drivers have been included to make everything work.
Your inevitable choice of build version to install on the USB drive will mean that some computers will be too old (don't meet minimum requirements for your build) and some too new (your OS is too old for them).
In limited cases (and even in wide ranges of computers spanning 4 years) one build can work for a whole host of computers. Also, the OS can work well enough in many cases if you are missing a WiFi driver or something minor and can run updates to get the required additions when you take an older OS onto "unsupported" newer hardware.
You can have much success with an external drive and multiple computers - especially once you check the build details and requirements for the OS and computers you intend to use. I say go for it, even though there isn't a universal, all encompassing image for all hardware shipped.
So, setting aside the new Mac Pro - I would expect every Mac manufactured in the last 5 years to run any 10.9.1 installed from a current 2012/2013 install. From a practical standpoint, I would run the install from the newest Mac you have which is the 2011 model to get the most recent version of things and to download the installer from the App Store and not reuse an old saved one in case Apple has rolled new drivers into the current installer.
It did not work for me. What I found is that when you install OS X or download OS X from the AppStore, you do not get the same binaries for all Macs. For example, if you get OS X for a 2007 Mac, it will not work on a 2008 Mac. I have a Late-2011 Macbook Pro (not Retina) and installer for it does not run on a Early-2012 Macbook Pro (non-Retina). Different hardware needs different drivers and when installing, the Installer puts a right combination for your current Mac.
It is possible that you will have compatible hardware but it will be much safer (and faster!) to use a NAS for your work and boot Macs normally.
Yes that is possible. I have a 2012 iMac and a 2012 MBP and have an external thunderbolt drive that has Mountain Lion on it installed from the iMac. It boots up flawlessly on both the MBP and the iMac. I use it mainly for those apps that are not supported by Mavericks yet and as an emergency backup for when I'm travelling.