Home headlines An open question to explore: How can programmers improve their programming skills?

An open question to explore: How can programmers improve their programming skills?

Jul 14, 2017 am 10:06 AM
Discuss question

How to improve programming skills? This question is largely an open question, and there may not yet be a unified answer in the IT industry. Everyone's learning and thinking styles are different, and the answers may be different in their minds. The following summarizes some of the more popular and popular views among individuals and web pages, provides some opinions and suggestions for programmers and developers, and helps friends on their journey to learn programming.

An open question to explore: How can programmers improve their programming skills?

1. Plan

At the beginning of programming, make a plan, draw up the design framework and Realize it. and repeat the operation. The best way to learn to code is by writing it. You will continue to learn and improve yourself through your mistakes. It is more motivating than reading a book and completing a project, and it will also bring you more fun. During the design phase, it is necessary to think about important details such as the relationships and interactions between modules and objects, control, and how data flows. If there are patterns or best practices available, use them. When designing a program, the ideas must be clear. First, the hierarchical structure must be clear, so that the relationship between the code blocks can be clarified, and the structure of the code blocks can be more reasonable. Doing something is usually broken down into multiple large steps, each large step can be broken down into multiple small steps, and the small steps can continue to be broken down. This structure is a hierarchical structure. It must be clear at which level the steps of the final code block belong. If this level is disrupted, the probability of bugs in the program is extremely high.

#2. Learn the basic programming language

##Learn basic programming languages ​​that can help you understand the underlying architecture. For example, C language, or assembly language.

Learning how computers execute programs and knowing how the operating system operates are the most basic requirements for programmers. If you want to have a good understanding of basic languages, you can read books about computer architecture, operating systems, embedded systems, driver operating system development, etc.

3. Write code

Practice writing code on your blog. You can also answer questions on different Q&A sites. At the same time you can also write some tutorials (DreamInCode). When you write code, you want to write it correctly so that you can explain the problems and techniques involved. Writing code can also reflect your programming knowledge and provide you with English grammar, which are very important in programming. Pay attention to code quality, don’t write code that looks messy, and don’t use names like asdf.

4. Join an open source project

What are the advantages of joining an open source project? You'll be able to work with others (who have worked alone on private projects) and when faced with unfamiliar code, you'll delve into it and learn to understand an unfamiliar code base (which should be quite challenging)

5. Learn how to read code

Some experts’ answers will mention reading more source code, and of course everyone will also list other For some content, reading source code is a very core method to improve programming ability, and programming ability itself is the core. When your programming skills improve, you will feel tingling when you read something wrong when reading the code. If the design

Module Design is not good, you will feel uncomfortable. Then debugging will naturally become much smoother. . .

What are the benefits of reading high-quality source code? This is very similar to the benefits of a lot of reading for writing. Writing code also has a sense of language. Before creating your own stuff, first read what others have created. Watch more how masters write code and try to understand what the masters are thinking when they write code. Over time, you will imitate and slowly learn how to write code like a master. When the amount of reading and writing reaches a certain level, many so-called design specifications and module processes in the industry will naturally be understood and followed, because this has become a habit.

6. Focus on thinking and testing

Before you start writing code, you need to think about it first, organize your ideas, take out paper and pen, and carefully come up with a plan. Relax your brain and keep your mind clear. Various error situations must be considered from the beginning, such as I/O errors, external module errors, user misoperations, etc. First of all, from the perspective of the possible occurrence of bugs, the more complex the project, the more bugs will be generated, and the actual situation is that the relationship between the two is non-linear. So you must be afraid of the complexity of the code. Bugs will obviously be easier to debug for short codes. A very important task is to conduct unit testing. For each single function, module, program, etc., test it in turn. To generate a set of data within a range to ensure that each function, module, and program can return correct results under any circumstances.

