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.
5
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:
-
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.
-
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.
-
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.
-
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:
-
It’s a dynamic language. Dynamic languages make it easy to create prototypes and to develop faster when circumstances make strong types not important.
-
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.
-
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.
-
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.
-
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.
-
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.
8
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.
3
Here are my top reasons why to learn a new language:
-
the rest of the team you are working with uses it, and you are the new guy going to become part of the team.
-
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
-
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.
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.
-
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.