← Software engineering

From idea to program

Coding, testing and debugging

编程、测试与调试

After design comes coding: writing the code that carries out the requirements.

Testing checks that the software works as it should and finds bugs; debugging is finding their cause and fixing it.

Good code is easy to read: clear names for variables and functions, short functions that do one job, and comments that explain "why" rather than "what". Code is read far more often than it is written.

Testing has levels: unit tests check one function, integration tests check that several parts work together, and system tests check the whole app as a user would use it. Running tests automatically catches bugs early.

When debugging: read the error message carefully, reproduce the problem with fixed steps, narrow down where it happens by printing values or using a debugger, then write a test so it doesn't come back.

Ask the AI assistant

Ask anything about this lesson and get a simple answer with the terms in Chinese, Arabic and English.

The AI assistant runs on Google's Gemini model and can make mistakes. Do not write personal information. Available to signed-in learners, up to 30 requests a day.

The content is simplified and covers the basics only.