Skip to content

Learning a Programming Language

A practical workflow for learning any language, whether first or fifteenth.

PhaseDurationFocus
OrientationDays 1-3Tooling, hello world, language tour
FundamentalsWeeks 1-2Syntax, types, control flow, functions
CompetenceWeeks 2-4Modules, idioms, small projects
FluencyWeek 4+Real projects, contribution, teaching

Experienced programmers learning a new language: compress to 1-2 weeks.

ActivityTimePurpose
Anki review10 minRetain syntax and idioms
Lesson or docs20 minLearn new concepts
Coding practice30+ minApply through exercises/projects

Consistency beats intensity. 30 minutes daily outperforms weekend marathons.

Goal: Run code and understand the ecosystem.

Terminal window
# Install the language and tooling
# Run the REPL or hello world
# Verify your editor has language support
  • Read the official language tour or tutorial
  • Note syntax that differs from languages you know
  • Identify: How do I run code? Import modules? Print output?

Create Anki cards as you learn. Use cloze deletions:

# Card front
In Python, iterate over a list with indices using {{c1::enumerate()}}
# Card back
In Python, iterate over a list with indices using enumerate()

Keep cards atomic—one fact per card.

Goal: Write basic programs without constant reference.

Work through these in order:

  1. Syntax — How code is structured (indentation, semicolons, braces)
  2. Types — Primitives, collections, type system philosophy
  3. Control flow — Conditionals, loops, pattern matching
  4. Functions — Definition, arguments, return values
  5. Error handling — Exceptions, Result types, or language equivalent

For each concept:

  1. Read — Official docs or lesson plan section
  2. Write — Code examples from memory, not copy-paste
  3. Card — Add syntax patterns to Anki
  4. Exercise — Solve a small problem using the concept

After the first few days, mix practice:

# Bad: blocked practice
20 string problems, then 20 array problems
# Good: interleaved practice
String → Array → HashMap → String → Array

Interleaving feels harder but produces better retention.

Goal: Build small projects and write idiomatic code.

Start the language track on Exercism:

  • Structured exercises with increasing difficulty
  • Automated feedback on code style
  • Optional mentorship from experienced developers
  • Study other solutions after submitting

Build something real:

Project TypeExamples
CLI toolTodo list, file organizer, markdown converter
Data processingCSV parser, log analyzer, API client
Web appSimple CRUD, personal dashboard

Choose projects that solve a problem you have.

Study well-written code in the language:

  • Standard library source
  • Popular open-source projects
  • Style guides (official or community)

Note patterns that differ from your expectations.

Goal: Think in the language, not translate from another.

  • Write code without syntax reference
  • Read unfamiliar code and understand intent
  • Debug errors without searching every message
  • Recognize when code is idiomatic vs. awkward

Choose something with actual users or stakes:

  • Contribute to an open-source project
  • Build a tool for your job
  • Create something you’ll maintain for months

Real constraints force deeper learning.

The Feynman Technique applied:

  • Write a blog post explaining a concept
  • Answer questions on forums or Discord
  • Create your own cheatsheet or lesson
  • Mentor someone earlier in their journey

Teaching reveals gaps you didn’t know existed.

From Learning:

TechniqueApplication
Active RecallWrite code without docs, then check
Spaced RepetitionDaily Anki review for syntax and idioms
InterleavingMix problem types in practice sessions
GenerationWrite code before looking at solutions
Feynman TechniqueExplain concepts in your own words
Deliberate PracticeExercism with feedback, projects at skill edge
# Bad: passive consumption
Watch 10 hours of tutorials → feel productive → can't code
# Good: active building
Watch 20 minutes → code for 40 minutes → repeat

Stick with one language for 3-4 months minimum. Switching before competence means restarting the frustration phase repeatedly.

Typing code that you copy trains muscle memory, not understanding. Write from memory, check against reference, correct mistakes.

# Bad: avoid errors
Skip exercises that cause confusion
# Good: embrace errors
Errors reveal gaps—investigate, don't avoid
  • Anki — Free, customizable, cross-platform
  • Use font-family: monospace in card CSS for code
  • One concept per card, cloze deletion for syntax
PlatformStrength
ExercismMentorship, idiomatic feedback
LeetCodeAlgorithms, interview prep
Advent of CodePuzzles, community
  • Official language docs (authoritative)
  • roadmap.sh — Learning paths with context
  • Language-specific cheatsheets in this repo

Document your journey to accelerate learning:

  • TIL posts — Short notes on daily discoveries
  • Blog posts — Longer explanations of concepts
  • Progress threads — Twitter/Mastodon updates
  • Code sharing — GitHub repos, gists

Share progress, not perfection. Vulnerability invites feedback and mentorship.