Is there a general method for working out electron configurations? For up to period 3, elements' electron configurations are relatively easy to work out until the transition metals begin. Then some elements may have $\ce{4s}$ orbitals which are preferred by electrons over $\ce{3d}$ orbitals. These small rules don't make sense all the time and only cover some elements. Is their any master method for working out the electron configurations of any given element?
There is a semi-empirical method to fill the atomic orbitals: atomic orbitals are filled  in the order of increasing n+l. If the sum n+l is equal for two atomic orbitals, they are filled in order of increasing n.
This gives the following order for filling the orbitals:
1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p, 6s, 4f, 5d, 6p, 7s, 5f, 6d, 7p, 8s, 5g, 6f, 7d, 8p, and 9s