How to solve the problem of program error when learning programming? For every programming beginner encountered a headache is the program error. On the topic of program error we are more concerned about the code error to master certain skills to solve.

As a programmer on your way to work, you should keep errors in perspective. This is not a major accident. Errors are common, regardless of whether they are caused by your environment configuration, code debugging, or other circumstances. Questions can be answered through search engines. Your questions can certainly be answered through your own efforts. Try to find the answer by following the following ideas:

First, correctly identify and search for problems

Try to use search engines to search their own errors, at the beginning is often not simple, we need to have a basic English word reserve, students who are not good at English, to master the use of various translation software to help improve their efficiency.

Common English words must be memorized so that we can find the key parts of the information to search. Then you need to correctly identify your problem, in general, in the last paragraph of the error will give a specific hint, we just need to directly Baidu this line. For beginners, SyntaxError, KeyError, AttributeError, ModuleNotFound and other common errors can be found in the first three posts of the search engine. It is also important to write down problems after they are resolved, otherwise there will be no growth.

The case where a copy error prompts you to search and find no valid solution, most likely because the corresponding code contains information unique to you. So you have to sort through a bunch of cues to figure out what kind of mistake it is, what words are unique to you that need to be eliminated and retrieved, and that’s an important skill that can only be honed through constant searching.

Two, dare to trial and error

If you are still trying to solve your problem by just watching the video and not trying, give it up. Such as the following questions, “what does this variable mean, what does this function do, what if this function is not written, this API line”, you can see it once, if you do not understand, you can perform it again to check the results and observe the changes.

“What happens if you don’t write the function?” You don’t write the function and try what happens. If it’s not what you want, you can fill in the function and realize its importance. “Whether this API works or not”, I generally recommend you to try it, whether it works or not is your independent thinking, for your later exploration and analysis of similar problems are helpful.

How to ask questions?

When you encounter problems that you can’t fix yourself, always consult someone with the problem/error code. It’s important to make your questions very effective, so avoid:

Ask questions without searching/trying to solve them; Does not provide a complete error log; Do not provide code snippets related to error code; Send an error without explanation; A good question should address at least two of the following, and try to get someone else to help you solve the problem once and for all. Say what you want to implement or what the code is doing; Complete error reporting code and corresponding code segment; Ensure that the first page of baidu error code is not available tutorial; It’s best to talk about what you’ve tried.

The best time to plant a tree was ten years ago. The second best time is now. ** For programmers who are learning to program or want to get promoted at work, if you want to improve your core programming skills, come prepared and confident in your interview! ** I may be able to help you here ~

C language C++ programming learning exchange circle, **QQ group [765803539] ** wechat public number: C language programming learning base

Share (source code, project actual combat video, project notes, basic introduction tutorial)

Welcome to change careers and learn programming partners, use more information to learn and grow faster than their own thinking oh!

Programming learning books: