Reaching the Inner Circle: It’s In the Man Page

A generation ago, the standard answer to any Unix question was “read the man page.” Before I explain how this relates to learning PHP Internals and about PHP Extensions, I should explain what a man page even is! The old school answer would be, “read the ‘man’ man page.” These days it’s explained on Wikipedia:

On Unix, and to a large extent Linux, most everything is documented in the man pages: Command usage, library usage, system calls, header files, utilities, even (eventually) some tutorials.

Unix (and therefore Linux) and arrogance go together. Larry Wall, the creator of Perl, calls it hubris, and declares it to be a mandatory trait. Time after time, the standard (and correct) answer is “It’s in the man page.” It may take you several days to figure out which man page to go read; that fact was both assumed and expected. No self respecting Unix guru will waste his or her time with someone incapable of figuring out which man page to read; and all Unix gurus are self respecting.

Dilbert, 20 years ago, learned it this way: The comic is so spot-on that the standard modern text on deep-down Unix programming has the comic on the book’s front cover (see above right)! There’s a third edition out, so if you follow my link, be sure to flip to the more recent edition before you buy the book. If you need to program with pthreads, named pipes, and other Unix/Linux system calls, you’ll be familiar with that book.

So what does this have to do with PHP Extensions? Bear with me; we’re getting there.

Now that you’ve met the local Unix/Linux guru (who’s willing to toss you a nickel), you’ll have your answer. “Read the man page.” Eventually you will have done your homework and come to the guru with a deeper or more subtle question. The answer will be subtly different as well, and inevitable: You will be informed that “It’s in the man page.”

This is a victory! You have gained the guru’s respect to the point that the guru now assumes you know how to read. The guru tells you what you need to know, Grasshopper, namely that the answer to your question IS in the man page.

In due course you will again find yourself qualified to visit the Guru. This time you are prepared. You show the guru where the answer WOULD be in the man page, if the answer were in fact in the man page. You’ve earned a different answer from the Guru: “It’s in the code.” This is a clear victory and acknowledgement of your right to ask the guru questions.

Some day, you’ll have another question, and you’re prepared to show that the answer is NOT in the code. You’ll be able to show that the code does in fact NOT match the man page; the answer is in fact NOT in the code; and show the specific revision in which the code began to diverge from the man page.

You have now reached the critical moment. If you got it right, you are now authorized to hold a DISCUSSION with the guru, rather than merely ask a respectful question.

What does this have to do with learning PHP Internals, PHP Extensions, and specifically with ME beginning to explore the same? There is a strong newbie tendency to want everything handed over. If you’re too ignorant to know that it is YOUR responsibility to do your homework, and YOUR responsibility to figure out what homework to do, why should the Guru bother with YOU?

The culture, fortunately, has to a large extent changed. People are willing and interested in helping beginners. As a beginner, however, it remains YOUR responsibility to distinguish yourself. Will you ALWAYS remain an annoying hopeless newb who wants everything explained and handed to them?

Instead, understand that it is YOUR responsibility to show that you’re for real. People are here to help. That’s certain. But show the degree to which you value that help.

Pay it forward: As you’ve been helped, help others in turn.

What about myself? As you see, I arrive with baggage. I arrive assuming that the world of C programming remains largely the Unix culture described above. But is it really? I don’t know! It’s up to me to explore and see.

Fortunately, I have a clear and concrete objective: To make it easier for the next person to come along. If I prove successful, I’ll have helped everyone up and down the food chain! That’s the plan, and a Summer of 2015 project.