Skip to content

Commit

Permalink
translate(ko): Comments (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
738 committed Apr 14, 2020
1 parent 63b21cd commit 30b2369
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
8. [Concurrency](#concurrency)
9. [Error Handling](#error-handling)
10. [Formatting](#formatting)
11. [Comments](#comments)
11. [์ฃผ์„(Comments)](#์ฃผ์„comments)
12. [๋ฒˆ์—ญ(Translations)](#๋ฒˆ์—ญtranslations)

## ์†Œ๊ฐœ(Introduction)
Expand Down Expand Up @@ -2703,21 +2703,21 @@ import { UserService } from '@services/UserService';

**[โฌ† ์ƒ๋‹จ์œผ๋กœ](#๋ชฉ์ฐจ)**

## Comments
## ์ฃผ์„(Comments)

The use of a comments is an indication of failure to express without them. Code should be the only source of truth.
> Donโ€™t comment bad codeโ€”rewrite it.
์ฃผ์„์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์€ ์ฃผ์„ ์—†์ด ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๋Š” ๊ฒƒ์ด ์‹คํŒจํ–ˆ๋‹ค๋Š” ํ‘œ์‹œ์ž…๋‹ˆ๋‹ค. ์ฝ”๋“œ๋Š” ๋‹จ์ผ ์ง„์‹ค ๊ณต๊ธ‰์›(Single source of truth)์ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

> ๋‚˜์œ ์ฝ”๋“œ์— ์ฃผ์„๋“ค ๋‹ฌ์ง€ ๋งˆ๋ผ. ์ƒˆ๋กœ ์งœ๋ผ.
> โ€” *Brian W. Kernighan and P. J. Plaugher*

### Prefer self explanatory code instead of comments
### ์ฃผ์„ ๋Œ€์‹ ์— ์ž์ฒด์ ์œผ๋กœ ์„ค๋ช… ๊ฐ€๋Šฅํ•œ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜์„ธ์š”

Comments are an apology, not a requirement. Good code *mostly* documents itself.
์ฃผ์„์€ ์‚ฌ๊ณผ์ผ ๋ฟ, ํ•„์š”ํ•œ ๊ฒƒ์ด ์•„๋‹™๋‹ˆ๋‹ค. ์ข‹์€ ์ฝ”๋“œ๋Š” ๋Œ€๋ถ€๋ถ„ ๊ทธ ์กด์žฌ ์ž์ฒด๋กœ ๋ฌธ์„œํ™”๊ฐ€ ๋ฉ๋‹ˆ๋‹ค.

**Bad:**

```ts
// Check if subscription is active.
// subscription์ด ํ™œ์„ฑํ™” ์ƒํƒœ์ธ์ง€ ์ฒดํฌํ•ฉ๋‹ˆ๋‹ค.
if (subscription.endDate > Date.now) { }
```

Expand All @@ -2730,9 +2730,9 @@ if (isSubscriptionActive) { /* ... */ }

**[โฌ† ์ƒ๋‹จ์œผ๋กœ](#๋ชฉ์ฐจ)**

### Don't leave commented out code in your codebase
### ๋‹น์‹ ์˜ ์ฝ”๋“œ๋ฅผ ์ฃผ์„ ์ฒ˜๋ฆฌํ•˜์ง€ ๋งˆ์„ธ์š”

Version control exists for a reason. Leave old code in your history.
๋ฒ„์ „ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ์ด ์กด์žฌํ•˜๋Š” ์ด์œ ์ž…๋‹ˆ๋‹ค. ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” ์ฝ”๋“œ๋Š” ๊ธฐ๋ก์— ๋‚จ๊ธฐ์„ธ์š”.

**Bad:**

Expand All @@ -2756,9 +2756,9 @@ type User = {

**[โฌ† ์ƒ๋‹จ์œผ๋กœ](#๋ชฉ์ฐจ)**

### Don't have journal comments
### ์ผ๊ธฐ ๊ฐ™์€ ์ฃผ์„์„ ๋‹ฌ์ง€ ๋งˆ์„ธ์š”

Remember, use version control! There's no need for dead code, commented code, and especially journal comments. Use `git log` to get history!
๋ฒ„์ „ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ์„ ์‚ฌ์šฉํ•˜์„ธ์š”! ์ฃฝ์€ ์ฝ”๋“œ, ์ฃผ์„ ์ฒ˜๋ฆฌ๋œ ์ฝ”๋“œ, ํŠนํžˆ ์ผ๊ธฐ ๊ฐ™์€ ์ฃผ์„์€ ํ•„์š” ์—†์Šต๋‹ˆ๋‹ค. ๋Œ€์‹ ์— ๊ธฐ๋ก์„ ๋ณด๊ธฐ ์œ„ํ•ด `git log` ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜์„ธ์š”!

**Bad:**

Expand Down

0 comments on commit 30b2369

Please sign in to comment.