These apply regardless of language, platform, nationality, planetary or galactic realm...
1. Thou shalt Document thy code or thou shall be kicked in thy crotch, severely and repeatedly. Thou shall at least provide a heading to denote filename, author, date and description.
2. Hard-coded folder paths shall be avoided at all costs. Use path variables from the fountain of variables. Violators shall be violated by gangs of convicts.
3. Assumptions shall not be taken about execution environment conditions. All shall be validated at runtime.
4. Error checking shall be done at all points where even the idea of an error might occur.
5. All errors/exceptions shall be properly handled or thou shall be banished to thy woodchipper. This applies to type checking as well.
6. Execute remote elevation in local system context. If thou hast done their preparation, this will always work.
7. Thou shall consume caffeine or alcohol if permissible. Even if not permissible.
8. Expect failures at every point and plan ahead for them.
9. Thou shall test thy code in an isolated environment before ever touching thy production environment. Failing to heed will result in a most horrific use of ice-climbing boots
10. Nay-sayers shall be drawn and quartered.
Let it be written.