# Confused about writing out electron configurations

I watched the Crash Course chemistry video about the electron. In the video Hank showed an example configuration of iron as $\mathrm{(1s)^2 (2s)^2 (2p)^6 (3s)^2 (3p)^6 (4s)^2 (3d)^6}$ and explained that due to energy constraints, electrons go to the s orbital of the 4th shell before going into the d orbital of the 3rd shell and so they are written in this order.

I looked up iron in Wikipedia and there the configuration is given as $\mathrm{[Ar](3d)^6 (4s)^2}$. I understand how it's shortened with argon, but why in Wikipedia is the d orbital of the 3rd shell written before the s orbital of the 4th shell?

Which one is preferred?

For a given configuration, the order of writing the orbitals is not completely fixed since only the orbital occupancies have physical significance. For example, the electron configuration of the titanium ground state can be written as either $\mathrm{[Ar] \, 4s^2 3d^2}$ or $\mathrm{[Ar] \, 3d^2 4s^2}$. The first notation follows the order based on the Madelung rule for the configurations of neutral atoms; $\mathrm{4s}$ is filled before $\mathrm{3d}$ in the sequence $\ce{Ar, K, Ca, Sc, Ti}$. The second notation groups all orbitals with the same value of $n$ together, corresponding to the "spectroscopic" order of orbital energies that is the reverse of the order in which electrons are removed from a given atom to form positive ions; $\mathrm{3d}$ is filled before $\mathrm{4s}$ in the sequence $\ce{Ti^4+, Ti^3+, Ti^2+, Ti+, Ti}$.