Skip to Content
훌륭한 프로그래머 되는 법: 프로젝트와 팀을 성공으로 이끄는 선배 개발자의 노하우
book

훌륭한 프로그래머 되는 법: 프로젝트와 팀을 성공으로 이끄는 선배 개발자의 노하우

by 최원재, 강전희, 안재덕, 남윤화, 피트 구들리프
May 2016
Beginner to intermediate
438 pages
8h 46m
Korean
Hanbit Media, Inc.
Content preview from 훌륭한 프로그래머 되는 법: 프로젝트와 팀을 성공으로 이끄는 선배 개발자의 노하우
104
1
부
you.write(code) ;
하지만 이러한 태도는 견고한 코드를 만들기 위한 좋은 전략이라고 할 수 없다. 혹은 단순히 게
으름에서 비롯된 결과일 수 있다. 코드 안에 오류가 있을 것으로 여겨지지 않아도, 만약을 대비
해 항상 유심히 확인하고 검토해야 한다.
TIP
코드에서 발생할 수 있는 모든 오류를 무시하지 말라. ’더 늦기 전에‘ 오류 처리를 미루지 말라. 자꾸 미루다 보
면 처리하기가 더 어려워진다.
8.1
메커니즘
우리는 여러 방법으로 코드의 오류를 확인한다. 그중 몇 가지는 다음과 같다.
코드 응답
함수는 값을 반환한다. 그중 어떤 것들은 ‘작동하지 않음’을 뜻한다. 오류에 대한 반환 코드는 무시되
기 십상이다. 코드에 문제가 있음을 알리는 어떤 것도 발견되지 않을 것이다. 실제로, 몇몇
C
표준 함
수의 반환 값을 무시하는 것이 관행으로 자리 잡고 있다.
printf
함수를 이용할 때 얼마나 자주 반환 값
을 확인하는가?
반환 코드는 가장 보편적인 오류 검출 방법이다. 함수들은 값을 반환하고, 운영 체제 프로세스도 값을
반환하며, 어떤 시스템에서는 스레드 역시 값을 반환한다.
반환 코드는 주로 정수 값으로
0
은 성공,
0
이 아닌 것은 오류를 나타낸다. 현대적 코드에서는 다른 형
태로 반환할 수 있다. 값들의 튜플
1
을 반환하거나, 함수의 실
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

클라우드 네이티브: 클라우드 네이티브 애플리케이션을 설계, 개발, 운영하는 핵심 가이드

클라우드 네이티브: 클라우드 네이티브 애플리케이션을 설계, 개발, 운영하는 핵심 가이드

정원천, 보리스 숄, 트렌트 스완슨, 피터 야우쇼베츠

Publisher Resources

ISBN: 9788968482304