Amazon sells books by Peter Smid at reasonable prices. I just ordered his book on Macro B programming, a little beyond your scope at the moment, but did note he had several others listed there on programming as well.
Many machine manuals also give G-code programming examples. The good thing about this is the G-codes are the correct ones for their machine. G0, G1, G2, G3, G4 are pretty standard on any machine. Canned cycles is one place where the builder decides what he wants to use. M-codes can very as well.
However, that isn't really too important. Learning the proper way to use the codes is. Then it is a simple matter of replacing one code for another.
There is also at least one online school. I have the link saved at home, and will try to add it here for you later tonight.