Another important significance of testing is to prevent overlapping bugs. A program has multiple bugs. When they exist together in your program, they have strange interactions with each other, causing errors to occur only with certain data. And when you adjust one of them, all your data will be wrong. You will subconsciously think that there is something wrong with your previous repair. Although this situation sounds ridiculous, in fact, this problem is often encountered.

In addition to unit testing, a very important skill is to encapsulate and re-encapsulate. Encapsulate everything that may need to be called repeatedly into interfaces, abstract classes, methods or functions. The benefits of this are self-evident. Once something goes wrong, all the code can be modified at once. Moreover, when debugging the program, the code is very short, so it is easy to determine which part is causing the problem.

7. Read good programming books

You will learn a lot from books. Although practice is important, by reading good programming books And challenging programming books are an important step in changing your way of thinking. Of course, you can choose some less difficult books, but avoid choosing those "dumb" books, that is, books that can teach you everything in 24 hours or 21 days. There is no way to learn to improve your programming skills from these books.

8. Try to solve some difficult problems

You should try to solve code problems; programmers always try to use the least amount of time during programming. Step by step to solve the difficult problems encountered, and in the process, you can learn the more profound and special functions of the language, so that you will have to think creatively about the code.

9. Some other important things

1) Prepare unit test cases (preferably (Writing unit test cases while writing code), and then continuously improving the unit test case set based on feedback from system joint debugging and production environment. After a few iterations, the modules covered by unit tests will maintain fairly good performance, and you can refactor those modules with confidence.

2) Before you start writing code, write documentation first. Especially if more than one person in the project writes code, documentation is even more important. It can help you clarify your thinking and discover some logic pitfalls in advance. Comments are to guard against "gentlemen" rather than "villains". You need to be on guard against callers who do not follow the rules. Therefore, it is also important to ensure that the required prerequisites have been met through assertions (or inspection judgments). In addition, whether your own code block achieves the expected purpose after execution can also be judged through assertions or check logic. In this regard, some ideas and practices of contract programming can be used for reference. Many times, program bugs occur because some internal implicit conditions are not met, which is more reflected in the fact that the caller does not know what the callee requires of him. Therefore, don't be stingy with comments. Expressing these requirements clearly through standardized comments will significantly reduce bugs.

3) When writing secondary logs to log files, use the popular log class instead of the simple printf. It is best to write important logs in data tables, so that you can use the functions of SQL and database software to manage, analyze, and use these log data.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to solve the problem that jQuery cannot obtain the form element value How to solve the problem that jQuery cannot obtain the form element value Feb 19, 2024 pm 02:01 PM

To solve the problem that jQuery.val() cannot be used, specific code examples are required. For front-end developers, using jQuery is one of the common operations. Among them, using the .val() method to get or set the value of a form element is a very common operation. However, in some specific cases, the problem of not being able to use the .val() method may arise. This article will introduce some common situations and solutions, and provide specific code examples. Problem Description When using jQuery to develop front-end pages, sometimes you will encounter

Teach you how to diagnose common iPhone problems Teach you how to diagnose common iPhone problems Dec 03, 2023 am 08:15 AM

Known for its powerful performance and versatile features, the iPhone is not immune to the occasional hiccup or technical difficulty, a common trait among complex electronic devices. Experiencing iPhone problems can be frustrating, but usually no alarm is needed. In this comprehensive guide, we aim to demystify some of the most commonly encountered challenges associated with iPhone usage. Our step-by-step approach is designed to help you resolve these common issues, providing practical solutions and troubleshooting tips to get your equipment back in peak working order. Whether you're facing a glitch or a more complex problem, this article can help you resolve them effectively. General Troubleshooting Tips Before delving into specific troubleshooting steps, here are some helpful

Clustering effect evaluation problem in clustering algorithm Clustering effect evaluation problem in clustering algorithm Oct 10, 2023 pm 01:12 PM

