When a child is ~12 months old, and learning to walk, they will likely be fascinated by fire. So fascinated that they run directly into it. The only protection the child has in this case, is constant supervision and prevention from a parent.
As the child progresses to 2-3 years old, they begin learning to talk. They will learn the word hot. The parent can then associate the vocal word "hot" to something that is hot. A parent may also associate a familiar word "ouch" with "hot" to communicate to the child a consequence of the danger. This does not alleviate the need for supervision, since the child may charge the fire anyway. Further, the child is still developing neurologically and so may simply stumble into the fire, despite comprehending the parent's warnings.
Whatever the case, the child has not yet learned what hot means. They have not felt it.
A parent may safely introduce "hotness" to a child. For example, by supervising while allowing a child to briefly touch a hot cup of tea. The child will not suffer any serious injuries as a result, but they will learn to associate "hot" with a true feeling, a danger. This is typically enough to teach the child of the danger, but supervision is still required to prevent them from stumbling into the fire while they develop neurologically.
When it comes to writing code, we have AI assistants. They are children, very young infants, and they will follow their parent's commands. It is a lot of work teaching an AI assistant to grow up. Regardless, be a responsible parent.