3.6.1 Note on Self-Programming
It is not recommended to perform self-programming of the Flash in harsh environments as incidents such as power failure during writing will risk corrupting Flash.
If self-programming is absolutely necessary, it is recommended to do this in a bootloader that is protected by lock bits so accidental self-overwrites are impossible. The bootloader should, in this case, run a CRC check of the application section of Flash before any code in it is executed.
All tinyAVR® 1-series devices feature a bootloader section in the Flash memory.