A little unconventional #coding #tip:
Always copy and paste code. At least at first. Don’t overthink it.
And: Don’t start refactoring right away.
Why?
Because you might think you’re creating almost similar behavior but you don’t know that really until you actually customise what you pasted. Refractoring based on the assumption of redundancy instead of the fact of it is premature refactoring. Once you’ve specialised your pasted code, then look for redundancy and then refactor.