AI + Socratic x Software Engineering Learning
- 文章發表於
- ...
At the end of 2022, with the launch of GPT-3.5 by OpenAI, the era of AI officially began. Today, leading AI labs are competing to build the most powerful language models. The capabilities of large language models (LLMs) continue to evolve over time, significantly boosting productivity across various fields.
In this article, I will share how I use the Socratic Method of questioning, aided by AI, to learn software engineering concepts.
What is the Socratic Learning Method?
The Socratic Learning Method involves guiding someone through a series of questions and answers to stimulate critical thinking and refine arguments, ultimately helping them form their own viewpoints.
This method originates from the ancient Greek philosopher Socrates, who never forced his opinions on others. Instead, he used a series of questions to help others identify contradictions in their arguments, encouraging them to refine and analyze their thoughts deeply to form their own conclusions.
Why Use the Socratic Learning Method?
Common Challenges
As a software engineer, whether working on projects, learning new technologies after hours, or preparing for interviews, most problems can find similar solutions online, sometimes even allowing for copy-pasting. From my experience, to meet deadlines, I've often used pre-built solutions or, when practicing coding problems, quickly glanced at optimal solutions from experts before attempting to understand and replicate them.
While this approach saves time, have you ever felt, like me, that after solving a problem, a voice inside asks, "Cool! But how exactly does this work?"
However, with the next project or task arriving, this question gets shelved. If someone then asks, "Why did you write it this way?" I might offer superficial reasons but often can't explain the underlying principles.
Past Learning Methods
Packages
When I wanted to delve deeper into the underlying principles of a technology or package, my approach was roughly as follows:
- Read the official documentation to understand the basic usage of the API;
- Search for simplified implementations of the package, usually via GitHub keyword searches or in the build-your-own-x repo;
- Attempt to understand the original or mini-version's code, which often takes the longest time and presents challenges like grasping the overall architecture, API entry points, core logic, and dependencies.
The third step is usually the most time-consuming and prone to getting stuck. Facing large packages, an API might involve several modules and dozens of files, making it easy to get lost in understanding the architecture rather than the core logic.
Coding Problems
For me, solving coding problems often feels unrewarding. Each problem requires considerable time to think through, and my best solutions often turn out to be brute-force compared to experts'. Seeing their solutions, I'm often amazed, "Wow, you can write it like this!" and then try to understand and replicate them.
Now, with AI, inputting a problem often yields more elegant and efficient solutions than mine, making the process even more frustrating.
Despite this, many companies still use LeetCode for interviews, making it a necessary part of learning. The learning effect from the above methods isn't great for me, often stopping at "I understand this code" without internalizing it as my own solution. Solving problems often becomes "solved" rather than "learned."
The Socratic Learning Method?
Here's how I apply the Socratic learning method to coding problems, using them as an example.
Whether for interviews or personal problem-solving, the steps are roughly the same:
- Read the problem to understand its requirements;
- Think through the solution approach, draft pseudocode, and discuss the time complexity with the interviewer;
- If optimization is possible, continue discussing until the interviewer is satisfied;
- Start coding, ensuring you and the interviewer are on the same page;
- Finally, submit and check if it passes.
When conversing with AI, we should aim to follow a similar process. Unlike an interviewer, AI can offer more guidance or hints, especially helpful for unfamiliar problems.
How to Use?

I start by creating a project in Claude and pre-writing the following prompt in the Project Instruction:
As an expert in algorithms and LeetCode problems, I’m currently working on a LeetCode question. I’ll provide you with the question.Here’s what I’d like you to do:- Help me solve the problem in an optimized way — from zero to hero — with clear explanations at each step.- Don’t give me the final answer directly. Instead, provide me with a solution skeleton.- Use Socratic questioning with me — one question at a time. I don’t want to jump straight to the answer. I value the process of communication and discovery.- Start with a solution in JavaScriptPlease focus the conversation on my output and thought process. If I get stuck at any point, feel free to give me hints and explain the concepts in a simple and easy-to-understand way, treat me like a high school student.
By inputting the problem into the project, I can start a dialogue with AI. Throughout, like Socrates, it continuously poses questions, prompting me to think through solutions, leading to many aha! moments in this back-and-forth.
If your note-taking software supports MCP interfaces, like Linear, you can also ask AI to organize the conversation into notes for easier review of where you got stuck.
Could you write a comprehensive article and add it to the Linear app ticket XXX that includes the following sections:1. **The Question**- A clear restatement of the original problem.2. **Core Concepts Discussed**- The main ideas and techniques we mentioned in our conversation (e.g., DFS, backtracking, etc.).3. **Our Thinking Process and Solution Evolution**- A breakdown of how we approached the problem step by step.- Include both the original and improved solutions.- Clearly state the time and space complexity of each approach.4. **Visual Representation**- A conceptual or visual explanation showing the gap between the brute-force and optimized solution.5. **Review and Learning Summary**- A quick reference section to help me revisit the topic in the future.- Highlight any pain points or areas I found confusing during our discussion.- Include a clean and reusable code template.6. **Reflections and Similar LeetCode Problems**- Your final thoughts on this question.- List related problems from LeetCode (search if needed) to help reinforce and extend my learning.
The same approach applies to learning packages, by integrating GitHub and using clear keywords (Socratic Method) for similar effectiveness!
Conclusion
"Socratic questioning" is a learning method I encountered through a video by Sal Khan, founder of Khan Academy. Initially trying this questioning style with Claude Sonnet 3.5 already provided a great experience. With the evolution of Claude AI, including more powerful model capabilities, GitHub integration, and MCP interface support, Claude now offers a nearly seamless learning experience.