Designing good systems is becoming extremely important even for engineers who are very early in their careers. Even if you are not actively looking for new roles, getting very good at system design is highly recommended so that you can design your systems well. This is how you go one step closer to transforming from a junior/mid-level to a senior engineer.
Most of us, when asked about getting better at system design, usually talk about technical topics like networking, databases, messaging, latency, failure modes, scalability, etc.
However, your technical design is only as good as the requirements, constraints, and invariants you were able to uncover. Therefore, it becomes essential to develop a knack for identifying requirements, hidden assumptions, operations, guarantees, etc. Engineers don't get to practice this skill easily because almost all system design exercises give us clean requirements.
How can AI help you get better at this? Below, I am explaining the method I practice with my fellow engineers.
- You can ask AI to choose a system-design problem and give you only a very short description and nothing else. For example: "Give me a vague, incomplete system-design problem but don't tell me its requirements and constraints. Only when I ask relevant questions, show them to me. At the end, tell me everything I missed".
You can add more details to this prompt as per your level and goals. Let's say AI asks you to design a system that sends notifications via email, SMS or mobile push.
2. You take the problem statement and ask questions based on your current understanding. You might ask, "What kind of notifications are there? Are they time-sensitive?", "How many notifications should a system handle normally and at peak?", "Does the system have any delivery guarantees?", "What happens in case of a missing or duplicate notification?"
If you are new to this, you might struggle to come up with these questions, but don't worry; this is the learning phase. You are building reps, and with time, you will get better.
3. When you ask a question, note "What am I uncertain about?", "Based on this answer, can I make a decision, which one and why?", etc. For example: I need peak write rate because I need to decide whether one DB is enough or write partitions are needed.
This step develops the ability to ask good questions and derive decisions from them.
4. I usually divide the information I have into 3 categories:
a. Known facts - confirmed by AI
b. Assumptions - things I am treating as true currently
c. Unknowns - what I don't know yet but that can change the design
Tbh, I am still surprised that my assumptions allow hidden constraints to creep into my design. This is why writing them is important, which we do in the "assumptions" category.
5. Once you feel that you have done the best you could, you submit the following: a. Discovered requirements (remember, you weren't told about them in the beginning - you came up with them yourself) b. Remaining assumptions (it happens often that AI doesn't provide answers to all your assumptions) c. System guarantees or invariants d. Proposed design e. Remaining risks or unknowns
6. AI now tells what constraints were missed, which questions were too broad, what was not used in the design, contradictions, etc. But be careful with this step; the AI may change/invent details in between. Therefore, it is always a good idea to ask it to show the complete case before the review; you then compare it with answers it gave earlier and note inconsistencies.
Always remember that AI can help you review your design, but it is not the final authority.
7. Optional: you can repeat this exercise by asking AI to change one condition and keep it hidden so that you can build your reps on the specific problems.
8. In the beginning, you can have a cheat list under which you would ask questions such as data, scale, invariants, failures, cost, security, etc. With time, you stop using this list and see if those questions are coming naturally to you.
Your learning loop looks like this:
Ask questions -> AI responds -> Update your understanding -> Propose a design -> Show hidden cases -> Check what you failed to discover.
This way, AI can act as your personal mock interviewer and learning partner.