FreeVS Code extensions: ReplayIt, React Explorer, Spring Explorer, Speed Code, Code Snippets, and Bulk Files Creator.VS Code extensions.See our products
Your next skill starts here

Make room for
your curiosity.

Learn something useful today. Read clear guides, test what you know, prepare for interviews, watch algorithms run, and use practical tools for the things you want to do.

Daily challenge

Today's question is waiting.

One programming question a day. It takes a minute, and every answer comes with an explanation.

Answer today's question
Interview prep

Walk into your next interview prepared.

The questions interviewers really ask, with short, clear answers and code you can read in a minute.

See all questions
  • What is a closure?JavaScriptJunior

    A closure is a function together with a reference to the variables of the scope it was created in. The function can still read and update those variables after the outer function has returned.

    Closures are behind private state, function factories, memoization, and most callbacks.

    function createCounter() {
      let count = 0;
      return () => ++count;
    }
    
    const next = createCounter();
    next(); // 1
    next(); // 2
  • What is the difference between any, unknown, and never?TypeScriptMid-level

    any turns type checking off for that value. unknown also accepts any value, but you must narrow it (with typeof, instanceof, and so on) before using it, so it is the safe choice for untrusted input.

    never is the type of values that never occur, such as the return of a function that always throws. It is useful for exhaustive checks.

    type Shape =
      | { kind: "circle"; radius: number }
      | { kind: "square"; size: number };
    
    function area(shape: Shape): number {
      switch (shape.kind) {
        case "circle":
          return Math.PI * shape.radius ** 2;
        case "square":
          return shape.size ** 2;
        default: {
          const unreachable: never = shape; // error if a case is missing
          return unreachable;
        }
      }
    }
  • How does a HashMap work internally?JavaMid-level

    A HashMap stores entries in an array of buckets. It uses the key's hashCode() to pick a bucket and equals() to find the right key inside it. When several keys land in the same bucket, they are chained, and since Java 8 a crowded bucket turns into a balanced tree.

    When the number of entries exceeds the capacity times the load factor (0.75 by default), the map doubles its capacity and redistributes the entries. Lookups and insertions are O(1) on average.

  • What is the difference between merge and rebase?GitMid-level

    git merge joins two branches with a merge commit and keeps the history exactly as it happened. git rebase replays your commits on top of another branch, which gives a linear history but creates new commits with new hashes.

    Golden rule: do not rebase commits that others have already pulled. Rebase your own local work, merge shared branches.

Free · For newsletter subscribers

Free ebooks to keep and read offline.

Interview prep, coding problems, cheat sheets, projects and quizzes, as PDF.

Free ebook

Coding interview problems: 13 classics, explained.

A 32-page PDF of the problems interviewers ask most, from Two Sum to Number of Islands, each with the key idea, a tested Python solution and its complexity. Free for newsletter subscribers.

  • Hash maps, two pointers, sliding windows, dynamic programming and grids
  • From brute force to the key idea, then a tested Python solution
  • Complexity tables and the mistakes interviewers watch for
Get the free ebook

Free ebook

Developer cheat sheets: eleven tools on one desk.

A 55-page PDF with the commands, syntax and patterns you look up every week, for Git, Linux, SQL, regex, JavaScript, TypeScript, React hooks, Python, Java, Docker and Angular. Free for newsletter subscribers.

  • Git, Linux, SQL, regex, JavaScript, TypeScript, React, Python, Java, Docker, Angular
  • Short examples you can copy, grouped by task
  • Made to print and keep next to your keyboard
Get the free ebook

Free ebook

12 JavaScript projects: build them step by step.

A 92-page PDF of small, complete web apps in plain HTML, CSS and JavaScript, from a countdown timer to a weather app, with every line of code explained. Free for newsletter subscribers.

  • A timer, a calculator, a quiz, a music player, a weather app and more
  • Plain HTML, CSS and JavaScript: no framework, no build step
  • Ideas at the end of each project to make it your own
Get the free ebook

Free ebook

The developer quiz book: 168 questions, explained.

A 67-page PDF of multiple-choice questions on 21 topics, from JavaScript and CSS to Kafka and Spring Boot, with every answer explained. Free for newsletter subscribers.

  • 21 topics: JavaScript, React, Angular, Java, AWS, Spring Boot, SQL, Kubernetes, Linux, microservices, system design and more
  • Answers on a separate page, so you can test yourself first
  • Every answer explains why the tempting wrong ones are wrong
Get the free ebook

Free ebook

Claude Certified Associate: 5 practice exams.

A 49-page PDF with 150 unofficial practice questions for the Foundations exam, five timed exams covering all seven domains, with every answer explained. Free for newsletter subscribers.

  • 5 exams of 30 questions, at two minutes a question
  • All seven domains, with their weight in the official outline
  • Every answer explained, and a plan to know when you're ready
Get the free ebook

Free ebook

SQL by example: 100 queries you'll actually write.

A 52-page PDF of everyday queries on one small shop database, each with a short explanation and the result it really returns in PostgreSQL. Free for newsletter subscribers.

  • Filtering, grouping, joins, subqueries, CTEs and window functions
  • Dates, strings, NULLs, upserts, indexes and transactions
  • Every result table comes from running the query
Get the free ebook

Free ebook

The developer interview playbook: 104 questions, answered.

A 71-page PDF with the technical questions interviewers ask most, each with a short answer, a full answer and code. Free for newsletter subscribers.

  • JavaScript, TypeScript, React, Angular, Java, Spring, SQL, Kafka and more
  • A short answer to say first, then the full answer and code
  • How to answer, a two-week study plan and tips for the day
Get the free ebook

Free ebook

System design interview: 30 common problems.

A 72-page PDF that walks through the problems interviewers ask most, step by step. Free for newsletter subscribers.

  • 30 problems, from a URL shortener to a payment system
  • Requirements, estimates, API, data model and a diagram for each
  • Deep dives, trade-offs and the follow-up questions to prepare
Get the free ebook
Algorithm visualizers

See how algorithms think.

Watch sorting, data structures, graph searches and pathfinding run step by step, with the line of code each step runs and a sentence explaining why.

Watch an algorithm run
No perfect plan required

Start wherever
you are.

You don’t need a syllabus, a schedule, or a big block of free time. Just follow what interests you. The next useful thing is one click away.

Find your next useful thing
  1. 01

    Get curious

    Find a topic that makes you want to know more.

  2. 02

    Try it out

    Read, play, and learn in the way that suits you.

  3. 03

    Take it with you

    Put a new idea or skill to work in your own way.

Tool spotlight

How fast can you type without looking?

Our typing speed tool helps you build real touch-typing habits, a few minutes at a time. Keep your eyes on the screen and watch your speed climb.

Try the typing test

More free tools for developers

VS Code extensions

Free extensions for your editor.

Record code demos that type themselves, see how your React components and Spring beans fit together, create many files at once, and write common code faster with snippets.

See all products

All free. If they help you, buy us a coffee (opens in a new tab).

Your next skill is one click away.

Pick a guide, a quiz, an interview question, or a tool. Ten minutes is plenty to learn something new.