Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 독서
- android custom view
- ListAdapter
- 스피너
- ExoPlayer
- Python
- Zsh
- android ktor
- android exoplayer
- map
- kotlin list
- ChatGPT
- 시행착오
- doc2vec
- kotlin collection
- list map
- exoplayer cache
- video caching
- ktor api call
- ktor client
- getChangePayload
- DiffUtil.ItemCallback
- 유튜브
- FastAPI
- ListAdapter DiffUtil
- llm
- AWS EC2
- android
- build with ai
- 안드로이드
Archives
- Today
- Total
버튼 수집상
[글] 마틴 파울러가 알려주는 ChatGPT와 페어 프로그래밍 하는 법 본문
요즘 ChatGPT를 정말 많이 사용하는데,
코드 짜다가 단편적인 부분에 대해서만 물어보는 바람에
소스코드 안에서 코드의 패러다임이 안 맞을 때가 있다.
<리팩토링> 저자가 말하는 ChatGPT랑 협업하기 팁을 참고하면
프로젝트 설계부터 구현까지 ChatGPT를 유용하게 사용할 수 있겠다.
유용해보이는 영어 표현들도 같이 기록.
원문 기사 : An Example of LLM Prompting for programming
* LLM(Large Language Model) Prompting : 코드가 아닌 자연어로 AI와 상호작용하게 해주는 프롬트.
마틴 파울러가 알려주는 ChatGPT와 페어 프로그래밍 하는 법
[한국어 번역] An example of LLM prompting for programming by Martin Fowler
sigridjin.medium.com
1. 풀고자 하는 문제의 맥락을 설명
- 어떻게 설계되면 좋겠는지
- Here are the common implementation strategy:
- 이 아래로 번호로 매겨도 ok.
- 기술스택 목록
- All codes should be written in the tech stack mentioned above.
- 테스트 방법
- Here are certain patterns should be followed when implement and test the component
- 예시)
1. When write test, use describe instead of test
2. Data-driven tests are preferred.
3. When test the view component, fake view model via the view model interface
- "코드는 작성하지 말아라"
- Don’t generate code(yet). Describe the solution, and breaking the solution down as a task list based on the guidance mentioned above. And we will refer this task list as our master plan.
- 코드를 바로 적게 하지 않고 Task List 작성을 유도한다.
- Generated Knowledge
- 비밀로 유지되어야 하는 실제 프로덕션 코드를 절대 넣어서는 안 된다
- 당연한 사실이지만 다시 리마인드
2. 꼬리를 무는 질문하기
- Task List에서 수정사항 있으면 번호를 지시해서 재작성 명령하기
- 피드백 주고받으면서 아키텍처 수정해나가기
3. 컴포넌트 이름 짓게 하기
- Task List 작성이 완료되면 디테일을 요구한다
- Rewrite the master plan, this time with detailed component names, methods, and prop
4. 코드 작성시키기
- 코드 컨벤션에 맞춰서 리팩토링을 지시할 수 있다.
- Token Limit 극복하기
- 답변이 중간에 멈췄을 때 "You are not finished." 혹은 "Go on."
- 대화가 길어질수록 앞서 언급된 컨텍스트를 까먹는다.
- 그래서 Task List의 번호 매기는 것이 도움된다.
정리
프로젝트 요구사항을 Task List로 구조화한 뒤,
리스트 항목의 내용을 구체화시켜나가는 방향으로 대화를 유도한다.
728x90
'TIL - 블로그(기사)' 카테고리의 다른 글
[기사] “자금 모두 바닥날 위기” 좀비기업 된 유니콘들, 무슨 일? (0) | 2023.12.20 |
---|---|
[글] '혼자' 보다는 '함께' 학습해야 하는 이유 (0) | 2023.09.07 |
[글] 프론트엔드 개발의 종말 (0) | 2023.09.04 |
[글] 개발자라면 반드시 알아야하는 기본기 (0) | 2023.06.30 |
[기사] C++ 창시자 비야네 스트롭스트룹Bjarne stroustrup 인터뷰 번역 (0) | 2023.06.29 |