Loading ...
Sorry, an error occurred while loading the content.
 

#!/usr/bin/perl - Episode 1

Expand Messages
  • Shlomi Fish
    This is episode 1 of a sitcom I m writing. It tells the story of a web publishing company. I should give a description of the characters, but it s too late now
    Message 1 of 6 , Aug 2, 2002
      This is episode 1 of a sitcom I'm writing. It tells the story of a web
      publishing company. I should give a description of the characters, but
      it's too late now anyway. I think it is very different than User Friendly.
      (which I like a lot).

      Comments, suggestions, corrections and flames are welcome.

      Regards,

      Shlomi Fish

      [A Black Screen. Some Letters are written one by one to the screen in a fixed
      font]

      <<<
      #!/usr/bin/perl

      Then a -w is added and then:

      #!/usr/bin/perl -w

      use strict;

      # Hmmm... now what?
      >>>

      Paul: Hi, can you please tell me in what language this del_temp_files.py
      of yours is written?

      Tony: Python, I think. Why?

      Paul: I am not going to maintain a Python script.

      Tony: I'll maintain it for you.

      Paul: No, you won't. Re-write in Perl.

      Tony: But Python has...

      Paul: I'm sure Perl has that too. If you need to install a CPAN module,
      you know you can always do it.

      Tony: OK. But in the worst case you can rewrite it from scratch?

      Paul: And who will save me from the hit-men that Joel Sposlky is going
      to send to kill me?

      Tony: Look, I read this article. It's very nice. But he was talking about
      a 100,000 lines + codebase, not about a 20-liner.

      Paul: A little calculation. Let's suppose I want to add a flag. A fix
      for it would take 1 minute to write and debug. Rewriting an entire
      script from scratch would take half an hour. Which is better? Hmmm...
      Hard Decision.

      Tony: I think sometimes it's better to start over.

      Paul: Granted. But the add, clean up, add, clean up, cycle takes much
      less time.

      [Cut]
      [Michelle is standing near a brand new computer]

      Michelle: Hmmm... I love the smell of a new workstation in the morning.

      Now what should I install? [Picks up a few CDs] Gentoo? Takes
      too long to compile everything. [Puts the CD in a different stack] Debian?
      [puts Takes too long to upgrade to testing. Slackware? The package
      management from hell. S.u.S.e? No.

      Red Hat? Mandrake is nicer. [Shouts to the other room] Hey what should I
      install on the new workstation?

      From the other room: RedHat! Debian! Slack!

      Michelle: Mandrake it is.

      [Cut. Tony is sitting in the same room, alone. Alan Enters]

      Alan: Hi!

      Tony: Hi! Aren't you the new intern?

      Alan: Yes. Alan Summers [they shake hands].

      Tony: What's you story?

      Alan: I'm an English student, studied a bit programming in the university.
      Installed Linux at home and got hooked. Don't know much but I'm getting
      there.

      Tony: Here's a gift for you. [gives him a copy of the Perl CD Bookshelf
      from a stack]

      Alan: The Perl CD Bookshelf. Gee thanks.

      Tony: And you can keep it even if you leave tomorrow. BTW, what's your
      favourite console editor?

      Alan: I started with pico, but then realized it was braindead, and looked
      for something similar. Someone told me about joe and I got hooked.

      Tony: joe? [shouting] joe? [opens his hands] Man! I love you already! [hugs
      him]

      Alan: You use joe too?

      Tony: Nah, I'm an Emacs man myself. But joe is much better than pico. You
      should see our semi-annual Emacs vs. VI shootout.

      [sits at the computer]

      Now here are some URLs. Read Freshmeat a lot, and I mean a lot. Slashdot
      has good content, but stay away from the comments. SweetCode is a must
      read. To learn perl quickly and nicely, check out this perl tutorial or
      Perl for Perl Newbies [{shameless plug}] of those Haifa Linux Club
      creatures. And while we're at it don't ever miss the Haifa Linux Club site.

      Alan: Why?

      Tony: they give a lecture about Linux every two weeks and every one is
      online.

      Alan: They sound like sick people to me.

      Tony: they are. But my best friends are sick.

      Alan: Maybe I'm new here, but can't you prepare a page or a small site, with
      all of these URLs already in place?

      Tony: Great idea! Tell you what, I'll work on it now.

      Alan: And what should I do?

      Tony: Learn Perl. Take your time. And, BTW, you can't avoid reading the man
      pages, but it's not the best source to learn Perl from.

      Alan: OK. Just learn.

      Tony: And write some programs. You know: the Hanoi Towers, Copy a file. Hmmm...
      I should prepare a list of exercises.



      ---


      [Cut.]

      [Michelle is sitting next to a computer. Alan Enters]

      Alan: Hey. I understand you are installing Linux on my computer.

      Michelle: Yep. Mandrake 8.2. Now it installs all the packages. Did you
      read "Back to Basics" by Joel Spolsky?

      Alan: No, net yet. Albeit I read about him on Slashdot.

      Michelle: Brilliant article. Do so. You see this is a 1.7 giga-hertz machine,
      and if something runs fine here, it does not mean it would on our
      extremely loaded server. Makes sure your algorithms are not braindead.

      Alan: Can I know your name before this discussion goes any further?

      Michelle: Sorry. Michelle Slavsky. Prima Hackeressa here. Not the best
      hacker and not the CTO, but more experienced than Tanya. For now, at least.

      Alan: Why?

      Michelle: This kid is learning fast!

      [Turns her chair]

      You're Alan right?

      Alan: Yep.

      [The computer beeps]

      Michelle: Oooh. Time to switch a CD.

      [Cut]

      [Robert enters the room where Michelle and Alan sit next to a computer]

      Robert: Hey Mik, and who might you be?

      Alan: I'm Alan, the new intern.

      Robert: Oh, now I remember. Alan. I guarantee you that I'll forget
      your name, so please don't mind if I ask you what it is.

      Alan: That's OK. I tell my name to people on the time, and I'm not
      unlike that either. Back in the university more people know me by name
      than I know theirs.

      Robert: Yes, that seems to be the case for everybody. Except that it's
      mathematically impossible... I think.

      Never mind, please come to my office later today, and I'll talk to you
      about the Tao of Programming.

      Alan: The Tao of Programming.

      Robert: That's right. How to become a good programmer. And how to become
      one as quickly as possible. In the One True Way, trademark.

      Alan: Do you have schedules, BTW?

      Robert: Of course. But they are realistic. We never force someone to
      stay late at work if he doesn't want to.

      Alan: Why?

      Robert: One thing is because tired programmers are sloppy and write bad
      code, and usually can't get anything done anyway. Another thing is
      that both me, being the CTO and the CEO are voluntarist at hearts.

      Alan: And Linux is the living proof.

      Robert: Did I mention I'm the CTO?

      Michelle: Robert, you just did.

      Robert: Super. Keep up the good work.

      [ Leaves the room]

      Michelle: That was Robert - he's amazing. He used to be my guru for a while.

      Alan: And who's your guru now.

      Michelle: Nobody. I'm guru-less, care-less and free.

      Alan: Cool. I wish I could feel that way.

      Michelle: You will and When you do, you'll know that You Were
      Enlightened trademark.

      Alan: OK.

      Michelle: One thing I'll always remember is that he did not know that
      grep could search through files. And I knew that by working with the
      Borland version of grep that I found on Windows.

      Alan: Unbelievable. Every half decent manual out there shows you
      "grep hello *" as one of the first example.

      Michelle: Yeah. OK, back to business. Now, you know how commands are
      parsed in bash?

      Alan: More or less. I know that asterisk expands to the list of files,
      and that double quotes wrap stuff where I can still put variables, and
      single quotes are the same only with dollars and backslashes being that.

      Michelle: Good boy. [ Pats his head ] Now, there are some more caveats,
      especially with bash. Back-quotes are your worst nightmare - they execute
      the command and return its output on the command line. Very dangerous.
      But they are treated like a string. $( ... ) is a much nicer version
      that puts them in a sub-shell. Won't work in System V's /bin/sh, but we
      don't care about them.

      Alan: Why?

      Michelle: I would not touch such a system voluntarily with a ten-meters-long
      pole.

      [Cut]

      Black Screen:

      Message: Later that day.

      Tim: people, people gather around. [Everybody gathers around] First of
      all, I'd like to welcome our newest employee: Alan Summers. Alan: I wish
      you good luck. Work hard, and have fun hard, preferably but not necessarily
      both at the same time.

      Everybody laughs.

      Alan: Thanks. I already like this place.

      Tim: If you need anything, let me know. We have a bookshelf of books there,
      and we order any books except reading books on demand. Michelle here, takes
      advantage of it to order a lot of pop psychology books, but they have proven
      to be useful.

      Alan: Sounds nice, but I think I'll wait before I'll take advantage of it.

      Tim: Perfectly fine with me. Now it's time for "donating something to a good
      cause". I talked with my accountant and we have a $1000 this week. So whose
      first?

      Tony: I am. We work with CVS. Well, I tried BitKeeper and it kicks ass. Except
      for branching which is nicer on CVS. Problem is: it costs a lot of money, and
      Larry McVoy is rather possessive about it. Now, this guy works on Arch, which
      aims to be a good BitKeeper replacement, it's usable, but isn't quite there
      yet. And now he asks for donation. I think we should give it to him.

      Tim: Sounds nice. Does anybody agree?

      Everybody: Yes. Yes. Fine by me.

      Tim: Oh well. We donated to LWN last week. Meeting is adjurned.

      [Cut.]

      Robert: Alan, let me tell you the secret of good programming: time. You
      become a better one with every passing day. Three monthes after you
      write a piece of code, it looks like junk to you. That's why people insist
      on their employees to have experience.

      But that's not the entire secret: some people are much better programmers
      after a year, than most programmers out there with ten years of experience.
      But that's because they are eager to learn new languages and new technologies
      and know that learning is a dynamic process.

      Alan: So? I knew that.

      Robert: Well, it's not the only thing I can tell you about becoming a good
      programmer.

      Alan: so go on.

      Robert: Why thanks! See, good code requires a good design. Without good design,
      you'll end up refactoring it too much. But don't over-engineer. You see,
      you need to have a good design, that can easily be extended.

      Alan: How do I do that?

      Robert: If you are good, you'll see that a project's TODO list always grows
      or remain constant. Think about all the features you'd like to have and
      think how to implement them. Don't put them in, but make sure they can all be
      implemented with some effort.

      Alan: OK. Good.

      Robert: Now, rewriting the entire codebase from scratch is something you
      usually should not do...

      [The End]




      For another episode:

      [Linus Torvalds Enters. Applause]

      Linus: Hello.

      Tony: Hi! You are Linus Torvalds, right?

      Linus: Yes.

      Tony: Nice to meet you. They shake hands.

      [Tony gets back to sitting next to the computer]

      [Pause]

      Linus [waits a little]: Isn't there something you want to ask me
      or say to me? The patch penguin fiasco? BitKeeper? The Dave Jones Tree?

      Tony: Actually, there is one. [Turns to Linus] You're disturbing me.

      .
      .
      .

      Linus: I met Tony. He was not excited to meet me at all.

      Tim: He gets this way. You should have seen the day that Sarah Michelle
      Gellar came to visit.

      Linus: Let me guess - you host a "Buffy" fan site.

      Tim: 5th place on Google, and it's of one of our employees.

      Linus: Whose Employee?

      Tim: Tony.








      ----------------------------------------------------------------------
      Shlomi Fish shlomif@...
      Home Page: http://t2.technion.ac.il/~shlomif/
      Home E-mail: shlomif@...

      "Let's suppose you have a table with 2^n cups..."
      "Wait a second - is n a natural number?"
    • Nadav Har'El
      ... There s something I don t understand. Who s the target of this sitcom??? Is it going to be broadcast on the Cable Geek Network? It contains far too much
      Message 2 of 6 , Aug 2, 2002
        On Fri, Aug 02, 2002, Shlomi Fish wrote about "[hackers-il] #!/usr/bin/perl - Episode 1":
        >
        > This is episode 1 of a sitcom I'm writing. It tells the story of a web
        > publishing company. I should give a description of the characters, but
        > it's too late now anyway. I think it is very different than User Friendly.
        > (which I like a lot).

        There's something I don't understand. Who's the target of this sitcom???
        Is it going to be broadcast on the Cable Geek Network?

        It contains far too much technical jargon, insider information, and
        programming details, in my opinion. Do you think that many TV viewers will
        understand what you're trying to say about Redhat/Debian/Gentoo/etc., for
        example?

        Take a look at other TV series, either drama or comedy, showing various
        professions (doctors, lawyers, police, social workers, newspaper, etc., etc.).
        In none of these will you find a technical term every two seconds. You'll
        find them once in a while to make the thing look real, but your enjoyment
        of the show should not hinge on your detailed knowledge of medicine, law, law
        enforcement, or in this case computer programming. Most of the "stories" in
        these series revolve around human-interest stories, and the professional
        details are used only as a background.

        Even in the most "technical" drama series I know, like E.R. and CSI ("crime
        scene investigation"), the suspense and buildup of "drama" is more important
        than the actual technical terms used.

        In comedies, the actual technicalities are usually (as far as I saw) kept
        even rarer. Think about shows like Nanny (a nanny and a broadway producer),
        Murphy Brown (TV reporter), Wings (pilots and airport personnel), MASH and
        Major Dad (military), The Naked Truth (tabloid reporters), Norm (social
        worker), Are You Being Served (store clerks), Just Shoot Me (fashion reporter)
        and probably a hundred other examples. You rarely see the people "doing their
        job". You don't see on these shows people spending half an episode writing a
        newspaper article, flying an airplane, planning an attack on the enemy, or
        things like that, because they are too technical to be funny to the general
        population.

        Also, don't forget, if this is to be a sitcom (SITuation COMedy), it must
        be funny. Have real jokes that make people laugh. Puns about System V /bin/sh
        usually won't make even a Linux geek laugh :(

        I liked the Linus Torvalds sketch, it was actually pretty funny if you know
        who Linus Torvalds is (or at least understand that he's supposed to be someone
        Really Important).

        Other small notes:
        * You have stuff like "$( ... )", "grep hello *", "Enlightened trademark" -
        how are these going to be spoken out without sounding ridiculous?
        * The idiom is "I wouldn't touch ... with a ten foot pole". Don't add "long",
        and don't make it meters. If you don't want to use imperial measurements,
        don't, but don't use this idiom either.

        --
        Nadav Har'El | Saturday, Aug 3 2002, 25 Av 5762
        nyh@... |-----------------------------------------
        Phone: +972-53-245868, ICQ 13349191 |If you tell the truth, you don't have to
        http://nadav.harel.org.il |remember anything.
      • Shlomi Fish
        Oh Jesus Christ! In one paragraph or two, while being completely honest and sincere. Did _you_, Nadav Har El, liked it or did you not? Did it make you laugh? I
        Message 3 of 6 , Aug 2, 2002
          Oh Jesus Christ!

          In one paragraph or two, while being completely honest and sincere. Did
          _you_, Nadav Har'El, liked it or did you not? Did it make you laugh? I
          can't see the forest from the trees.

          Regards,

          Shlomi Fish



          ----------------------------------------------------------------------
          Shlomi Fish shlomif@...
          Home Page: http://t2.technion.ac.il/~shlomif/
          Home E-mail: shlomif@...

          "Let's suppose you have a table with 2^n cups..."
          "Wait a second - is n a natural number?"
        • Nadav Har'El
          ... No, he had nothing to do with it. ... You can t see the forest from the trees?? All the trees said one thing: This is a long way from being a sitcom.
          Message 4 of 6 , Aug 3, 2002
            On Sat, Aug 03, 2002, Shlomi Fish wrote about "[hackers-il] Re: #!/usr/bin/perl - Episode 1":
            >
            > Oh Jesus Christ!

            No, he had nothing to do with it.

            > In one paragraph or two, while being completely honest and sincere. Did
            > _you_, Nadav Har'El, liked it or did you not? Did it make you laugh? I
            > can't see the forest from the trees.

            You can't see the forest from the trees?? All the "trees" said one thing:
            This is a long way from being a sitcom. Most of the script wasn't funny,
            in my opinion, especially to the general population for which the words
            "Perl", "Python", "/bin/sh" and even "Linux" don't mean a thing.

            The rest of the "trees" in my postings were more detailed suggestions on
            what, I think, makes a good sitcom and why your script is problematic. If
            you want to ignore it, fine, after all I'm not a movie or TV expert. But
            what I wrote was just common sense, I think.

            Is that honest and sincere enough for you?

            --
            Nadav Har'El | Saturday, Aug 3 2002, 25 Av 5762
            nyh@... |-----------------------------------------
            Phone: +972-53-245868, ICQ 13349191 |Despite the cost of living, have you
            http://nadav.harel.org.il |noticed how it remains so popular?
          • Shlomi Fish
            ... It s an expression. ... I don t aim it for the general population. _I_ like computers, and I m going to write about a topic I like. I don t say I m going
            Message 5 of 6 , Aug 3, 2002
              On Sat, 3 Aug 2002, Nadav Har'El wrote:

              > On Sat, Aug 03, 2002, Shlomi Fish wrote about "[hackers-il] Re: #!/usr/bin/perl - Episode 1":
              > >
              > > Oh Jesus Christ!
              >
              > No, he had nothing to do with it.
              >

              It's an expression.

              > > In one paragraph or two, while being completely honest and sincere. Did
              > > _you_, Nadav Har'El, liked it or did you not? Did it make you laugh? I
              > > can't see the forest from the trees.
              >
              > You can't see the forest from the trees?? All the "trees" said one thing:
              > This is a long way from being a sitcom. Most of the script wasn't funny,
              > in my opinion, especially to the general population for which the words
              > "Perl", "Python", "/bin/sh" and even "Linux" don't mean a thing.
              >

              I don't aim it for the general population. _I_ like computers, and I'm
              going to write about a topic I like. I don't say I'm going to adapt the
              script for the masses, but I'm still going to think and act in a Linuxy
              way.

              > The rest of the "trees" in my postings were more detailed suggestions on
              > what, I think, makes a good sitcom and why your script is problematic. If
              > you want to ignore it, fine, after all I'm not a movie or TV expert. But
              > what I wrote was just common sense, I think.
              >
              > Is that honest and sincere enough for you?
              >

              It is. Your commentary was very helpful. I'd like to switch further
              discussion of the script to the humanity mailing list:

              A permanent location for the script can be found here:

              http://humanity.berlios.de/usr-bin-perl/

              Version 0.2.0 of Episode 1 was already a little revised.

              BTW:

              1. I'm not such a bad sitcom writer - after you've read the Fountainhead
              (which I recommend anyway you look at it, and I can lend it to you), you
              might wish to take a look at "The One with the Fountainhead" on my site. I
              was told it was very funny by at least two people, one of whom was not
              familiar with the show. (albeit it helps)

              2. Sitcom scripts when read are usually not as funny as watching the
              episode on T.V.. Even Friends (all of whose chapters were written down),
              seems to suffer from this symptom.

              In any case, I'm not going to dumb out the contents on purpose, adding
              streotypical geeks jokes, and stuff. And there's more to my art than just
              wanting to make people laugh, despite the fact that the latter is a noble
              cause as any.

              Regards,

              Shlomi Fish

              > --
              > Nadav Har'El | Saturday, Aug 3 2002, 25 Av 5762
              > nyh@... |-----------------------------------------
              > Phone: +972-53-245868, ICQ 13349191 |Despite the cost of living, have you
              > http://nadav.harel.org.il |noticed how it remains so popular?
              >
              > To unsubscribe from this group, send an email to:
              > hackers-il-unsubscribe@egroups.com
              >
              >
              >
              > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
              >
              >



              ----------------------------------------------------------------------
              Shlomi Fish shlomif@...
              Home Page: http://t2.technion.ac.il/~shlomif/
              Home E-mail: shlomif@...

              "Let's suppose you have a table with 2^n cups..."
              "Wait a second - is n a natural number?"
            • Shlomi Fish
              ... Enlightened trademark was removed in the CVS. And grep hello star and dollar parenthesis . ... I omitted the long, and made a joke out of the meters.
              Message 6 of 6 , Aug 3, 2002
                On Sat, 3 Aug 2002, Nadav Har'El wrote:

                > On Fri, Aug 02, 2002, Shlomi Fish wrote about "[hackers-il] #!/usr/bin/perl - Episode 1":
                > >
                > > This is episode 1 of a sitcom I'm writing. It tells the story of a web
                > > publishing company. I should give a description of the characters, but
                > > it's too late now anyway. I think it is very different than User Friendly.
                > > (which I like a lot).
                >
                > There's something I don't understand. Who's the target of this sitcom???
                > Is it going to be broadcast on the Cable Geek Network?
                >
                > It contains far too much technical jargon, insider information, and
                > programming details, in my opinion. Do you think that many TV viewers will
                > understand what you're trying to say about Redhat/Debian/Gentoo/etc., for
                > example?
                >
                > Take a look at other TV series, either drama or comedy, showing various
                > professions (doctors, lawyers, police, social workers, newspaper, etc., etc.).
                > In none of these will you find a technical term every two seconds. You'll
                > find them once in a while to make the thing look real, but your enjoyment
                > of the show should not hinge on your detailed knowledge of medicine, law, law
                > enforcement, or in this case computer programming. Most of the "stories" in
                > these series revolve around human-interest stories, and the professional
                > details are used only as a background.
                >
                > Even in the most "technical" drama series I know, like E.R. and CSI ("crime
                > scene investigation"), the suspense and buildup of "drama" is more important
                > than the actual technical terms used.
                >
                > In comedies, the actual technicalities are usually (as far as I saw) kept
                > even rarer. Think about shows like Nanny (a nanny and a broadway producer),
                > Murphy Brown (TV reporter), Wings (pilots and airport personnel), MASH and
                > Major Dad (military), The Naked Truth (tabloid reporters), Norm (social
                > worker), Are You Being Served (store clerks), Just Shoot Me (fashion reporter)
                > and probably a hundred other examples. You rarely see the people "doing their
                > job". You don't see on these shows people spending half an episode writing a
                > newspaper article, flying an airplane, planning an attack on the enemy, or
                > things like that, because they are too technical to be funny to the general
                > population.
                >
                > Also, don't forget, if this is to be a sitcom (SITuation COMedy), it must
                > be funny. Have real jokes that make people laugh. Puns about System V /bin/sh
                > usually won't make even a Linux geek laugh :(
                >
                > I liked the Linus Torvalds sketch, it was actually pretty funny if you know
                > who Linus Torvalds is (or at least understand that he's supposed to be someone
                > Really Important).
                >
                > Other small notes:
                > * You have stuff like "$( ... )", "grep hello *", "Enlightened trademark" -
                > how are these going to be spoken out without sounding ridiculous?

                Enlightened trademark was removed in the CVS. And "grep hello star" and
                "dollar parenthesis".

                > * The idiom is "I wouldn't touch ... with a ten foot pole". Don't add "long",
                > and don't make it meters. If you don't want to use imperial measurements,
                > don't, but don't use this idiom either.
                >

                I omitted the long, and made a joke out of the meters.

                Regards,

                Shlomi Fish

                > --
                > Nadav Har'El | Saturday, Aug 3 2002, 25 Av 5762
                > nyh@... |-----------------------------------------
                > Phone: +972-53-245868, ICQ 13349191 |If you tell the truth, you don't have to
                > http://nadav.harel.org.il |remember anything.
                >
                > To unsubscribe from this group, send an email to:
                > hackers-il-unsubscribe@egroups.com
                >
                >
                >
                > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                >
                >



                ----------------------------------------------------------------------
                Shlomi Fish shlomif@...
                Home Page: http://t2.technion.ac.il/~shlomif/
                Home E-mail: shlomif@...

                "Let's suppose you have a table with 2^n cups..."
                "Wait a second - is n a natural number?"
              Your message has been successfully submitted and would be delivered to recipients shortly.