AI 资讯
Back-of-the-envelope estimation for system design interviews
Back-of-the-envelope estimation for system design interviews Most people don't fail capacity math because the arithmetic is hard. They fail because they do it silently, produce a number they can't defend, and then never use it again for the rest of the interview. The math itself is trivial. The method is what's worth learning. Why interviewers ask Capacity estimation isn't a numeracy test. It's checking two things: Can you tell whether a design is physically possible before you commit to it? Do you know which constraint actually binds — storage, read throughput, write throughput, or bandwidth? A candidate who estimates 30,000 reads/sec and 200 writes/sec has learned something that changes the design. A candidate who computes petabytes of storage and then never mentions it again has just performed arithmetic. Round aggressively Precision is a trap. You're not producing a capacity plan; you're finding the order of magnitude. The single most useful substitution: 1 day = 86,400 seconds ≈ 10^5 seconds That's a 16% error and it makes every subsequent division doable in your head. Nobody will challenge it. Everyone will notice if you spend forty seconds long-dividing by 86,400. A few more worth having ready: 1 million requests/day ≈ 12/sec — round to 10 1 KB × 1 million = 1 GB 1 KB × 1 billion = 1 TB Peak traffic ≈ 2–3× average Replicated storage ≈ 3× raw ## Work in one direction Users → requests → QPS → storage → bandwidth. Don't jump around. Say each assumption out loud and label it as an assumption, so the interviewer can correct you early rather than watch you build on sand. A worked example Say we're designing a social feed. Given: 100M daily active users. Assumptions (stated, not smuggled in): Each user posts 0.2 times/day Each user reads their feed 10 times/day A post averages 1 KB including metadata A feed page shows 20 posts Writes 100M × 0.2 = 20M posts/day 20M / 10^5 = 200 writes/sec Peak (3×) = 600 writes/sec Reads 100M × 10 = 1B feed loads/day 1B / 10^5 = 10,0
AI 资讯
This Former Intel CEO Wants to Jumpstart Moore’s Law With Light
Pat Gelsinger wants to pave the way to ever more powerful artificial intelligence using tiny beams of light.
AI 资讯
‘It’s a Modern-Day Draft’: Why Stanford Students Walked Out on Sundar Pichai’s Commencement Speech
Last month, more than a hundred Stanford students left their own graduation to protest Google’s military contracts and deals with ICE. Two organizers, Amanda Campos and Eva Jones, tell us why.
AI 资讯
riding the wave of ai
I remember when coding interviews happened at a whiteboard, no computer, no internet, just a marker and whatever you could hold in your head. When AI tools arrived, using one in an interview was the red flag. Now the red flag is the candidate who doesn't use AI enough. In about two years, the same tool went from forbidden to expected. And it only gets faster. Every few months another wave rolls in, a model out of some lab, a tool that does something it couldn't last year, and it resets what counts as normal. You ride it, or you let it break over you. Plenty of people imagine a third option, waiting on the beach with their arms crossed until the water goes calm, but the water never goes calm, and it was never going to wait for them. all in I've decided to ride it, in the most literal way I have. All of my code is written by AI now (is it mine at this point?), and somewhere along the way I stopped treating that as a threat to be managed and started treating it as leverage to be spent. I know the engineers who went the other way, who made a personality out of dismissing the tools, and the tools got better anyway while they just fell further behind. Going all in wasn't one decision; it's one I make again every few weeks. A better model ships, and I rebuild a working agent on top of it instead of staying on the old version, because the result comes out better and cheaper. Relying on older models would have been easier, and most people do. Riding means doing that over and over, long after the novelty wears off. I get why people stop trying to keep up. The volume is genuinely insane, more launches in a week than you could try in a month, and it isn't only engineers feeling it now, it's anyone whose work runs on a keyboard. People are overwhelmed and often giving up. But you don't have to keep up with everything; you just can't ignore it all. keep the thinking It means handing a lot of work to AI, and I hand over more every month. It writes code, drafts the first version of
AI 资讯
LLD Domain Modeling: How to Debug Your Design When It Feels “Wrong”
Every engineer eventually hits this phase: “My design looks okay… but something feels off.” No compile errors. No obvious bugs. But still: responsibilities feel scattered services feel too big entities feel too thin logic feels duplicated boundaries feel unclear This is normal. Because domain modeling is not about getting it right in one attempt. It is about refining structure until the business behavior becomes clear. Step 1 — Start With the Symptom, Not the Code If your design feels wrong, don’t immediately rewrite everything. First identify the symptom: Common symptoms: too many “Manager” services logic repeated in multiple places unclear ownership of rules too many dependencies between modules frequent “if-else explosion” Each symptom points to a specific modeling issue. Step 2 — Check If Invariants Are Scattered Ask: “Where are my business rules living?” Bad sign: Rules inside services + controllers + helpers This leads to: inconsistent behavior duplicated validation broken business guarantees Good design: invariants live close to the entity or aggregate root Step 3 — Check Entity vs Service Confusion A very common issue: Entities become dumb: only fields no behavior Services become overloaded: all logic all rules all decisions This creates: Anemic Domain Model + Fat Services Fix mindset: Entity = owns behavior + protects state Service = coordinates workflows Step 4 — Check Your Aggregate Boundaries Ask: “What must stay consistent together?” If your answer is unclear, you likely have: wrong aggregates or missing aggregates Example problem: Cart and Order sharing logic This causes: inconsistent pricing unclear lifecycle ownership Fix: Cart = intent Order = truth Step 5 — Look for “Hidden Coupling” Hidden coupling happens when: one module depends on internal state of another multiple services modify same data business rules are duplicated across boundaries This leads to fragile systems. Strong design ensures: each domain owns its own truth. Step 6 — Validate Stat
开源项目
The Guardian’s Carter Sherman fondly remembers being terrified by Ocarina of Time
Carter Sherman has been covering sex, gender, and the complex personal and national politics that accompany them for years. She was a senior reporter for Vice and has written for Elle, Ms. magazine, and Los Angeles magazine as well. Along the way, she's garnered a Scripps Howard Award, a National Press Club Journalism Award, and […]
AI 资讯
React Native Interview Handbook — Part 8 of 10: Code Output Challenges
This is Part 8 of 10 , a bonus practice article with 70 code-output challenges . Each challenge asks you to predict the result before revealing the answer and reasoning. Complete series This Dev.to series has five core handbook articles plus five focused practice extras. Open the series page to move through the complete reading order: Part 1: JavaScript — core handbook, questions 1–120 Part 2: React — core handbook, questions 121–220 Part 3: React Native — core handbook, questions 221–420 Part 4: Performance & Architecture — core handbook, questions 421–560 Part 5: Senior & System Design — core handbook, questions 561–719 Part 6: Output-Based JavaScript Practice — bonus practice article Part 7: Coding Interview Practice — bonus practice article Part 8: Code Output Challenges — bonus practice article Part 9: Current React Native Interview Questions — new high-frequency practice article Part 10: Project & Production Interviews — senior project ownership and real-production practice How to use this challenge set Read the code, state the exact output or error, then explain the language rule. Do not run the snippet until you have committed to an answer. For React Native interviews, connect the JavaScript behavior to rendering, state updates, list handling, or the JavaScript thread when relevant. Skills tested Hoisting, scope, closures, and this Arrays, conditions, references, object behavior, and loose versus strict equality Promises, timers, async / await , and microtasks Common JavaScript patterns used in React and React Native interviews Code output challenges Challenge 1. Block-scoped counter Predict the exact output before opening the answer. let total = 0 ; for ( let i = 0 ; i < 3 ; i ++ ) { total += i ; } console . log ( total ); Answer and explanation Expected output: 3 Why: The loop adds 0, 1, and 2. Challenge 2. var callback loop Predict the exact output before opening the answer. for ( var i = 0 ; i < 3 ; i ++ ) { setTimeout (() => { console . log ( i ); }, 0
AI 资讯
React Native Interview Handbook — Part 7 of 10: Coding Interview Practice
This is Part 7 of 10 , a bonus practice article containing 75 coding interview questions drawn from the React Native Interview Handbook. It covers the implementation tasks commonly used in JavaScript and React Native rounds, from string and array problems to hooks, FlatList , asynchronous work, caching, retries, and native modules. Complete series This Dev.to series has five core handbook articles plus five focused practice extras. Open the series page to move through the complete reading order: Part 1: JavaScript — core handbook, questions 1–120 Part 2: React — core handbook, questions 121–220 Part 3: React Native — core handbook, questions 221–420 Part 4: Performance & Architecture — core handbook, questions 421–560 Part 5: Senior & System Design — core handbook, questions 561–719 Part 6: Output-Based JavaScript Practice — bonus practice article Part 7: Coding Interview Practice — bonus practice article Part 8: Code Output Challenges — bonus practice article Part 9: Current React Native Interview Questions — new high-frequency practice article Part 10: Project & Production Interviews — senior project ownership and real-production practice How to answer coding questions Before coding, clarify inputs, output, edge cases, platform constraints, time complexity, space complexity, cancellation, and test coverage. Start with a correct readable solution, then optimize only when the constraint justifies it. Topics covered Strings, arrays, maps, sets, recursion, and algorithmic complexity Debounce, throttle, memoization, deep cloning, and polyfills Custom hooks, API state, error boundaries, and React rendering FlatList pagination, pull to refresh, search, and offline retry Promises, timeouts, concurrency limits, and exponential backoff Caching, EventEmitter, Pub/Sub, LRU design, and native module boundaries Interview coding checklist Confirm assumptions before writing code. State time and space complexity. Handle empty input, invalid input, and duplicate values deliberately
AI 资讯
React Native Interview Handbook — Part 6 of 10: Output-Based JavaScript Practice
This is Part 6 of 10 , a bonus practice article containing 191 output-based JavaScript interview questions . It includes 111 questions drawn from the React Native Interview Handbook plus 80 additional questions on the JavaScript behavior interviewers commonly test in React Native rounds: hoisting, scope, closures, arrays, objects, functions, coercion, conditions, Promises, and the event loop. Complete series This Dev.to series has five core handbook articles plus five focused practice extras. Open the series page to move through the complete reading order: Part 1: JavaScript — core handbook, questions 1–120 Part 2: React — core handbook, questions 121–220 Part 3: React Native — core handbook, questions 221–420 Part 4: Performance & Architecture — core handbook, questions 421–560 Part 5: Senior & System Design — core handbook, questions 561–719 Part 6: Output-Based JavaScript Practice — bonus practice article Part 7: Coding Interview Practice — bonus practice article Part 8: Code Output Challenges — bonus practice article Part 9: Current React Native Interview Questions — new high-frequency practice article Part 10: Project & Production Interviews — senior project ownership and real-production practice How to use this guide Before opening an answer, state the exact output first. Then explain the rule that causes it: evaluation order, scope, coercion, reference identity, prototype lookup, or microtask scheduling. Run the snippet only after committing to an answer. Topics covered Hoisting, Temporal Dead Zone, var , let , const , and function declarations Scope, closures, this , arrow functions, call , apply , and bind Arrays, sparse arrays, map , reduce , sort , slice , splice , and mutation Objects, references, shallow copies, prototypes, getters, and property lookup Conditions, truthiness, equality, nullish coalescing, and type coercion Promises, async / await , microtasks, timers, and error recovery React and React Native rendering behavior, state updates, effects,
AI 资讯
The Jedi Way to Talk Through Code in Interviews
The Quest Begins (The "Why") I still remember the first time I walked out of a coding interview feeling like I’d just lost a lightsaber duel. The problem was a simple array‑rotation task, but I dove straight into typing, eyes glued to the screen, and barely said a word. When the interviewer asked, “What are you thinking right now?” I froze, mumbled something about “just trying to get it done,” and watched the seconds tick away. The feedback later? “Great coding skills, but we couldn’t follow your thought process.” That moment stung because I knew I could solve the problem—I just hadn’t learned how to show my thinking. After a few more silent attempts, I realized the interview isn’t a solo boss fight; it’s a co‑op mission where the interviewer wants to see how you navigate the terrain. If they can’t hear your internal monologue, they have no way to gauge your problem‑solving instincts, communication style, or ability to catch mistakes early. I went on a quest for a repeatable, low‑effort way to narrate my thinking without turning the interview into a monologue. What I found was a three‑step verbal framework that felt like unlocking a new Force power—simple, repeatable, and surprisingly effective. The Revelation (The Insight) The technique I now swear by is State → Plan → Execute . At each stage you say out loud exactly what you’re doing, using a tight, repeatable script. It’s not about over‑explaining; it’s about giving the interviewer a clear map of your mind. Here’s the exact wording I use, broken down by phase: State – Clarify the problem, assumptions, and constraints. “Okay, so we need to rotate an array to the right by k steps. I’m assuming k can be larger than the array length, so I’ll use modulo to normalize it. The array can contain any integers, and we should aim for O(n) time and O(1) extra space.” Plan – Outline the high‑level approach before writing a line of code. “My plan is to use the three‑step reversal algorithm: reverse the whole array, then reverse
AI 资讯
🚀 Mastering OOP for Interviews : Understanding Abstraction from First Principles (C++)
Series: Master OOP for Software Engineering Interviews Introduction Ask ten beginner developers: "What is abstraction?" Most answers sound like this: "Abstraction is the process of hiding implementation details and showing only essential information." Technically, that's correct. But if I ask the next question: "Why was abstraction invented?" or "Can you explain abstraction using an Inventory Management System?" or "How is abstraction different from encapsulation?" many candidates struggle. That's because they memorized the definition instead of understanding the idea behind it. In this article, we'll learn abstraction the way experienced software engineers think about it—not by memorizing definitions, but by understanding why it exists, what problem it solves, and how it appears in every modern software system. 🎯 Learning Goals After reading this article, you should be able to: Explain abstraction without memorizing a textbook definition. Understand why abstraction exists. Identify abstraction in everyday life. Recognize abstraction in software systems. Confidently answer beginner interview questions. Build a strong mental model that makes future OOP concepts easier. Before We Learn Abstraction... Let's ask an important question. Why do programming languages even provide OOP? Imagine writing software for an e-commerce company. The system contains: Products Customers Orders Warehouses Payments Delivery Partners Notifications Discounts Reviews Thousands of features. If every developer had to understand every implementation detail before writing code, software development would become impossible. We need a way to reduce complexity. That solution is called abstraction. The Problem Abstraction Solves Imagine buying a new car. You sit inside. You: Press the accelerator. Turn the steering wheel. Shift gears. Press the brake. Simple. But underneath the hood, hundreds of complex operations happen every second. The engine burns fuel. The pistons move. The gearbox changes tor
开发者
This Luddite Puppet Hopes You’re Not Reading This on Your Smartphone
On this week’s episode of The Big Interview podcast, WIRED’s senior culture editor Manisha Krishnan talks to Gowanus about eschewing Big Tech, going outside, and rejection in the age of dating apps.
AI 资讯
Every Interview Has Two Stories. We Hear Only One
We'll get back to you. It's a sentence almost every job seeker has heard. For some, those words become the beginning of a new career. For many others, they become another unanswered promise. But the truth is, an interview doesn't begin when someone asks, Tell me about yourself . For millions of job seekers, it begins much earlier. Before the Interview Even Begins It's 6:45 in the morning. The alarm rings. A young professional stands in front of the mirror, adjusting the outfit they've carefully prepared the night before. He checks his resume one last time, gathers his documents, confirms the location, and takes a deep breath. As he’s about to leave, someone at home asks, “Do you think this one will work out?” He smiles. “I hope so.” He walks out carrying more than a folder. He carries expectations, financial pressure, family responsibilities, and the quiet hope that this interview might finally change everything. The Hidden Cost Nobody Talks About People talk about skills, preparation, and confidence. Those matter. But there’s another side rarely discussed: the hidden costs. Transportation. Professional clothing. Internet bills. Certification courses. Resume updates. Travel. Meals. Even taking a day off from a part-time job or missing freelance work. For someone without steady income, these aren’t just expenses — they’re investments with no guaranteed return. Sometimes they lead to an offer. Often, they end in rejection or silence. A Resume Can Tell You Skills. It Can’t Tell You a Story. A resume tells recruiters what a candidate has done. It doesn't tell them what they're carrying. It doesn't reveal the father waiting for good news, the mother asking how it went, the EMI due next week, the rent that can't wait, or the confidence slowly wearing down after repeated rejections. When Expectations Change Candidates prepare for the role they applied for. Sometimes they discover the responsibilities, salary, or even the position itself has changed. Business priorities evo
AI 资讯
FL Studio head Constantin Koehncke turns to Reddit for feedback and fun
If you're a music maker of a certain age, then you probably once dabbled with a pirated copy of a little app called Fruity Loops. These days it's called FL Studio, and Constantin Koehncke, is the man responsible for shepherding the pioneering digital audio workstation (DAW) through the modern age. As CEO of Image Line, […]
AI 资讯
Gson silent bug that Never Said a Word(Interview Prep)
Here's a bug that looks impossible until you understand Gson. You have this data class in your Pokedex app: data class PokemonStat ( @SerializedName ( "base_stat" ) val baseStat : Int , val stat : StatInfo ) A teammate cleans up the code and deletes what looks like a redundant line: data class PokemonStat ( val baseStat : Int , // @SerializedName removed val stat : StatInfo ) It compiles . No red errors. He runs the app — and every Pokemon's baseStat is 0 . Not the real 45 or 49. Just 0 . Everywhere. And Gson never threw an error, never logged a warning, never said a single word. If you can explain why this happens, you understand Gson better than most juniors. This is also a favorite interview question. Let's break it fully. What Gson actually does When the JSON comes back from the server, Gson goes key by key: Read a key from the JSON — say base_stat . Look for a Kotlin property with the exact same name . Found it? Pour the value in. Not found? Leave that property at its default value and move on. That's the entire matching game — exact name match, or nothing. Now look at the "cleaned up" class. The JSON key is base_stat . The Kotlin property is baseStat . Those are not the same string . Gson looks for a property called base_stat , doesn't find one, shrugs, and leaves baseStat at its default. The default for an Int is 0 . That's your bug. @SerializedName("base_stat") was never redundant. It was the sticky note telling Gson: "this property is called baseStat in Kotlin, but look for base_stat in the JSON." Delete the note, and Gson stops matching. Two ways to fix it: Rename the property to base_stat — works, but breaks Kotlin's camelCase convention. Put @SerializedName("base_stat") back — keeps the clean name and matches. This is the right one. But why 0 ? Why not a crash? This is the part that surprised me. A missing field feels like it should be an error. It isn't. Gson treats a missing key as allowed . It builds your object, fills the fields it found, and leaves
AI 资讯
Flatbush Zombies’ Erick the Architect misses his BlackBerry keyboard
Erick the Architect is a founding member of, and the primary producer for, the legendary Flatbush Zombies. He's toured the world, performed on Kimmel and Fallon, played Coachella, and collaborated with everyone from Joey Bada$$ and the Rza to James Blake and hardcore punk band Trash Talk. But perhaps the most unexpected collab was with […]
AI 资讯
Mystery box shows are complicated for everyone — even the actors
Silo is such a complicated show that even its showrunner gets confused sometimes. While filming the final seasons of the Apple TV sci-fi thriller, Graham Yost remembers two instances where he messed up details: once it was an actor who realized that a conversation they were about to shoot should've already taken place, the other […]
AI 资讯
After $18B IPO, Bending Spoons founder says success comes from minimizing luck
The co-founders of Bending Spoons, the Italian company quietly buying beloved, ailing Internet brands, learned big lessons from their own startup's failure.
AI 资讯
Bernie Sanders Saw This Coming
For decades, the senator has argued that concentrated wealth threatened American democracy. Now he’s betting that frustration with Big Tech, billionaires, and unchecked AI is reaching a tipping point.
AI 资讯
The Guardian’s Kai Wright refuses to buy a new phone
Kai Wright is the co-host of Stateside with Kai and Carter over at the Guardian. But Wright has been bringing his unique insights to listeners for years. He's also hosted Notes From America, The United States of Anxiety, and Indivisible. He's a Peabody Award-winning journalist who has profiled powerful men, explored what it means to […]