Why do you learn Python?

Source: Internet
Author: User
I am a junior undergraduate, has been learning Java, like multi-threaded reflection of these things are also known, spring,ibatis These frameworks are also used in internships, and other web frameworks also know a lot.
Many students around in the sophomore began to learn python, but I have not seen how they used, so has been very confused about what the use of self-learning python, coupled with the use of Python is not very understanding, sophomore did not consider learning Python. I read a few introductions, saying that Python is a "glue language", and Linux is a common tool for using Python as a server.
If it is to develop your own gadgets, I think Java is enough for me. So I want to ask the seniors what is the motive, purpose, and reason for learning Python? Because I always feel that some students in school seem to be in order to follow the fashion of the python, and then look at the two days to boast about how high-level cattle python,python, and then throw away, I think if I do not know the purpose of learning, It is estimated that Python will be thrown aside for two days, so I would like to ask the seniors for their reasons for learning Python and what they have done with it.

Maybe everyone misinterpreted my meaning, I just want to ask Python and other languages there is no attractive place, so I can learn better understanding of the meaning of Python language designer, have their own experience, with their own way of thinking to learn. Instead of looking at the tutorial blindly, just to take it as an extra ability for yourself. I think only the people who have been using Python to say it is different from other languages, these experiences are impossible to write on the online tutorial, so I will ask why to learn python, because I think every language must have other languages can be replaced by the place will persist, My intention is only to ask you about the language of Python, and the understanding of learning Python, not to belittle anything, not to show off what language means. Although people may be more inclined to blame for my problem, but still very attentively answered my question, very teachable

Reply content:

Because after eating the py can eat Raspberry Pi ah.

Learn py can also fly.


All right, I'm done. Quietly moved the first slide to learn py. The feeling of this generalization is quite comprehensive. In a word, Java and py coexist peacefully and mutually. Strong My big Java native language (sorry a bit off the topic (Escape _ √ζε:) _
If you give only one reason, a word: write fast and look clear.

You have to ask what it can do. As a universal language, basically everything is capable, except for some occasions where performance requirements are high. The more common areas are Web servers, scientific computing, application-embedded scripting, and System management (from high to low).

In this case, simply tell me what I think.

First of all, I think the fashion is not any problem (that is, Python is now fashionable, almost 20 years.) The trendy should be go, hack and the like). As a professional programmer, catching up with the trend of technology is a normal thing. What new tools, languages, theories. Let's have a play and get a look at his features. This is called the technical Reserve. The reason why a thing can be popular must have its characteristics inside. Sometimes learning something is just a fun. Every time when you have a need to learn to always lag behind a beat, and can not stand in a height to choose.
For example, if you want to write a mobile game now, there are unity, cocos2d, Cocos2d-x, Cocos2d-x Lua and other engines to choose from. If you've never used these things, how do you choose? Must be on the Internet to see a pile of good and bad blog, ask colleagues, seniors and so on, and finally feel the choice of a start to write. What if you only have one of them? You won't hesitate to use the one you will. The problem is, sometimes different technical solutions have different limitations, it is not good to be a time bomb ah. If you've used all of this, even if you're not very proficient. You can also choose the most appropriate tool based on your team composition, duration, difficulty in recruiting, type of game, and more. When there is a need, there will be no time for you to learn it all at once.

Second, the most important programmer is to develop a vision. It doesn't hurt to try a few more languages. Learning other languages can help you jump out of your previous limitations and look at problems. Language limits your expression and limits the way you think about things. Learn more about the different programming paradigms that will help you deepen your understanding of programming languages. There's no harm in it. Just curled up in the familiar things can never improve.

Finally, I think your mentality has a lot of problems. Why do you say that? If a lot of people constantly say to me: "I will python,python how much high-grade cattle break." "My first reaction was:" I rub, really? I can't even use something like this hanging. Go back and play and see how it works. "Instead of saying:" Wipe, and TM to Lao Tze, will python great? "If you really crave knowledge or technology, you don't care who says what in what tone." All you care about is knowledge itself. Because I was brainwashed, I thought Python Dafa was good.
Ps:python Dafa is really good. Some people say I am not good bcause, then change the words. But let's put it in the front line:

"What is the use of learning xx, I will xx, not very good?" said the words from the CS student mouth really should not.

When I was in college, the school taught only C + + and Java. Because Linux played for some time was called to write a website, contact PHP. At that time to PHP surprise for heaven: Language concise, can directly write the site, with string processing. This feeling is the title of the main "artifact sense", that time every day and classmates introduced PHP, how powerful it is.

Later on Python has a "artifact sense", Django has a "sense of artifact", to Flask has a "artifact sense", Scala has a "artifact sense", to go has a "artifact sense." Later, the C + + has a "sense of artifact", Java has a "artifact sense." I have been exposed to the language only these, really do not have the energy to learn other languages, if I go back to college, so much leisure time enough to learn how many things ah!

Plainly, any language, a little more in-depth study rather than the "learning xx What use" question answer, you will soon have "artifact sense", because any language if popular to you have heard the name, there must be a difference between the comparative advantage of other languages.

A person who really has a thirst for knowledge can learn a simple and quick language. You learn Java, no problem, there are so many JVM-based languages. Scala,closure, there are a lot of well-known language JVM implementations, one to learn about it? Just Java, so study the JVM, look at byte code, understand the difference between the JVM GC mechanism and ref counting, and understand its JIT mechanism.

You said you used spring and ibatis, that Pony orm-use Pure Python to Speak to Your Data Have you ever used this ORM made with Python black magic? Has the Django Admin site been used by this site builder? Again, web.py and flask This quick Build station tool tried?

You said to learn too much threading, then you know that industry rarely use multi-threading, more fiber, the association process it? Do you know how it is to go to make Goroutine a language feature? Look at the picture, don't talk.
Because life is too short to write a script Ah! Small problems in life, there is no need to use "heavy weapons."

Process text, categorize files, bulk download ...
Reptiles or something, a few lines will be written out.

Everything is too lazy to hand operation, all throw to Python good.

Java is too bloated;
PHP is not easy to run locally;
C and C + + are too troublesome;
Golang need to compile;
The CMD function is too weak (bash is also available, but I usually use windows in the day).
List God horse I have not learned to understand it ...

The choice is very limited, the appearance of Python is very timely ... There are some inconvenient places in Java:
    1. System deployment, if you call external commands or resources frequently, it is inconvenient to use Java.
    2. If you want to interact with other tools or languages, Java is less efficient than the glue-language-like python.
    3. Web development, non-industrial applications, Python code is less than 1/3, M.F.B. s performance is not bad.
    4. Simple to publish, the Python environment is quite lightweight compared to Java.
You have to say what Python can do Java do not, I can not think of a moment (I am also very familiar with Java, think about what needs can also be done in Java, there are some things my intuition is not to choose Java. )。 Writing code in Python now seems to be the highest efficiency, higher than go, and if performance is not a priority, Python is definitely preferred. You think, if you get a mapreduce simple processing of the data, Java is still in the import line number Python will be able to finish, you will use Which?

PS: Recently spent a lot of time on go, it seems likely to use go to replace Java and a part of the use of Python, development efficiency is very high, write concurrent program Super worry, and Linux system is better than Java, deployment is simple, do not rely on external tools (go built-in tools, Fairly simple and easy to use compared to Maven and virtualenv). In the long run, the C/c++/java/python that has been relied on may become c/go/python, fully capable of achieving the same functionality and performance, and more efficiently. No motive, motive is curiosity or oneself happen to have time, put aside the purpose of specific purposes, learning a language is not a bad thing, because it can cultivate your vision and different ways of thinking, two can be familiar with the ability to learn new language.

You see me now if I want to use a new language, one weeks of free time is enough for me to get started, because most of the somewhat famous language I have studied, the basic elements are nothing more than that, strong type weak type, static type dynamic type, there is no lazy evaluation, functional or imperative, there is no GC, Dynamic or compile, what is the OO system, what is the concurrency support, multithreading, or native support, or Erlang's Advanced API, how efficient is the language execution. Know enough for yourself to be more flexible, the usual choice is more.

For example, my previous experiments have been written in Python, but recently I found that python efficiency is really too much, then I naturally think of changing the language, then I went to find, first used to python,c/java this certainly is not going back, to consider efficiency, That basic choice is the JVM or JS V8 on or static compilation, and I also prefer the function, find a lap, Clojure seems to be able to, then I change Clojure, a week familiar with the language, and then switched over. The results found that clojure too dependent on Java, but also performance or not, to improve performance I have to give each variable manually type hint, then I need to use clojure, so it took one weeks to simply go to Haskell. Why switch so freely, is because I am all right when these languages basically have turned over to know how to go about it.

So I tell you, cherish college this free time, interested in learning more. Learn to throw it all right, you forget the grammar, but the thought and characteristics are not forgotten or even if forget is also a bit of an impression, and grammar this thing is the simplest and easiest to learn to forget also does not matter. But in case of future use, you have a variety of options.

(In addition, I do not think that the Java programmer learned Python will look at two days to throw to the side haha, since one-third of the code to be able to do the same thing why and their own difficult to get over it haha ~ ~ ~ ~ Five years ago to learn python that fashion is now all rotten Street, okay ~ Don't you want to join my big Haskell boy?

Well, let everyone who asks "what Python can Do" go to this page: / http nbviewer.ipython.org

As for doing something that everyone can do, write a website well. Django's heavy-frame code Restart time is also within 1s, the deployment of a WAR package in Tomcat 30sec enough?
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.