17/05/2026
The Ultimate Web Dev Interview: Sachin vs. Gopal
Characters:
Sachin: Senior Technical Architect (Strict, logic-driven, values experience).
Gopal: Candidate (5 years of experience, ex-XYZ Company, Web Dev + Design expert).
Phase 1: Introduction & The Career Shift
Sachin: (Setting files aside) Greetings, Gopal. Five years at XYZ Company... that’s a significant tenure. Most people jump every two years. Were you staying for the stability, or did you truly feel there was that much to learn?
Gopal: Greetings, sir. At XYZ, I witnessed the entire journey from ground zero to massive scaling. I wasn't just writing code; I was leading the migration of legacy technologies to a modern stack. I’m here at ABC Company now because I’m looking for higher-stakes challenges and a larger scale to work on.
Phase 2: The Foundation (Basic to Intermediate)
Sachin: Fair enough. Let’s check the "base" first. Do you still remember the fundamentals you learned five years ago, or have they grown fuzzy?
Sachin: Question 1: What is the real-world difference between CSS Flexbox and Grid? When do you choose one over the other?
Gopal: Flexbox is one-dimensional (dealing with either a row or a column). Grid is two-dimensional. If I’m building a simple navigation bar, I’ll use Flexbox. But for a complex, multi-section dashboard layout, Grid is much more efficient and cleaner.
Sachin: Question 2: What are Closures in JavaScript? Give me a real-life use case.
Gopal: A closure is when a function "remembers" its outer scope even after that scope has finished executing. In real projects, we use them for Data Encapsulation—creating private variables that can't be accessed from the outside, keeping our code secure and modular.
Sachin: Question 3: Between Sessions and Cookies in PHP, which is more secure and why?
Gopal: Sessions are stored on the server, making them significantly more secure. Cookies reside on the user's browser and are susceptible to theft or manipulation. Over the last five years, my standard has been to use sessions for sensitive data and cookies only for non-sensitive preferences like "Dark Mode" or language.
Phase 3: The "Deep Dive" (Technical Problem Solving)
Sachin: (Changing tone) Any fresh graduate can answer those. Let’s talk at a senior level.
Sachin: Suppose we have a profile picture upload form. A user uploads a 10MB image, and it crashes our server. You’ve managed both front and back end—what is your permanent fix?
Gopal: The solution must be multi-layered:
Frontend: I’d implement client-side validation to check file size before the upload even begins.
Compression: I’d use the Canvas API to resize and compress the image within the browser before it hits the network.
Backend: I would set strict upload_max_filesize limits in PHP/Node and move storage to a cloud service like AWS S3 instead of saving directly on the app server to prevent disk-space exhaustion.
Sachin: Good. Now, what about Web Accessibility (A11y)? Is an alt tag on an image enough?
Gopal: Not even close. As a senior dev, I ensure we use Semantic HTML (, , ) so screen readers can navigate logically. I also prioritize keyboard navigation and "Focus Management" so that users who don't use a mouse can still interact with every part of the site.
Phase 4: Architecture & Strategy (The Architect Round)
Sachin: Gopal, our site’s Initial Page Load is abysmal. Users stare at a white screen for 5 seconds. Without switching frameworks, how do you fix this step-by-step?
Gopal: (Focusing) I would optimize the Critical Rendering Path:
Identify Render-Blocking: I’d audit CSS/JS and apply async or defer to non-essential scripts.
Critical CSS: I would inline the "above-the-fold" CSS directly in the of the HTML.
Font Strategy: Use font-display: swap so text is visible immediately while fonts load.
Lazy Loading: Use the Intersection Observer API to load images and heavy components only as they enter the viewport.
Sachin: Final scenario: Your "Senior Manager" tells you, "Forget security, we need this feature live by tomorrow morning." What do you do?
Gopal: I’d explain that Technical Debt (unsecured code) is an expensive loan that will come due at the worst time. I’d propose a middle ground: we launch on time with essential security patches, and the very next sprint is dedicated entirely to hardening the code.
Phase 5: Conclusion & Verdict
Sachin: (Leaning back) Gopal, I’ve pushed you from the basics to high-level architecture. Your five years of experience aren't just a number; they show in your judgment. You know when to write code and when to build a "Strategy."
Gopal: Thank you, sir. The challenges at XYZ taught me that a good developer thinks about the business as much as the code.
Sachin: Exactly. We don't just need a "Coder"; we need a Problem Solver. Welcome to ABC Company