in reply to Revisiting the old clichés of programming languages

There are similar things said about natural languages. German is good for engineering. Greek is good for philosophy. French is good for foreplay. If I knew any of those languages, I might not say that about them.

As long as I'm musing on things of questionable relevance, I find a good interview question to be, "what kind of project would you rather write in this other language you know rather than in Perl?" Someone asked me that about Python, and I said, "I'd never write anything in Python over Perl because I know Perl so much better." The discussion in Don't Write That In Perl! is interesting along these lines.

  • Comment on Re: Revisiting the old clichés of programming languages (natural languages)

Replies are listed 'Best First'.
Re^2: Revisiting the old clichés of programming languages (natural languages)
by tilly (Archbishop) on Jan 26, 2009 at 22:00 UTC
    Were I an interviewer I would not like that answer. No matter how much better you know Perl, there are generic valid reasons to write in Python instead that you can give that interviewer:
    1. A personal project to help you learn Python, some Python library, etc. (Note, learning how a framework in another language does something is an excellent way to open your mind to new ways to do it in Perl.)
    2. An existing Python project has a lot of the functionality you need, and extending it looks easier than rewriting it.
    3. The team that will have to support and maintain it are Python developers rather than Perl developers.
    4. A client is willing to pay you to write in Python, and is willing to accept your reduced productivity.
    What you're trying to demonstrate with these answers are that you are open to working with others, fitting yourself to an organization's needs, and learning. The answer you gave instead could leave the impression that you have none of those traits.

    The only time I would want to leave an interviewer with those types of negative impressions of me is if working with a particular language was so distasteful that I really don't want a job where I have to do that. The only language that I feel that way about is VB. Certainly I don't feel that way about Python. Furthermore Python has some good features that I wish were in Perl. For instance Perl has nothing equivalent to Python's list comprehensions and generators.

      As it happens, most of what I know about Python comes from three out of four of the motivations you list. I wanted to add a feature to an existing (open source) Python project (maintained by Python programmers, natch), in part because I wanted to learn about the language. I also discussed that in the same interview, just not in answer to that question.

        That's good, and I want to be clear that I'm not accusing you of having the negative traits. I'm just saying that when you give that answer, you don't know how it will be heard. And some interviewers will hear that answer in a very bad way.

        The potential for harm is mitigated a lot if you have already discussed your willingness to work with Python in other circumstances. But if the job they envision is 70% Python and 30% Perl, you've still potentially argued yourself out of a job for a skill that you realistically could come up to speed on well within the usual window of 1-3 months that most people need to become productive.

Re^2: Revisiting the old clichés of programming languages (natural languages)
by JavaFan (Canon) on Jan 26, 2009 at 18:17 UTC
    "what kind of project would you rather write in this other language you know rather than in Perl?"
    I can think of the following reasons to not use Perl. All of them have been reasons for me in the past to not use Perl.
    • The environment it has to work on doesn't have the resources to have Perl. I've worked on Linux systems that only had 25 Mb of disk space, 8 Mb of RAM, and where installed from a single floppy disk. No way to cram Perl in there.
    • Speed or memory usage is an issue. In such cases, I use C.
    • There's a domain specific language much more suitable to solve the problem. SQL being an obvious example.
    • Lack of enough Perl knowledge (or willingness to use it) in the rest of the team.
    • Program needs to be distributed in an environment that may not have Perl. Hasn't been a reason for me in the last 10 years, but was before.
    • Low level enough that it's easier to do in C than it would be in Perl.
    Note that most of the reason have not much to do with the project itself, but more with the environment. But then, I've always said that most of the time you shouldn't pick a language based on the project you want to solve, but you should pick a language based on the people you want to do the project with.
Re^2: Revisiting the old clichés of programming languages (natural languages)
by swampyankee (Parson) on Jan 27, 2009 at 13:02 UTC

    Didn't one of the Fredericks of Germany once say something to the effect of "I speak English to my wife, French to my ministers, Italian to my mistress, and German to my horse?"


    Information about American English usage here and here. Floating point issues? Please read this before posting. — emc

        I'm sure you're correct. Alas, my memory seems to suffer from bit rot.


        Information about American English usage here and here. Floating point issues? Please read this before posting. — emc