Claude Code 실제로 살펴보기

Claude Code로 배우는 Software Development

Dani Zysman

AI Curriculum Manager @ DataCamp

Claude Code로 배우는 Software Development

Claude Code의 위치

Claude 제품 구조: 웹 채팅, 데스크톱 앱, 터미널 CLI

  • Claude.ai: 채팅 인터페이스, 일반 작업용
  • Claude Desktop: 파일 접근 가능한 앱
  • Claude Code: 터미널 기반, 코딩 전용
Claude Code로 배우는 Software Development

시작하기

$ curl -fsSL https://claude.ai/install.sh | bash

자세한 내용은 다음을 참고하세요: https://code.claude.com/docs/en/overview

$ cd /path/to/your/project
$ claude

유용한 명령어:

  • /clear: 대화 기록 지우기
  • /exit 또는 Ctrl + C: 세션 종료
  • /help: 사용 가능한 명령어 표시
Claude Code로 배우는 Software Development

헷갈리는 코드 분석하기

def process_data(records, threshold=0.5):
    result = []
    for r in records:
        if r.get('value') and r['value'] > threshold:
            x = r['value'] * 1.1 if r.get('premium') else r['value']
            result.append({'id': r['id'], 'adjusted': x, 'flag': x > 1})
    return sorted(result, key=lambda d: d['adjusted'], reverse=True)[:10]
  • 한 글자 변수
  • 주석 없음
  • 압축된 로직
Claude Code로 배우는 Software Development

Claude가 설명하고 문서화합니다

> What does process_data() do?
process_data(): Filter, Adjust & Rank

Filter: Keep records where value > threshold (default: 0.5)
Adjust: Apply 10% boost if premium=True
Transform: Output id, adjusted value, and flag (if adjusted > 1)
Sort: Return top 10 by adjusted descending
> Add a docstring to process_data()
"""Filter records above threshold, apply 10% premium uplift, and return 
the top 10 by adjusted value."""
Claude Code로 배우는 Software Development

버그 찾기

def add_item(item, item_list=[]):
    item_list.append(item)
    return item_list

문제를 찾을 수 있나요?

Claude Code로 배우는 Software Development

Claude가 버그를 찾아 수정합니다

> Find the bug in add_item() and fix it
Bug found and fixed: The issue was a mutable default argument. 

Using item_list=[] means all calls to add_item() without providing a 
list argument would share the same default list object, 
causing items to accumulate across calls.
def add_item(item, item_list=None):
    if item_list is None:
        item_list = []
    item_list.append(item)
    return item_list
Claude Code로 배우는 Software Development

문제 해결

문제 해결 방법
"Context window exceeded" /clear로 초기화
속도 제한 잠시 후 다시 시도
결과가 부정확함 한 가지 작업에 집중한 프롬프트 작성
Claude Code로 배우는 Software Development

피드백 루프

개발 루프: 설명, 생성, 검토, 개선

Claude Code로 배우는 Software Development

연습해 봅시다!

Claude Code로 배우는 Software Development

Preparing Video For Download...