14

I am learning Python currently which wasn't part of my college curriculum. I was asked in an interview why I chose Python and I replied that it is easy to learn and the documentation is very well written. The interviewer didn't reply whether it was a good enough reason. He looked convinced but I cannot be sure.

Is a well written documentation along with ease of learning a good enough reason for choosing a scripting language? Or should I have elaborated more about the availability of Python libraries and bigger user base of Python?

Just a note. Python wasn't required for the job. The company worked on Ruby-on-rails. Python was in my resume and I think the interviewer just wanted to know what considerations I made as a fresher while choosing a programming language.

closed as primarily opinion-based by Ixrec, user53019, durron597, jwenting, user40980 May 17 '15 at 13:51

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 12
    possibly not in interview, but i'd question whether you need a reason to learn anything other than you want to. – jk. Aug 20 '13 at 10:14
  • 2
    @jk I just know C so far. I am not a huge expert but I know the syntax, can implement data structures and such. I needed a language where I can implement ideas faster. That was the reason I chose a scripting language. Documentation, ease of use and user base were the main advantages when I compared it to Perl and Tcl. Not all three applied to both the languages but as far as I could find using google Python was better than these in one of these. So I chose Python. Learning because I want is a good enough reason but it wasn't Python that I was interested in. The ideas were the main thing. – Aseem Bansal Aug 20 '13 at 10:26
  • 1
    [Doing something because it is easy] is not nearly as impressive as [doing something because it is hard]. Unless it actually is hard and you are just showing-off. ;) – TimG Aug 20 '13 at 12:45
  • 5
    Since you're new to Python, I would suggest you consider stopping referring to it and thinking of it as "a scripting language". It's a language. People write web sites, desktop apps, small scripts, huge libraries, embedded controllers, etc. with it. Calling it "a scripting language" seems inappropriate to me. – Chelonian Aug 20 '13 at 17:17
  • @Chelonian Point noted. Thanks for pointing that out. – Aseem Bansal Aug 20 '13 at 18:25
20

No, well-written documentation is not a good enough reason for learning a language.

Badly written documentation is a good reason for not learning one.


There are four reasons to learn a language:

  1. Because it may be a useful tool in your career

    Language is a tool. One use a language rather than another because of its benefits in a given context. The fact that a language has a high quality documentation doesn't make it a better tool, or only marginally¹.

    The language choice would rather be based on the prior experience, the paradigms (example: functional programming for Haskell), the approaches (example: fully-asynchronous mode for JavaScript as a server-side programming language with Node.js), the interoperability (example: compatibility with nearly every operating system for Java), etc.

    Being able to use a tool in your daily life is one of the reasons to learn a language.

  2. Because it broadens your culture and knowledge

    Another reason to learn a language is to learn new concepts, paradigms and ways of writing elegant code (example: Haskell). Here again, documentation helps, but is not a sole reason to learn a language.

  3. Because it requires minimum effort to learn it

    Another reason to learn a language is because it's simple to learn (example: PHP). Again, documentation contributes a lot, but the language itself is still more important. Moreover, I would avoid telling during an interview that I learnt a language simply because it's easy to learn.

  4. Because it's fun.

    The last reason to learn a language is because it's simply exciting to learn either a well-designed language (examples: Haskell, Ruby) or a language for geeks (example: Brainfuck).

In a case of Python, what you can answer is that:

  1. It's a dynamic language. Dynamic languages make it easy to create prototypes and to develop faster when circumstances make strong types not important.

  2. It's elegant. Maybe not as elegant as, say, Haskell, but still the comparison with mainstream web-oriented languages such as PHP is easy to do.

  3. The usage of meaningful indentation is interesting, given that many mainstream languages make indentation only a burden which should have been managed by the IDE in the first place. Haskell compiler and interpreter rely on indentation too, by the way.

  4. Python has an elegant way to work with lists. List comprehensions and generator expressions are interesting concepts for someone who have never used functional programming before.

  5. Django makes it very easy to create web applications fast while keeping code rather clean. This is a huge benefit over many other programming languages.

  6. It's fast enough and powerful enough for large-scale web applications. For example, Dropbox is written in Python. YouTube relies heavily on Python. Reddit, if I remember well, also relies on Python.


¹ A well-written documentation still helps doing things the right way and fast.

  • I just know C. I learned Python because I wanted to implement ideas faster. That rules out the first point. I came to know the functional paradigm only through Python so 2nd point is also out. Then in this situation I am left with the 3rd point only. What should have been the emphasis of my answer? More info in this comment to question – Aseem Bansal Aug 20 '13 at 10:30
  • @AseemBansal: I edited my question to show what you could have answered. Also, the fact that you "came to know the functional paradigm only through Python" is exactly what I'm talking about: you learnt Python, and it helped you discovering FP, which is exactly the purpose of learning a language. – Arseni Mourzenko Aug 20 '13 at 10:55
  • 1
    You can use Dropbox as an example instead of youtube and Reddit. It is made in Python completely. If I remember correctly Guido helped Dropbox to build their product and he recently joined them again. – Aseem Bansal Aug 20 '13 at 10:59
  • There is a fourth reason I think you have skipped: Because the language looks fun! – martiert Aug 20 '13 at 12:22
  • Somewhat in the line of martiert, but what about fun? If you want to learn a specific language, that's more than a good enough reason. Everything doesn't have to be motivated by career advancement and strategies to maximize your skills. – Gilles Aug 20 '13 at 13:17
7

If you are like me, you do not use a hammer simply because it has a comfortable handle. You use a hammer because you need it to get something done hammered.

So, no, while good documentation is certainly helpful, it is not a reason in itself to learn a programming language.

  • 1
    I added things that I wanted to do and was doing using Python but I guess I should have placed more emphasis on getting things done than documentation. – Aseem Bansal Aug 20 '13 at 10:06
  • 3
    you use a hammer because you need to get something hammered... too many people use hammers when a screwdriver would be more suitable. – gbjbaanb Aug 20 '13 at 10:32
  • @gbjbaanb: Exactly! Thanks for being even more precise. – stakx Aug 20 '13 at 13:13
1

Here are my top reasons why to learn a new language:

  1. the rest of the team you are working with uses it, and you are the new guy going to become part of the team.

  2. you want to solve a problem, and language X, or libraries/frameworks for language X seem to provide the best available support for that task

  3. You do it just for educational purposes of your own.

Often for situation 2 there is more than one language or framework suitable to solve the problem. Then well-written documentation may be one of the factors to take into consideration (but other factors also). For point 3, good documentation may be more important, but honestly, if you want to learn a new language just for the sake of learning it, first find a problem you want to get solved, otherwise you will soon loose your motivation, well-written documentation available or not.

1

Yes, why not? The more languages you learn, the easier it is to learn the next language. Many programming concepts can be learned in a variety of languages. So you might as well start with the one that has the best materials available for learning.

Also most tasks can be accomplished in a variety of languages. Usually, after a while, you'll master the core language concepts and tools, but you'll learn most libraries as needed. It is an argument in favor of a language if the libraries are well-documented so that you can quickly get up to speed on a particular application domain.

0
  • No, well-written documentation is not a good enough reason for learning a language.

  • The interviewer asked this question for that you tell him some goodness of python.You should compare python and ruby.

Not the answer you're looking for? Browse other questions tagged or ask your own question.