“bug” can be any unwanted error caused by a non-perfectly written code. They mostly have to do with some small logic-related mechanism.
Let’s say that you need a lil robot to dig a tunnel.
You tell him “if you find dirt ahead of you dig one meter with a shovel” “else, if you find rock, dig 50cm with a pick” “else if you dont find dirt or rock, stop and tell me you completed the tunnel”.
In case it finds clay, since it’s neither dirt nor rock, it will tell you he completed the tunnel, even if it’s not.
There are a million ways a bug can occur, this is just the simplest example that came to my mind
Latest Answers