Skip to Content
실무로 통하는 클린 코드
book

실무로 통하는 클린 코드

by 막시밀리아노 콘티에리, 이태영
August 2024
Beginner to intermediate
488 pages
11h 1m
Korean
Hanbit Media, Inc.
Content preview from 실무로 통하는 클린 코드
316
실무로 통하는 클린 코드
문제 설명
테스트 주도 개발 기법을
적용하기가 더 어려움
테스트 주도 개발은 결합도를 다루고 새 테스트를 만들 때 이를 우회해야 합니다.
상황에 맞는 고유한 개념
이전 예제 코드를 참고하세요. 고유성은 범위에 따라 달라집니다. 그리고 절대 전역이어서
는 안 됩니다.
멀티 스레드 환경 문제
싱글턴이 많으면 스레드에 안전하지도 않고 재진입도 불가능하며 예기치 않은 동작을 유
발합니다.
가비지 상태 누적
여러 테스트를 실행하면 싱글턴이 부풀어 오를 수 있으며, 수집되지 않으므로 가비지가
유지됩니다.
클래스 단일 책임 위반/
관심사 분리(
SoC
)
클래스의 단일 책임은 인스턴스를 생성하는 것이지 인스턴스를 관리하는 것이 아닙니다.
쉬운 접근 지점 싱글턴이 있으면 더 많은 객체가 쉽게 전역 참조를 하며 난장판이 될 수 있습니다.
의존성 지옥
클래스는 싱글턴 객체에 종속되고, 해당 싱글턴 객체는 다른 싱글턴 객체에 종속되고…
계속 이어집니다.
유연성 부족 싱글턴 객체가 생성된 후에는 교체하거나 수정할 수 없습니다.
수명 주기 관리의 어려움
싱글턴의 수명 주기를 관리하는 것은 어려울 수 있으며, 메모리 누수나 불필요한 리소스
사용으로 이어질 수 있습니다.
관련 레시피
10
.
4
절 ‘코드에서 교묘함 제거하기’
12
.
5
절 ‘디자인 패턴 남용 제거하기’
17.3
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

데이터 과학을 위한 통계(2판)

데이터 과학을 위한 통계(2판)

이준용, 피터 브루스, 앤드루 브루스, 피터 게데크
클라우드 네이티브 애플리케이션 디자인 패턴

클라우드 네이티브 애플리케이션 디자인 패턴

카순 인드라시리, 스리스칸다라자 수호티얀
데이터 엔지니어를 위한 97가지 조언

데이터 엔지니어를 위한 97가지 조언

Tobias Macey, 임혜연(Lim Hye Yeon)

Publisher Resources

ISBN: 9791169212779