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

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

by 최원재, 강전희, 안재덕, 남윤화, 피트 구들리프
May 2016
Beginner to intermediate
438 pages
8h 46m
Korean
Hanbit Media, Inc.
Content preview from 훌륭한 프로그래머 되는 법: 프로젝트와 팀을 성공으로 이끄는 선배 개발자의 노하우
49
3
장
코드 적게 쓰기
석, 장황한 설명 등과 같은 여러 형태를 띠고 있다. 좀 더 자세히 알아보자.
3.2
허술한 논리
무의미한 코드의 간단하고 흔한 사례로 조건문과 중복적 논리 구조의 남발을 꼽을 수 있다. 허
술한 논리는 곧 느슨한 정신을 표현한다. 혹은 논리 구조에 대한 이해가 없다는 뜻이다. 다음
예를 살펴보자(이때 변수
expression
은
bool
형이다).
If
(
expression
)
return true
;
else
return false
;
이 코드는 다음과 같이 더 단순하고 직관적으로 변경할 수 있다.
return expression
;
위의 코드는 간편할 뿐만 아니라 읽기도 쉬워 이해하기에 어렵지 않다. 코드라기보다는 영어
문장처럼 보여 편하게 읽을 수 있다. 그리고 눈치챘겠지만, 컴파일러는
1
비트도 신경 쓰지 않
는다. 구구절절하게 표현된 또 다른 코드의 사례를 살펴보자.
if
(
something
= =
true
)
{
//…
}
이 표현보다는 다음 표현이 훨씬 낫다.
if
(
something
)
훌륭한 프로그래머 5교 수정.indd 49 2015. 12. 1. 오전 10:56
50
1
부
you.write(code) ;
이러한 예제는 매우 간단한 경우로, 실제로는 훨씬 더 정교한 구조로 만들어진다. 간단한 것을
복잡하게 만드는 프로그래머의 능력을 절대
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