How to become a Python expert

Source: Internet
Author: User

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

This article is a summary of some articles I have collected. Because many talented people have already written a lot of good articles about how to become a good Python programmer.

My summary focuses on four basic topics: functional programming, performance, testing, and coding specifications. If a programmer can absorb and digest all these four aspects of content, he/she will have a huge harvest in any case.

Functional Programming

The imperative programming style has become a de facto standard. Imperative programming programs are composed of statements that describe state transition. Although sometimes this programming method is very effective, it is sometimes different (such as complexity)-and it may not seem intuitive relative to Declarative Programming.

If you don't understand what I'm talking about, it's normal. Here are some articles that can help you get your head open. But you should note that these articles are a bit like the Red Pills In the hacking empire-once you have tried functional programming, you will never go 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 these "scripting languages" (Python, Ruby) for their low performance, but you are often easy to ignore the fact that: it is the algorithm used by programmers that causes poor performance of the program.

Here are some very good articles that let you know details about the performance of Python runtime, you will find that through these refined and interesting languages, you can also write high-performance applications. Also, when your boss challenges Python's performance, don't forget to tell him that the second largest search engine in the world is written in Python-it's called Youtube (refer to the Python excerpt)

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

Today, in the computer science field, testing may be the most confusing topic. Some programmers can really understand it, and pay great attention to TDD (test-driven development) and its successor BDD (behavior-driven development ). Some others do not accept it at all, which is a waste of time. Now, I will tell you: if you have never started to use TDD/BDD, you miss a lot of the best things!

This is not just about introducing a technology that can replace the original release management system in your company that uses stupid manual clicks to test applications. More importantly, it is a tool that gives you a deep understanding of your business-what you really need, how you want to solve problems, and how to handle problems. If you have not done so, try it. The following articles will give you some tips:

  • 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
Code Specification

Not all codes are equal. Some code can be read and modified by any other good programmer. But some of them can only be read, and can only be modified by the original author of the code-and it can only be done within hours when he or she has written the code. Why? Because it has not been tested by code (as mentioned above) and lacks correct programming specifications.

The following article describes a collection of minimum rules to be followed. If you follow these guidelines, you will be able to write more concise and beautiful code. As an additional effect, your program will become more readable and easily modified by you and anyone else.

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

Let's copy this document. Start with the person sitting next to you. Maybe at the next programmer salon or programming conference, I have become a master of Python programming!

Wish you a smooth learning journey.

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.