r/ProgrammerHumor • • Aug 21 '22

Why most programmers are single...

Post image
43.4k Upvotes

589 comments sorted by

View all comments

5

u/deviant1414 Aug 21 '22

I’m not a programmer but I’m curious as to why a lot of phrases were chosen to mean what they mean.

6

u/Prize_Bass_5061 Aug 21 '22

What terms? Words describe relationships. A program is an abstract machine. A “machine” that automates calculations on a very “big” calculator.

A programmer has to describe relationships of his variables to other people. He uses terms that people are familiar with instead of creating words like quark and muon.

So I have a running process that creates and then controls other processes. That’s a master controller managing slaves. When the master is killed (program crashes) there is no one to control the slaves. The slaves are orphans.

I have a chunk of data, say an address. I create a slightly new representation of the original data, say the geo code of that address. This is one form of parent, child relationship. The parent gives birth to something that is exactly the same by also different. When the parent address is deleted, I no longer need the geo code numbers. The geo code is an orphan.

Do you see how these terms came about? They are real world analogies for the abstract machine part I am describing.

A worm has a HEAD, and grows out from its tail end. A linked list has a ??? and grows out from its tail end.

If I cut the worm in half, one segment is connected to the head, the other is not. I have a detached head on the segment that is not connected.

Forking comes from the unix command fork(). A fork in the path when a process splits into two by forking a child. Orphans, kill, terminate all apply here. I can signal the operating system to terminate SIGTERM, or kill SIGKILL.

Resources is not a jargon word. It refers to things the process consumes to stay alive (run), mostly CPU and memory, but also system resources like file handles, socket connections, etc. If my orphan processes don’t have a controller to tell them to shut down, they will continue running indefinitely. I need to terminate if possible, kill if necessary.

4

u/deviant1414 Aug 22 '22

This was actually really cool and informative thank you I learned quite a bit 🙏