JavaScript Under the Hood for Pythonistas

Stephen Gruppetta 16 Lessons 2h 29m Updated

In CPython, reference counting usually frees an object as soon as its last reference goes, and a Pythonista carries that expectation into JavaScript. But when a match-log processor calls history.push(match) for every match, setting your own variable to null doesn’t free anything: the history still owns each match, and it keeps them all day while the standings refresh more slowly.

In this course, you’ll investigate a game server’s match-log processor that returns the right scores but slows down and holds on to a day of match records.

By the end of this course, you’ll be able to:

  • Profile with node --cpu-prof before changing code, and time it fairly with performance.now()
  • Explain what the V8 engine learns as code runs, and build records consistently
  • Trace what keeps an object alive, and attach metadata with a WeakMap without owning it
  • Keep cleanup explicit, and know what WeakRef and FinalizationRegistry don’t promise
  • Settle a behavior question by reading the specification

You’ll need CPython’s bytecode, reference counting, garbage collection, and profiling. You’ll also need Node 26 and JavaScript Maps, arrays, objects, functions, and modules. The Python examples use Python 3.15.

The course mixes short videos and text lessons with exercises and a quiz. Timings and memory readings vary by machine and Node version, so the course treats each one as an observation, not a promise.

What’s Included:

  • 16 Lessons
  • Video Subtitles and Full Transcripts
  • Translated Subtitles in 8 Languages
  • 2 Downloadable Resources
  • Interactive Quiz to Check Your Progress
  • 5 Hands-On Coding Exercises
  • Q&A With JavaScript Experts: Ask a Question
  • Certificate of Completion

Downloadable Resources:

Related Learning Paths:

About Stephen Gruppetta

Stephen obtained a PhD in physics and worked as a physicist in academia for over a decade before becoming a programming educator. He's constantly looking for simple ways to explain complex things.

» More about Stephen

← Browse All Courses