ELI5: Explain Like I'm 5

Side effect (computer science)

In computer science, a side effect is like a reaction that happens when we try to do something on our computer program. Just like when you try to draw a picture with a marker, there might be some smudging or accidental marks on the paper.

When your computer program runs, it might make some changes to the computer or to other parts of the program that are not intended. This is called a side effect.

Let's say you have a program that adds numbers together. When you run that program, it should only add the numbers together and give you the answer. But sometimes, the program might accidentally change some other numbers that you didn't want to change. That's a side effect.

Side effects can be tricky because they can change things that we didn't mean to change, and that can cause other problems in the program. So it's important for programmers to be careful and try to avoid side effects as much as possible.