Skip to content

Don't just give me answers! Learning better with AI.

Noah Spott
#AI #Learning

Don’t just give me answers! Learning better with AI.

Today, I discovered a cool new way to learn with Claude with this simple yet effective prompt strategy:

<Insert your question here>

Help me LEARN. Don't just give me answers. Give me small pieces of information and guide me with questions to arrive at the answer."

While working on today’s Advent of TypeScript challenge, I felt I needed more guidance after viewing the hint. But, I didn’t want Claude to just give me the answer.

With this prompt, the LLM didn’t just dump code; it asked me technical questions to lead me to the solution:

Great question! Let’s explore this step by step, and I’ll help you discover how to create a “newable” object in JavaScript.

First, let me ask you: What do you already know about constructor functions in JavaScript?

Think about these questions:

  • Have you ever seen a function that starts with a capital letter?
  • Do you know what the this keyword does in a function context?
  • Are you familiar with how the new keyword works when creating objects?

Let’s start by exploring a basic constructor function. Can you tell me what you think might be different about a function that’s designed to be used with new compared to a regular function?

This Socratic method of learning pushed me to:

  • Articulate my existing knowledge
  • Explore nuanced technical concepts
  • Understand not just the “how” but the “why” behind JavaScript’s object creation

Key insights emerged:

  • I learned how forgetting new can accidentally pollute the global object
  • I understood the evolution from constructor functions to ES6 classes
  • I saw how TypeScript adds an extra layer of type safety to object creation

The beauty of this approach? It’s not about getting quick answers, but about developing a deeper, more intuitive understanding of technology.

To my fellow developers and self-learners: Try out this learning technique. Ask for guidance, not just answers. Embrace curiosity, ask questions, and let the learning process unfold organically.

#WebDevelopment #LearningTechniques #TypeScript #AdventOfCode #ContinuousLearning