Getting Started with Claude Code
You're a developer who just joined a new team working on a music analytics platform. Your colleague mentioned that Claude Code can help you understand unfamiliar codebases quickly.
Your project directory contains analytics.py with this function:
def calculate_album_stats(albums, min_tracks=5, multiplier=1.2):
"""Process album data and return statistics for qualifying albums."""
output = []
for album in albums:
track_count = album.get('track_count', 0)
if track_count > min_tracks:
adjusted_popularity = album.get('popularity', 0) * multiplier
tier = 'platinum' if adjusted_popularity > 80 else 'gold'
output.append({
'album_id': album['album_id'],
'title': album['title'],
'original_popularity': album.get('popularity', 0),
'adjusted_popularity': adjusted_popularity,
'tier': tier
})
return sorted(output, key=lambda x: x['adjusted_popularity'], reverse=True)[:5]
Note: For instructions on how to set Claude Code up on your own machine, check the setup guide.
Deze oefening maakt deel uit van de cursus
Software Development with Claude Code
Oefeninstructies
- Start Claude Code with
claude. - Ask Claude to explain the
calculate_album_stats()function inanalytics.py. - When done exploring, type
/exitto exit Claude Code.
Praktische interactieve oefening
Zet theorie om in actie met een van onze interactieve oefeningen.
Begin met trainen