The other bit I know, besides this one, is to write comments stating what you're trying to achieve, and why. The how is redundant, but sample data right there may help.
(Someone famously pleaded for documenting the data structures, and leaving aside the processing mechanics.)
(Someone famously pleaded for documenting the data structures, and leaving aside the processing mechanics.)