Friday, September 12, 2003

Hopelessness

My daughter is studying computer science. She is in third year now. Last year, when she was taking a course on Unix, one of her assignments was about facilities that are needed to write a shell. That brought back a lot of memory about my years in graduate school, playing with Unix for fun, all the time trying to finish my thesis on time. I wrote a few shells at that time, starting with the tinkering of the Bash Shell when it was version 0.3, I think. It was not really usable at that time, but it was a lot of fun for me to modify it to fix the bugs I found when I was using it.

Eventually, when I got bored by Bash and it was also getting better by other people's effort, I decided to write a shell of my own. It was based on my obsession at that time, Lisp. I got a open source Lisp interpreter to use as the engine. I put in all the Unix system stuff to handle pipes, process handling, terminal handling, background jobs, etc. It was a fun thing, and it is just too bad that I lost the source code. The biggest problem at that time for me was the syntax for pipes. The Bourne shell is left associative. But Lisp uses a prefix notation.

Anyhow, what makes that a random thought is that I went to an interview this morning. I was asked a few questions about Korn Shell, the successor of Bourne Shell. Since I was not told that shell scripts would be in the interview, I did not pay attention to shell scripts at all. So, I did not know what $? meant.

You know, at that time, I had that feeling of hopelessness that I feel about when I look at most job postings: they all ask for a certain years of experience using a certain software package. I have the same hopelessness because if I was given the time, I have the ability to write the software package in the first place.

Even though I might not be able to tell you all the special variables in Korn Shell, I can tell you what variables have to be in Korn Shell for it to be useful for the job at hand. In other words, I know all the concepts; not only do I know the concepts, I actually know how they are implemented; not only do I know how they are implemented, I know how to use them. I just don't know their literal symbolic representation.

But in the interview, I knew it was useless to tell the interviewer that I knew how to re-write Korn Shell myself. And I just happened to be one of those guys who can't memorise these special variables. In any case, when I debug shell scripts, I always consult a reference on shell scripts, just to be sure that I remember the special variables right. So the reference will always be there, whether I can remember the special symbols or not.

Is anybody hiring a guy who can implement whatever program you need to implement, but who can't remember any language's syntax unless it is being used right now?

No comments: