Learning System Design through error messages
Teaching system design in a way that feels more interactive
When software engineers need to prepare for programming interviews, 9 times out of 10 they are going to reach for Leetcode. Anyone who has successfully gone through the FAANG interview process knows that just grinding LeetCode doesn’t act as a comprehensive study plan. You need to study the fundamentals, engage in mock interviews and practice writing code by hand.
Don’t get me wrong, Leetcode is a critical piece of the puzzle. The question is why do people prefer studying with practice problems instead of reading more thorough resources? My theory is that engineers like the constant feedback that they receive from error messages when solving a problem.
Benefits of Interactivity
Having problems that are interactive dramatically shortens the feedback loop letting you know how you're progressing. One of the biggest reasons that people give up when studying is that they don't feel that progress is being made. With LeetCode, there is a clear progression path: you solve easy, then medium, then hard problems. When you are reading a textbook, it's not clear how you are progressing. Your confidence may go up but you aren't getting that external honest feedback letting you know whether you are moving closer to your goal.
In fact, it's easier to go off the rails and study things that are irrelevant when you aren't using an interactive tool that is constantly grading you. I've seen engineers spend months studying overly complicated topics and learning new engineering skills that feel good but aren’t bringing them any closer to the destination.
I made this mistake when I was studying NP & NP-Complete for my Google interview. Google sent me a PDF that contained a list of topics and eight book recommendations. One of the topics on the list was learning NP. I went down the rabbit hole and spent a full 2 1/2 months studying the topic. I only realized I was too deep when I was reading a research paper published that year, and I found myself writing an email to the author questioning one of their conclusions.
Staying on track is critically important to make sure you are spending your time efficiently. Getting that feedback during and after every problem is a great way to make sure you are actually building the skills you need.
The feedback loop
The LC feedback loop consists of error messages that guide you to the right answer, and then ultimately a “success” grade that lets you know you’ve made it to the optimal solution. You don’t want to be too prescriptive with the error message. If a user is just copying and pasting the correct answer they aren’t learning much. Crafting informative error messages that still push the user to think deeply and learn is a big challenge. This balancing act is something I’m looking to emulate for system design.
Bringing interactivity to learning System Design
There are so many awesome System Design text resources out there like Alex Xu’s bytebytego or the grokking courses, but nothing that gives you that constant feedback like Leetcode does. This is why I’ve kicked off LeetDesign, an interactive and growing list of system design problems to help engineers ace their system design interviews. Grading a system design diagram has its own set of UX & engineering challenges(I’m 30k lines deep on the diagram system alone) and I’m shipping new improvements to the site every day.
I’m building LeetDesign publicly and sharing the lessons & milestones on twitter Please send me any bugs or feedback on twitter or via email!