One example for self documenting code is typing. If you use a language which enforces (or at least allows, as in Python 3.8+) strong typing and you use types pro actively, this is better than documentation, because it can be read and worked with by the compiler or interpreter. In contrast to documenting types, the compiler (or interpreter) will enforce that code meaning and type specification will not diverge. This includes explicitly marking parameters/arguments and return types as optional if they are.
I think no reasonable software developer should work without enforced type safety unless working with pure assembler languages. Any (higher) language which does not allow enforcing strong typing is terrible.
Are you sure? Doesn’t the “smart edison bulb” design make it harder to dissipate heat to the casing, therefore making the LEDs get hotter compared to PCBs with LEDs surface mounted on them?
Anyway, if you want your
light bulbsany technology to last long, don’t buy the “smart” variant. “Smart” usually means more components and/or more dependencies on interfaces, and more complexity, so a higher chance to fail.