The clustering effect evaluation problem in the clustering algorithm requires specific code examples. Clustering is an unsupervised learning method that groups similar samples into one category by clustering data. In clustering algorithms, how to evaluate the effect of clustering is an important issue. This article will introduce several commonly used clustering effect evaluation indicators and give corresponding code examples. 1. Clustering effect evaluation index Silhouette Coefficient Silhouette coefficient evaluates the clustering effect by calculating the closeness of the sample and the degree of separation from other clusters.

Deep dive: What is the Django framework? Deep dive: What is the Django framework? Jan 19, 2024 am 09:23 AM

The Django framework is a Python framework for web applications that provides a simple and powerful way to create web applications. In fact, Django has become one of the most popular Python web development frameworks and has become the first choice for many companies, including Instagram and Pinterest. This article will delve into what the Django framework is, including basic concepts and important components, as well as specific code examples. Django basic conceptsDjan

What are the questions in the Rulong 8 Wine Master exam? What are the questions in the Rulong 8 Wine Master exam? Feb 02, 2024 am 10:18 AM

What are the questions involved in the Yulong 8 Wine Master exam? What is the corresponding answer? How to pass the exam quickly? There are many questions that need to be answered in the Master of Wine Examination activities, and we can refer to the answers to solve them. These questions all involve knowledge of wine. If you need a reference, let’s take a look at the detailed analysis of the answers to the Yakuza 8 Wine Master exam questions! Detailed explanation of answers to questions in the Rulong 8 Wine Master exam 1. Questions about "wine". This is a distilled liquor produced by a distillery established by the royal family. It is brewed from the sugar of sugarcane grown in large quantities in Hawaii. What is the name of this wine? Answer: Rum 2. Question about "wine". The picture shows a drink made from dry ginseng and dry vermouth. It is characterized by the addition of olives and is known as "cockney"

What happens if there is a problem with the sound card driver? What happens if there is a problem with the sound card driver? Mar 02, 2024 am 10:49 AM

The sound card driver is a system program in the computer that controls and directs the sound card. It can help us play sound. Therefore, if there is a problem with the sound card driver, the most intuitive situation is that in terms of sound, there will be no sound or the sound will fluctuate and freeze abnormally. What will happen if there is a problem with the sound card driver: 1. Sound error 1. The sound card driver serves the sound, so the most intuitive problem is the sound problem. 2. Whether there is no sound from the computer, or the sound is stuck, delayed, noisy, or the volume tone is abnormal, it may be related to the sound card driver. 3. So when we encounter similar problems, we can try reinstalling or updating the sound card driver. 2. Exclamation mark in Device Manager 1. If there is no problem with the sound, it means that the sound card driver is normal in most cases. 2. But I

Analysis of common problems when Linux SSH service fails to start Analysis of common problems when Linux SSH service fails to start Mar 19, 2024 pm 05:48 PM

Analysis of common problems when Linux SSH service fails to start. In Linux systems, the SSH (SecureShell) service is a commonly used remote management tool that can achieve secure remote access and management. However, sometimes you encounter various problems when starting the SSH service. This article will analyze common SSH service startup failures and provide corresponding solutions, as well as specific code examples. 1. The SSH service is not installed. If the SSH service is not installed in the system, it will naturally not start.

How to recover the D drive of the computer if it is missing How to recover the D drive of the computer if it is missing Jan 07, 2024 am 10:09 AM

Our computer has been upgraded and installed with the win10 operating system or the win10 system that comes with the computer. In some cases when using the computer, the computer's D drive may be missing and cannot be found. For this kind of problem, I think it may be because there is an internal problem in our system. You can try to use the gepedit.msc code to perform related operations during operation. How to recover the computer's D drive is missing 1. First press "win+r" to open Run, enter gpedit.msc, and then click OK. 2. Enter the local computer policy and expand "User Configuration-Administrative Templates-Windows Components-Windows Explorer" 3. Find the "Hide these specified drivers in my computer" on the right