How to become a Python master (go)

Source: Internet
Author: User

http://www.cnblogs.com/xupeizhi/p/3207976.html#2896469

How to become a python master

This article is from how to become a proficient Python programmer this article translated.

This article is mainly a summary of some of the articles I have collected. Because there are many more talented people than I have written a lot about how to be a good Python programmer.

My summary is mainly focused on four basic topics: functional programming, performance, testing, coding specifications. If a programmer can absorb the knowledge of the four aspects of the content, then he or she will have a great harvest anyway.

Function-Type programming

The imperative style of programming has become a de facto standard. Imperative programming programs are made up of statements that describe state transitions. While this is sometimes very effective, it can sometimes be quite different (such as complexity)-and it may seem less intuitive than a declarative approach to programming.

If you don't understand what I'm talking about, it's normal. Here are some articles that can get your head right. But note that these articles are a bit like the red pill in the Matrix-once you've tried functional programming, you'll never look back.

    • Http://www.amk.ca/python/writing/functional
    • Http://www.secnetix.de/olli/Python/lambda_functions.hawk
    • Http://docs.python.org/howto/functional.html
Performance

You will see that so many discussions are criticizing how these "scripting languages" (Python,ruby) are performing poorly, but you often tend to overlook the fact that programmers use algorithms that lead to a poor performance of the program.

Here are some great articles that let you know the details of Python's run-time performance, and you'll find that you can write high-performance applications through these refined and interesting languages. And, when your boss questions Python's performance, don't forget to tell him that the world's second-largest search engine is written in Python-it's called YouTube (see Python excerpt)

    • Http://jaynes.colorado.edu/PythonIdioms.html
    • Http://wiki.python.org/moin/PythonSpeed/PerformanceTips
Test

Now in the computer science community, testing can be one of the most confusing topics. Some programmers can really understand it and attach great importance to TDD (test-driven development) and its successor, BDD (behavior-driven development). and others simply do not accept that it is a waste of time. Well, I'll tell you now: If you haven't started using TDD/BDD, you've missed out on a lot of the best stuff!

This is not just about introducing a technology that can replace the original release management of your company with a stupid manual click Test Application, and more importantly, a tool that gives you a deep understanding of your own business areas-the real things you need, the way you want to conquer problems, and deal with problems. If you haven't done so yet, please try it. The following articles will give you some hints:

    • http://www.oreillynet.com/lpt/a/5463
    • http://www.oreillynet.com/lpt/a/5584
    • Http://wiki.cacr.caltech.edu/danse/index.php/Unit_testing_and_Integration_testing
    • Http://docs.python.org/library/unittest.html
Coding specifications

Not all codes are born equal. Some code can be read and modified by any other good programmer. But some can only be read, and can only be modified by the original author of the code-and this is just a few hours after he or she writes the code. Why is that? Because there is no code to test (said above) and lack of proper programming specifications.

The following article describes a minimal set of specifications that should be adhered to. If you follow these guidelines, you will be able to write more concise and beautiful code. As an added effect, your program becomes more readable and easier to modify by you and any other person.

    • http://www.python.org/dev/peps/pep-0008/
    • Http://www.fantascienza.net/leonardo/ar/python_best_practices.html

Then go and circulate this information. Start with the person sitting next to you. Maybe at the next programmer's salon or programming conference, you've become a python programmer!

I wish you a smooth study journey.

If you like these articles, please top it up on Weibo and let the others know.

How to become a Python master (go)

Related Article

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.