0.4 Introduction to C++ development

주홍영·2022년 3월 9일
0

Learncpp.com

목록 보기
4/199

https://www.learncpp.com/cpp-tutorial/introduction-to-cpp-development/

이번 챕터에서는 c++ 프로그램 방법론에 대해서 이야기한다
일단 간략하게 다음과 같은 프로세스로 이뤄진다

Step 1: Define the problem that you would like to solve

step 1은 "what"에 관한 step
무엇을 프로그램할지는 간단하면서도 어려운문제
잘 정의된 아이디어만 있다면 문제없다

Step 2: Determine how you are going to solve the problem

step 2는 "how"에 관한 step
가장 자주 무시되는 step이기도 하다
문제를 푸는 방법은 정말 다양하나 어떤 방법은 좋고(효율적이고) 어떠한 방법은 그 반대다.
프로그래머들은 자주 앉자마자 코딩을 시작하며 실수를 범한다

Typically, good solutions have the following characteristics:

  • straightforward (간단하게, 복잡하고 혼란스럽지 않도록)
  • well documented (한계나 가정등을 자세히 기록)
  • modularly (모듈식, 따라서 파트가 재사용할 수 있고, 수정시 영향 최소화)
  • robust, can recover or give useful messages (디버깅을 위해서)

    As an aside… (여담으로)
    The term bug was first used by Thomas Edison back in the 1870s! However, the term was popularized in the 1940s when engineers found an actual moth stuck in the hardware of an early computer, causing a short circuit. Both the log book in which the error was reported and the moth are now part of the Smithsonian Museum of American History. It can be viewed here.
    토마스 에디슨이 처음 사용했지만 moth (나방) 벌레로 인한 합선 때문에 발생한 오작동에서 버그라는 말이 유명해짐

프로그래머는 대부분의 시간을 코드를 유지보수하면서 보낸다
따라서 코딩을 시작하기 전에 최적의 방법에 대해서 생각하는 것은 매우 중요하다

Step 3: Write the program

step 3는 "write"
프로그래밍 언어에 대한 지식과 텍스트 에디터가 필요하다
아무 editor나 사용해서 스크립팅 해두 되나
코딩을 위한 editor를 사용해서 스크립팅하기를 권고함

일반적으로 코딩 에디터는 다음과 같은 기능을 지원한다
1. Line numbering
2. Syntax highlighting and coloring
3. unambiguous font (ex 0과 O의 구분)
효율적인 코딩을 위해서

단어장

crux : 문제나 쟁점의 가장 중요한(곤란한) 부분
Typically : 일반적으로
robust : 튼튼한, 탄탄한, 혈기 왕성한
consist of : ~으로 이뤄지다, 구성되다
cope : 대처하다
ex) updates to cope with changes in the environment
urge : 권고하다
ex) we strongly urge you to use an editor that is designed for programming (called a code editor)
unambiguous : 모호하지 않은 (<-> ambiguous 모호한)

profile
청룡동거주민

0개의 댓글