<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Daniel Duan on Medium]]></title>
        <description><![CDATA[Stories by Daniel Duan on Medium]]></description>
        <link>https://medium.com/@danduan?source=rss-749dd060a356------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*j1Ts8l3C8YejCGhiD1Yusw.jpeg</url>
            <title>Stories by Daniel Duan on Medium</title>
            <link>https://medium.com/@danduan?source=rss-749dd060a356------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 11 Nov 2026 18:55:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@danduan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Job Hunt and Interview Prep for Senior/Staff Product Engineering]]></title>
            <link>https://medium.com/@danduan/interview-prep-for-senior-staff-product-engineering-301a6b917d4e?source=rss-749dd060a356------2</link>
            <guid isPermaLink="false">https://medium.com/p/301a6b917d4e</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[career-advice]]></category>
            <dc:creator><![CDATA[Daniel Duan]]></dc:creator>
            <pubDate>Sat, 10 Oct 2026 23:24:36 GMT</pubDate>
            <atom:updated>2026-10-15T22:17:02.730Z</atom:updated>
            <content:encoded><![CDATA[<p>The tech interview in 2026 requires a totally different prep strategy than in previous years. In the past, grinding LeetCode, memorizing some systems designs, and preparing some behavioral stories gets you 99% of the way there. Today, there are at least 5 different rounds assessing everything from product thinking to agentic coding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cSzhNljcFadwts23" /><figcaption>Photo by <a href="https://unsplash.com/@charlesdeluvio?utm_source=medium&amp;utm_medium=referral">charlesdeluvio</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Job market today</h3><p><strong>Employers are inundated with fake applications, and job seekers get no responses. No one can find each other.</strong> Job requirements and expectations are rising at the same pace as AI stocks. Junior roles have all but disappeared, and staff+ roles are plenty but the desired skillsets often look more like a wishlist than a candidate profile. Both hiring managers and company leadership are a bit delusional. I’d say even candidates are a bit too — most recruiter calls start with setting salary expectations that they don’t pay like Anthropic and ending with “please don’t cheat, good luck”.</p><p><strong>The traditional full-stack, frontend, or backend specific role is disappearing and replaced by all-encompassing product engineering roles.</strong> Instead of a team with a senior/staff team lead, 2+ frontend/backend engineers that cover the full stack, a designer, and a PM, the new team structure is just a single staff product engineer that does everything with AI. Where there are knowledge gaps and needs for specific skillsets in the org, dedicated staff+ roles are then created for things like frontend build systems, agentic workflows, distributed systems, and other niche skillsets that product generalists may not have deep knowledge in. If I have any advice here, it’s to broaden your scope of knowledge so that you cover a full product development cycle for the product engineering roles.</p><p><strong>The forward deployed engineer role is another avenue for full-stack engineers with team lead and product experience.</strong> The same people skills to talk to internal stakeholders, gather requirements, scope, and execute can be applied to client-facing work for this role. In the age of AI, humans are now a valuable differentiator when large enterprises are paying millions for software, implementation, and support. Many AI companies are struggling to fill these roles and the requirements differ quite a bit company to company. It seems to be around <strong>40% software engineer, 20% product manager, 20% systems/solutions architect, 10% technical sales, and 10% enterprise customer support</strong>, certainly a lot of hats for a single role.</p><p>A good summary of what’s in-demand today from a Stripe recruiter: <strong>“all-around generalists who are spiky in specific areas”</strong>.</p><h3>Trends and Observations</h3><p><strong>Remote jobs are extremely competitive these days.</strong> There are often 5+ rounds with the final onsite at one of their HQ offices and a reference check at the end. Because the full process is remote, these companies are even more rigorous about hiring and sniffing out cheaters and culture fit. Be open to relocation to the bay if you’re not here already, or at least Seattle and New York to expand the job opportunities. Companies like Reddit and Airbnb that are fully remote have their top pick from the candidate pool because of that flexibility. New York seems to have a much higher bar for candidates while paying less than the bay.</p><p><strong>Chaotic recruiting processes are norm.</strong> It seems like recruiting teams have been cut heavily and recruiters are expected to run with fewer coordinators that were responsible for scheduling and follow-ups. Newer tools like Ashby aren’t fully replacing human coordinators because people are ignoring scheduling requests or forgetting to block out their calendar for vacation. I’ve gotten ghosted by recruiters and companies halfway through the process more than a few times. Recruiters simply don’t have time to make sure all the candidates for each of their open roles get courtesy treatment, a stark contrast to 5–10 years ago. Be prepared to drive the recruiting process.</p><p>The worst part is the online applications with <strong>endless online assessments and take-home projects</strong>. The online assessments sometimes arrive right after application submission to filter down the number of candidates and get a rough sense of skill. Some have take-home projects that are hours long and more freeform, but still graded by AI based on a few narrow criteria. It’s a shame that most companies run a depressing robotic pipeline turning a career journey into a factory.</p><p><strong>Most interview processes now look something like this:</strong></p><ol><li>Online application</li><li>Automated code screen</li><li>Recruiter chat</li><li>Take-home project or tech screen</li><li>Tech screen 2</li><li>Onsite — systems design, coding, behavioral, and another technical round</li><li>Leadership (bar-raiser or behavioral)</li></ol><h3>Application Strategy</h3><p><strong>The best route is to get referrals.</strong> It’s best to get someone who personally knows you. A random referral might get your resume reviewed by a human, but a good referral can vouch for you when the review panel is on the edge about your performance, or advocate for you when you get down-leveled. <strong>Find someone who worked with you</strong> in the past and has positive things to say about the scope of work, technical abilities, and working well with others.</p><p>If you do go the online application route, make sure your <strong>resume is tuned for both human and machine reading</strong>. Make sure the relevant keywords are included in the tech stack you work with as well as any related tools. Include well-known or top-tier companies, even if the experience is decades old or internships. Make sure your school and degree are easily parsed as well so they’re not empty fields in the ATS. Then <strong>make sure each job experience has action verbs and metrics</strong> so that the hiring manager understands the scope of your work at the senior or staff level when they read the resumes.</p><p>Also take into consideration that many <strong>recruiters now vibe code their own resume parsers instead of doing manual reviews</strong>. In one recruiter screen, we got sidetracked on personal projects and talked about how the recruiter vibe coded a resume tool that filters based on top schools, previous companies, skills, and estimated seniority. Honestly pretty cool for a recruiter, but terrible for candidates.</p><p>In short, the resume needs to <strong>survive ATS parsing</strong>, <strong>human review by hiring managers</strong>, and perhaps <strong>some basic AI filtering algorithms</strong> made by recruiters. ChatGPT and Claude are pretty good at this if you prompt them to optimize for all three criteria here.</p><p><strong>Also take into consideration where companies source their candidates and what culture and profile they look for.</strong> Reddit and Airbnb, for example, mostly hires from FAANG. Netflix rarely hires L6 externally, and L7+ openings are almost exclusively promoted from internally. Many OpenAI people come from Meta, and Anthropic people from Stripe. Tesla and Amazon feed SpaceX. You’re climbing an uphill battle if your current or past companies don’t exhibit the same cultural values and technical standards so prioritize the relevant companies first.</p><p><strong>The old advice of applying to the less desirable companies first for practice is no longer feasible.</strong> I found that top companies like Google, Stripe, OpenAI were able to process their applications much more quickly if I matched what they were looking for. I almost never heard back from startups I applied to, and when I did, it would be in weeks or months and I had totally forgotten about them. Many startups now do paid work trials for referrals so the interview experience isn’t even good practice.</p><h3>Automated Online Tech Screen</h3><p><strong>I only have bad things to say about HackerRank and Coderpad.</strong> It’s an unfamiliar place to write and test my code, in a new environment while working under severe time constraints. I’d get fired if I worked like I was speed-running through tasks on the job. Why try to qualify candidates this way? In hindsight, it speaks a lot about the company culture, engineering leadership, and the type of engineers you’d work with.</p><p><strong>If it’s a single problem, get through it quickly and make sure it scores 100%.</strong> If it’s a multipart problem, try to get through each step quickly and forget about code quality. Some parts or steps might be worth more points than others, so <strong>it may be better to complete step 4 instead of step 3 depending on the point distribution</strong>, level of effort, and time remaining. A machine is grading it and it just needs to pass the test cases. Even returning the exact output to pass 1 test case is better than nothing.</p><p><strong>How to prep? Be resourceful.</strong> Familiarize yourself with Coderpad and HackerRank, they often have an open practice question to try the IDE. Use all your resources such as <strong>Reddit, Glassdoor, Blind, and 1Point3Acres</strong> to find past interview experiences and leaked question banks. Practice the leaked questions thoroughly before attempting the actual run. If you don’t utilize these question banks, someone else will. (Nvidia, Uber, Ramp, and Capital One are notorious for this type of assessment)</p><h3>Recruiter Screens</h3><p><strong>Do some research on the recruiter before the call.</strong> If they are a junior recruiter or candidate sourcer, they likely pass the information to the hiring manager for review. If they are an experienced recruiter, they have the power to move you to the next round.</p><p><strong>Sourcers are usually provided with a set of questions by the hiring manager to ask the candidates</strong>, and the meeting recording is summarized and passed back to the hiring manager for review. Sourcers are often new to tech or recruiting and don’t really know how to talk tech. Your best bet is to try and include some tech stack keywords and convey experience level through the answers during the call. It’s also a sign that the company is looking beyond traditional channels, perhaps to expand their candidate pipeline. <strong>Your chances aren’t very good with a technical sourcer simply because they’re sent to find the diamonds in the rough.</strong></p><p><strong>Experienced recruiters usually lead the call and can comfortably navigate topics</strong> or ask follow-up questions. Sometimes there are curveballs like the Anthropic AI safety questions, but otherwise be prepared to talk about your impact and contributions. It’s mainly to get to know you and build up rapport on both sides for the next steps. Unless there are red flags, you’re likely moving forward.</p><h3>AI Assisted Coding Rounds</h3><p>This is a very new type of interview that only started this year. To be frank, <strong>I don’t think interviewers and companies know exactly what to look for</strong> and there isn’t a solid rubric because “best practices” change every month with every new model and agent. It’s mainly split into solving a reasonable problem better than you can manually code by hand, or solving an extremely difficult problem you would otherwise not finish by hand. <strong>Your goal is to not get eliminated by their list of negative actions to watch out for.</strong></p><p>Stripe and Anthropic are in the reasonable difficulty camp. <strong>You could copy and paste the prompt in, and Claude may even confirm some assumptions before 1-shotting a reasonable answer. DO NOT DO THIS!</strong> A very good programmer could probably finish a solution by hand in the given amount of time. What they want to see is that you understand the problem, can break it down in a reasonable manner, and have AI work on it while remaining in control of the final outcome and quality. You should fully understand the architecture as well as most of the files generated. <strong>Prompt using your own words, describe the actual implementation like creating task tracking tickets with pseudocode, and start the project in planning mode, then have the agent step through while you verify each step’s outcome.</strong></p><p>Mercor and OpenAI and a few other AI labs are in the complete opposite direction where there is absolutely no way you can finish a directed graph with topological sort and validation problem in the hour allocated while simultaneously reading through a 5 page requirements document. They’ve also tested their prompts against all models to make sure you cannot 1-shot the solution. <strong>It’s best to fully grasp the problem mentally, summarize and give the algorithm and problem approach to Claude, have it code using parallel agents, and use adversarial reviewers to make sure each portion is done correctly.</strong> Then use the agent again to navigate the code repo and spot check the core implementation. Watch out for automated submission scripts too. Some of them will upload your agent chat logs to their server to grade your approach. You’ll be asked to bring your own computer so make sure you have a Claude Max subscription so you don’t run out of tokens half way, and switch between Fable for planning or reasoning complex tasks and Sonnet for coding speed to finish on-time.</p><p>Sometimes, these <strong>AI coding rounds are in the form of take-home projects</strong> and your goal is to do the same, but make it presentable and clearly explain your approach in a README or screen recording. <strong>Most of these AI take homes also upload your agent chat logs.</strong></p><p>I have also noticed a pattern where <strong>traditional companies get offended when I say I do almost all code with AI.</strong> At the same time, it’s also a <strong>red flag for AI companies if I say I prefer to do even a small amount of coding by hand</strong>. I never expected this topic to be so polarizing that I’ve settled on the answer “I delegate most form UIs and well defined tasks to Claude and take extra care when creating core utilities or business logic. Sometimes I write code by hand so I fully understand the logic and the potential upstream and downstream effects.” It seems like a terrible way to judge candidates’ competency but I also see the need to filter out vibecoders and workflow laggards alike.</p><p><em>Hello Interview has a pretty good</em> <a href="https://www.hellointerview.com/learn/ai-coding/fundamentals/codebase-orientation"><em>section</em></a><em> on how to approach AI assisted coding rounds, what interviewers assess for, and things to watch out for as a candidate. It’s the most up to date and comprehensive guide I’ve seen on all the prep sites. They also have some practice problems, although in my opinion the problems are a bit too easy.</em></p><h3>Technical Screens</h3><p><strong>Leetcode is no longer the focus.</strong> This round at the senior or staff level makes sure you can write code by hand, fully understand the problem, the implications of each line, and what optimizations can be made. The assumption here is that you will likely use an agent to write code on the job but you should be able to debug and fix things if anything goes wrong. I still think Leetcode is good practice to go through their top 50 easy and medium questions while talking through the implementation.</p><p>Data structures and algorithms are still important nonetheless. I’ve gotten some optimization questions verbally that required more advanced memoization or greedy algorithms.</p><p>There are many LeetCode videos online and I found the pattern of writing some comments to confirm requirements a good place to start, then get right into coding because half the battle is finishing within the allocated interview time.</p><h3>Debugging Interview</h3><p>I’ve been through a select few rounds where the goal is to <strong>debug a couple things that are broken in an existing codebase.</strong> It’s pretty popular with Stripe, OpenAI, and quite a few Bay Area startups for phone screens. These are usually split between frontend or backend, and you’ll be given a choice during the recruiter chat.</p><ul><li>Frontend is typically an asynchronous fetching or state update issue, some common but tricky CSS layout bugs, and a rendering or other performance issue to fix.</li><li>The backend seems to center around bugs in data parsing, race conditions in parallel execution, and sometimes an unoptimized N+1 SQL query.</li></ul><p><em>If you regularly code and debug, this round shouldn’t be too difficult. A good place to start is to pick an open source project, find some issues marked ready for new contributors, and attempt to solve it without AI. The skillset here is navigating a large codebase by hand, finding potential leads to the problems, and then fixing them.</em></p><h3>Systems Design</h3><p>This is the bread and butter of senior and staff interviews and is worth dedicating the majority of your time preparing. <strong>The goal here is to be extremely articulate about tradeoffs upfront and identify performance and scaling constraints unprompted.</strong> The last time I’ve interviewed was in 2022 and I can say that the bar for current senior is the old staff, and the current staff is everything under the sun. A good interviewer will probe for your area of expertise and allow you to demonstrate your area of expertise, but <strong>most interviewers are bad and will just sit and watch you talk while following up to nitpick topics in their own area of expertise</strong>.</p><p><em>Practice system design using </em><a href="https://excalidraw.com/"><em>Excalidraw</em></a><em> as your chart diagram tool. Use all the keyboard shortcuts so drawing becomes second nature. Many companies now use Coderpad for interviews and their drawing tool is an embedded version of Excalidraw.</em></p><p><strong>Designing Data-Intensive Applications, 2nd Edition is a good place to start</strong> to learn about the systems as a whole and in more depth than most of the online prep guides. The 2nd edition has updated estimations of capacity limits of various systems as well as dedicated chapters for real-time applications regarding agentic and AI systems. Unfortunately, this book is also quite dense and requires at least 1–2 weeks to properly digest when studying 1–2 chapters a day.</p><p><strong>Hello Interview is a great resource for quick refreshers</strong> before an interview and has really good 1-pagers for each topic like Kafka, Postgres, Cassandra, Temporal, and Redis. <strong>The “</strong><a href="https://www.hellointerview.com/learn/system-design/core-concepts/numbers-to-know"><strong>Numbers to Know</strong></a><strong>” page is a gold mine for capacity estimation.</strong> Product engineers are now expected to know backend and distributed systems so a team of 1–2 people can cover everything a team of 5–8 used to on a traditional project.</p><p>I’ve noticed that recent interviews, especially for AI companies, tend to cluster around a combination of these topics:</p><ul><li>Build ChatGPT (or agent for XYZ product)</li><li>Build a distributed web scraper (distributed task runner with queues)</li><li>Build Uber or Stripe (workflow and transactions)</li><li>Build Google Docs (real time multiuser editing)</li><li>Durable execution</li><li>Write heavy vs. read heavy databases</li><li>Caching strategies</li><li>Queuing, scheduling, event-driven processes</li><li>Real-time streaming updates via SSE/Websockets/gRPC</li></ul><p>To get to the real depth of knowledge that you may need for a more backend or systems-focused role, you can’t just recite an answer from Hello Interview. It’s good to reference Hack2Hire solutions which have more technical and in-depth knowledge as well as ShowOffer for a third opinion. <strong>You are ready for staff when you can identify the trade-offs between the 3 solutions and clearly articulate them in your own solution from start to finish unprompted.</strong></p><p><em>Take the rideshare example between </em><a href="https://www.hellointerview.com/learn/system-design/problem-breakdowns/uber"><em>Hello Interview</em></a><em>, </em><a href="https://www.hack2hire.com/question-bank/questions/system-design/69ca875aff3ebde766ced8b9"><em>Hack2Hire</em></a><em>, and </em><a href="https://www.showoffer.io/learn/system-design/questions/uber"><em>ShowOffer</em></a><em>:</em></p><ul><li>For real-time updates for rider driver matching, <strong>Hello Interview prefers native mobile push notifications</strong> which seem like an easy way out of discussing real-time updates, and both APN and FCM lack delivery time guarantees and receipts. <strong>Hack2Hire and ShowOffer both use WebSocket</strong> which is bidirectional, but is stateless and lacks recovery mechanisms in case of connection drops. <strong>SSE is actually better</strong> because it sends missed events on connection recovery, and utilizes existing HTTP protocols so requests route through proxies and corporate firewalls without extra configuration. Since there’s only a cancel option when matching is in progress, bidirectional communication with WebSocket is unnecessary. Both SSE and push are needed for a full solution, SSE for UI updates when the app is open and more progress details can be shown, and APN/FCM for when the app is backgrounded.</li><li><strong>Rider/driver fanout is part of the Hack2Hire deep dive</strong>, an improvement to the “find nearest riders/drivers” black box algorithm in HelloInterview and ShowOffer.</li><li><strong>Hello Interview mentions Temporal and durable execution</strong> as part of their solution, whereas Hack2Hire and ShowOffer rely on distributed state stores in Redis and Postgres for state tracking. Interviewers who ask this question often expect durable execution as an up-to-date answer to this problem, with the limitation that workflow engines need proper consistent sharding and clusters to handle burst and high throughput.</li><li>Hello Interview’s ride service writes to the DB, then adds rides to a queue, which then pushes the rides to Temporal. <strong>This pattern risks orphan rides in the DB if the server crashes after a write, before adding to the queue.</strong> An improvement would be to use Kafka Connect CDC to stream changes from the database and watch for rides added to the table. In practice, a user would just cancel that ride when stuck waiting for a while and try again. While this pattern isn’t expected as a first attempt or even part of the final solution, it regularly comes up as “what if?” and complexity trade-offs discussion during deep dives for FAANG and MANGOS interviews. The design Stripe problem from the three prep sources has many mitigation techniques that are worth a study.</li></ul><p><em>I hope this is a good example of the direction and depth to study for since there aren’t many examples or videos online of what a 4 or strong hire looks like at the staff level. The comments section of Hello Interview is an extremely valuable resource as well. You can see the many different takes on why or why not XYZ for every part of the system. I’d imagine as a distributed systems engineer, the bar is even higher for staff.</em></p><p>For product engineering at AI companies, they will likely <strong>expect some knowledge of AI systems</strong>. That means understanding at a high level of how an agentic system operates, what pre-training and post-training entails, how RAG retrievals add context and reduce hallucinations, what an inference scheduler does, why KV caches exist, etc. The expectation for an applied AI engineer isn’t to build that system, but to know how to use such system while working with its strengths and limitations.</p><p>In terms of delivery and presentation, <strong>Hello Interview’s system design video walkthrough by Evan King are a good example</strong> of what to strive for as a senior candidate in terms of technical ability, and senior or staff candidate in terms of communication style. In my experience with staff level interviews, the trade-off discussions go much deeper than Evan’s videos and most YouTube examples, often into the core of the technology itself such as how exactly Cassandra manages high write throughput and durability, and how LSM trees and SSTables work under the hood to power Cassandra and ScyllaDB. Similarly, durable execution often dives into Temporal Activities, Signals, replay, and rollback scenarios for 99.99% SLA. Often times, the interviewer might suggest an alternative pattern and ask for your opinion. There are also curveballs thrown where irrelevant systems and information are added, or you’re asked to double-check certain answers and assumptions even though they are correct.</p><p><strong>Ask ChatGPT or Claude to poke holes in any given final design from these prep sites and see if you can defend or suggest changes.</strong> Interviewers often ask at the end of the interview what if the system is designed this other way and what impact it might have on performance, reliability, or maintainability. Having good insights and answers, along with anecdotes from personal experience, seems to make the difference for a strong hire on the systems design.</p><p><em>The system design is also my worst round judging from what little feedback I’ve received from recruiters and my personal feelings. I actually paid for 2 systems mocks with L6/7 engineers after failing a bunch of interviews just to get a sense of my own weaknesses. Aside from some missing technical depth in distributed systems, the mocks revealed that I didn’t deliver with enough confidence, sometimes rambled and used filler words, and my delivery felt too structured and prepped. I was also told I spoke too technically when asked to expand on topics and it is a staff engineer’s job to explain tech to leadership in a way that a non-technical person can understand the system. This was a mind-blowing revelation to me because I thought this interview round was for a technical audience only. It’s hard to get this level of feedback doing mocks with friends and I’m glad I paid for them.</em></p><h3>Product Thinking</h3><p>Quite a few companies now have some form of product thinking assessment for product engineers as well, especially the startups. It’s sometimes embedded in a second system design round, in one of the coding rounds, or in a behavioral round. <strong>It feels very similar to a product manager interview</strong>, a role I studied and interviewed for very early in my career.</p><p>I know PMs use Decode and Conquer as one of the main prep books for the PM role. I recommend skimming through examples with the <strong>CIRCLES and DIGS framework</strong> to understand the expected output, tell it in a story format, and insert your own snippets of knowledge from your experience. As a technical person, many of the book’s practice scenarios and technical examples are outright ridiculous so take it with a grain of salt.</p><h3>Decomposition (Forward Deployed)</h3><p>I was kind of stumped my first time doing a Palantir-style decomposition interview. It was framed as a “product discovery and behavioral chat” with leadership where I was given <strong>a very vague business goal and the interviewer role-played a non-technical customer stakeholder.</strong> It is similar to defining high-level business goals and KPIs, then working through new products and existing system improvements around that goal, but for an external customer where you don’t know what systems might exist. Someone operating at the staff level should be somewhat familiar with this already for quarterly business planning and other high level meetings.</p><p>This interview is almost guaranteed to be a round for forward deployed engineers, but I have also been asked by some AI startups for a “0 to 1 product engineer” role. I’m not an expert at this by any means so this is more of a heads-up that this special type of interview exists. You can find some prep materials online if you search for decomposition and Claude or ChatGPT can do a decent job roleplaying it too.</p><h3>Behavioral and Leadership</h3><p>Most interview prep guides have a pretty comprehensive list of questions that you might expect — disagreement with a coworker, dealing with ambiguity, demonstrating ownership, etc. It’s really important to <strong>prepare these ahead of time so your story flows well and gets the point across</strong>. Try to have many stories prepared for multiple projects so that you’re not telling the same story over and over. Many guides will tell you to use the STAR method, but in practice it may sound a bit too structured and unnatural if all 5 behavioral stories are explained the same way.</p><p><em>In my mocks, I’ve been given feedback that at the staff level, the stories should explain the situation (project) in a non-technical way so that a PM or executive at the company can understand. Keep the STAR method in mind, but try to tell it in a way where each story has variance and doesn’t feel scripted. Staff engineers are also expected to communicate much better than senior engineers.</em></p><p><strong>I really struggled with the “Why us?” question that every company seems to ask nowadays.</strong> For some companies, it felt quite natural to talk about my passions and how they align with the company’s products. For others, it felt disingenuous to LARP being mission-driven for the companies that are trying to win at all costs. I didn’t pass the Anthropic behavioral round likely because I didn’t truly believe Anthropic prioritized AI safety above growth. It was also hard to interview for SpaceX and answer questions about the mission and leadership when Elon, for all his sharp business acumen and work ethic, had racist tendencies. Perhaps that’s the intent, to filter out candidates that don’t quite align. Most prep guides have a template or example on how to answer, but they don’t really work for every company. I’ve settled on a very <strong>neutral statement about working with smart colleagues, an interesting mission, and a great place to grow a career</strong> if I can’t find anything genuinely nice to say, along with some ChatGPT suggestions on how it relates to my past experiences and interests.</p><h3>Project Deep-Dive and “Bar-Raiser”</h3><p>This round seems to be popular with some companies that purportedly hire “top performers” including SpaceX and some startups with ex-Amazon leadership. <strong>The interview is designed to gauge your contributions in your past roles on your resume.</strong> I’ve never interviewed for Amazon so I can’t speak about the original bar-raiser. In my experience, it’s a deep dive into a recent project, what my contributions are, challenges and learnings, and any improvements to the system if I had unlimited resources. <strong>It’s extremely helpful to have a systems diagram handy</strong> so you’re not drawing while explaining during the interview, and the process of creating that diagram beforehand is also a great way to prep for discussion topics ahead.</p><p>This round is a mix of behavioral, leadership, and systems design about a past project with an extra diagram prepared, but don’t take this round lightly as it seems to weigh heavily in terms of leveling.</p><h3>Company Specific Rounds</h3><p><strong>Some companies have special rounds dedicated to finding culture fit.</strong> I won’t go into specifics but make sure to do some research and prepare for these</p><ul><li>Netflix culture — radical candor, top of the market pay, B-performers get severance packages</li><li>Anthropic safety behavioral — how to build AI systems safely, biggest risk of AI in society</li><li>Shopify life story — bring your own diverse background to the company and team</li></ul><h3>Work Trial</h3><p>Instead of going through a full panel of interviews, some early-stage startups may just do a week-long paid work trial as a holistic way to measure a candidate’s performance. Often, candidates come from direct referrals and are offered a trial after a quick phone screen with one of the cofounders. I didn’t personally go this route because the companies at this stage are a bit too small and early.</p><h3>Prep Resources</h3><p><em>High Priority:</em></p><p><a href="https://learning.oreilly.com/library/view/designing-data-intensive-applications/9781098119058/"><strong>Designing Data Intensive Applications, 2nd Edition</strong></a> — $60 for the printed edition, free e-book with O’Reilly subscription. good book for breath and figuring out what more to study about distributed systems.</p><p><a href="https://www.hellointerview.com"><strong>Hello Interview</strong> </a>— $80/year, this is a really good 1-stop-shop for all interview prep, the free content for system design is enough for junior roles, senior and staff candidates will benefit from the paid advanced topics and video examples.</p><p><a href="https://www.baseten.co/inference-engineering/"><strong>Inference Engineering</strong> </a>— Free e-book from baseten, great overview for non-AI background seeking AI related product roles</p><p><em>In-Depth or Topic Specific:</em></p><p><a href="https://www.hack2hire.com"><strong>Hack2Hire</strong></a><strong> &amp; </strong><a href="https://www.showoffer.io"><strong>ShowOffer</strong></a> — some free and paid systems designs to supplement your understanding and trade-offs from Hello Interview</p><p><a href="https://learning.oreilly.com/library/view/software-architecture-the/9781492086888/"><strong>Software Architecture: the Hard Parts</strong></a> — builds on DDIA for more in-depth distributed systems knowledge, its a very dense read and assumes you already have some knowledge.</p><p><a href="https://prepfully.com"><strong>PrepFully</strong></a><strong>, </strong><a href="https://interviewing.io"><strong>interviewing.io</strong></a><strong>, </strong><a href="http://IGotAnOffer"><strong>IGotAnOffer</strong></a><strong>, </strong><a href="https://www.meetapro.com/"><strong>MeetAPro</strong></a><strong> </strong>— paid mock interviews with L6/7+ big tech hiring managers and interviewers to get personalized feedback on your own performance. keep track of the interviewer ID so you don’t book the same person twice.</p><p><em>Other interesting reads:</em></p><p><strong>Post-mortems</strong> — learn about how systems fail at scale, <a href="https://github.com/danluu/post-mortems">Dan Luu has a great list on GitHub</a>. They’re really good resources for learning about the root cause of failures 3 levels deep at scale and mitigation steps for the future.</p><p><strong>Engineering blogs</strong> — companies usually create posts when they solved a novel problem in a unique way and wants to share their learnings with the community. <a href="https://www.figma.com/blog/making-multiplayer-more-reliable/">Figma</a> and <a href="https://www.notion.com/blog/how-notion-handles-concurrent-editing-with-crdts">Notion</a> both have some great posts around real time editing and conflict resolution. Chrome has interesting updates on <a href="https://developer.chrome.com/blog">web technologies</a> in general. Many interview questions and prep guides source their systems knowledge from these blogs.</p><p><strong>Newsletters</strong> — <a href="https://blog.bytebytego.com/">ByteByteGo</a>, <a href="https://react.statuscode.com">React Status</a>, <a href="https://javascriptweekly.com">Javascript Weekly</a>, <a href="https://www.ben-evans.com">Benedict Evans</a>, and <a href="https://stratechery.com">Stratechery</a> are all great for keeping up with changes in tech. These won’t directly help you in an interview, but keeping up-to-date in trends is an important part of working in tech</p><p><em>There’s also a bunch of vibecoded question banks and interview prep sites that are complete garbage. If you search on Google or ask your agent for “[insert company name] interview questions”, these will certainly pop up as the top results. Don’t waste your time reading them. You’re better off asking the recruiter about coding exercise formats and systems design topics and preparing on your own.</em></p><h3>Other interview logistics and reading between the lines</h3><p><strong>Most of my interviews for cold online applications came from newly posted roles</strong> that just opened. Some were also from LinkedIn where the job is recently “reposted”. I imagine the recruiters go through the pile periodically and stop when they have a decent shortlist to interview so the subsequent applications are just ignored. The best strategy is to apply immediately when the roles open.</p><p><strong>There are application limits for most companies now</strong>, even if they’re not disclosed or enforced during submission. I’d say 3–5 applications per quarter is probably a safe upper bound, with no more than 2–3 per month per company. If you have an agentic application strategy, chances are, you’ll end up in the ATS spam bucket. It may be better to wait for a more relevant role than waste a shot on a distant fit.</p><p><strong>Don’t be afraid to follow-up</strong> to remain in the recruiting pipeline and move onto the next step in the current state of interviews. It seems like results from phone screens and online assessments are quick and respond within 1–2 days of completion. The final round sometimes takes up to a week, with the debrief happening mostly on Thursdays or Fridays, even for a Monday interview. If you don’t hear back, don’t be afraid to follow up because chances are, the recruiter has 100 other candidates and your results are lost in the mix.</p><p><strong>I’ve also been in a situation where I was definitely a backup candidate.</strong> A recruiter asked to schedule a second technical screen 2 weeks out and a week before the scheduled day I received a templated email saying the role has been filled. There were also instances where we moved suspiciously slowly, with each step taking upwards of 2 weeks to complete. I speculated that there was an entire cohort of candidates moving through each step at the same time and I was eventually rejected before the final on-site and 2 weeks after my second phone screen. I believe that in both cases, I wasn’t the top candidate and the lack of communication shows.</p><p><strong>In the case where I might be the top candidate, the recruiters sometimes suddenly switched on and pop up right before the final round.</strong> They prep me for the interviews and give me additional details around what happens at each round and the type of problem to expect. After the round, they can see the feedback submitted immediately, even before the group debrief. If the scorecards are good, I would receive an email the next day to check in and ask how I felt about the company and the team. If the scores weren’t good, it’d be radio silence and an automated rejection email scheduled for Monday morning. At best, I’d get a chance to schedule 15 minutes with the recruiter to close out the interview process.</p><p><em>In many ways, recruiting is exactly like dating. Recruiters and hiring managers chase the top candidates with the shiniest resumes, bench the backups, ignore the rest of the inbox, all while claiming there aren’t enough qualified people to fill the openings.</em></p><h3>Last Thoughts</h3><p>The small difference that got me across the line was mainly referrals from people who worked with me personally along with tweaking behavioral answers, studying more systems design depth, and practicing better communication.</p><p>I definitely feel like I got lucky with the last few offers because the interview rounds hit my areas of expertise and preparation. The referrals vouched for me in a way that no amount of behavioral interviews could have. I’m very thankful for the friendships I’ve made in my last few jobs.</p><p>Am I a slightly better engineer after studying all this system design and going through interview rounds? Definitely. Could I have learned all this on the job or consulted ChatGPT when needed? Surely yes. It’s one thing performing the duties of a staff engineer and another to pass an L6 interview by showcasing experience, knowledge, and behavior in a short span of 4–6 hours.</p><p><em>I’m not affiliated with any of the books/sites/resources. You’ll see a few products mentioned because I genuinely believe they’re worth the time and money. I paid for everything out of pocket and nothing is sponsored.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=301a6b917d4e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Preparing for the Frontend Interview in 50 Hours]]></title>
            <link>https://medium.com/@danduan/preparing-for-the-frontend-interview-in-50-hours-5b972d43a07c?source=rss-749dd060a356------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b972d43a07c</guid>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[interview-questions]]></category>
            <dc:creator><![CDATA[Daniel Duan]]></dc:creator>
            <pubDate>Thu, 04 Feb 2021 14:18:38 GMT</pubDate>
            <atom:updated>2026-08-24T05:41:44.207Z</atom:updated>
            <content:encoded><![CDATA[<h3>Prepare for the Frontend Interview in 50 Hours</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9iSUX-jSj4IwOCV9TRwaaQ.jpeg" /></figure><p>If you believe technical interviews are a bunch of 💩, you are not alone. These interviews are like performances where engineers prepare for weeks or months to put on a handful of shows for companies looking to hire. I realized during my time preparing for interviews that there are so many different topics to prepare for and that the resources for those are scattered across so many different places, if they exist at all. Many people have asked me where to begin, how much time to spend on each topic, and what different companies value. <strong>I created this guide in hopes of helping you get the most of your preparation time and beat the technical frontend interviews by providing a list of specific commonly encountered topics and questions to prepare for.</strong></p><p>Unfortunately for frontend engineers, algorithms and <a href="https://leetcode.com/">LeetCode</a> aren’t the only things standing between us and our dream jobs. In an effort to diversify the range and practicality of questions, many companies started doing the so-called <strong><em>“frontend interview”</em></strong> where HTML, CSS, and JavaScript knowledge is also required. The companies that do not have frontend specific interviews will likely put candidates through their generalist interview. <strong>In order to do well in all interviews and maximize the number of competing offers across different companies, candidates have to prepare for both generic algorithm problems and frontend scenarios, increasing the amount of knowledge and preparation the candidates need.</strong></p><p><em>The estimated 50 hours in this guide assumes you have frontend experience and a good understanding of data structures and algorithms. The time amounts to roughly 1–2 weeks of full time studying and applying for jobs or 4 weeks of part time prep after work or on the weekends.</em></p><h3>Types of questions</h3><p>I prioritized this list according to how much each topic potentially weighs on your overall interview performance and the amount of improvement you can gain by preparing for it.</p><p><em>The hours is a rough estimate of how you can split up your 50 hours of prep time.</em></p><ol><li><strong>Frontend working knowledge</strong> — (5 hours) <em>This comes in many shapes and forms including take-home projects and recreate-this-design live interviews</em></li><li><strong>Data structures and algorithms </strong>— (25 hours) <em>Leetcode style problems</em></li><li><strong>Async programming and JavaScript specifics</strong> — (5 hours) <em>Managing callbacks and events along with functional programming paradigms</em></li><li><strong>Data manipulation</strong> — (2 hours) <em>Transform one shape of data into another</em></li><li><strong>Systems design</strong> — (10 hours) <em>Frontend and backend systems design</em></li><li><strong>Behavioral</strong> — (2 hours) <em>How do you react in certain scenarios? What qualities do you have?</em></li><li><strong>Frontend trivia</strong> —(1 hours) <em>This is like playing jeopardy with HTML, CSS, and JavaScript where you answer questions about esoteric knowledge</em></li><li><strong>Company specifics</strong> —<em> </em>(0+ hours?)<em> Netflix culture?</em></li></ol><h3>Frontend working knowledge</h3><p><em>Prep 5 hours</em></p><p>I put this before data structures and algorithms because this portion is often done as a technical phone screen or take home project earlier in the interview process. This is the one topic that should be most similar to the work you have been doing but that doesn’t mean you can completely skip preparation. Many of the requirements, including using vanilla JavaScript with no frameworks, will be different than what you are used to at your current workplace. Startups and less technical companies tend to value this part of the interview a lot. <strong>Because this is very similar to actual work, poor performance here is detrimental to your candidacy and heavily impacts leveling potential for frontend specific roles during hiring committee review.</strong></p><h4>Recreate-this-design interview</h4><p>During an on-site or phone screen, the interviewer may ask you to create something in code given a design or list of specifications. More often than not, this interview also serves as a frontend systems design interview as well.</p><ul><li>Log viewer (<em>Squarespace 2018</em>) — Create a scrollable view that renders log entries and details</li><li>Poker cards (<em>Airbnb 2019</em>) — With a deck of cards, shuffle the cards, generate a poker hand, and display the cards</li><li>Phone input (<em>Stripe 2019</em>) — Format an input such that numbers typed in are rendered like (123)456-7890</li></ul><p>Tip #1:<em> </em><strong><em>Ask questions to clarify the scope of the problem you solve for.</em></strong><em> The specifications you received is most likely incomplete. Is the list API paginated? How can users interact with the UI? Should it be designed for mobile? Your interviewer will likely have a more comprehensive rubric to grade you with.</em></p><p>Tip #2:<em> </em><strong><em>Componentize wisely.</em></strong><em> Instead of writing one big chunk of code, break down the individual pieces and discuss how certain components could be reused.</em></p><p>Tip #3: <strong><em>Talk through performance.</em></strong><em> Consider how API loading impact your interface and how user experience can be improved with placeholders and loading indicators. Prioritize loading the most important part of the interface first if possible.</em></p><p>Tip #4: <strong>Consider accessibility.</strong> Does the interface support keyboard or touch navigation? Are the elements using the correct HTML tags with proper attributes?</p><h4>Take-home project</h4><p>A take-home project is sometimes used instead of a phone screen and consists of building a more complex app. It most likely comes with a blank slate or a very minimal skeleton to get started. There will also be a fairly lengthy set of instructions and specifications to follow. These take-home projects are not too common anymore because grading takes a similar amount of time as an interview and plagiarism is a common concern.</p><ul><li>Snake game (<em>Squarespace 2018</em>) — Create a snake game with HTML, CSS, and vanilla JS</li><li>Hangman Solver (<em>Hulu 2015</em>) — Programmatically solve hangman by hitting an API endpoint with letter guesses</li><li>Movie list (<em>Vimeo 2016</em>) — Given a movie list API, render the list of movies, make a popup for movie details, and animate it’s transition</li></ul><p>Tip #1: <strong><em>Attribute code you have copied in the comments.</em></strong><em> If you found a function to generate a random string from StackOverflow, paste the link as comments in the code and briefly explain why. The grader will understand that you don’t want to spend 15 mins implementing UUID when the project is creating a todo list.</em></p><p>Tip #2: <strong><em>Do not borrow code in its entirety.</em></strong><em> If the company asked for a todo list, do not follow a tutorial for todo list in React. It is pretty obvious to the grader when the code is copied because others may have also copied from the same few tutorials with the same potential bugs.</em></p><p>Tip #3: <strong><em>Go a little above and beyond if there is no hard time limit.</em></strong><em> If you passed the suggested time limit and you barely finished, take some time to make the code and the user interface look good. I almost never hear of submissions being penalized for taking a little extra time. Often, I see feedback praising code cleanliness and good documentation even though these are pretty quick to fix and write. On the other hand, if you are way overtime, it is a sign that the role you applied for isn’t the right fit for your current skillset and that you need to prepare a lot more.</em></p><h4>How to prepare</h4><p>Practice using vanilla JavaScript as well as your most familiar library. After using React, Angular, or Vue, many engineers often forget the browser APIs such as addEventListener, getElementById, and fetch. While it is possible to look up documentation during your interviews sometimes, your problem solving speed will be impacted and you risk not finishing in time.</p><ol><li><strong>Create a formatted input such as a phone input </strong>— Use HTML and vanilla JavaScript to listen and handle changes to the input element.</li><li><strong>Create an animated progress bar</strong> — Use only CSS to animate progress change. Make the animations smooth if updates are called before the previous animation finishes.</li><li><strong>Create an infinite scroll feed with pagination </strong>— Think of this as building the Twitter or Facebook UI. The feed should detect when scroll is near the bottom of the list and call an API to fetch more data. Feel free to mock the backend paginated API.</li></ol><h3>Data structures and algorithms</h3><p><em>Prep 25 hours</em></p><p>As an engineer, companies expect you to be able to code. While I personally disagree that frontend engineers need to know paradigms such as greedy algorithms, dynamic programming, and discrete math by heart, most companies have at least one data structures and algorithms interview in their frontend interview process.</p><p><strong>Depending on the company, some committees may allow an otherwise strong frontend candidate to progress with a mediocre algorithm interview. Others will reject everyone who did not pass.</strong></p><p>The trick to passing these interviews is being fluent in data structures as well as identifying potential algorithms quickly. Most problems are variations of the same few underlying algorithms so it’s better to aim for deeper understanding of a few major variations rather than sheer quantity of problems completed. Make sure you practice using JavaScript too.</p><h4>Commonly used data structures</h4><ol><li><strong>Arrays</strong> — These are mutable lists in JavaScript. Helpful methods include concat, slice, splice, indexOf</li><li><strong>Maps</strong> — 1:1 mapping of unique key to value, can be built with Map() or plain JavaScript object {}. Helpful methods include Object.keys(), Object.entries(), Object.values(), for (let key in obj) { ... }, {}.hasOwnProperty(). If you use a plain JS object, note that there are built-in prototype methods such as constructor that may interfere with your keys.</li><li><strong>Stack</strong> — Last in, first out ordered data store, use an Array with push() and pop().</li><li><strong>Queue</strong> — First in, first out ordered data store, use an Array with unshift() and shift().</li><li><strong>Set</strong> — Check for uniqueness, Set() has methods that include has() and add(). Use Array.from(set) to convert to an array. Alternatively, use Map().</li><li><strong>Tree or graph</strong> — Use JavaScript objects as nodes, pointers don’t exist in JavaScript.</li><li><strong>Trie</strong> — Tree where nodes have many children nodes that could correspond to characters in the alphabet. Very useful for finding words or patterns such as anagrams, palindromes, and word search puzzles.</li></ol><h4>Commonly used concepts</h4><ol><li><a href="https://www.geeksforgeeks.org/greedy-algorithms/"><strong>Greedy algorithms</strong></a> —<em>Make optimal local decisions until a full solution is found, i.e. knapsack problem, task scheduling</em></li><li><a href="https://www.geeksforgeeks.org/dynamic-programming/"><strong>Dynamic programming </strong></a>— <em>Build on previous solutions to find new solution, i.e. Fibonacci sequence calculation, array subset</em></li><li><strong>Search and graph traversal</strong> — <em>Traversing through nodes or arrays, i.e. binary search, depth first search (DFS), breath first search (BFS), Dijikstra’s shortest path, and topological sort</em></li></ol><h4>Algorithm Complexity</h4><p>The different data structures and algorithms have widely different ways to access data. To compare the speed of each algorithm, a commonly used measurement is called the Big O notation which measures how many times each element is accessed. Refresh your memory with the <a href="https://www.bigocheatsheet.com/">Big O Cheat Sheet</a>.</p><h4>How to prepare</h4><p><a href="https://leetcode.com/">Leetcode</a> is probably the best known online resource for practice. <strong>I highly recommend the paid Leetcode subscription </strong>for their solutions and company specific problems ranked by frequency. If you need a quick refresher on programming concepts, <a href="http://www.crackingthecodinginterview.com/"><strong>Cracking the Coding Interview</strong></a> is a good book to review. If you never had a formal computer science education or never taken an algorithms class, I suggest taking a <a href="https://www.edx.org/learn/algorithms">full algorithm course online</a>. It will help you understand the general problem solving techniques instead of memorizing solutions to specific problems.</p><ul><li><a href="https://jeremyaguilon.me/blog/ranking_interview_questions_by_cram_score"><strong>Opinionated list of Leetcode questions to cram</strong></a><strong> </strong>—<strong><em>This is the minimum you should spend time on.</em></strong> The 19 problems should take about an hour each on average to study and complete depending on difficulty. I have been asked by various companies every problem in the “Cram Level 1” section and a few in the rest as well. If you don’t have much time to prepare, work through these, read the different solutions, and make sure you can solve them on your own in JavaScript.</li><li><a href="https://www.teamblind.com/post/New-Year-Gift---Curated-List-of-Top-75-LeetCode-Questions-to-Save-Your-Time-OaM1orEU"><strong>Curated list of top 75 Leetcode problems </strong></a>— This is a more expanded set that covers a bigger breath of topics. Even if you don’t have time to work through these problems, it’s helpful to read the prompt, think about how to solve it, and understand the approaches to different solutions.</li><li><a href="https://leetcode.com/explore/"><strong>Leetcode Premium company specific questions</strong></a><strong> </strong>— If you have more time to practice, go into the lists of questions for each company you are interviewing for and sort the list by frequency and work from the top down. All 5 of the problems listed under Square were asked during my interview in 2019, 3 of which were hard level problems that I could have better prepared for had I known about it. The Google and Facebook problems are pretty accurate too. The subscription pays for itself if you land a higher paying job.</li></ul><p><strong><em>Generally, most companies will ask 2 easy or 1 medium difficulty questions per interview. Hard questions are rare. You should aim to finish Leetcode medium problems in 20 mins and hard in 40 mins during your practice.</em></strong></p><p>Tip #1: <em>Be honest and let the interviewer know if you might have seen the problem before. It is very obvious to an experienced interviewer anyway. You should still go through the same steps as you would normally in explaining and solving the problem.</em></p><p>Tip #2: <em>Always talk through the problem solving strategy first before coding. Start with the brute force case, then optimized solutions. Talk though the complexity in </em><em>O(N) for all of them. Sometimes the interviewer is looking for a specific solution.</em></p><p>Tip #3: <em>If you have no idea how to get to an optimal solution, quickly code the brute force solution and work on optimizing that. Be receptive to the interviewer’s hints.</em></p><p>Tip #4: <em>If you don’t think you can finish the most optimized solution in the allocated interview time, mention this to your interviewer. They might ask you to code the most important part of the optimized solution first or complete a less optimized approach from start to finish.</em></p><p>Tip #5: <em>When you are truly stuck during an interview, think out loud and list all the different data structures and algorithms you know. Sometimes the interviewer will drop hints when you list each one.</em></p><h3>Async Programming and JavaScript Specifics</h3><p><em>Prep 5 hours</em></p><p>Asynchronous programming is at the heart of JavaScript and code execution in the browser so a lot of companies now test for understanding of this fundamental concept. Many companies use an async problem in place of an extra algorithm based problem for frontend candidates as well. While good performance here can help your candidacy, a bad one will impact leveling potential. <strong>Most hiring managers think of async programming as something that can be learned, although it would take a strong algorithm performance to offset a weak interview here.</strong></p><p>If you are struggling, <a href="https://eloquentjavascript.net/11_async.html">Eloquent JavaScript</a> has a great section about async.</p><h4>How to prepare</h4><p>Implement these in vanilla JavaScript:</p><ol><li><a href="https://itnext.io/broken-promises-a-barely-working-implementation-of-js-promises-ed7f99071f54"><strong>Promise</strong></a><strong> </strong>(<em>WeWork 2019, Flatiron Health 2019</em>)— <em>Implement a Promise that accepts callbacks and executes them in the order they are chained with. For added challenge, implement one that allows parallel functions to execute and waits for all of them to finish. Do not use the built-in Promise.</em></li><li><a href="https://medium.com/better-programming/how-to-create-your-own-event-emitter-in-javascript-fbd5db2447c4"><strong>EventEmitter</strong></a><strong> </strong>(<em>Jet.com 2019, TwoSigma 2019</em>) — <em>Create an event emitter object or class that can be subscribed to using callback functions according to the event name. When an event with a specific name is fired, all functions that were attached to that name should be executed. Each subscription can be unsubscribed as well. Do not use the built-in EventEmitter.</em></li><li><a href="https://lodash.com/docs/4.17.15#throttle"><strong>Throttle</strong></a><strong>/</strong><a href="https://lodash.com/docs/4.17.15#debounce"><strong>Debounce</strong></a><strong> </strong>(<em>Google 2016, Jet.com 2019</em>)—<em> Create a function that limits the frequency of a function called within a specific time frame. Implement leading and trailing as well. Remember to cancel when the async function is no longer needed.</em></li><li><strong>Chaining timeouts </strong>(<em>Google 2016</em>)— <em>Given a list of functions and their respective timeouts, execute each function one after another after the previous timeout ends. Be sure to cancel the timeouts if the function is no longer needed. For added bonus, allow arrays of functions that run in parallel.</em></li><li><a href="https://blog.bitsrc.io/understanding-currying-in-javascript-ceb2188c339"><strong>Function currying</strong></a><strong> </strong>(<em>Squarespace 2016, Jet.com 2019</em>)— <em>Write a counter that can be repeatedly incremented like </em><em>add(1)(2)(10)(4) infinitely.</em></li></ol><h3>Data Manipulation</h3><p><em>Prep 2 hours</em></p><p>Like the async programming section, you probably use these utility functions often but rarely implement from scratch. It’s a matter of dedicating a little bit of time to practice so your execution is perfect when it comes time for interviews. These are often used as phone screens.</p><h4>How to prepare</h4><p>Implement these Lodash functions in vanilla JavaScript and compare your solution to their source code on GitHub:</p><ol><li><a href="https://lodash.com/docs/#flattenDeep"><strong>flattenDeep</strong></a><strong> </strong>(<em>Facebook 2019</em>) — <em>Given nested array of elements, remove the nesting so that all the elements are placed in a single array.</em></li><li><a href="https://lodash.com/docs/#merge"><strong>merge</strong></a> (<em>Jet.com 2019</em>) — <em>Given two objects, merge all the keys from one object into the other.</em></li><li><a href="https://lodash.com/docs/#map"><strong>map</strong></a> (<em>Facebook 2019</em>) — <em>Given an array and a function, return the list of results from applying the function to each element in the array.</em></li></ol><p>If you need more practice, try implementing other <a href="https://lodash.com/">Lodash</a> functions.</p><h3>System Design</h3><p><em>Prep 10 hours</em></p><p>This interview is the bread and butter of engineers who want to land a job at a senior level or above and also the most important technical interview for determining candidates’ leveling. <strong>Candidates that do well on the systems design interview can potentially land a level higher than what the years of experience entails. Similarly, a bad one will almost always result in a under-leveled offer or even rejection.</strong></p><p>System design is about architecting scalable, performant, and maintainable systems given a set of requirements. Sometimes, the given requirements are meant to be vague in order to gauge candidates’ ability to deal with uncertainty. Other times, the requirements can be more stringent to see if candidates can work within certain constraints. It is also important to understand how people and processes work with these systems as well.</p><p>I’ve found that the best way to learn about frontend systems is to keep up with current technology by reading technical blogs and watching conference talks. I personally subscribe to <a href="https://react.statuscode.com/">React Status</a>, <a href="https://frontendfoc.us/">Frontend Focus</a>, and <a href="https://javascriptweekly.com/">JavaScript Weekly</a>. I’ve also attended in person and watched videos from <a href="https://conferences.oreilly.com/fluent/fl-ca">Fluent</a>, <a href="https://www.react-europe.org/">React Europe</a>, <a href="https://reactsummit.com/">React Amsterdam</a>, <a href="https://2019.jsconf.eu/">JSConf Berlin</a>, and <a href="https://developer.chrome.com/devsummit/">Chrome Developer Summit</a>. All of these conferences upload past talks onto YouTube for others to watch for free.</p><h4><strong>Frontend Systems</strong></h4><p>There are two different areas of focus in frontend systems interviews, <a href="https://bradfrost.com/blog/post/design-system-interview-questions/">design systems/reusable components</a> and <a href="https://blog.pramp.com/how-to-succeed-in-a-frontend-interview-d748cb073823#e34a">web app architecture</a>. <strong>The design systems interview will ask you to architect a complex reusable component</strong>, usually popup tooltip or input forms that comprise of many simpler components. <strong>The web app architecture will ask you to create the frontend for a popular web app</strong> such as Twitter or Gmail. Often times, the conversation starts in one of these two areas and touch upon the other as well. Unfortunately, I have yet to find a good one stop resource for learning about these frontend topics so here’s a list of relevant information I’ve gathered over the years.</p><ul><li><a href="https://uxdesign.cc/everything-you-need-to-know-about-design-systems-54b109851969"><strong>Design Systems</strong></a> — <a href="https://polaris.shopify.com/">There</a> <a href="https://www.carbondesignsystem.com/">are</a> <a href="https://evergreen.segment.com/">so</a> <a href="https://designsystem.digital.gov/">many</a> <a href="https://ant.design/">examples</a> <a href="https://ant.design/">of</a> <a href="https://backpack.github.io/">component</a> <a href="https://baseweb.design/">libraries</a> <a href="https://rei.github.io/rei-cedar-docs/">and</a> <a href="https://canvas.hubspot.com/">design</a> <a href="https://comet.discoveryeducation.com/">systems</a> out in the wild. Read the principles behind these systems and why systems are made a certain way. Take note of the simplest pieces such as token values and atoms, how they build into more complex inputs and buttons, and put together to form a user interface.</li><li><a href="https://bradfrost.com/blog/post/atomic-web-design/"><strong>Atomic Design</strong></a> — Brad Frost is one of the first to coin the term for the hierarchies of reusable components in user interfaces. He recently wrote a lengthy but insightful <a href="https://atomicdesign.bradfrost.com/">book</a> about design systems and the processes and talent necessary to maintain it in large organizations. This <a href="https://www.youtube.com/watch?v=2M6dJ2Uynhg">talk</a> is a good high level overview of design system challenges.</li><li><a href="https://overreacted.io/react-as-a-ui-runtime/"><strong>React as a UI Runtime </strong></a>— What does React do under the abstraction that their APIs provide? You are expected to understand what frameworks do and provide an informed opinion on how it compares to alternatives you are familiar with.</li><li><a href="https://addyosmani.com/blog/progressive-web-apps-with-react/"><strong>Progressive Web Apps with React </strong></a>— A good frontend system in 2020 generally looks something like a PWA. This is a high level overview of the different parts of a PWA along with some code examples.</li><li><a href="https://www.youtube.com/watch?v=X9eRLElSW1c"><strong>The Cost of JavaScript</strong></a> — Addy Osmani explains web performance in a way that’s very easy to understand. This talk during PerfMatters Conference will give you a basic understanding of where frontend performance bottlenecks are and how to mitigate them.</li><li><a href="https://blog.danielna.com/creating-an-accessibility-engineering-practice/"><strong>Creating an Accessibility Engineering Practice</strong></a> — In depth resource about why accessibility is important and how to build an app that supports it.</li><li><a href="https://developers.google.com/web/updates/2018/09/inside-browser-part1"><strong>Inside Look at Modern Web Browser </strong></a>—High level overview of what browsers do at each stage of the render pipeline, great for answering discussions about how browsers parse code and display information. There’s 4 parts to this series of blog posts.</li><li><a href="https://addyosmani.com/blog/usability/"><strong>Metrics</strong></a><strong> &amp; </strong><a href="https://addyosmani.com/blog/performance-budgets/"><strong>Performance Budgets</strong></a><strong> </strong>— How to create trackable goals around web performance. What does <em>fast</em> really mean?</li><li><a href="https://addyosmani.com/blog/adaptive-loading/"><strong>Adaptive Loading</strong></a> — Strategy for loading only what’s necessary for the current user interface and device type.</li></ul><h4><strong>Backend Systems</strong></h4><p>As mentioned, some companies don’t have frontend interviews and may ask backend and infrastructure focused systems design interviews. These should give you enough breath of information to talk about systems beyond the backend APIs for frontend.</p><ul><li><a href="https://www.educative.io/courses/grokking-the-system-design-interview"><strong>Grokking the Systems Design Interview</strong></a> — Paid course on Educative that goes through popular types of systems. Content is pretty concise and covers enough information to sufficiently pass a full stack or backend leaning systems design interview. Well worth the $39 for a month of access to the platform or $79 for lifetime access to the course, especially if you in a time crunch.</li><li><a href="https://github.com/donnemartin/system-design-primer"><strong>System Design Primer </strong></a>— Free resource on GitHub that covers a very wide breadth of topics as well as many popular types of systems. As a frontend or full stack engineer, you will probably not encounter topics beyond backend and databases.</li></ul><h3>Behavioral</h3><p><em>Prep 2 hours</em></p><p>The behavioral interview is usually conducted by a manager to determine your level of expertise, culture fit, and career interests. This is also an opportunity for you to improve your candidacy profile by highlighting your own strengths against the needs of the team or the company as well.</p><h4>Expertise</h4><p>You will be asked indirectly about your current role and past roles by examples of projects and teams you have worked on. When talking about your previous experiences, try to give examples that are of the highest impact and scope. The hiring committee and hiring manager will take this feedback into account when determining potential level at the offer stage.</p><p>Typically levels correspond to stories like this:</p><ul><li><strong>New Grad</strong> (L3)— “I helped my team ship the new checkout experience by building the new payment input components and address forms.”</li><li><strong>Junior</strong> (L4)— “I rebuilt the shopping cart page from scratch as part of the new checkout experience to improve user experience and performance by migrating away from our legacy code .”</li><li><strong>Senior</strong> (L5) — “I lead the project to deliver a new checkout experience by scoping the project with our product manager and breaking down the technical tasks with my team. I also helped coordinate cross-team technical dependencies and resource constraints with other leads as they came up during development.”</li><li><strong>Staff</strong> (L6) — “I advocated for the e-commerce wide effort to improve performance and lead the effort across our shopping experiences by identifying areas of improvements. I then worked with stakeholders on each team to explore possible projects and define goals. Across the projects that include creating a brand new checkout experience and optimizing product pages, we saw a 30% reduction in page load times and an overall conversion rate improvement of 10%.”</li></ul><h4>Culture Fit</h4><p>At smaller companies, this is more of the Airport Test — “Would you want to be stuck in an airport with this person?”. Do you like the person and would the person get along with you and the rest your team?</p><p>At larger companies, especially ones with more objective hiring criteria, this becomes a negotiation and conflict de-escalation discussion. You will be asked about how you resolve disagreements with coworkers and receive difficult feedback. There are a few right answers to these questions and some companies seem to prefer certain ones over others — the more “tech bro” companies like Palantir and TwoSigma seem to prefer direct feedback while the “diversity focused” types like Airbnb and Stripe seem to prefer the negative sandwich feedback. It really depends on the interviewer’s personality and also the personality types that the company attracts.</p><h4>Career Interests</h4><p>What types of projects interest you? Is it building user interfaces, component libraries, or architecture optimizations? How much CSS and HTML do you want to write? How much or how little backend development do you want to be involved in? Do you like fast moving projects or a steady stream of work?</p><p>Where do you want to be for your career in the next few years? Do you want to take on a bigger scope of work? Are you interested in leading a team or managing people? Or is work life balance extremely important to you because of other obligations?</p><h4>How to prepare</h4><p>Put some thoughts into how you would answer these questions and what examples you would give.</p><ol><li>Tell me a little bit about you and your past work experiences.</li><li>What are you looking for in your next role?</li><li>Tell me about a project that you are most proud of.</li><li>Tell me about a project that failed and what you learned from it.</li><li>Tell me about the best feedback that you’ve received.</li><li>Tell me about a time you received critical feedback and how you handled it.</li><li>What is your biggest strength?</li><li>What is an area of improvement for you?</li><li>Tell me about a time you disagreed with your peers or your manager.</li><li>Was there ever a time when you advocated for something few people believed in? How do you influence others and get buy-in?</li><li>Why do you want to work for company X?</li><li>What interests you about team Y?</li></ol><h3>Frontend Trivia</h3><p><em>Prep 1 hour</em></p><p>Sometimes, companies ask a few quick frontend focused questions to gauge your level of comfort with frontend early on in the process. If you don’t know the answers to a few of them, it’s not really a big deal although more preparation is always better.</p><ul><li>Facebook — recruiter phone screen</li><li>Spotify — technical phone screen</li><li>Squarespace — online HackerRank test</li><li>Airbnb — technical phone screen</li></ul><p>This <a href="https://github.com/yangshun/front-end-interview-handbook">Frontend Interview Handbook</a> has 3 sections, HTML, CSS, and JavaScript. It covers pretty much everything interviewers might throw at you. You can read over them to refresh your memory.</p><h3>Company Specifics</h3><p>It goes without saying that not every company looks for the same combination of technical and people skills. Always do some homework and research into what the interview entails and mentally run through the leaked problems.</p><h4>Interviews</h4><p>Some companies have special interviews.</p><ul><li><strong>Netflix</strong> has a huge emphasis on culture so it is a requirement that the candidates review the <a href="https://jobs.netflix.com/culture">Netflix Culture page</a> and <a href="https://www.youtube.com/watch?v=2fuOs6nJSjY">Reed Hasting’s thoughts on culture</a> to formulate their own opinions to discuss during the interviews.</li><li><strong>Shopify</strong> has a <a href="https://www.shopify.com/careers/how-we-hire#life-story-interview">Life Story</a> interview where the recruiter interviews the candidate about their upbringing, background, and life details that don’t normally surface in an interview. It’s important to have a few stories prepared that showcase your life in a positive manner about family, friends, and colleagues.</li></ul><h4>Additional resources</h4><ul><li><a href="https://www.glassdoor.com/"><strong>Glassdoor</strong></a><strong> </strong>— great resource for getting more details about the interview process, offer timelines, and occasionally some leaked questions</li><li><a href="https://leetcode.com/discuss/interview-experience?currentPage=1&amp;orderBy=hot&amp;query="><strong>Leetcode forums </strong></a>— lots of detailed interview experiences here too, mostly larger companies like Microsoft, Facebook, Google, and Amazon</li><li><a href="https://www.rooftopslushie.com/"><strong>Rooftop Slushie</strong></a>— platform where people pay current employees at specific companies to answer questions, some pretty good information about teams, culture, and leaked problem sets too</li><li><a href="https://www.teamblind.com/"><strong>Blind</strong></a> — anonymous tech oriented discussion app, some pretty juicy insider information about company culture and team dynamics. great for getting second opinions on your job offer and negotiations</li></ul><h3>Additional Resources</h3><p>This <a href="https://yangshun.github.io/tech-interview-handbook/">Tech Interview Handbook</a> is written and curated by the same person who put together the Frontend Interview Handbook. It has a lot of good information about resumes, application processes, offer negotiations, and general tech job hunting tips.</p><h3>Closing Thoughts</h3><p>Don’t get too upset if you can work through these exercises just fine but stumble during your actual interviews. Everyone’s been there, even many of the engineers you admire. Try practicing with a buddy and do mock interviews with each other using the same tools such as CoderPad, white board, and Zoom to simulate the actual interview environment as closely as possible.</p><p>Good luck with your interviews!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b972d43a07c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Translating React Apps Using i18next]]></title>
            <link>https://medium.com/@danduan/translating-react-apps-using-i18next-d2f78bc87314?source=rss-749dd060a356------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2f78bc87314</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[localization]]></category>
            <category><![CDATA[i18n]]></category>
            <category><![CDATA[internationalization]]></category>
            <category><![CDATA[i18next]]></category>
            <dc:creator><![CDATA[Daniel Duan]]></dc:creator>
            <pubDate>Wed, 27 May 2020 18:33:50 GMT</pubDate>
            <atom:updated>2020-09-17T21:30:20.853Z</atom:updated>
            <content:encoded><![CDATA[<h3>Translating React Apps with i18next</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l0eLcMyolGYBghFGfC4iWg.jpeg" /></figure><h3>Overview</h3><p>Translation is usually the most obvious step in localization (<em>l10n</em>) and internationalization (<em>i18n</em>) efforts where applications are adapted to fit the needs of users in specific regions or markets. It is also the most standardized process and most organizations follow similar processes with similar tools to get their frontend strings translated.</p><p><strong>This guide focuses on translation</strong> and the content here is intended to connect the dots between various i18next library documentations<strong> </strong>while providing additional code required to get an app translated inside Create React App. I found that while many other guides exist, very few of them explain why certain processes or tools are required. I will try to provide the necessary context for both technical and user experience related decisions as well as internationalization best practices whenever possible. This guide assumes you have working frontend knowledge including JavaScript, React, NPM, etc. Full example code will be provided in a GitHub repo linked at the end.</p><p><em>Even though this guide targets Create React App, it should be applicable to most React apps. I will try to note the differences whenever possible. Please leave suggestions in the comments.</em></p><p><strong>What this guide will cover:</strong></p><ol><li><a href="#29ac">Why i18next</a></li><li><a href="#0883">Initial setup</a></li><li><a href="#2b8f">Writing translations</a></li><li><a href="#1828">User language and locale detection</a></li><li><a href="#673f">Extracting strings for translation</a></li><li><a href="#48b7">Async load translated strings</a></li><li><a href="#2b34">Switching from one language to another</a></li><li><a href="#45bb">Pluralization</a></li><li><a href="#39a2">ICU JSON syntax validation</a></li><li><a href="#92e5">Fallback scenarios</a></li><li><a href="#3ea4">Smartling processes for getting content translated</a></li></ol><p><strong>What this guide will not cover:</strong></p><ul><li>Adapting visuals to different cultures and identities — <em>People relate to products better when their identities are represented in photos and graphics</em></li><li>Modifying content to suit the tastes of different markets — <em>Humor and idioms don’t always translate</em></li><li>Adjusting feature sets for different consumption habits — <em>Some Europeans prefer SEPA direct debit over credit card payments</em></li><li>Adapting designs and layouts to properly display translated text — <em>German words can be very long, Chinese characters can be very dense, Arabic and Hebrew are read right to left</em></li><li>Converting to local units such as currencies and units of measure — <em>Most of the world do not use U.S. Dollars or inches</em></li><li>Using proper local formats for date, time, addresses, and phone numbers —<em> Some use 24 hour time, country and area code for phone numbers differ</em></li><li>Adhering to local regulations and legal requirements — <em>Cookies and user data are regulated by GDPR in Europe</em></li><li>Technical infrastructure changes — <em>Setting up servers and content delivery networks closer to users will give users faster access more reliability</em></li></ul><h3>Why i18next?</h3><p>When I was looking for a set of translation tools for a project, I was measuring them based on a few criteria: ease of use, vendor integration, bundle size, feature set, and reliability. It should be easy to set up and use, cover almost all cases, and require little maintenance.</p><h4>Available open source libraries:</h4><ol><li><a href="https://formatjs.io/">Format.js</a> — <em>Library with extensive but relatively young ecosystem that does almost everything. Unfortunately, it has many quirks and unresolved edge cases with how the tools work together.</em></li><li><a href="https://github.com/globalizejs/globalize">Globalize.js</a> — <em>Comprehensive library that covers every possible formatting need very well, leverages Unicode CLDR, but has very limited React integration and other tools</em></li><li><a href="https://www.i18next.com/">i18next</a> — <em>Good ecosystem of plugins and third party tooling, works with React well, supported from early jQuery days with minimal API changes</em></li><li><a href="https://airbnb.io/polyglot.js/">Polyglot.js</a> — <em>Lightweight but extremely limited library, does not support any standardized formats</em></li></ol><p>The decision came down to Globalize.js and i18next. Globalize handles formatting very well but setup can be a pain and bundle size bloat from Unicode CLDR data negates the benefits. Most apps will also never require the advanced formatting that sets Globalize apart. i18next is more of a swiss army knife in that it does many things relatively well and is lightweight and intuitive to use.</p><h4>Helpful i18next plugins:</h4><ol><li><a href="https://react.i18next.com/">i18next-react</a> — <em>full React support including </em><em>&lt;T&gt; component, higher order component, hook, and render prop</em></li><li><a href="http://i18next-browser-languageDetector">i18next-browser-languageDetector </a>— <em>detect user language from browser or previously saved cookie and LocalStorage</em></li><li><a href="https://github.com/i18next/i18next-parser">i18next-parser</a> — <em>automate extraction of strings embedded within JavaScript code to a dedicated JSON file to submit for translations</em></li><li><a href="https://github.com/i18next/i18next-http-backend">i18next-http-backend</a> — <em>load translation strings dynamically to minimize initial bundle size</em></li><li><a href="https://github.com/i18next/i18next-icu">i18next-icu</a> — <em>support industry standard ICU JSON format for submitting and reading translations from tool vendors like Smartling. ICU JSON allows translators to specify different forms of pluralization, pair gendered nouns with the appropriate adjectives, and more advanced things of that nature.</em></li></ol><h3>Initial setup</h3><p>In src/index.js in Create React App or wherever your app is initialized before React is called, initialize i18next and react-i18next following the <a href="https://react.i18next.com/latest/using-with-hooks#configure-i-18-next">official documentation</a>.</p><p>Create a file called i18nextInit.js. I put this file under src/. Import this file in src/index.js so it runs when the app starts.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/21f31a470a17caf9d34b7c75657b535e/href">https://medium.com/media/21f31a470a17caf9d34b7c75657b535e/href</a></iframe><p><em>The initialization code is used to bootstrap plugins that can help detect language, load the desired language, and get the </em><em>react-i18next connected to </em><em>i18next.</em></p><h3>Writing translations</h3><h4>Do not import the t() function directly from i18next</h4><p>This sounds strange, but the t() from i18next operates outside of react-i18next and React component lifecycles. Strings will not translate if called before async translations are loaded and will not update if language is changed.</p><h4>React hook</h4><p>This is newest and probably easiest way if you use functional components.<br><a href="https://react.i18next.com/latest/usetranslation-hook">Official hook documentation</a></p><pre>import { useTranslation } from &#39;react-i18next&#39;;</pre><pre>const { t } = useTranslation();</pre><pre>t(&#39;key.something&#39;, &#39;This is the default English version of the string&#39;)</pre><h4>React component</h4><p>This is more versatile and self contained, especially if the existing string was passed around in utility functions that don’t have access to t() any other way. Make sure a component can be rendered where the string was previously used.<br><a href="https://react.i18next.com/latest/trans-component">Official component documentation</a></p><pre>import { Trans } from &#39;react-i18next&#39;;</pre><pre>&lt;Trans i18nKey=&quot;key.something&quot;&gt;This is the default English version of the string.&lt;/Trans&gt;</pre><h4>Higher order component and render prop</h4><p><a href="https://react.i18next.com/latest/withtranslation-hoc">Official HoC documentation</a><br><a href="https://react.i18next.com/latest/translation-render-prop">Official render prop documentation</a></p><p>In src/App.js, I added an example of both but you can pick one or the other. Notice I hardcoded the number of apples in the string. We will pluralize it later. I added &lt;React.Suspense fallback=&quot;loading&quot;&gt; to index.js as well because useTranslation can trigger suspense when the language strings are loading. You can <a href="https://react.i18next.com/latest/usetranslation-hook#not-using-suspense">turn this feature off</a> if you’d like.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/94ec69bb0bf5c0bf4f44345185f8c946/href">https://medium.com/media/94ec69bb0bf5c0bf4f44345185f8c946/href</a></iframe><p>The translation functions rely on a set of translations for each defined locale. It will look up the translated string using the key provided in the function so these keys should all be unique. We will define the translated strings in a separate file later.</p><p><strong><em>Tip 1: Use a different key for each string</em></strong><em>, even if the content of the string is the same. Take advantage of the hierarchy allowed by the </em><em>. to split keys into smaller subgroups. “okay” can be used as “confirm” in a confirmation dialog or “average” in a survey and should have different translations. Rather than sharing </em><em>okay as the key, it will be easier to manage for translators and engineers if this same string is split into something like </em><em>confirmation.okay_button and </em><em>engagement_survey.okay_satisfaction_rating.</em></p><p><strong><em>Tip 2: Add context in the string key</em></strong><em> to reduce uncertainty in the meaning of each string. While it is possible to provide translator notes in other ways, I found it much simpler to include context in the key itself. As a translator, “Letter” with a key of </em><em>print.letter can mean a few different things, but </em><em>print.letter_paper_size makes it clear that this is a paper size and not a type of document or an individual character. It is also helpful to include information about the type of interface the string is used in such as button, tooltip, and alt tags as well.</em></p><p><strong><em>Tip 3: Avoid using abbreviations as much as possible</em></strong><em>. “PB&amp;J Sandwich” may not mean much to translators in other countries. Some may choose to keep the abbreviation in their translation while others will request additional context and translate that. It would be easier to write out like “peanut butter and jelly sandwich” instead.</em></p><p><strong><em>Tip 4: Do not split up phrases or sentences.</em></strong><em> If certain portions of a phrase need to be stylized, it would be better to highlight the whole phrase instead of individual portions. </em><em>&lt;b&gt;t(&quot;Do not split&quot;)&lt;/b&gt; t(&quot;the sentence up like this&quot;) ,</em><em>&lt;b&gt;t(&quot;Instead emphasize the whole thing&quot;)&lt;/b&gt;. Often times in other languages, syntax order is different and stylizing certain portions would be almost impossible — </em><em>*Do not* the sentence *split* up like this. Same for specifying things like </em><em>Blood type: O. It would better to allow the translator to place variable like </em><em>&quot;Blood type: {bloodType}&quot; instead of </em><em>&quot;Blood type: &quot; + bloodType so translators have the flexibility to rearrange words and numbers according to local customs.</em></p><h3>User language and locale detection</h3><p>In order to provide a good translated experience, an app should try to automatically figure out the user’s preferred language without prompting the user. The browser API window.navigator.language is probably the easiest, most reliable, and <a href="https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/language">well-supported</a> way.</p><p><a href="http://i18next-browser-languageDetector">i18next-browser-languageDetector</a> plugin takes care of reading from window.navigator.language as well as maintaining any language selection in the browser cookie and LocalStorage. If the initially detected language is not preferred one and the user changes the language, the plugin will automatically persist that change for next time.</p><p>We need to chain the browser detection library to i18n to let it initialize together. langDetectorOptions is a set of optional parameters for tweaking the default behavior. For the purpose of this guide, we use en, zh, es as our 3 languages and we need to provide this in the whitelist has a list to pick from.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a554d8df9f8e164c04eae8775b826752/href">https://medium.com/media/a554d8df9f8e164c04eae8775b826752/href</a></iframe><p>Don’t worry if your languages are actually locales with country codes like en-US. i18next will approximate 2 letter language codes to 4 letter locale codes like en to en-US and vice versa.</p><p><a href="https://github.com/i18next/i18next-browser-languageDetector#detector-options">Official documentation</a></p><p><strong><em>Tip 5: Try to create region-specific translations whenever possible</em></strong><em> if your budget allows, especially for those your app is specifically targeting. Swiss German has different idioms and syntax patterns than German Standard German. Chinese readers struggle between the simplified characters used in Mainland China and the traditional characters used in Taiwan, Singapore, and Hong Kong. Even with languages that have a lot in common such as American English and British English, users will feel much more comfortable reading their own localized language. Automated tools for these also exist.</em></p><h3>Extracting strings for translations</h3><p>We can use <a href="https://github.com/i18next/i18next-parser">i18next-parser</a> to extract the strings that are embedded in our JavaScript into a dedicated JSON file that we can then submit to Smartling or other vendors for translation.</p><p>In the root project directory, create i18next-parser.config.js. The file output location is changed because Create React App only allows imports from within the src/ directory.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dcf9fbc16751a55911d0331707fed453/href">https://medium.com/media/dcf9fbc16751a55911d0331707fed453/href</a></iframe><p>Run extraction by calling npx i18next-parser.</p><p>This should generate a file src/locales/en.json with the strings you’ve previously created. I took the liberty to manually create es.json and zh.json as well for demonstration purposes. We can then add the content of those locale files to i18next in the initialization code. JSON webpack imports are built-in for Create React App. You may need an additional webpack plugin otherwise.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2f02630f88f4e42c2fa4dd323ea06aaf/href">https://medium.com/media/2f02630f88f4e42c2fa4dd323ea06aaf/href</a></iframe><p>At this point, you can try viewing other languages by manually setting the locale cookie.</p><p><a href="https://github.com/i18next/i18next-parser#i18next-parser-">Official parser documentation</a></p><p><em>Note that sometimes this extraction library doesn’t always pick up all the translations. There are some edge cases with the </em><em>&lt;Trans&gt; component as well as the </em><em>t() where you may need to try a different syntax or calling inside a different function or file for it to work. I don’t recommend using this parser in a fully automated script.</em></p><h3>Async load translated strings</h3><p><strong><em>This is more or less a hack because </em></strong><strong><em>i18next doesn’t support async loading locales from webpack bundle splitting. Only recent versions of webpack support async imports.</em></strong></p><p>String text can make up a significant portion of the total app bundle size, especially if many languages are involved. Loading only the required language can speed up page loading significantly.</p><p>The i18next-http-backend is built for loading language JSON from static folders. It is not only inconvenient to copy translations files every time, but also tedious to implement cache invalidation for every update. Instead, we can leverage webpack and the import() promise to create language bundles that can be served alongside existing JavaScript. The plugin’s async fetch behavior can be overridden to load from promises.</p><p>In localeBundles.js, we create a list of async imports and generate a list of supported languages from those. We then write a helper function loadLocaleBundle in i18nextInit.js to select the right bundle to load and optionally always bundle a default fallback language. In backendOptions, we override the default behavior of request to load from import() promises instead of URLs and we get the language requested by overriding the loadPath so it could be parsed in request easier.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6345f30b56d69ea0561c3181793caefd/href">https://medium.com/media/6345f30b56d69ea0561c3181793caefd/href</a></iframe><p>You should now see an additional request being made for your selected locale.</p><p><em>There should really be a backend plugin that takes in a list of async imports. Please steal this idea and open a PR against </em><em>i18next!</em></p><p><a href="https://github.com/i18next/i18next-http-backend#introduction">Official HTTP backend documentation</a></p><p><em>Before anyone calls out the other million ways to split bundles by locales, I want to emphasize the simplicity of this solution. This does not require any webpack config changes or infrastructure changes necessary to serve static locale files.</em></p><h3>Switching from one language to another</h3><p>What if you don’t want a hard refresh for users when changing locales? Fortunately, react-i18next supports dynamic language changes and updates existing translations after a new language is finished loading.</p><h4>Do not import the i18n object directly from i18next</h4><p>Again, i18next falls outside of the React component lifecycle and will not trigger the appropriate updates to translate and render the changed components.</p><p>We add a button to cycle through the 3 different languages we have configured. We then add the I18nextProvider to the root of our rendered app so it can propagate language changes to the children. The i18n object as a method i18n.changeLanguage to change language as well as information about current language i18n.language.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b8036e6890e71eb9b792e47e9c27fa71/href">https://medium.com/media/b8036e6890e71eb9b792e47e9c27fa71/href</a></iframe><p><em>Tip 4: If you have components or APIs inside your app that requires locale information such as third party payment widgets, make sure you get </em><em>i18n.language through one of the React methods and not directly from </em><em>i18next import. Otherwise, the third party component will not change language when requested and you end up with partially translated pages.</em></p><h3>Pluralization</h3><h4>Why do I have to worry about pluralization?</h4><p>Different languages have varying degrees of pluralization and different sets of rules for plurals.</p><p><strong>English</strong></p><ul><li>First form: for 1</li><li>Second form: for all other</li></ul><p><strong>Arabic:</strong></p><ul><li>First form: for 0</li><li>Second form: for 1</li><li>Third form: for 2</li><li>Fourth form: for numbers that end with a number between 3 and 10 (like: 103, 1405, 23409).</li><li>Fifth form: for numbers that end with a number between 11 and 99 (like: 1099, 278).</li><li>Sixth form: for numbers above 100 ending with 0, 1 or 2 (like: 100, 232, 3001)</li></ul><h4>ICU Plural MessageFormat</h4><p>I chose to use the <a href="http://userguide.icu-project.org/formatparse/messages">ICU JSON format</a> for a few reasons. Most translation vendors support this format so there is no TMS vendor lock-in. ICU JSON supports multiple forms of plural as well as variations of phrases for masculine and feminine forms of words in certain languages. These functionalities are self contained in a single string so it works with i18next-parser out of the box.</p><p><em>The </em><a href="https://www.i18next.com/misc/json-format"><em>i18next JSON format</em></a><em> also supports multiple forms of plural but it uses a new key for each plural form. Key additions are not an ideal solution because it is only supported by a single TMS vendor, </em><a href="https://locize.com/"><em>Locize</em></a><em>.</em></p><p>Since this guide is in English, I will only cover how to create the 2 English plural forms, singular and plural. The other forms for other languages should be generated by your translation vendor after strings have been translated. We will also need to provide the corresponding ICU locale data in the app for i18next-icu format plugin so strings can be formatted properly in our app.</p><h4>Simple plural example in English</h4><blockquote>You have 0 credits remaining.</blockquote><blockquote>You have 1 credit remaining.</blockquote><blockquote>You have 2 credits remaining.</blockquote><pre>t(“key.credits_remaining_warning”, { defaultValue: “You have {numCredits, plural, one {1 credit} other {{numCredits} credits}} remaining.”, numCredits: x }};</pre><h4>Plural example with special case for zero in English</h4><blockquote>Play this game for free.</blockquote><blockquote>Play this game for 1 credit.</blockquote><blockquote>Play this game for 2 credits.</blockquote><pre>t(“key.play_for_credits_prompt”, { defaultValue: “Play this game for {numCredits, plural, 0= {free}, one {1 credit} other {{numCredits} credits}}.”, numCredits: x }};</pre><h4><em>Multiple plurals example in English</em></h4><p>Smartling and some other translation management software vendors do not support multiple plurals in a single string even though it is part of the ICU MessageFormat standard. We can get around this by creating 3 separate strings, 2 for each plural form, and 1 for the sentence.</p><blockquote>Adam has 2 apples and Betty has 1 orange.</blockquote><blockquote>Adam has 1 apple and Betty has 2 oranges.</blockquote><blockquote>Adam has 2 apples and Betty has 2 oranges.</blockquote><pre>const adamsApples = t(“key.apples”, { defaultValue: “{numApples, plural, one {1 apple} other {{numApples} apples}}”, numApples}}; // 1 apple, 2 apples</pre><pre>const bettysOranges = t(“key.oranges”, { defaultValue: “{numOranges, plural, one {1 orange} other {{numOranges} oranges}}”, numOranges}}; // 1 orange, 2 oranges</pre><pre>t(“key.apples_and_oranges”, { defaultValue: “Adam has {adamsApples} and Betty has {bettysOranges}.”, adamsApples, bettysOranges }}; // complete sentence</pre><h4>Masculine and feminine forms</h4><p>I’m going to skip over this one because it is easier to rewrite the phrase to avoid using pronouns altogether. Creating a system in place to save and render gender information for properly conjugating phrases is not worth the effort. In addition, gender is also not binary in certain parts of the world as well.</p><p><strong>Gendered:</strong></p><blockquote>He/she needs additional time.</blockquote><p><strong>Gender neutral:</strong></p><blockquote>The customer needs additional time.</blockquote><p>For those intellectually curious, gendered forms can be created using the select function from ICU Message Format.</p><p>We can create another toggle button in App.js that will cycle a variable between 0–3. In the t() function, we can pass in an object with the translation string as defaultVariable and other keys as replacement variables. This will give us a way to test pluralization with different quantities.</p><p>We also need to provide the <a href="https://react.i18next.com/misc/using-with-icu-format">ICU formatter plugin</a> for i18next as well as the associated formatting data for each language. The formatting data is relatively small so it is probably not worth the effort to bundle split.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dd529cd70a3a9da35629c11bec9a98cf/href">https://medium.com/media/dd529cd70a3a9da35629c11bec9a98cf/href</a></iframe><h3>ICU JSON syntax validation</h3><p>The ICU JSON format is not the most straightforward format to read and write manually. i18next-icu also <a href="https://github.com/i18next/i18next-icu/issues/21">crashes when there is a syntax error</a> in the translation string. We can reduce the number of syntax errors and mistakes by using <a href="https://github.com/godaddy/eslint-plugin-i18n-json">eslint-plugin-i18n-json</a> to scan all of the translations.</p><p>I created a .eslintrc.js file in the src/locales directory to specifically target translation json files with root=true to avoid inheriting the project config. I also turned off sorted-keys because it conflicts with the i18next-parser order and generates merge conflicts.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d4116019c6249b86c4627fa821dad0c4/href">https://medium.com/media/d4116019c6249b86c4627fa821dad0c4/href</a></iframe><p>Run npx eslint src/locales/*.json to validate your translation syntax.</p><p><em>Tip 6: In your tests or </em><em>prepush git hook, you can add the extract and validate scripts to make sure all translation changes have been extracted and that the syntax is correct.</em></p><h3>Fallback scenarios</h3><p>In the case that a translation is not available in a certain language or the additional bundles do not load for whatever reason, i18next has a series of fallbacks the app can rely on to display something meaningful to the user.</p><p>Here’s the order of precedence for language matching as defined by the whitelist:</p><ol><li>Exact match of language or locale code requested: es to es</li><li>Nearest match of language or locale code: es-MX to es and vice versa</li><li>Fallback language defined in init(): fallbackLng: &#39;en&#39;</li></ol><p>The order is similar for individual translation key lookup:</p><ol><li>Exact or nearest match of language or locale</li><li>Fallback language</li><li>String provided as defaultValue for the translation function</li></ol><h3>Tools and processes for getting content translated</h3><p>Getting the right tools and implementing a smooth process can make the overall translation much less painful. This is more important the larger your organization is. A new startup may choose to have internal staff translate the JSON files directly and avoid additional tools and vendors as well.</p><h4>Translation Management System</h4><p>You will need a translation management system<strong> </strong>(<em>TMS</em>) to process the original strings, allow translators to input their translations in different formats, check for quality, and output translations in a form engineers can use. The system will typically also save previous translations and match new ones against those as well.</p><p>I’ve only had extensive experience with <a href="https://www.smartling.com/">Smartling</a>. Other systems include <a href="https://xtm.cloud/">XTM</a> and <a href="https://www.transifex.com/">Transifex</a>.</p><p><strong>Smartling Pros:<br></strong>It seems like this is a popular choice among smaller tech companies. Their cost is fairly reasonable and the interface for managing translations works as intended. The software seems to be designed for non-technical people who are involved in internationalization, namely the translators and program administrators. Single sign on support and cost previews are helpful as well.</p><p><strong>Smartling Cons:</strong><br>Their developer-facing tools rarely get updated and technical support is almost nonexistent. <a href="https://help.smartling.com/hc/en-us/articles/360008152513-GitHub-Connector-Overview">Smartling GitHub Connector</a> is inflexible and a pain to use. Current PRs must be kept open for translations to be added back in and there is always a risk of merge conflicts. Their API documentation leaves a lot to be desired as well.</p><p>A typical translation process for Smartling looks like this:</p><ol><li>Write the translation in code</li><li>Extract to JSON file</li><li>Commit changes and push to GitHub</li><li>Open PR for Smartling GitHub Connector to pick up translation</li><li>Keep PR open until Smartling GHC opens another PR against the existing PR branch to merge translations in</li><li>Resolve any merge conflicts and then merge</li></ol><h4>Translators</h4><p>Now that you have a system to manage translations, you will also need someone or something to actually translate.</p><ul><li><strong>In-house translators </strong>— <em>Product support specialists and product owners who work in other languages are great candidates since they understand your product and typically require less context. They will require training so consider the opportunity cost vs. hiring external vendors.</em></li><li><strong>Third party translators </strong>— <em>Hiring professional third party is a good choice if your budget allows. </em><a href="https://www.rws.com/"><em>RWS Moravia</em></a><em> and </em><a href="https://www.eriksen.com/"><em>Eriksen</em></a><em> are two I’ve worked with in the past. It usually takes about a couple business days for strings to be translated and returned back.</em></li><li><strong>Machine translators</strong> — <em>This is similar to using Google Translate across your app where the translation might not always make sense. There is an emerging trend to temporarily use machine translations when human translations are not yet available. Machine assisted translations exist as well where a human translator proofreads and edits machine translations.</em></li></ul><p>Once your translators are added to the translation management system, you are ready to begin the process of translating your app!</p><h3>What’s next?</h3><p>As mentioned earlier, there are many more steps to properly internationalize and localize an app, many of which are a combination of technical and non-technical tasks. <strong>Translating an app alone will only bring limited success if the app features aren’t adapted to other markets.</strong> Take some time to review <a href="#81c1">the list of topics not covered</a> and see which ones are important to your product. This guide is already long enough so I will leave you with just a few more things to consider.</p><h4>Date and time formatting</h4><p>If you find yourself translating anything date or time related, even if the phrases are simply days of the week or months, consider using a library instead.</p><blockquote>Human readable relative time — A few seconds ago</blockquote><blockquote>Duration — 2 hours</blockquote><ul><li><a href="https://momentjs.com/">moment.js </a>— mature full feature library that can do everything, comes at a very large bundle size</li><li><a href="https://moment.github.io/luxon/">luxon.js</a> — lightweight, relies on browser APIs, minor inconsistencies in older browsers from missing browser APIs</li><li><a href="https://date-fns.org/">date-fns</a> — young and modular full feature library that uses browser APIs, pick and choose necessary functionality</li></ul><h4>Locale specific layout and design changes</h4><p>Some languages such as German have longer words that may not fit in your English layout. A common pattern to detect these visual defects is to programmatically generate a test language that is 2x longer than the English phrase with a minimum word length of 10–15 characters and manually review each interface.</p><p>Languages in other regions of the world may not have the same typography attributes found in European languages. East Asian text is typically illegible under 12px font size on low resolution screens. Letter spacing cannot be applied to languages such as Arabic where characters are connected. Language specific customizations like these can be applied by adding thelang to HTML elements and styling using the :lang() <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:lang">CSS selector</a>.</p><p>Fully supporting right to left language is a huge pain because users prefer having their entire layout horizontally flipped. Fortunately, there are tools like <a href="https://github.com/vkalinichev/postcss-rtl">PostCSS-RTL</a> that will programmatically generate a set of CSS styles that has all horizontal styles flipped.</p><h4>Example code</h4><p>As promised, here’s the final app with all the steps combined. Feel free to fork or copy. Happy translating!</p><p><a href="https://github.com/danielduan/i18next-create-react-app">danielduan/i18next-create-react-app</a></p><p><strong><em>Many thanks to all the people at Squarespace and WeWork who helped me learn about internationalization from the ground up. </em></strong>Please leave comments and suggestions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2f78bc87314" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>