Community

개발자 99% 커뮤니티에서 수다 떨어요!

← Go back
Clean code #2 의미있는 이름
#clean_code
2년 전
802

오늘 읽은 범위

2장 의미있는 이름

책에서 기억하고 싶은 내용을 써보세요.

  • 해법 영역에서 가져온 이름을 사용하라

  • ( Use solution domain name , The code that has more to do with problem domain concepts should have names drawn from the problem domain.)

코드를 읽는 사람도 프로그래머이다 ( 나를 포함해서 )

기술 개념에는 기술 이름이 가장 적합한 선택이다

적절한 프로그래밍 용어가 없다면 문제 영역에서 이름을 가져오라

우수한 프로그래머는 해법 영역과 문제 영역을 구분할 줄 안다

  • For Nico

The people who read my code is also programmer ( include me )

Term from solution domain is best for solution concept

If there is no appropriate name in solution domain then bring a name from problem domain

Brilliant programmer can make distinction between problem domain and solution domain

오늘 읽은 소감은? 떠오르는 생각을 가볍게 적어보세요

나의 코드는 전문가적인가?

적절한 방법을 찾아내 원하는 것을 구현한 나의 코드 칭찬할 일이다

하지만 코드의 독자는 나를 포함한 개발자이다

내가 쓴 코드, 일반적인 개발자가 읽을때 쉽게 이해할수 있는가?

다른 개발자가 내 코드를 이해하지 못한것은 내가 더 뛰어나서가 아니다

내가 쓴 코드가 전문가적이 아니기 때문이다

책의 저자는 이렇게 이야기한다

전문가 프로그래머는 '명료함이 최고'라는 사실을 이해한다

자신의 능력을 좋은 방향으로 사용해 남들이 이해하는 코드를 내놓는다

  • For Nico

I get question my self 'My codes is professional?'

Finally I found all the way how I can make something what I wanted to

Celebration! But readers for my code are programmers ( include me )

Can I convince that readers can easily understand my code ?

If they can't understand my code that doesn't mean that I'm smarter

That means I'm not professional

The author says

The professional programers know that 'Clearness is the best'

They make some code what is easily understandable using there ability

궁금한 내용이 있거나, 잘 이해되지 않는 내용이 있다면 적어보세요.

클래스의 이름에 Manager, Processor, Data등의 일반적인 이름을 사용하지 말라는 내용이 있다

코드를 짜면서 고민해 보았던 부분이다

나는 위치 정보를 처리하는 클래스를 'LocationManager'라고 부를 수 밖에 없었고

서버와 데이터를 주고받는 클래스를 'ServerDataManager', 'ServerDataOperator' 라고 밖에 부를 수 없었다.

  • For Nico

There is some advice "Do not use general word like 'Manager', 'Processor', 'Data' for class name"

Which is I consider when I make some class

I didn't have choice but using 'ServerDataManager', 'ServerDataOperator' for class handle the data operating between server, using 'LocationManger' for class hold and manger user's geolocation