# Effective Java 3/e

<figure><img src="/files/QAibUGaRpqfTusyAGVyu" alt=""><figcaption></figcaption></figure>

## 공부하는 이유

* 수정하기 쉬운 코드를 작성하기 위해, 코드의 좋은 구조를 배우기 위함
* 더 나은 방법을 알아두어 향후 기술적인 선택에서 합당한 근거를 찾기 위함
* 코드 리뷰 할 때, 한마디라도 더 해보려고...!&#x20;

## 개요

* 자바 프로그래밍의 Best Practice / Anti Pattern 를 배울 수 있는 책
* 핵심적인 기본 원칙
  * 명료성 (clarity)
  * 단순성 (simplicity)

## 기본 원칙

이 책의 원칙들은 아래 5가지 내용을 구체적으로 작성한 것이다.

1. 컴포넌트[^1]는 정해진 동작이나 예측할 수 있는 동작만 수행해야 한다. (명료성)
2. 컴포넌트는 가능한 한 작게 유지하는 것이 좋다. (단순성)
3. 코드는 복사되는 것이 아니라 재사용 되어야 한다.
4. 컴포넌트 사이의 의존성은 최소로 유지해야 한다. (단순성)
5. 오류는 가능한 한 빨리 잡아야 한다. (컴파일 타임에 잡을 수 있는 것이 제일 좋다.)&#x20;

[**이 규칙들은 맹종하진 않아야 하지만, 어겨야 한다면 합당한 이유가 있어야 한다.**](#user-content-fn-2)[^2]

[^1]: 재사용 가능한 모든 소프트웨어 요소

[^2]: 먼저 정석이 되는 규칙들을. 배운 후, 언제 그 규칙을 깨도 되느냐를 익힌다.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://programmer-jjy.gitbook.io/second-brain/technical/study/effective-java-3-e.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
