Data is more important than code.
If your data is smart, the code can be dumb.
Dumb code is easy to understand. So is smart data.
Almost every algorithmic grief I've ever had has been due to data being in the wrong place or abused of its true meaning. If your data has meaning put that meaning into the type system.