5: Reading Order
You're reading a file, you get to the end and there it is! The detail that would have helped you understand all the rest of the file.
Reorder the code in the file in the order in which a reader would prefer to encounter it.
Resist the temptation to apply any other tidyings at the same time! They can come later. Don't mix.
Be Careful: Some languages are sensitive to order.
No single ordering is perfect. Sometimes you want to understand primitives first and then understand how they compose. Sometimes it's the API followed by the implementation. As the reader, use your best judgement and experience.
What order would you have liked to encounter? Give the gift of that sequence to the next reader.
Last updated