3.10 Finding issues before they become problems

주홍영·2022년 3월 11일
0

Learncpp.com

목록 보기
47/199

https://www.learncpp.com/cpp-tutorial/finding-issues-before-they-become-problems/

이번에도 디버깅 철학에 대해서 다룬 내용을 생략한다

One way to address this is to break a single long function into multiple shorter functions. This process of making structural changes to your code without changing its behavior (typically in order to make your program more maintainable) is called refactoring.
복잡한 함수 -> 작은 기능을 하는 여러 함수로 만드는 작업이 refactoring

Shotgunning for general issues

Programmers tend to make certain kinds of common mistakes, and some of those mistakes can be discovered by programs trained to look for them. These programs, generally known as static analysis tools (sometimes informally called linters) are programs that analyze your code to identify specific semantic issues (in this context, static means that these tools analyze the source code). The issues found by static analysis tools may or may not be the cause of any particular problem you are having, but may help point out fragile areas of code or issues that can be problematic in certain circumstances.

프로그래머들이 흔히 하는 실수를 추적해줄 수 있는 툴을 뜻한다
VS에도 built-in 툴이 있는 것 같다.

For Visual Studio users

Build > Run Code Analysis on Solution (Alt+F11).
이를 통해 built-in static analysis tool에 접근할 수 있다

단어장

An issue may lurk undetected in your code
lurk : 숨어있다

profile
청룡동거주민

0개의 댓글