Planning is vital to any infrastructure environment and when scripting or using PowerShell is by no means any different. when you add a high level plan/structure and use it as a map of to-dos and things you want to add later and things you would like to change.
Failure to plan can mean data loss and errors that go uninvestigated. Either of which is not what you want to lay eye on or expose ears to. Error handling should go hand in hand with any PowerShell approached solution to cover your bases.
One way is to write a road map of comments in your script prior to coding. reference snippets as often as you can. enough detail so that you wont be lost of you reference that script or function 2 or 3 years from current date to create easily understood code and recycle.