Final answer:
G-code and M-code are the two common methods of programming CNC machines.
Step-by-step explanation:
The two common methods of programming CNC machines are G-code and M-code. G-code is a standardized programming language that is used to control the movements and functions of the machine. M-code is another programming language that is used to control auxiliary functions, such as turning on and off coolant systems or changing tools.