Python is a beautiful language that can inspire the love of the user. So if you're trying to join a programmer, or you're a bit tired of C++,perl,java and other languages, I recommend you try Python.
Python has a lot of features to attract programmers, it's easy to learn, object-oriented, bytecode compilation, free and open source. There is also a run-time check. Complete and fast support for the expansion of various tasks.
In this article, I want to emphasize some aspects of Python that can save time and maximize productivity. In preparation, I consulted a few pythonists, what are their most time-saving tips? The answer is here ...
Using semicolons is optional in Python, and you don't need to use semicolons behind each statement in contrast to other object-oriented languages.
This looks simple and doesn't seem to save much time, but once your code expands to thousands, the semicolons become distracted and don't need to be typed.
You can save a lot of time by choosing a code Editor to call your hands. Faced with so many code editors, many beginners will feel very confused.
It's confusing to get used to an editor to use another editor, so choosing a hand is a good starting point. Whichever you choose, support Flake8 and PEP8 in real time.
For an editor selection guide, refer to the article Which Code Editors do pythonists use?
Following the Python code specification can improve the readability of your code, saving you time to review your code. (Python's design philosophy emphasizes the readability of your code.) )
Python Help () is a handy built-in function that saves 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.
Python has a lot of libraries that you don't have to reinvent the wheel every time.
For example, you can choose from PyPI (Python package index) a large number of available packages, this is a software warehouse.
Scikit-image is a good example of the image processing task such as fuzzy, enhanced contrast, scaling requires only a few function calls can be completed.
Cookiecutter is a command-line tool that can help you create Python projects from engineering templates, which can save a lot of time.
7. Strict notes
Develop a good habit of writing notes that can save you and other people's time, especially for debugging and tracking. (Yes we hear a lot, but it seems like a lot of programmers still need to be reminded).
Annotations are critical in teamwork, especially one that makes a lot of changes.
8. Regular testing
Try to test every component in your program. It may sound a bit time-consuming, but long runs can save you a lot of time, help you find hidden bugs, make you more comfortable with your code, and force you to understand how each piece of your code works in real life.
REPL is a read-eval-print loop, a common code testing tool that many pythonists use.
9. Focus and Professional
Pythonists all suggest a focus area and expertise. You can do a lot of things with Python, from writing web cams to processing calculations and algorithms.
There are already a large number of libraries that can help accomplish these tasks, such as SIMPLECV, computer vision processing, Biopython, a biometric library; sympy, a Mathematical symbolic computing 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 (mentioned in part Three), dealing with specific types of problems.
10. Daily coding
When you get into the habit of writing Python code every day and using Python to solve problems, you start thinking in Python, so to speak, which will ultimately help you solve problems faster.
Summarize
In this short article, I've listed the main tips I've collected from conversations with Python developers, and here are the other tips I can add.
Participate in Python activities and rallies
Be sure to attend every event and rally you can attend. They are useful for sharing experiences, best practices, tools, and other interesting topics.
This may not be an easy strategy on the surface, but it is another way to avoid duplicating the wheel by suggesting, suggesting, cracking to learn from other people's experiences.
The annual pyconf is a good place to know the activity.
Thinking on the paper
Thinking on paper-doing this before you dive directly into the code-will give you the flexibility to modify it. Writing code directly will force you to consider the details of implementation from the outset, which is often not the best way to use your time when starting a project. Thinking about this kind of distraction on paper is good for brainstorming and problem solving.
Master Basic Knowledge
This last one seems obvious, but it must be time to learn 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's also important to keep the information fresh by reading blogs and articles. One of the great blogs you can follow up on is the Mouse Vs. The Python.