ELI5: Explain Like I'm 5

Stub (computer science)

So, you know how when you want to build something big, you usually have to build it in smaller parts first, like a puzzle?

Well, when people make computer programs, sometimes they have to build them in the same way. They have to make different parts of the program before they can put it all together and make it work.

A stub is kind of like one of those smaller puzzle pieces. It's a little piece of code that programmers make just to stand in for a bigger piece that they haven't made yet. It's like a placeholder, so that they can keep working on the rest of the program without having to wait until they've made everything before it.

So, let's say that you were building a program to help people learn their ABCs. You might start by making a stub for the screen that shows the letters. It might not be very fancy, but it would be good enough for you to keep working on the other parts of the program, like the sounds that go with the letters, or the pictures that help people remember them.

Once you've finished making all the other parts, then you can come back to the stub and make it into a fancy screen that looks good and works well.

Basically, stubs are just little pieces of code that help programmers keep working on a program without having to stop and wait until everything else is done. It's like building a puzzle one piece at a time.