Machine to identify substances I was looking at Wikipedia's article on mass spectrometers, and realized that the method described was to heat a sample into its gas phase and separate the ions by mass using a large magnet. While I know this technique works well, and is used extensively, would it not work better/more easily to heat a sample into a its gas phase, shine a very bright light through it, and apply normal spectroscopy? The only downside I can see, is that it would require a large amount of sample to use.
I was thinking of something like this:

 A: The traditional spectroscopy you describe is still used; different techniques apply better in different circumstances.
For example, there are chemical bonds whose energy is in the ultraviolet. UV spectroscopy is good if you are dealing with such molecules, perhaps things with lots of $\require{mhchem}\ce{C=C}$ bonds. The information you get can tell you about the connectivity of the molecules (which atoms are connected to which others).
Lower energy transitions in the infrared tend to be between different rotational and/or vibrational states of molecules. Think of a molecule bending and flexing -- the energy scales are not as high as actually breaking bonds or liberating electrons. Thus IR spectroscopy is well suited for studying molecules according to their flexibility.
In between is optical spectroscopy. And of course there is no clear delineation in nature as to what information can be gleaned from what whavelengths.
At the more extreme ends of the electromagnetic spectrum there are still further types of spectroscopy.
NMR (aka MRI) uses radio waves to essentially study the electronic environment around hydrogen atoms. An $\ce{H}$ in $\ce{H2}$ will be different from the one attached to $\ce{O}$ in $\ce{CH3OH}$, which will be different from the three attached to the $\ce{C}$ in the same molecule. This is because the proton is affected by the surrounding electron cloud, which is distorted by nearby nuclei. The spin states available to protons are very close in energy and so are probed by low-energy frequencies.
High-energy X-rays are not so good at exciting transitions to other bound states (they tend to quickly ionize materials and break them), but they can still be used to "image" molecules, as was done in figuring out the shape of DNA.
All of these examples used electromagnetic waves to probe a substance, and all of them work very closely with the electrons. If you want to probe the structure of a nucleus with EM waves, you'll need much higher (gamma ray) energies. But there are other ways to probe things. Mass spectrometry is, at its most basic, just pushing on an object with a known force, watching how much it deflects, and inferring its mass. Mass spectrometers can easily tell the difference between isotopes of the same element, which is much more difficult if you only directly query the electrons.
So in summary yes, spectroscopy as you describe is very much used in practice to analyze substances. Each technique has its own niche.
A: Optical spectroscopy will tell you about different kinds of bonds that are present in a molecule. However, it is very hard if not impossible to distinguish, say, $\require{mhchem}\ce{CH3CH2CH2CH2CH3}$ (pentane) from $\require{mhchem}\ce{CH3CH2CH2CH2CH2CH3}$ (hexane) with this method - you might see a difference in intensity of the different bond types, but it would be incredibly small. And these larger molecules have such complex vibration modes that they will blur into a big mess.
By contrast, with a mass spectrometer you would ionize the molecule and from the deflection in a magnetic field determine its mass - quite accurately. No question whether there were five or six carbon atoms.
So the techniques are complementary. Optical methods tell you more about individual bonds, and IR spectroscopy will tell you about the atoms at the ends of these bonds; but vibration modes for larger molecules get too complex to be distinguished.
Analytical chemistry is a very broad field - chromatography, electrophoresis, nuclear magnetic resonance, infrared spectroscopy, mass spectroscopy... they all have their place, and so do many other techniques. Just take a look at Abby's lab (in NCIS - the TV show). 
A: 
would it not work better/more easily to heat a sample into a its gas phase, shine a very bright light through it, and apply normal spectroscopy?  

This is very similar to atomic absorption spectroscopy. Except that the light is a heated filament with the elements of interest incorporated so it emits the spectral lines for those elements. You measure the amount of light absorbed to determine the concentration in the gas. The sample is either heated in a flame or a graphite furnace. For high concentrations, you could leave the light off and just measure the intensity of the spectral line.
A: One important advantage of mass spectrometry over optical methods that has not been mentioned yet: sensitivity.
If you have just a handful of molecules you are interested in, there is only a tiny possibility that you will hit them by photons, in most cases they will go undetected. However, if you ionize molecules, you can move them with electrostatic lenses where you want and detect with almost 100% efficiency.
