Ten tips to save Python developers time
Python is a beautiful language that can inspire the user to love it. So if you're trying to join the programmer , or you're a little tired of C++,perl,java and other languages, I recommend you try Python.
Python has a lot of features that attract programmers, it is easy to learn, object-oriented, bytecode compilation, free and open source. There is also a run-time check. Complete and fast support, you can perform various tasks of the extension.
High-efficiency Python
In this article, I want to highlight some aspects of Python that can save time and maximize productivity. In preparation, I consulted a few pythonists, what are their most time-saving skills? The answer is here ...
1. Do not use semicolons
Using semicolons is optional in Python, and in contrast to other object-oriented languages, you do not need to use semicolons after each statement.
This looks simple and doesn't seem to save much time; but once your code expands to thousands, the semicolons become distracting and unnecessary to type.
2. Find a code editor called Hand
Choosing a code editor that is called a hand can save a lot of time. Faced with so many code editors, many novice will feel very confused.
It's confusing to get used to an editor and use other editors, so choosing a hand is a good starting point. Whichever you choose, support Flake8 and PEP8 in real time.
For the editor selection Guide, refer to the article which Code Editors do pythonists use?
3. Follow the Python code specification
Following the Python code specification can improve the readability of your code, saving you time in reviewing your code. Python's design philosophy emphasizes the readability of the code. )
4. Use the Help () function
Python's Help () is a handy built-in function that can save a lot of time, such as finding explanations for other functions. You can run the function directly at the interpreter terminal.
Python documents have more use of this function.
5. Using Libraries
Python has a large library of libraries that you don't have to reinvent the wheel every time.
For example, you can select a large number of available packages from the Pypipython package index, which is a software repository.
Scikit-image is a good example of making image processing tasks such as blurring, enhancing contrast, and scaling with only a few function calls to complete.
6. Using Cookiecutter
Cookiecutter is a command-line tool that can help you create a Python project from a project template, which can save a lot of time.
7. Strict comments
Develop a good habit of writing comments that can save you and other people time, especially for debug tracking. Yes we hear a lot, but it seems like a lot of programmers still need to be reminded.
Note working in a team is critical, especially one that has made a lot of changes.
8. Regular testing
Try to test every component in your program. It may sound a bit time-consuming, but a long run can save you a lot of hours, help you find hidden bugs, make you feel more comfortable with your code, and force you to understand how each piece of code works in real-world situations.
REPL is a read-eval-print loop, a common code testing tool that many pythonists use.
9. Focus and professionalism
Pythonists all suggest a focus area and expertise. You can use Python to do a lot of things, from writing web cams to processing calculations and algorithms.
Already have a large number of libraries can help to accomplish these tasks, such as SIMPLECV, computer vision processing, Biopython, is a biological computing library, SymPy, is a mathematical symbol calculation library.
Delve into areas like these and master a specific framework that helps you learn Python at a deeper level, mastering a particular code style that has been mentioned in the third part, and dealing with specific types of issues.
10. Daily encoding
When you get into the habit of writing Python code every day, using Python to solve problems, you start to think in Python, so to speak, it will eventually help you solve the problem faster.
Summarize
In this short article, I've listed some of the main tips I've collected from conversations with Python developers, and below are some of the other tips that I can add in.
Participate in the activities and gatherings of Python
Be sure to participate in every event and rally you can participate in. They benefit from sharing experiences, best practices, tools and other interesting topics.
This may not appear to be an easy strategy, but it is another way to avoid repeating the wheel by suggesting, suggesting, cracking to learn from other people's experiences.
Once a year, pyconf is a good place to know.
Thinking on paper
Thinking on paper--Before you go into the code directly--will give you the flexibility to modify it. Writing code directly will force you to consider the details of the implementation from the start, which is often not the best way to use your time when starting a project. Thinking on paper this way of liberating attention is good for brainstorming and problem solving!
Master Basic Knowledge
This last one seems obvious, but it is important to devote time to learning the basics of Python. This will ultimately save you a lot of time, because you will be better prepared for more complex topics.
Some good books can help, and they include:
It is also important to keep the freshness of information relevant by reading blogs and articles. A great blog that can be followed up is the Mouse Vs. The Python.
http://www.bkjia.com/PHPjc/1042402.html www.bkjia.com true http://www.bkjia.com/PHPjc/1042402.html techarticle Ten tips to save Python developer Time Python is a beautiful language that can inspire the user to love it. So if you're trying to join the programmer, or you're a little bit bored ...