<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <id>https://www.techinterviewhandbook.org/blog</id>
    <title>AI Paper Insights Blog</title>
    <updated>2022-07-09T00:00:00.000Z</updated>
    <generator>https://github.com/jpmonette/feed</generator>
    <link rel="alternate" href="https://www.techinterviewhandbook.org/blog"/>
    <subtitle>AI Paper Insights Blog</subtitle>
    <icon>https://www.techinterviewhandbook.org/img/favicon.png</icon>
    <entry>
        <title type="html"><![CDATA[Getting a Tech Job as an Undergraduate]]></title>
        <id>https://www.techinterviewhandbook.org/blog/getting-a-tech-job-as-an-undergraduate</id>
        <link href="https://www.techinterviewhandbook.org/blog/getting-a-tech-job-as-an-undergraduate"/>
        <updated>2022-07-09T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Recently, I have met many juniors and peers especially from non-computer Science related backgrounds asking me about securing a job as a fresh graduate especially in this area of software engineering. Here's my take and some tips and tricks to get started.]]></summary>
        <content type="html"><![CDATA[<p>Recently, I have met many juniors and peers especially from non-computer Science related backgrounds asking me about securing a job as a fresh graduate especially in this area of software engineering. Here's my take and some tips and tricks to get started.</p><p>Before I share my resources and how to get a gentle start on this handbook, let me warn you that you would need to allocate a minimum of 6 months to get really good and confident with some of the LeetCode questions. Do not neglect the behavioral questions too! I am not going to repeat some of the things that are mentioned in this handbook but rather help everyone with some useful shortcuts of mine to navigate this resource to ease your preparations.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="crafting-your-resume">Crafting your resume<a href="#crafting-your-resume" class="hash-link" aria-label="Direct link to Crafting your resume" title="Direct link to Crafting your resume">​</a></h2><p>In most companies, the resume stage is the most important as it is the first stage that you will need to clear! For undergraduates, most hiring managers would only look at resumes that are within one page. The moment the second page is seen, they will not tend to consider. Hence, here are some tips that can help you to prepare your resume in under an hour to reduce your agony.</p><ol><li><p>Use a <strong>career hiring tool</strong> like <a href="https://app.kinobi.asia/resume" target="_blank" rel="noopener noreferrer">Kinobi</a>. Kinobi saves you time in having to fix alignments unlike word as this career tool formats everything for you. Furthermore, they help you to score your resume so that you know where you stand when applying for a job.</p></li><li><p>As far as possible, <strong>attend career talks</strong> by your favorite companies because hiring managers are there and you can get some feedback about your resume. It is indeed helpful because you know what to look out for when applying.</p></li><li><p>Keep your sentences short and sweet, else you are out of the game.</p><ul><li><strong>Good example:</strong> "Developed a full-stack website that garnered positive responses from faculty and administration about course visualization." You need not provide tech stacks and let alone, links here. The sentence here is short and sweet and all in past tense.</li><li><strong>Bad example:</strong> "Was a project manager for two projects- AI_ducation as well as the lift project for ALEF. Helped day-to-day operations by communicating with clients in Mandarin to map business requirements to technical requirements.". Over here, the sentence is long and things can be <strong>separated out into points</strong>. Furthermore, it does not describe the outcome of the project enough to say <strong>"Why should you be hired?"</strong>.</li></ul></li><li><p>To save time, while building your projects, apply good practices and also think of various optimizations in terms of algorithmic design, not forgetting system design. You can also show this off and this saved me a lot of time especially when it comes to grinding LeetCode.</p></li><li><p>Your LinkedIn stands out the most and less of your personal website unless it's design related or frontend related. Write more things that are still succinct on your LinkedIn. Show your work there and let recruiters interact with your work.</p></li><li><p>ATS-friendly resumes are the most important ones as recruiters screen high volumes of candidates everyday so they have less than even 5 seconds to look at your resume. Some companies use ATS to scan for good keywords.</p></li></ol><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="how-to-use-the-tech-interview-handbook-easily">How to use the Tech Interview Handbook easily<a href="#how-to-use-the-tech-interview-handbook-easily" class="hash-link" aria-label="Direct link to How to use the Tech Interview Handbook easily" title="Direct link to How to use the Tech Interview Handbook easily">​</a></h2><p>I am about to recommend relevant sections to go in sequentially and how to systematically use them to your advantage especially in being real productive. This stage is normally faced when the resume stage has passed. Even then, months of prior preparation has to be done. However if you only have one month to prepare, I suggest the following tips:</p><ol><li><p>Know your interview process. Ask your recruiter about the interview process.</p></li><li><p>Go to your Glassdoor page and pick out some of the past relevant interview questions that your company has done to get a gauge of what to expect. If you are unable to do those past questions, I suggest revising a good amount about the common topics. One common topic is array and hash table design. You can refer to the <a href="/coding-interview-rubrics/">coding interview rubrics section</a> get to know your interview rubrics. It helps and you know what to do.</p></li><li><p>Know and try various techniques for each LeetCode question. It's not purely about variety but more about if you were to even come back to the same question, will you be able to give a more optimal solution? If you don't know where to get started especially when solving problems in general refer to this <a href="/coding-interview-techniques/">coding interview techniques section</a>.</p><ul><li>Start with a whiteboard or pen and paper. Show your thought process.</li><li>In most companies, if you were to show your thought process while doing, interviewers tend to favour candidates who do this. If you are not confident, start thinking that you are explaining and teaching a 12 year old child about how to solve this question.</li><li>Code it out and write your own test cases. Get used to the HackerRank or LeetCode IDEs.</li><li>Now with virtual interviews, some companies tend to use HackerRank live to conduct whiteboard interviews. Prepare a pen and paper beside you as you work along. Prepare to remote desktop protocol (RDP) into your computer to show step-by-step workings.</li><li>Do not blurt out the solution straightaway as interviewers can tell that you memorize.</li></ul></li><li><p>Last but not least for algorithms heavy interviews, you might really want to save your time looking at <a href="https://techinterviewhandbook.org/grind75" target="_blank" rel="noopener noreferrer">Grind 75</a>. It's a useful curated source of questions to note how much you can prepare for your interview.</p></li><li><p>Always be prepared for even system design questions! You will never know what comes your way and this is where your projects come in and how much of good practices you apply in them and what do you learn. The <a href="https://github.com/donnemartin/system-design-primer" target="_blank" rel="noopener noreferrer">System Design Primer</a> is a good start.</p></li></ol><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="do-not-neglect-behavioral-interview-questions">Do not neglect behavioral interview questions<a href="#do-not-neglect-behavioral-interview-questions" class="hash-link" aria-label="Direct link to Do not neglect behavioral interview questions" title="Direct link to Do not neglect behavioral interview questions">​</a></h2><p>Most candidates at least from what I know, tend to neglect this section. As a result, they pass up good opportunities because of this section.</p><p>I suggest reading Cracking the Coding Interview, which explains this section very well in detail. Here are some preparations that you can do before the interview.</p><ol><li><p>Draw up a table in this format. This is so that you know what to say when a question about your projects come up.</p><table><thead><tr><th></th><th>Project 1</th><th>Project 2</th></tr></thead><tbody><tr><td>Strength 1</td><td></td><td></td></tr><tr><td>Strength 2</td><td></td><td></td></tr><tr><td>Weakness 1</td><td></td><td></td></tr><tr><td>Weakness 2</td><td></td><td></td></tr><tr><td>Improvement 1</td><td></td><td></td></tr><tr><td>Improvement 2</td><td></td><td></td></tr></tbody></table></li><li><p>For those with portfolio websites, do be prepared to answer "What do you think can be done better to improve your website?" I highly suggest inspecting your console and using UI/UX principles to state the improvements. It would be also good for front end engineering roles to state how you can better engineer your website.</p></li><li><p>When preparing, do not focus your answers heavily on your team. Instead, the interviewers want to see how you have grown as an individual and the difficulties that you encounter. Be also prepared to stand strong on your answers and do not give an "I think" vibes to the interviewer. They will tend to have a bad impression.</p></li><li><p>Certain companies go by rubrics for this and they do not disclose this! However, always be humble and thank the interviewers for helping even if you are unable to justify.</p></li></ol><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="interview-day">Interview day<a href="#interview-day" class="hash-link" aria-label="Direct link to Interview day" title="Direct link to Interview day">​</a></h2><p>As always, have a goodnight sleep before and adjust your sleep cycle <strong>at least 3 days</strong> prior. If you do not know where to start form, start from a brute force solution and manipulate the data structure to your advantage.</p><p>Most interviewers like optimized solutions but they like how you can design a <strong>simple solution</strong> to the problem!</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="conclusion">Conclusion<a href="#conclusion" class="hash-link" aria-label="Direct link to Conclusion" title="Direct link to Conclusion">​</a></h2><p>All the best in your preparations! Hope my shortcuts help for those of you who are extremely busy!</p>]]></content>
        <author>
            <name>Melody Yun</name>
            <uri>https://github.com/caramelmelmel</uri>
        </author>
        <category label="undergraduate" term="undergraduate"/>
        <category label="career" term="career"/>
        <category label="job search" term="job search"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Why You Should Include Debugging In The Interview Process]]></title>
        <id>https://www.techinterviewhandbook.org/blog/why-you-should-include-debugging-in-the-interview-process</id>
        <link href="https://www.techinterviewhandbook.org/blog/why-you-should-include-debugging-in-the-interview-process"/>
        <updated>2022-04-21T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[See discussions on Hacker News]]></summary>
        <content type="html"><![CDATA[<br><div class="theme-admonition theme-admonition-tip alert alert--success admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>tip</div><div class="admonitionContent_S0QG"><p>See discussions on <a href="https://news.ycombinator.com/item?id=31125269" target="_blank" rel="noopener noreferrer">Hacker News</a></p></div></div><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="most-technical-interviews-are-over-indexing-on-coding">Most technical interviews are over-indexing on coding<a href="#most-technical-interviews-are-over-indexing-on-coding" class="hash-link" aria-label="Direct link to Most technical interviews are over-indexing on coding" title="Direct link to Most technical interviews are over-indexing on coding">​</a></h2><p>Over the past two years, I have interviewed with over 10 different tech companies ranging from hot startups like Coinbase, Stripe, and Instacart to FAANG companies like Amazon and Meta, for Software Engineer positions of various levels.</p><p>The technical interview processes I have had all consisted of at least two rounds of coding interviews, where I either had to solve an <strong>algorithmic, LeetCode-type</strong> question or build a <strong>practical app/feature</strong>. During those coding interviews, I always started with an <em>empty slate</em>: if it was an algorithm-heavy interview question, there would be a literally empty file in the editor for me to start writing code; if it was a practical app building exercise, there might be some boilerplate code or some utilities/helper functions available but still I was expected to build the app/feature from scratch.</p><p>I do think they did a good job at assessing my coding ability. But the issue I see here is that the standard interview process in our industry has over-indexed on coding ability along. As a software engineer, apart from meetings and writing design docs, I’d say at least half of my programming work isn’t just coding – the other half largely involves searching through a codebase and reading existing code or code-adjacent artifacts like error messages, tests, and logs. And oftentimes, coding isn’t the hardest part.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="what-is-programming-exactly">What is programming exactly<a href="#what-is-programming-exactly" class="hash-link" aria-label="Direct link to What is programming exactly" title="Direct link to What is programming exactly">​</a></h2><p>Programming is a complex task so it makes sense to dissect it so we can study the different phases, dimensions and components of it individually.</p><p>I have been reading <a href="https://www.manning.com/books/the-programmers-brain" target="_blank" rel="noopener noreferrer"><em>The Programmer's Brain</em></a> by Felienne Hermans. It is a book about the cognitive process involved in programming. Felienne divides programming into five more concrete activities: <strong>searching, comprehension, transcribing, incrementation, and exploration</strong>.</p><p>Searching is the activity where a programmer is looking for a specific piece of information in a codebase, such as the precise location of a bug you need to fix in the code.</p><p>Comprehension is reading the code to understand its functionality and the way it is intended to work. It also involves executing the code and observing the results.</p><p>Transcribing is about converting your thoughts or solutions to executable code. This is what we usually refer to as <strong>"coding"</strong> and is what the current standard coding interview process only focuses on.</p><p>Incrementation is about incrementing (iterating) on an existing codebase, such as adding a new feature. It is a mix of the previous activities, where a programmer has to search, comprehend and transcribe their thoughts to code.</p><p>Exploration is sketching and prototyping with code. Try things and use code as a means of thought. It is also a mix of the previous activities.</p><p>With this newfound knowledge, it is not hard to tell what exactly the current standard interview process lacks. Activities such as searching and comprehension are completely left out and you have no way to prove your competencies needed for a big part of a software engineer job.</p><p>It begs the question of what we can do to complement the interview process to cover all these activities. And the answer is to add a <strong>debugging interview</strong> in the process.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="debugging-is-all-encompassing">Debugging is all-encompassing<a href="#debugging-is-all-encompassing" class="hash-link" aria-label="Direct link to Debugging is all-encompassing" title="Direct link to Debugging is all-encompassing">​</a></h2><p>When one is debugging, they engage in <strong>all five activities</strong>. It entails a sequence of searching, comprehension, exploration and writing code. And it is incredibly revealing to watch one debug:</p><ol><li>Are they debugging with a plan, iteratively bisecting the code or just randomly tweaking the code?</li><li>How are they navigating their way through an unfamiliar codebase, forming different hypotheses about the bug?</li><li>Do they try to write a test that reliably reproduces the issue?</li><li>Are they able to find where things are diverging and trace to the root cause?</li><li>Are they familiar with the IDE or editor they are using and know how to use tools like breakpoints and watches to step through the code?</li><li>Do they understand how to read error messages and leverage stack traces?</li><li>Are they able to implement a fix at the end?</li><li>...the list goes on and on</li></ol><p>On top of its comprehensiveness, debugging is what software engineers do on a regular basis. It is relevant to the actual work.</p><p>Out of all the companies I have interviewed for, <em>only</em> Stripe conducted a debugging interview. They call it Bug Squash, where you’d dive into a large, well-written library codebase to fix real-world open-source bugs. I had a blast going through that interview which I can’t say about boring LeetCode questions.</p><p>Granted, preparing such a debugging interview involves more work for the company than just throwing a LeetCode question at the candidate. Still, having that in the process gives you more signals for selecting capable, experienced engineers. I hope more companies start to embrace that in their hiring process.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="further-reading-that-can-make-you-better-at-debugging">Further reading that can make you better at debugging<a href="#further-reading-that-can-make-you-better-at-debugging" class="hash-link" aria-label="Direct link to Further reading that can make you better at debugging" title="Direct link to Further reading that can make you better at debugging">​</a></h2><ul><li><a href="https://www.goodreads.com/book/show/3938178-debugging" target="_blank" rel="noopener noreferrer"><em>Debugging: The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems</em></a> by Dave Agans</li><li><a href="https://blog.isquaredsoftware.com/2021/06/presentations-debugging-software/" target="_blank" rel="noopener noreferrer"><em>Debugging Software</em></a> by Mark Erikson</li><li><a href="https://jvns.ca/blog/2015/11/22/how-i-got-better-at-debugging/" target="_blank" rel="noopener noreferrer"><em>How I got better at debugging</em></a> by Julia Evans</li></ul>]]></content>
        <author>
            <name>Zhenghao He</name>
            <uri>https://twitter.com/he_zhenghao</uri>
        </author>
        <category label="interview" term="interview"/>
        <category label="debugging" term="debugging"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Take Control Over Your Coding Interview]]></title>
        <id>https://www.techinterviewhandbook.org/blog/take-control-over-your-coding-interview</id>
        <link href="https://www.techinterviewhandbook.org/blog/take-control-over-your-coding-interview"/>
        <updated>2022-04-20T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[The interview question]]></summary>
        <content type="html"><![CDATA[<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="the-interview-question">The interview question<a href="#the-interview-question" class="hash-link" aria-label="Direct link to The interview question" title="Direct link to The interview question">​</a></h2><p>Imagine you were a university student looking to land an entry-level software engineer job and you were having this technical coding interview. The interview question starts with a table showing amount of units of a product sold at the shop and the corresponding price per unit. The idea here is that there is an incentive for customers to buy in bulk – the more we can sell the lower the price:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain">purchase quantity                                  price per unit</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    1-5                                              5 dollars</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    6-10                                             4 dollars</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    11-20                                            3 dollars</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    20+                                              2.5 dollars</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>The task the interviewer asks you to do is to write out a function that takes the amount of the times being purchased as the input and output the price per unit according the table. So if the input is 5, the function returns 5, and if the input is 6, the function returns 4... you get the idea.</p><p>That's it. That is the whole question. "This is even simpler than <a href="https://leetcode.com/problems/fizz-buzz/" target="_blank" rel="noopener noreferrer">Fizz Buzz</a>," you think to yourself, "but it might lead to more difficult follow-up questions, like it might get tweaked into a binary search problem or something". So you start to write the following simple solution, expecting more in-depth follow-up questions to come.</p><div class="language-js codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-js codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">function</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">getPrice</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token parameter">amount</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">amount </span><span class="token operator">&gt;=</span><span class="token plain"> </span><span class="token number">1</span><span class="token plain"> </span><span class="token operator">&amp;&amp;</span><span class="token plain"> amount </span><span class="token operator">&lt;=</span><span class="token plain"> </span><span class="token number">5</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'5'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">amount </span><span class="token operator">&gt;=</span><span class="token plain"> </span><span class="token number">6</span><span class="token plain"> </span><span class="token operator">&amp;&amp;</span><span class="token plain"> amount </span><span class="token operator">&lt;=</span><span class="token plain"> </span><span class="token number">10</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'4'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">amount </span><span class="token operator">&gt;=</span><span class="token plain"> </span><span class="token number">11</span><span class="token plain"> </span><span class="token operator">&amp;&amp;</span><span class="token plain"> amount </span><span class="token operator">&lt;=</span><span class="token plain"> </span><span class="token number">20</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'3'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">amount </span><span class="token operator">&gt;</span><span class="token plain"> </span><span class="token number">21</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'2.5'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'unknown price'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>However, to your surprise, after you came up with this solution, the interviewer just stops there, moves on to the next question or discusss something completely unrelated.</p><p>The next day, you get a rejection letter from the company.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="the-tweet">The Tweet<a href="#the-tweet" class="hash-link" aria-label="Direct link to The Tweet" title="Direct link to The Tweet">​</a></h2><p>This is based off of a true story. It was a real interview question and the solution I wrote above was considered <strong>unacceptable</strong> by the interviewer, i.e. the tweet author.</p><blockquote class="twitter-tweet"><p lang="zh" dir="ltr"><a href="https://twitter.com/hashtag/%E5%BE%AE%E4%BB%A3%E7%A0%81?src=hash&amp;ref_src=twsrc%5Etfw" target="_blank" rel="noopener noreferrer">#微代码</a> 最近面试校招生的一个感想：有非常多的同学会写出解法1的代码，这让我很难理解。以至于只要看到有解法2的样子，印象上就会先加分了。 <a href="https://t.co/g38d2A5Bjj" target="_blank" rel="noopener noreferrer">pic.twitter.com/g38d2A5Bjj</a></p>— toobug (@TooooooBug) <a href="https://twitter.com/TooooooBug/status/1437252082264731649?ref_src=twsrc%5Etfw" target="_blank" rel="noopener noreferrer">September 13, 2021</a></blockquote> <script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script><p>A while ago this tweet went viral in the Chinese programming circle. The tweet author used this exact question to screen new grads for an entry-level software engineer position. The tweet and the question were written in Chinese so I translated this question into English.</p><p>In the tweet, he complained that he was having a hard time understanding (很难理解) why many students came up with the solution that we came up with above. Instead of a straightforward solution with a bunch of <code>if</code> statements, he said he was expecting an answer like this:</p><p><img loading="lazy" src="https://pbs.twimg.com/media/E_IiA2JVIAcZSSk?format=png&amp;name=900x900" alt="alt" class="img_ev3q"></p><p>Compared to the first solution with a bunch of <code>if</code> statements, this solution, in his opinion, is more <strong>modular, extensible, and maintainable</strong>. That was the answer he had in mind and failing to arrive at this solution means you are weeded out in the interview process.</p><p>I am not sure how you feel about this, but in my opinion, this is a pretty pointless interview question to ask new grads. The first solution is totally fine. Under the right circumstances, the second solution is closer to what you would want in production code, even though it is still not quite the <a href="#table-driven-development">table-driven development</a> you'd want.</p><p>There are so many things I want to unpack, so here is the tl;dr:</p><ol><li>Different types/styles of interviews call for different answers and that should be clearly communicated during the interview. The first solution is totally fine as the answer to an algorithmic question.</li><li>Take control of your interview so you don't have to guess what the interviewer has in mind. You do this by asking clarifying questions. <strong>Keep asking until everything the interviewer is looking for is clear to you</strong>.</li><li>The table-driven method (what the second solution tries to achieve) <strong>optimizes for changes</strong> and that's why the interviewer (the tweet author) failed students who didn't come up with that answer.</li></ol><p>The overarching theme in this post is that you should take control of your coding interview so you don't have to guess the answer your interviewer is thinking of.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="different-styles-of-interviews-calls-for-different-answers">Different styles of interviews calls for different answers<a href="#different-styles-of-interviews-calls-for-different-answers" class="hash-link" aria-label="Direct link to Different styles of interviews calls for different answers" title="Direct link to Different styles of interviews calls for different answers">​</a></h2><p>Generally, there are two types of coding interviews:</p><ol><li>Interviews that focus on <strong>algorithms &amp; data structures</strong></li><li>Interviews that focus on <strong>practical app/feature-building</strong> and test your hands-on engineering chops</li></ol><p>Normally it should be easy to distinguish between these two types of interviews by merely looking at the question: <a href="https://leetcode.com/problems/invert-binary-tree/" target="_blank" rel="noopener noreferrer">Inverting a Binary Tree</a> is a typical algorithmic question, while designing and implementing an auto-complete search feature is more about practical app-building. Although sometimes the two types of interview questions would blend. For example, you might be asked to (partially) implement a <a href="https://en.wikipedia.org/wiki/Trie" target="_blank" rel="noopener noreferrer">trie</a> when you are talking about the design of an auto-complete search feature/service/component. But these two different types of interviews are meant to test different competences.</p><p>In a pure algorithmic, LeetCode-type of interviews, your <strong>main goal</strong> is to leverage the right data structures and come up with an efficient algorithm to solve the problem with the right set of memory/runtime complexity trade-offs <strong>as fast as you can</strong>. How readable, maintainable and extensible your code is, or whether it conforms to the current best practice in the the community/industry are <em>not</em> that important, or at least secondary to the main goal. You can go ahead and name your variables <code>i</code>, <code>n</code>, <code>p</code>, <code>q</code> and mutate that input array in-place without being judged as long as your solution passes the test cases under the time and memory limits.</p><blockquote><p>As <a href="https://www.joelonsoftware.com/" target="_blank" rel="noopener noreferrer">Joel Spolsky</a> wrote in his <a href="https://www.joelonsoftware.com/2006/10/25/the-guerrilla-guide-to-interviewing-version-30/" target="_blank" rel="noopener noreferrer">blog post</a>: with the algorithmic interview questions, he wants to see if the candidate is smart enough to "rip through a recursive algorithm in seconds, or implement linked-list manipulation functions using pointers as fast as you can write on the whiteboard".</p></blockquote><p>For more experienced engineers/developers, the coding interview tends to lean into the practical app-building category, where <strong>readable, maintainable code and extensible program structure</strong> are what they look for, and all aspects of the full software development life cycle, even including error handling, are fair game to be asked, as they are important in real-world software building.</p><p>Here I don't make any value judgment about which type of interviews are good or better. I just pointed out that they exist and interviewers look for different things by conducting different types of interviews.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="take-control-over-the-interview">Take control over the interview<a href="#take-control-over-the-interview" class="hash-link" aria-label="Direct link to Take control over the interview" title="Direct link to Take control over the interview">​</a></h3><p>As an interviewee, you want to make sure you understand <strong>which category the question falls into</strong> because the underlying core criteria on which you are assessed are different – you don't want to overload the capacity of the working memory of your brain with tasks that are secondary before you reach the main goal. You want to take control over the interview so you are not left in the dark.</p><p>One way to take control over the interview is to <strong>narrate your thoughts</strong> as you go and <strong>articulate any assumptions</strong> you have to make sure you get confirmation from your interviewer on your way forward or they should help you correct course.</p><p>If I were the candidate receiving this exact question, I would ask this upfront: "should I write production-grade code with good engineering practices or you are more interested in how I'd tackle the algorithm &amp; data structure part?". That is probably one of the highest ROI questions we can ask during an interview. The interviewer would either tell me to write a workable solution under the constraints of the runtime or space characteristics or treat this as a real-world engineering problem with real-world tradeoffs.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="with-all-that-being-said-it-is-a-bad-question-to-ask-new-grads">With all that being said, it is a bad question to ask new grads<a href="#with-all-that-being-said-it-is-a-bad-question-to-ask-new-grads" class="hash-link" aria-label="Direct link to With all that being said, it is a bad question to ask new grads" title="Direct link to With all that being said, it is a bad question to ask new grads">​</a></h3><p>The question itself doesn't test any of the core competencies that distinguish between brilliant programmers and mediocre ones. What's really being tested here, based on the (ideal) answer the interviewer (the author of the tweet) had in mind, is the whether the candidate – <strong>new CS grads</strong> without any significant experience working in the software industry – knows how to use the table-driven method to implement such a function.</p><p>I don't believe that any smart college student who can breeze through a graph traversal problem in an interview can't understand and pick up patterns like the table-driven method in just a couple of hours. On the other hand, any mediocre programmers who happened to read <em><a href="https://en.wikipedia.org/wiki/Code_Complete" target="_blank" rel="noopener noreferrer">Code Complete</a></em> can write a table-driven solution and pass the interview. Not to say that knowing good engineering practices is not a good thing; it is just that using that as the <strong>only</strong> hiring criteria to hire new grads is pointless and it doesn't help you find the smart kids.</p><details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>So what are the ideal interview quetsions to ask new grads?</summary><div><div class="collapsibleContent_i85q"><p>Joel pointed it out <a href="https://www.joelonsoftware.com/2006/10/25/the-guerrilla-guide-to-interviewing-version-30/" target="_blank" rel="noopener noreferrer">in his post</a> that the ideal interview questions should cover at least one of these two Computer Science concepts: 1. recursion 2. pointers</p><p>I actually agree with him on this. You want to ask questions about these two concepts not because they are ubiquitous in your average codebase and you have to use them every day. It is because they are a great tool to test the ability to reason and think in abstractions, the kind of mental aptitude a brilliant programmer would have.</p></div></div></details><p>Anyway, the moral of the story is don't be afraid to ask clarifying questions so you don't have to guess what the interviewer looks for and cares about if they are not being explicit about their expectations.</p><blockquote><p>You can stop here if you don't care about technical discussions about this simple interview question.</p></blockquote><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="table-driven-development">Table-driven development<a href="#table-driven-development" class="hash-link" aria-label="Direct link to Table-driven development" title="Direct link to Table-driven development">​</a></h2><p>Solution 2 resembles a form of table-driven development described in a classic programming book called <em><a href="https://en.wikipedia.org/wiki/Code_Complete" target="_blank" rel="noopener noreferrer">Code Complete</a></em>. But even if you have never read the book, you probably know this pattern from your experience working as a software developer/engineer.</p><p>At its core, it tries to separate <strong>data</strong> from <strong>logic</strong>: instead of having all the information about pricing strategy (the data) hardcoded in the function (the logic) as literal values, it separates them.</p><p>The pricing strategy is a business rule, and business rules tend to be the source of frequent changes. By encoding that in an external data structure (i.e. the array <code>priceMap</code> in this case), we make our program easier to accommodate future changes. Whenever the pricing strategy changes, we can just modify the entries in the array without touching the logic of the function. In other words, we isolate the unstable part, so the effect of a change will be limited.</p><p>However, I said it only resembles table-driven development that you'd use in production code but it is not quite there yet:</p><ol><li>The pricing data is not fully separated from the logic as the array <code>priceMap</code> is still defined within the function</li><li>Magic numbers are still there</li></ol><p>Depending on where the pricing data comes from, one possible variation of the table-driven method for this particular question is as follows:</p><div class="language-javascript codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-javascript codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token comment" style="color:rgb(98, 114, 164)">// config.js</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token keyword module" style="color:rgb(189, 147, 249);font-style:italic">export</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> priceByRanges </span><span class="token operator">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">[</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"> </span><span class="token literal-property property">min</span><span class="token operator">:</span><span class="token plain"> </span><span class="token number">1</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token literal-property property">max</span><span class="token operator">:</span><span class="token plain"> </span><span class="token number">5</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token literal-property property">price</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'5'</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"> </span><span class="token literal-property property">min</span><span class="token operator">:</span><span class="token plain"> </span><span class="token number">6</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token literal-property property">max</span><span class="token operator">:</span><span class="token plain"> </span><span class="token number">10</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token literal-property property">price</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'4'</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"> </span><span class="token literal-property property">min</span><span class="token operator">:</span><span class="token plain"> </span><span class="token number">11</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token literal-property property">max</span><span class="token operator">:</span><span class="token plain"> </span><span class="token number">20</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token literal-property property">price</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'3'</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"> </span><span class="token literal-property property">min</span><span class="token operator">:</span><span class="token plain"> </span><span class="token number">21</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token literal-property property">max</span><span class="token operator">:</span><span class="token plain"> </span><span class="token known-class-name class-name">Number</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token constant" style="color:rgb(189, 147, 249)">MAX_SAFE_INTEGER</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token literal-property property">price</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'2.5'</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">]</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token comment" style="color:rgb(98, 114, 164)">// app.js</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token keyword module" style="color:rgb(189, 147, 249);font-style:italic">import</span><span class="token plain"> </span><span class="token imports punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token imports"> priceByRanges </span><span class="token imports punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"> </span><span class="token keyword module" style="color:rgb(189, 147, 249);font-style:italic">from</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'./config.js'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">function</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">getPrice</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token parameter">amount</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token comment" style="color:rgb(98, 114, 164)">// error handling for amount outside the range</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> priceByRanges</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">find</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token parameter">priceByRange</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token arrow operator">=&gt;</span><span class="token plain"> amount </span><span class="token operator">&gt;=</span><span class="token plain"> priceByRange</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">min</span><span class="token plain"> </span><span class="token operator">&amp;&amp;</span><span class="token plain"> amount </span><span class="token operator">&lt;=</span><span class="token plain"> priceByRange</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">max</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">price</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Now the pricing data is stored in <code>config.js</code> seperately and <code>priceByRanges</code> is resolved at load time.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="further-optimization">Further optimization<a href="#further-optimization" class="hash-link" aria-label="Direct link to Further optimization" title="Direct link to Further optimization">​</a></h3><p>If the array <code>priceByRanges</code> is always sorted in terms of the price ranges, we can further optimize Solution 2 by leveraging binary search.</p><div class="language-javascript codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-javascript codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> priceByRanges </span><span class="token operator">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">[</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"> </span><span class="token literal-property property">min</span><span class="token operator">:</span><span class="token plain"> </span><span class="token number">1</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token literal-property property">max</span><span class="token operator">:</span><span class="token plain"> </span><span class="token number">5</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token literal-property property">price</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'5'</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"> </span><span class="token literal-property property">min</span><span class="token operator">:</span><span class="token plain"> </span><span class="token number">6</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token literal-property property">max</span><span class="token operator">:</span><span class="token plain"> </span><span class="token number">10</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token literal-property property">price</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'4'</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"> </span><span class="token literal-property property">min</span><span class="token operator">:</span><span class="token plain"> </span><span class="token number">11</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token literal-property property">max</span><span class="token operator">:</span><span class="token plain"> </span><span class="token number">20</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token literal-property property">price</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'3'</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"> </span><span class="token literal-property property">min</span><span class="token operator">:</span><span class="token plain"> </span><span class="token number">21</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token literal-property property">max</span><span class="token operator">:</span><span class="token plain"> </span><span class="token known-class-name class-name">Number</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token constant" style="color:rgb(189, 147, 249)">MAX_SAFE_INTEGER</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token literal-property property">price</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'2.5'</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">]</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">function</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">getPrice</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token parameter">amount</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">amount </span><span class="token operator">&lt;</span><span class="token plain"> priceByRanges</span><span class="token punctuation" style="color:rgb(248, 248, 242)">[</span><span class="token number">0</span><span class="token punctuation" style="color:rgb(248, 248, 242)">]</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">min</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'unknown price'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">let</span><span class="token plain"> start </span><span class="token operator">=</span><span class="token plain"> </span><span class="token number">0</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    end </span><span class="token operator">=</span><span class="token plain"> priceByRanges</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">length</span><span class="token plain"> </span><span class="token operator">-</span><span class="token plain"> </span><span class="token number">1</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">while</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">start </span><span class="token operator">&lt;=</span><span class="token plain"> end</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> mid </span><span class="token operator">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">start </span><span class="token operator">+</span><span class="token plain"> end</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token operator">&gt;&gt;&gt;</span><span class="token plain"> </span><span class="token number">1</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">priceByRanges</span><span class="token punctuation" style="color:rgb(248, 248, 242)">[</span><span class="token plain">mid</span><span class="token punctuation" style="color:rgb(248, 248, 242)">]</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">max</span><span class="token plain"> </span><span class="token operator">&lt;</span><span class="token plain"> amount</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">      start </span><span class="token operator">=</span><span class="token plain"> mid </span><span class="token operator">+</span><span class="token plain"> </span><span class="token number">1</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"> </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">else</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">      end </span><span class="token operator">=</span><span class="token plain"> mid </span><span class="token operator">-</span><span class="token plain"> </span><span class="token number">1</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> priceByRanges</span><span class="token punctuation" style="color:rgb(248, 248, 242)">[</span><span class="token plain">start</span><span class="token punctuation" style="color:rgb(248, 248, 242)">]</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">price</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>What is this <code>&gt;&gt;&gt;</code>?</summary><div><div class="collapsibleContent_i85q"><p><code>&gt;&gt;&gt;</code> is binary right shift by 1 position, which is effectively just a division by 2 followed with a <code>Math.floor</code>. e.g. for 11: 1011 -&gt; 101 results to 5.</p></div></div></details><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="notes-on-performance-and-big-o">Notes on performance and Big O<a href="#notes-on-performance-and-big-o" class="hash-link" aria-label="Direct link to Notes on performance and Big O" title="Direct link to Notes on performance and Big O">​</a></h3><p>It might feel that the first clumsy solution with a bunch of <code>if</code> blocks is better in terms of the performance than the second table-driven approach that <em>loops</em> through the array.</p><p>Actually for the Big O analysis, both approaches have the <strong>same constant time complexity</strong>, as the number of operations (i.e. comparision between <code>amount</code> and the price range), doesn't grow no matter how big the input is (i.e. <code>amount</code>).</p><p>What's more interesting, in my opinion, is the performance implications between using a loop vs. "unrolling" the loop. By unrolling I mean discretely writing line-by-line of the loop body. <a href="https://stackoverflow.com/questions/38111355/javascript-are-loops-faster-than-discretely-writing-line-by-line" target="_blank" rel="noopener noreferrer">A quick google search</a> suggests that popular JavaScript engines such as V8 heavily optimize loops. But getting any accurate results from such a micro-benchmarking is really hard as the performance varies a lot depending on different factors like the engine and the code in the loop body.</p>]]></content>
        <author>
            <name>Zhenghao He</name>
            <uri>https://twitter.com/he_zhenghao</uri>
        </author>
        <category label="interview" term="interview"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Front End vs. Back End System Design Interviews]]></title>
        <id>https://www.techinterviewhandbook.org/blog/front-end-vs-back-end-system-design-interviews</id>
        <link href="https://www.techinterviewhandbook.org/blog/front-end-vs-back-end-system-design-interviews"/>
        <updated>2021-12-23T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Walkthrough of similarities and differences between front end vs. back end system design interviews and my thoughts on a front end career ceiling.]]></summary>
        <content type="html"><![CDATA[<p>Walkthrough of similarities and differences between front end vs. back end system design interviews and my thoughts on a front end career ceiling.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="context">Context<a href="#context" class="hash-link" aria-label="Direct link to Context" title="Direct link to Context">​</a></h2><p>As I mentioned in my post on <a href="https://www.zhenghao.io/posts/framework-for-coding-interview" target="_blank" rel="noopener noreferrer">coding interviews frameworks</a>, I have been interviewing a lot for the past year - not conducting interviews, I was the candidate being interviewed. Most of the interview processes I had with big tech companies consisted of 1-2 system design rounds depending on the level of the role. Unlike traditional back end-focused system design questions, for which you can find lots of prep resources online such as the famous Grokking System Design Interview or System Design Primer, I didn't know what to expect for a front end-focused system design interview as there are very few resources out there talking about this type of interviews.</p><p>Now that I have done a fair amount of system design interviews of both types, I want to give you a summary of what to expect, especially for the front end ones since I have been mostly working on the front end side.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="similarities">Similarities<a href="#similarities" class="hash-link" aria-label="Direct link to Similarities" title="Direct link to Similarities">​</a></h2><p>Both front end-focused and back end-focused system design interviews share a lot of similarities in terms of the methodology you can adopt to solve the design questions:</p><ul><li>Starting with gathering system requirements</li><li>Laying out a clear plan and identifying major distinguishable components of the system</li><li>Proceeding to end to end api design</li><li>Talking about optimization</li></ul><p>Other kinds of similarities include:</p><ul><li>The interviewer is relying on you to drive the presentation. You can't rely on the interviewer to have your back.</li><li>While the topics can be either micro or macro, you probably won't need to actually write code - it is rare to jam some portion of coding in the middle of a system design interview</li><li>Unlike scantron school exams, both types will consist of mainly open ended questions. There probably isn't a checklist of things for you to cover one by one. Nor are you expected to drill deep into all of those. When you realize your interviewer is biased toward a particular part of the system, which they usually do, pivot your focus to that area. Other times you focus on your strengths and lead the conversation.</li></ul><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="differences">Differences<a href="#differences" class="hash-link" aria-label="Direct link to Differences" title="Direct link to Differences">​</a></h2><p>During the back end-focused system design interviews, you would spend most of the time talking about things like:</p><ul><li>Back end/server side architecture, hand waving various back end services/components</li><li>Discussing which type of database to use and how to aggregate data across different shards</li><li>Designing SQL table schema</li><li>Choosing the right the cross-region strategy if your service has a global user base</li><li>Any other kinds of system characteristics like latency, availability, fault tolerance, etc</li></ul><p>For front end-focused system design interviews, you would spend most of the time talking about stuff like:</p><ul><li>Front end/client side architecture, such as the appropriate rendering pattern to choose - client side rendering, or server side rendering or static generation or something in between?</li><li>What kind of data fetching mechanism to use - REST vs. GRAPHQL vs. gRPC and what should the APIs look like?</li><li>Specifics about UI components<ul><li>A news feed which has an infinite scroll behavior with all the images lazily loaded while ensuring the client side has the aspect ratio of the images upfront to prevent layout shift.</li><li>An autocomplete UI component which fetches search result data incrementally in batches while receiving images from server pushes in parallel.</li><li>a gallery page which pulls images and displays them in the correct order despite the asynchrony that comes with the network requests that might cause them to arrive out of order.</li></ul></li><li>How do you leverage different layers of cache to decrease latency or support offline mode.</li><li>If they want to get framework-specific, which is totally possible, they might even ask you to define a particular React components's props or manage complex state in a React app.</li></ul><p>A lot times having one type of system design interviews means you can over simplify the opposite side:</p><ul><li>In a back end system design interview, the client-side/front end is reduced to an API layer - you don't need to consider all the intricacies of the browser or the pesky rerenders your real-time updates would cause.</li><li>In a front end system design interview, you can treat the back end as a black box and you don't need to worry about how things like how to scale a database, or how your choice of using web sockets might affect the load balancers because of the need for sticky sessions support.</li></ul><p>But again, this is a summary of my experience and depending on who your interviewers are (are they front end, back end and/or fullstack developers), the scope of the role and which team it is (are you going to be on a front end team or are you expected to work across the stack and stretch into the back end?) your front end system design interview might be a bit of a hybrid where some aspects of back end system design interviews might come up.</p><p>Outside of the differences with the technical topics I needed to dig deep into during the interviews, I found there are two other interesting differences that stand out between the two types:</p><ul><li>For front end system design interviews I was often encouraged to treat the interviewer as the <strong>product manager</strong> and we spent some time just fleshing out the brief solution for each user story. For the back end system design interviews, we didn't really get to talk about any user interaction (I am aware that the definition of users of your system might vary, depending on whether it is customer-facing vs. developer-facing)</li><li>These two types of system design interviews also differ a lot in terms of estimating certain system's needs based on the potential scale of the system. The system needs can be storage needs or throughput needs or any other types of requirements.<ul><li>It is common and expected to do these estimation during back end system design interviews since your design decision is only feasible when all of the system needs can realistically be met.</li><li>But for the front end system design interview, I rarely needed to do any <strong>quantitative estimation</strong> - for example, when I was designing some live feed during a front end system design interview, I didn't need to do estimations like "So let's say each message was roughly 140 characters long and it is utf8 so that's 140 bytes and an average user gets 10000 messages over a certain period of time so we ended up allocating 1.4mb memory on user devices". Again, I am not saying that this would never come up during a front end system design interview. in my experience It is just much, much more rare compared to back end ones.</li></ul></li></ul><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="career-ceiling">Career ceiling<a href="#career-ceiling" class="hash-link" aria-label="Direct link to Career ceiling" title="Direct link to Career ceiling">​</a></h2><p>I am going to talk about something that is a little tangential. I don't think this is going to be a hot take but if you just want to pass the upcoming interviews, then you are welcome to skip this part.</p><p>I have done interviews for both front end focused roles and general software engineer roles. As I went through the preparation process for the system designs interviews, it just occurred to me that there is indeed a career ceiling for a pure front end focused software engineer role.</p><p>Ok so let's first get this out of the way - you can be extremely successful as either a front end developer or a back end developer.</p><p>Also it is hard to discuss any topic intelligently when we cannot agree on definitions. By saying front end developers I meant developers/engineers who solely work on the UI of a software system. And by saying career ceiling I meant the potential terminal title and the highest level such a developer/engineer can achieve in the technical individual contributor track.</p><p>This is an unspoken thing and a very impolite conversation. And <a href="https://twitter.com/swyx/status/1236023548227072000" target="_blank" rel="noopener noreferrer">there are exceptions</a> to this but just statistically speaking there seems to be a career ceiling for front end-only developers.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="fighting-the-inertia">Fighting the inertia<a href="#fighting-the-inertia" class="hash-link" aria-label="Direct link to Fighting the inertia" title="Direct link to Fighting the inertia">​</a></h2><p>Part of the ceiling comes from some traditional baggage:</p><ul><li>modern front end development is fairly new compared to the back end counterpart. I have seen some bias in the industry that front end is not real engineering compared to the back end and that needs absolutely to be combated.</li><li>power structure persists for a very long time and that's partially why most of VP Eng and CTOs out there are back end/infra developers.</li></ul><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="economic-reasoning">Economic reasoning<a href="#economic-reasoning" class="hash-link" aria-label="Direct link to Economic reasoning" title="Direct link to Economic reasoning">​</a></h2><p>I had this realization that when I was going through the back end system design interviews vs. the front end system design interviews - the technical topics those interviews tend to cover let me think about some economic reasoning leading to the perception of a "Front end ceiling" as well. Your value to the company really depends on how many machines/compute/storage run through you. As a developer/engineer, that means much money you control and front end-only developers just don't take as much. Of course front end is just as hard and as important especially for consumer facing products but at the end of the day your compute is being run on someone else's machine or device and the company just don't value that as much as the compute that they themselves need to pay for and to scale.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="short-lived-vs-long-running">Short-lived vs. long-running<a href="#short-lived-vs-long-running" class="hash-link" aria-label="Direct link to Short-lived vs. long-running" title="Direct link to Short-lived vs. long-running">​</a></h2><p>On top of that, normally the front end/web apps are short-lived on the client side - the user opens the browser tab that loads your app and after 20 minutes they might just close the tab, and all the memory allocated by your app is on their devices from that point onward. On the other hand, the back end servers/services behind probably keep running for months or even years. One implication resulting from this difference is that you can generally get away with bad code that leads to performance problems down the road in front end apps because they are short-lived and the scale of the data they are dealing with is probably small, but you cannot ignore that in a long-running back end service.</p><p>Good luck with your interviews.</p><hr><p><em>Follow me on <a href="https://twitter.com/he_zhenghao" target="_blank" rel="noopener noreferrer">Twitter</a></em></p>]]></content>
        <author>
            <name>Zhenghao He</name>
            <uri>https://twitter.com/he_zhenghao</uri>
        </author>
        <category label="front end" term="front end"/>
        <category label="back end" term="back end"/>
        <category label="system design" term="system design"/>
        <category label="interview" term="interview"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[My Experience Working as a Meta (previously Facebook) Engineer]]></title>
        <id>https://www.techinterviewhandbook.org/blog/my-experience-working-as-a-meta-facebook-engineer</id>
        <link href="https://www.techinterviewhandbook.org/blog/my-experience-working-as-a-meta-facebook-engineer"/>
        <updated>2021-10-30T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[A number of the folks I referred have completed their interviews and are in the midst of deciding which company's offer to accept for their internship/full-time roles. Hence I figured it might be a good time to write about my experience at Meta (previously Facebook) so far as it could be helpful in helping some of them make their first important career decision!]]></summary>
        <content type="html"><![CDATA[<p>A number of the folks I referred have completed their interviews and are in the midst of deciding which company's offer to accept for their internship/full-time roles. Hence I figured it might be a good time to write about my experience at Meta (previously Facebook) so far as it could be helpful in helping some of them make their first important career decision!</p><p><img loading="lazy" alt="Meta logo" src="/assets/images/meta-facebook-288627ec227a9698ca9823251b594eee.jpg" width="852" height="367" class="img_ev3q"></p><p><strong>Disclaimer: Opinions are my own and do not represent the views of my employer (Meta)</strong></p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="products">Products<a href="#products" class="hash-link" aria-label="Direct link to Products" title="Direct link to Products">​</a></h2><p>Meta is a huge company and has teams working on all sorts of products. For big tech companies, common products include ads networks, chat, enterprise offerings, video watching, payments, hardware products, industry-leading AI tools, internal tools, etc. the other big tech companies Microsoft, Amazon, Apple and ByteDance have products in some of these areas as well. For many big companies, they are large enough that they build their our own infra and internal tools for most technologies they use because most existing technologies on the market can't meet their scale. Hence, not only will you get the chance to work on consumer products, you might also get to work on some of the lower level infrastructure work that is used by your fellow software engineers - our internal database systems, our internal Docker, our open source projects like React, React Native, GraphQL, Jest, PyTorch, Docusaurus, etc.</p><p>The impact is huge - every line of code you write has the potential to impact millions (sometimes even billions) of users due to the widespread nature of Meta's products. There was an intern who on their second day of work, changed the placeholder text of facebook.com's search bar by accident to "Hi I'm a Search Bar!" as part of a ramp up task and it was shipped to public for a brief moment before the change got reverted. With great power comes great responsibility!</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="teams-in-meta-singapore">Teams in Meta Singapore<a href="#teams-in-meta-singapore" class="hash-link" aria-label="Direct link to Teams in Meta Singapore" title="Direct link to Teams in Meta Singapore">​</a></h3><p>Let's talk about some of the teams in Meta Singapore since I currently work in Singapore and many of the readers are based in Singapore. <strong>Note that this section will go out of date as priorities shift. Last update: 2022/05/12.</strong></p><p>In Meta SG we have two teams belonging to two organizations - Commerce Engineering and Ads &amp; Business Platform. Both organizations, like most organizations in Meta, have global impact where the number of users is in the order of millions or more.</p><p>Commerce Engineering (hardware sales) is Meta's next up and coming revenue stream and is also the organization which I work in. Commerce Engineering primarily deals with bringing Meta's hardware products to market - from building immersive digital storefronts and highly optimized checkout flows to delivering great post-sales experiences to platforms that manage the demand, production, testing and shipping of Meta hardware products across the entire supply chain. If you have heard of the Quest headset device, which is Meta's flagship VR device, my team spent the entire of 2021 building the Meta Store website to sell them (<a href="https://store.facebook.com/quest/" target="_blank" rel="noopener noreferrer">https://store.facebook.com/quest/</a> and <a href="https://store.facebook.com/portal/" target="_blank" rel="noopener noreferrer">https://store.facebook.com/portal/</a>). I led the organization's migration from our existing separate Meta Quest and Portal websites to the unified Meta Store website, by building the web infrastructure, the React components for the web version of the Meta Store Design System, and developed migration guides + new APIs to help teams quickly migrate their products onto the Meta Store website. In April 2022, Meta announced the <a href="https://about.fb.com/news/2022/04/meta-retail-store/" target="_blank" rel="noopener noreferrer">Meta Store in Burlingame, California</a> and the Meta Store website, which is one of the most visible products from the Singapore engineering office. It's definitely one of the highlights of my career to be building a product that contributed to Meta's 2nd highest revenue stream (and still growing)! We have even bigger plans for the Meta Store website. Stay tuned.</p><p>Some stories from engineers in Commerce Engineering:</p><ul><li><a href="https://www.metacareers.com/life/help-10-peopleor-billions/" target="_blank" rel="noopener noreferrer">Help 10 People—or Billions? Engineering Impact on a Global Scale</a>, Nishita A., Software Engineering Manager, Commerce Engineering</li><li><a href="https://www.metacareers.com/life/embracing-change-to-evolve-her-engineering-journey" target="_blank" rel="noopener noreferrer">Embracing Change to Evolve Her Engineering Journey</a>, Michelle T., Software Engineer, Commerce Engineering</li></ul><p>On the Ads and Business organization, there are these teams:</p><ul><li><strong>Business Integrity</strong>: They work on building tools to catch bad advertisers (advertisers who create ads which violate our policies). They want to maximize Business Integrity outcomes by building a human review system for ads &amp; commerce on Meta, driving end-to-end improvements in the workflows, and providing best-in-class tools to IP rights holders, etc.<ul><li><a href="https://www.metacareers.com/life/software-engineering-in-apac" target="_blank" rel="noopener noreferrer">Software Engineering in APAC: Building for Rapid Growth</a></li><li><a href="https://www.metacareers.com/life/curiosity-and-passion-software-engineering-at-facebook" target="_blank" rel="noopener noreferrer">Curiosity and Passion: Software Engineering at Facebook</a>, Henry B., Software Engineer, Business Integrity</li></ul></li><li><strong>Business Support Platform</strong>: They redefine the support experience across all Meta business products, making it available, effective and effortless for all businesses. They make sure businesses can identify the help resources available to them when they need assistance in accomplishing their goals across Meta's suite of business tools. Their tools will also effortlessly help marketers diagnose their issues and connect them to the best solution to solve their problem. They have also some investment into the machine learning space.</li><li><strong>Business Messaging Commerce</strong>: They build products that enable the Business Messaging ecosystem across Messenger, Instagram, and WhatsApp.</li></ul><p>Enterprise Engineering has a sizable presence in Singapore as well:</p><ul><li><a href="https://www.metacareers.com/life/enterprise-engineering-in-apac" target="_blank" rel="noopener noreferrer">Enterprise Engineering in APAC: Building Products That Scale</a></li><li><a href="https://www.metacareers.com/life/opportunity-and-trust-growing-an-engineering-career-at-facebook" target="_blank" rel="noopener noreferrer">Opportunity and Trust: Growing an Engineering Career at Meta</a>, Shuhong W., Enterprise Engineering Manager</li></ul><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="career-progressioncompensation">Career progression/compensation<a href="#career-progressioncompensation" class="hash-link" aria-label="Direct link to Career progression/compensation" title="Direct link to Career progression/compensation">​</a></h2><p>Meta is one of the best companies for ambitious people who want to grow their careers quickly. At Meta, promotions come sooner and we encourage employees to be at their top form. At Meta, our terminal level (level at which there is no pressure to promote) is E5 and most people get from E3 to E4 within 1-1.5 years and from E4 to E5 within 2-2.5 years (this is a conservative estimate - I've seen top performers go from E3 to E5 in under 2 years). As an E5 in Meta SG your annual compensation will be at least 300k annually, which is on par, if not higher than most director-level roles in non-tech industries in SG. Imagine getting to that level of pay within 5 years of your career!</p><p>For comparison, Google, which is a similar company to Meta in many ways, has a slower promotion cycle - the average engineer at Google takes more than 2 years to get from L3 to L4, more than 3 years to get from L4 to L5 and more than 4 years to get from L5 to L6. At Google the terminal level is L4 so there's no pressure to promote. None of my peers are L6 at Google but a few are already E6 at Meta and it is quite achievable.</p><p>Faster promotions also lead to better pay, so in most cases, Meta pays more than most other companies. Meta is one of the top companies in terms of reputation and prestige especially for engineers.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="company-prospects">Company prospects<a href="#company-prospects" class="hash-link" aria-label="Direct link to Company prospects" title="Direct link to Company prospects">​</a></h2><p>Meta is a tech giant and their products have over 3 billion active monthly users. The company relies on ads as their primary source of revenue. Whether you like it or not, Meta products are around to stay for the next couple of years. Even if they are going to die off, it won't be that soon. Stock growth has been relatively strong over the past few years (doubled since I joined in Nov 2017), especially since 2020.</p><p>Mark Zuckerberg is also betting on the <a href="https://about.fb.com/news/2021/10/founders-letter/" target="_blank" rel="noopener noreferrer">Metaverse</a>, which is obvious from the decision to change the company name from Facebook to Meta. Personally I'm undecided on whether the Metaverse is the future.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="culture">Culture<a href="#culture" class="hash-link" aria-label="Direct link to Culture" title="Direct link to Culture">​</a></h2><p>There's so much to say about a company's culture, but hopefully you can infer some things about the company culture from the stuff I wrote above. Since I am an engineer, I will speak more about the engineering aspects of Meta's culture.</p><ul><li>Done is better than perfect - At Meta we have a quote "Done is better than perfect". Shipping something into the hands of users is more important than having perfect engineering. Teams get to decide how they want to build their products, whether to focus on getting MVPs out first and then iterating and improving the engineering later on, however they want.</li><li>Bootcamp - Many engineers at Meta aren't assigned a team before they start at the company. They have to go through this program called Bootcamp, which is a crash course to teach them the useful tools and practices and also match them to their future team. Bootcampers work on Bootcamp tasks, which are small tasks created by various teams across Meta to get acquainted with the tech stack, development flow, and also the various products Meta has to offer. Few weeks into the Bootcamp program, bootcampers start chatting with managers of teams and can choose to work with teams which interest them. Bootcamp ends with the bootcamper decides on a team to join. Bootcamp is a great way for new employees to find teams which interest them the most and lowers the risk of them joining a team that aren't a good fit for them.</li><li>Development efficiency - There are tens of thousands of Software Engineers at Meta, hence we have teams specializing in making the developer experience extremely efficient for us. The default IDE for us is a customized version of VS Code with a ton of useful internal plugins. Engineers can each get a remote server to do development on, which contains the latest code and development environment set up - we can start coding right away without having to figure out how to update dependencies and set up the necessary environment.</li><li>Bottom-up culture - Engineers at Meta get a lot of say regarding the roadmap and wear multiple hats - project roadmapping, project management, data analysis, prototyping, etc on top of the core coding expectations. I'm personally heavily involved in the roadmapping process for my team as my team has a heavier focus on engineering - we build tools for the other product teams within Commerce Engineering to use.</li><li>Hackathons - Hackathons have been an integral part of Meta's culture since it started and many successful products were born out of hackathons. Hackathons are a great way to encourage innovation and promote collaboration between engineers, designers, product managers, etc. In the past, the most successful hackathon projects get shipped - Like button, Facebook timeline, comments tagging. These days, due to the maturity and scale of the company, shipping hackathon projects to the public is rarer but our hackathon culture is still going strong. In a recent hackathon, me and two others built a Kudoboard replacement to solve a problem faced by managers where they had to resort to external services in order to sign group cards to send well wishes to coworkers (farewell/celebrating work anniversaries). We took a weekend to build an initial version of a tool we uncreatively call "Boards", spent the next week or so integrating with internal features like commenting, reactions, GIFs and announced about it in a company-wide group. The response was very encouraging - it has gained significant traction within the company - over 2000 boards and 20000 messages have been written since it was launched in Aug 2021! As a bonus, we'll be getting credit for it in our performance review :)</li><li>Building cool internal tools - At Meta scale, it sometimes make sense for us to build our own internal tooling that has tight integration with our internal ecosystem as opposed to using an external service which might incur significant expenses and also pose security risks. We have teams building and maintaining our own tasks tool, code browsing and reviewing tool, a Q&amp;A tool similar to Stack Overflow, a customized version of VS Code, an interview question bank, interview feedback tool, data visualization and querying tool, and a workflow automation tool similar to IFTTT/Zapier! Someone built a Pokedex app where you can catch a random Pokemon every time you close a task (I'm at 807/899 now!). I also have to mention that we have an internal meme maker which we can use to add customized internal memes to use in our comments in diff reviews and group posts</li><li>Code wins arguments - It's not gender, race or your background that wins debates, it's the work that you produce. Instead of spending time arguing over technical decisions, it is more convincing to write some code to demonstrate the point.</li><li>Beyond coding - We are also expected to contribute to the company beyond our coding, as in our perf evaluation we have a People axis, which measures how much you help and grow the people around you. People give talks, organize events, summits, do interviews, to score in this axis.</li><li>Fun social groups - Workplace is Meta's enterprise offering, it's essentially Facebook for companies. We have various interest groups where we can find colleagues to play board games, share cat photos, memes when we want to procrastinate on writing performance reviews, interesting puns, investing tips, and more!</li></ul><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="mentorship-and-growth">Mentorship and growth<a href="#mentorship-and-growth" class="hash-link" aria-label="Direct link to Mentorship and growth" title="Direct link to Mentorship and growth">​</a></h2><p>Mentorship is readily available at Meta all the way from interns to senior executives. One thing that stood out to me when I first joined Meta was the focus on mentorship. When I first joined the company and was in the Bootcamp program, I had a Bootcamp mentor. After joining a team, I was assigned a senior engineer as my mentor who was also my tech lead. Employees will have weekly 1:1s with their mentor and manager. For interns, each intern at Meta is assigned an intern manager, who will act as their mentor and is usually the person who came up with their internship project. The intern manager will be the main person evaluating the intern's work and they ultimately determine the intern's performance and if they receive a return offer at the end of their internship.</p><p>These days, as a tech lead myself, I have around 4 1:1s weekly with mentees and 2 with managers. I'm able to chat with my mentees and mentors about anything - it doesn't have to be about work. I often give my mentees feedback on how they are doing, advice and ideas on how they can be more successful, talk about the things I'm working on and why I made certain decisions.</p><p>There are also specialized mentorship programs for those who need it, technical mentorship, career growth mentorship, managerial role transition mentorship, etc.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="work-life-balance">Work-life balance<a href="#work-life-balance" class="hash-link" aria-label="Direct link to Work-life balance" title="Direct link to Work-life balance">​</a></h2><p>At Meta, you get to choose how fast you want to accelerate your career. Some people choose to take up more responsibilities, work more and ship more impact, usually resulting in faster professional growth, higher ratings and pay, while others work at their own comfortable pace; it's really up to the individual. The top performer on my team now is nearly getting to E5 with just around 2 years of working experience. They don't work beyond working hours, they're doing well because they're working smart and working on the most impactful and challenging problems.</p><p>Every Meta employee has 21 days of leave/paid time off every year and this year the company gave everyone three company-wide paid holidays on Friday in the summer and also two Meta choice days - effectively more paid time off but they cannot be accrued.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="transfers-and-mobility">Transfers and mobility<a href="#transfers-and-mobility" class="hash-link" aria-label="Direct link to Transfers and mobility" title="Direct link to Transfers and mobility">​</a></h2><p>It is extremely easy to move around in Meta because Meta understands that mobility is important to the happiness and welfare of employees. People move around quite often and people are eligible to consider team changes from their second year at the company onwards. Meta is a large company comprising of many organizations and each organization has their own unique culture. It can be refreshing to move to another part of the company, working on different domains, different products, experiencing a slightly different engineering culture, yet still be productive because you are using the same engineering tools as before. When engineers move around the company, positive things can happen - they bring the good practices from their previous organizations to the new organizations, networks are strengthened and new connections are formed. Because Meta has offices around the globe, it is also possible to transfer to different countries as long as there are no work authorization issues. Personally I relocated back to Meta Singapore office after working for 2 years in Meta Menlo Park and my manager has worked in <strong>4 different offices</strong> (Menlo Park, London, New York, Singapore) throughout her 9 years at Meta!</p><p>For engineers, there are also temporary transfers which we call Hackamonths. Hackamonths are month-long projects proposed by teams where they welcome someone outside their team to work on. At the end of the hackamonth, the participating engineer could return back to their original team or stay on the new team. This provides engineers with the opportunity to try out work and the culture of their new teams before committing to a permanent move.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="what-i-dislike-about-meta">What I dislike about Meta<a href="#what-i-dislike-about-meta" class="hash-link" aria-label="Direct link to What I dislike about Meta" title="Direct link to What I dislike about Meta">​</a></h2><ul><li>Imposter syndrome - The company is full of the smartest people in the world. There are many days I feel that the people around me are smarter than me and that I might not belong here.</li><li>Launch processes - With the company undergoing tons of scrutiny these days, we have to be even more careful around how we use our users' data and what we are tracking. Every public launch now has to undergo a review process with legal and security.</li><li>Cross-timezone collaboration - My team frequently works with product managers, designers and other roles who are based in California. Meetings with these folks tend to be in the morning (their evening) and it can be hard to get up in the morning sometimes...</li><li>Fewer low hanging fruits - In a mature company especially if you are working on mature products, sometimes the low hanging fruits have been snapped up and you mostly are left with really tough problems to solve. On the bright side, Meta engineers should be smart and should be able to live up to those challenges.</li><li>Legacy code - Unless you're working on a new product, you inevitably will have to be deal with code others have written. The older the product you work on, the more legacy code you have to deal with and the code quality varies.</li></ul>]]></content>
        <author>
            <name>Yangshun Tay</name>
            <uri>https://github.com/yangshun</uri>
        </author>
        <category label="career" term="career"/>
        <category label="facebook" term="facebook"/>
        <category label="meta" term="meta"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[A Glimpse into Front End Interviews]]></title>
        <id>https://www.techinterviewhandbook.org/blog/a-glimpse-into-front-end-interviews</id>
        <link href="https://www.techinterviewhandbook.org/blog/a-glimpse-into-front-end-interviews"/>
        <updated>2021-08-30T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[A glimpse into the front end interview process and questions that frequently come up.]]></summary>
        <content type="html"><![CDATA[<p>A glimpse into the front end interview process and questions that frequently come up.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="interview-process">Interview Process<a href="#interview-process" class="hash-link" aria-label="Direct link to Interview Process" title="Direct link to Interview Process">​</a></h2><p>Applying for front end engineer roles is very similar to software engineer roles, but the interviews can be quite different. In my experience, for each company, there tend to be between 3 to 4 sessions. Most of them will be testing on JavaScript and discussion around web development technologies, and the rest on algorithms or behavioral.</p><p>One aspect that I have found interesting is that the younger the company, the more questions will lean towards JavaScript. This could be because hiring specifically for front end engineers is relatively new. Older companies used to only hire software engineers without regard if their focus is on the back end or front end.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="javascript-rounds">JavaScript Rounds<a href="#javascript-rounds" class="hash-link" aria-label="Direct link to JavaScript Rounds" title="Direct link to JavaScript Rounds">​</a></h2><p>JavaScript is the main focus among all the companies I have interviewed with. It makes sense as front end work nowadays is very JavaScript-heavy. HTML and CSS knowledge is no longer a necessity thanks to component libraries and the likes.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="javascript-minutiae">JavaScript Minutiae<a href="#javascript-minutiae" class="hash-link" aria-label="Direct link to JavaScript Minutiae" title="Direct link to JavaScript Minutiae">​</a></h3><p>To qualify for some companies, you might need to brush up on the minutiae of JavaScript. Topics like variable hoisting, holey arrays, non-strict mode, and switch case fall through came up. While I do not feel that knowing such things determine who is a better engineer, it is what it is. Here is my <a href="https://repl.it/@li_kai/JavaScript-Cheatsheet" target="_blank" rel="noopener noreferrer">JavaScript cheat sheet</a>.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="javascript-topics">JavaScript Topics<a href="#javascript-topics" class="hash-link" aria-label="Direct link to JavaScript Topics" title="Direct link to JavaScript Topics">​</a></h3><p>After the first assessment, live interviews tend to test on more advanced JavaScript concepts such as the event loop, promises, async/await, scope and closures.</p><p>If you have been writing JavaScript applications for some time and have come across a variety of situations, this should not be too hard.</p><p>The most frequently asked question I have ever gotten is to implement <code>debounce</code> and <code>throttle</code>:</p><div class="language-javascript codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-javascript codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">function</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">debounce</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token parameter">fn</span><span class="token parameter punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token parameter"> duration</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">let</span><span class="token plain"> id</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">function</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token parameter spread operator">...</span><span class="token parameter">args</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">id</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">      </span><span class="token comment" style="color:rgb(98, 114, 164)">// reset timeout and prevent it from triggering</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">      </span><span class="token comment" style="color:rgb(98, 114, 164)">// if debounced function is called within duration</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">      </span><span class="token function" style="color:rgb(80, 250, 123)">clearTimeout</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">id</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    id </span><span class="token operator">=</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">setTimeout</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token arrow operator">=&gt;</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">      </span><span class="token function" style="color:rgb(80, 250, 123)">fn</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token spread operator">...</span><span class="token plain">args</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> duration</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">function</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">throttle</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token parameter">fn</span><span class="token parameter punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token parameter"> duration</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">let</span><span class="token plain"> id</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">function</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token parameter spread operator">...</span><span class="token parameter">args</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">id</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">      </span><span class="token comment" style="color:rgb(98, 114, 164)">// if throttled function is called within duration,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">      </span><span class="token comment" style="color:rgb(98, 114, 164)">// do nothing</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">      </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token function" style="color:rgb(80, 250, 123)">fn</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token spread operator">...</span><span class="token plain">args</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    id </span><span class="token operator">=</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">setTimeout</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token arrow operator">=&gt;</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">      id </span><span class="token operator">=</span><span class="token plain"> </span><span class="token keyword null nil" style="color:rgb(189, 147, 249);font-style:italic">null</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"> </span><span class="token comment" style="color:rgb(98, 114, 164)">// release "lock"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> duration</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token comment" style="color:rgb(98, 114, 164)">// usage example</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> </span><span class="token function-variable function" style="color:rgb(80, 250, 123)">helloWorld</span><span class="token plain"> </span><span class="token operator">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token arrow operator">=&gt;</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token console class-name">console</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">log</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token string" style="color:rgb(255, 121, 198)">'hello world'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> debouncedHelloWorld </span><span class="token operator">=</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">debounce</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">helloWorld</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token number">1000</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> throttledHelloWorld </span><span class="token operator">=</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">throttle</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">helloWorld</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token number">1000</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>The second most frequently asked question is to implement a sequential <code>Promise.all</code> of sorts:</p><div class="language-typescript codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-typescript codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">function</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">sequential</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">data</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> fetcher</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> </span><span class="token function-variable function" style="color:rgb(80, 250, 123)">helper</span><span class="token plain"> </span><span class="token operator">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">index</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> results</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token operator">=&gt;</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">index </span><span class="token operator">===</span><span class="token plain"> data</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token plain">length</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">      </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> results</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">fetcher</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">data</span><span class="token punctuation" style="color:rgb(248, 248, 242)">[</span><span class="token plain">index</span><span class="token punctuation" style="color:rgb(248, 248, 242)">]</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token function" style="color:rgb(80, 250, 123)">then</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">datum</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token operator">=&gt;</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">      results</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token function" style="color:rgb(80, 250, 123)">push</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">datum</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">      </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">helper</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">index </span><span class="token operator">+</span><span class="token plain"> </span><span class="token number">1</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> results</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">helper</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token number">0</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">[</span><span class="token punctuation" style="color:rgb(248, 248, 242)">]</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token comment" style="color:rgb(98, 114, 164)">// usage example</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> </span><span class="token function-variable function" style="color:rgb(80, 250, 123)">fetcher</span><span class="token plain"> </span><span class="token operator">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">i</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token operator">=&gt;</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">new</span><span class="token plain"> </span><span class="token class-name builtin" style="color:rgb(189, 147, 249)">Promise</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">resolve</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token operator">=&gt;</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token function" style="color:rgb(80, 250, 123)">setTimeout</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token operator">=&gt;</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">resolve</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">i</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token number">1000</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token function" style="color:rgb(80, 250, 123)">sequential</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">[</span><span class="token number">1</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token number">2</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token number">3</span><span class="token punctuation" style="color:rgb(248, 248, 242)">]</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> fetcher</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="discussion-rounds">Discussion Rounds<a href="#discussion-rounds" class="hash-link" aria-label="Direct link to Discussion Rounds" title="Direct link to Discussion Rounds">​</a></h2><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="web-development-tools">Web development tools<a href="#web-development-tools" class="hash-link" aria-label="Direct link to Web development tools" title="Direct link to Web development tools">​</a></h3><p>Regardless of how we wish to deny it, web development tools are an increasingly complex and diverse ecosystem.</p><p>Smaller companies, especially start-ups, require engineers who have a good understanding of these tools. Larger companies will be able to abstract tooling complexity away from engineers unless the role demands it.</p><p>As such, web development tools like Webpack and Babel have become a common discussion topic.</p><p>A good understanding of tools like Webpack would be to be able to explain the following concepts:</p><ul><li>what is bundling</li><li>what is tree-shaking</li><li>what is lazy-loading and why does it matter</li><li>how loaders work</li></ul><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="react-or-web-framework-of-choice">React or web framework of choice<a href="#react-or-web-framework-of-choice" class="hash-link" aria-label="Direct link to React or web framework of choice" title="Direct link to React or web framework of choice">​</a></h3><p>If the role states that React knowledge is required, you may be expected to answer or code out React components. If you do not have React experience, using other frameworks would be possible, provided that you can explain well what is happening.</p><p>This may range from implementing a feature live or simply answering or explaining some React concepts such as <code>useEffect</code>'s dependencies array or <code>shouldComponentUpdate</code>.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="work-experience">Work experience<a href="#work-experience" class="hash-link" aria-label="Direct link to Work experience" title="Direct link to Work experience">​</a></h3><p>Aside from the two topics mentioned earlier, interviewers might dive into one or two things that they found interesting in your resume and ask you to elaborate.</p><p>As I had some experience in writing Babel plugins and jscodeshift code mods, I walked them through how I utilized those tools to help make the company codebase better.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="implementation-rounds">Implementation Rounds<a href="#implementation-rounds" class="hash-link" aria-label="Direct link to Implementation Rounds" title="Direct link to Implementation Rounds">​</a></h2><p>In all of my interviews, I have only been asked to implement a feature twice. It is not a common question, but it may come up.</p><p>This would come down to how well-versed you are with your basics such as HTML and CSS, as well as tools and frameworks. As an example, one of the question I have gotten was to implement an autocomplete search bar like Google's. If you have built something like that before, it is doable within an hour.</p><p>Implementation rounds feel very similar to algorithms, as you need to actively find the best solution while thinking out loud and explaining your decisions.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="algorithm-rounds">Algorithm Rounds<a href="#algorithm-rounds" class="hash-link" aria-label="Direct link to Algorithm Rounds" title="Direct link to Algorithm Rounds">​</a></h2><p>As software engineers, we are not unfamiliar with algorithm questions. LeetCode and Hackerrank are common resources used for practicing such questions.</p><p>As I knew this was my weakness, this was where I spent the most time. It may be a little ironic that I chose Python over JavaScript as my language of choice for tackling algorithms. JavaScript's lack of a native minheap and binary search implementation made it a slightly worse choice.</p><p>For those who are just starting to learn Python or getting back into it, here's my <a href="https://repl.it/@li_kai/Python-Cheatsheet" target="_blank" rel="noopener noreferrer">Python cheat sheet</a>.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="conclusion">Conclusion<a href="#conclusion" class="hash-link" aria-label="Direct link to Conclusion" title="Direct link to Conclusion">​</a></h2><p>Front end software engineer roles are not very different from general software engineer roles, but they do tend to be more specialized and in some ways, require even more effort.</p><p>If you are passionate about this field and interested in what you do, this would not be too high of a hurdle. I hope my experience and tips were useful to you, and good luck in your search!</p>]]></content>
        <author>
            <name>Kai Li</name>
            <uri>https://github.com/li-kai</uri>
        </author>
        <category label="front end" term="front end"/>
        <category label="leetcode" term="leetcode"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Resume improvement case study]]></title>
        <id>https://www.techinterviewhandbook.org/blog/resume-improvement-case-study</id>
        <link href="https://www.techinterviewhandbook.org/blog/resume-improvement-case-study"/>
        <updated>2021-08-29T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[As an example of putting the Resume tips to practice, let's reviewing Teik Jun's resume, critiquing it and improving it. At the time of writing, Teik Jun is a Year 4 undergraduate at National University of Singapore and is looking for a Software Engineering (SWE) internship for the summer of 2022.]]></summary>
        <content type="html"><![CDATA[<p>As an example of putting the Resume tips to practice, let's reviewing <a href="https://github.com/teikjun" target="_blank" rel="noopener noreferrer">Teik Jun's</a> resume, critiquing it and improving it. At the time of writing, Teik Jun is a Year 4 undergraduate at National University of Singapore and is looking for a Software Engineering (SWE) internship for the summer of 2022.</p><p>Here's the initial version of Teik Jun's resume I received from him.</p><div class="text--center"><figure><img loading="lazy" alt="Teik Jun's initial resume" class="shadow--md img_ev3q" src="/assets/images/teik-jun-resume-old-c53d226294d42b7359c993cb29a6067c.png"><figcaption>Teik Jun's initial resume</figcaption></figure></div><p>On first glance, it looks like a solid resume, and it is. However, I've known Teik Jun for a few years now since the <a href="https://fellowship.mlh.io/" target="_blank" rel="noopener noreferrer">Major League Hacking (MLH) Fellowship program</a> where he <a href="https://github.com/facebook/docusaurus/commits?author=teikjun" target="_blank" rel="noopener noreferrer">contributed a ton of features to Docusaurus v2</a>, and know that he has done even greater things in the past. This version of his resume doesn't do his skills justice. Let's see how we can improve it by applying the points learnt in the previous section.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="resume-critique">Resume critique<a href="#resume-critique" class="hash-link" aria-label="Direct link to Resume critique" title="Direct link to Resume critique">​</a></h2><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="good">Good<a href="#good" class="hash-link" aria-label="Direct link to Good" title="Direct link to Good">​</a></h3><ul><li>Demonstrates diverse and full stack experience - Has experience in front end, building web applications, JavaScript tooling, payments infrastructure and blockchain</li><li>Diverse interests and abilities - Open Source, AI and Machine Learning, Front End, Algorithms TA, Hackathons</li><li>Clean formatting which is easily readable</li><li>Reverse chronological order</li><li>Straightforward, bullet point format</li></ul><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="points-of-improvement">Points of improvement<a href="#points-of-improvement" class="hash-link" aria-label="Direct link to Points of improvement" title="Direct link to Points of improvement">​</a></h3><ul><li><strong>Irrelevant experience</strong> - It's honestly super cool to be "Best Shot" of Sniper Course and to get other impressive accolades as an NSF, but it's hardly relevant to a SWE job. If I were running out of space I'd remove it.</li><li><strong>Not sufficiently conveying the impressiveness of his experience</strong> - Teik Jun's work on the MLH program was for a popular Facebook Open Source project, Docusaurus (the same project that powers this website) and he did very very good work as part of the program. I know because I reviewed his Pull Requests and he did a damn good job. Docusaurus is an important project to Facebook and widely used by popular Facebook projects like React Native, Jest, and Relay.</li><li><strong>Not explaining what the project is about</strong> - In most cases, recruiters are the ones reading a resume and they would not know what a project is about, especially when most of them aren't technical. Hence resumes also have to explain the complexity and impact of a project. I know what Docusaurus and TEAMMATES are, but that's because I worked on Docusaurus and I am aware of NUS' projects. Most recruiters would not, so we have to explain what they are. TEAMMATES was also a Google Summer of Code project, so mentioning that would be nice.</li><li><strong>Trivial details</strong> - Under TEAMMATES, there was a point "Added a progress indicator component for expensive operations". This sounds quite small and can be removed if there's a lack of space.</li><li><strong>Obscure projects</strong> - The "Mentorship Management Web Application" doesn't sufficiently relay the complexity. The details are also obvious and doesn't sound impressive. I'd remove this project because it doesn't add much value.</li><li><strong>Contributions to Open Source projects</strong> - Any project can be made open source and contributing to your own open source homework doesn't mean much. What makes open source contributions impressive would be the complexity of the project and the contributions made. The latter might be hard to fit into a resume, so we should do the former at the very least.</li></ul><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="bonus">Bonus<a href="#bonus" class="hash-link" aria-label="Direct link to Bonus" title="Direct link to Bonus">​</a></h3><p>I know that Teik Jun will be interning with ByteDance in the fall, so it could be added as a signal of Teik Jun's abilities, telling recruiters that he's good enough to work at ByteDance.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="improved-version">Improved version<a href="#improved-version" class="hash-link" aria-label="Direct link to Improved version" title="Direct link to Improved version">​</a></h2><p>Here's an improved version of Teik Jun's resume which I feel which better highlights Teik Jun's abilities. Main changes made were:</p><ul><li>Added more important keywords - ByteDance (future internship), Facebook (MLH collaboration), Google (TEAMMATES was a Google Summer of Code project for a few years).</li><li>Removed redundant and unimportant details.</li><li>Added links to certain projects to make it more convenient for recruiters who want to gain more context of the projects listed.</li></ul><p>In my opinion, this improved resume is sure to capture the eyes of any recruiter in the world!</p><div class="text--center"><figure><img loading="lazy" alt="Teik Jun's improved resume" class="shadow--md img_ev3q" src="/assets/images/teik-jun-resume-new-2516bc230948c8ffb29468ce76501395.png"><figcaption>Teik Jun's improved resume</figcaption></figure></div>]]></content>
        <author>
            <name>Yangshun Tay</name>
            <uri>https://github.com/yangshun</uri>
        </author>
        <category label="career" term="career"/>
        <category label="resume" term="resume"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Front End Career Questions]]></title>
        <id>https://www.techinterviewhandbook.org/blog/front-end-career-questions</id>
        <link href="https://www.techinterviewhandbook.org/blog/front-end-career-questions"/>
        <updated>2021-08-28T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Recently a junior front end engineer at a startup in Singapore reached out to me to ask me how front end development as a career.]]></summary>
        <content type="html"><![CDATA[<p>Recently a junior front end engineer at a startup in Singapore reached out to me to ask me how front end development as a career.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="my-manager-told-me-that-currently-its-a-bit-hard-to-define-requirements--expectations-for-higher-tier--higher-individual-contributor-ic-level-for-front-end-engineers-in-the-organization-since-you-are-working-at-facebook-i-am-wondering-what-are-some-requirements--expectations-for-higher-ic-level-there-for-front-end-engineers-maybe-around-ic4-ic5-and-above-if-thats-kinda-the-level-you-use-there">My manager told me that currently it's a bit hard to define requirements &amp; expectations for higher tier / higher Individual Contributor (IC) level for Front End engineers in the organization. Since you are working at Facebook, I am wondering what are some requirements &amp; expectations for higher IC level there for Front End engineers (maybe around IC4, IC5 and above if that's kinda the level you use there)?<a href="#my-manager-told-me-that-currently-its-a-bit-hard-to-define-requirements--expectations-for-higher-tier--higher-individual-contributor-ic-level-for-front-end-engineers-in-the-organization-since-you-are-working-at-facebook-i-am-wondering-what-are-some-requirements--expectations-for-higher-ic-level-there-for-front-end-engineers-maybe-around-ic4-ic5-and-above-if-thats-kinda-the-level-you-use-there" class="hash-link" aria-label="Direct link to My manager told me that currently it's a bit hard to define requirements &amp; expectations for higher tier / higher Individual Contributor (IC) level for Front End engineers in the organization. Since you are working at Facebook, I am wondering what are some requirements &amp; expectations for higher IC level there for Front End engineers (maybe around IC4, IC5 and above if that's kinda the level you use there)?" title="Direct link to My manager told me that currently it's a bit hard to define requirements &amp; expectations for higher tier / higher Individual Contributor (IC) level for Front End engineers in the organization. Since you are working at Facebook, I am wondering what are some requirements &amp; expectations for higher IC level there for Front End engineers (maybe around IC4, IC5 and above if that's kinda the level you use there)?">​</a></h3><p>For smaller companies that might be true, but it's still possible if you don't limit yourself to front end work. Going up the levels is all about scope and complexity. IC3s (Junior Engineer) work on tasks, IC4s (Software Engineer) work on features, IC5s (Senior Software Engineer) work on projects, IC6s (Staff Software Engineer) work on huge projects spanning across teams, IC7s (Senior Staff Software Engineer) work on projects spanning across the org, IC8+s (Principal Software Engineer) work on projects spanning across the company or even influencing the industry. If you're able to show that you can handle scope of that magnitude, there shouldn't be a reason not to be compensated at that level. That said, the rough guide I proposed here is for a company the size of Facebook where we have 10s of thousands of Engineers. Doing work that impacts an entire company of 10 people likely won't be IC8 level work. For reference, React core team is mostly made up of IC5s/IC6s and one IC7. Flow has a number of IC5s and IC6s as it's technically complex and affects how the entire company writes JavaScript. GraphQL has many senior engineers and the creator of GraphQL is currently a director (IC8 equivalent).</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="are-you-still-doing-a-lot-of-front-end-related-development-work-now-be-it-in-the-company-or-personally-if-yes-i-am-just-curious-what-are-the-things-you-often-do-and-what-do-you-like-in-particular-about-front-end-development">Are you still doing a lot of Front End-related development work now? Be it in the company or personally? If yes, I am just curious what are the things you often do, and what do you like in particular about Front End development?<a href="#are-you-still-doing-a-lot-of-front-end-related-development-work-now-be-it-in-the-company-or-personally-if-yes-i-am-just-curious-what-are-the-things-you-often-do-and-what-do-you-like-in-particular-about-front-end-development" class="hash-link" aria-label="Direct link to Are you still doing a lot of Front End-related development work now? Be it in the company or personally? If yes, I am just curious what are the things you often do, and what do you like in particular about Front End development?" title="Direct link to Are you still doing a lot of Front End-related development work now? Be it in the company or personally? If yes, I am just curious what are the things you often do, and what do you like in particular about Front End development?">​</a></h3><p>I'm still doing a lot of Front End development for work. Less in a personal capacity ever since I stopped working on Docusaurus as a side project. You can check out my GitHub to see what stuff I've done. At work I'm in-charge of oculus.com and built the infra for it. I built a design system of React components for the content developers to develop the marketing pages.</p><p>I really like all aspects of Front End development, maybe except optimizing performance. At FB we build a lot of Front End-related tooling (e.g. Jest, GraphQL, Flow) and libraries (our internal CSS-in-JS solution, Docusaurus, React, Flux, etc) which is personally very exciting to me. Even within front end development, there are various layers - very user-facing stuff (HTML/CSS/visual related code) and back end (JavaScript stuff, network layer, storage), tooling (ESLint, Babel, TypeScript, webpack). I call myself a full front end stack developer as I'm decent across the entire front end stack. I'm especially excited about tooling work as the problems there are interesting and challenging. Typically only large companies face such problems because they only occur at scale, hence I really like being at FB because FB is one of such companies.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="personally-do-you-have-any-tips-on-how-best-to-grow-as-an-front-end-engineer-are-there-any-particular-areas-that-youd-recommend">Personally, do you have any tips on how best to grow as an Front End engineer? Are there any particular areas that you'd recommend?<a href="#personally-do-you-have-any-tips-on-how-best-to-grow-as-an-front-end-engineer-are-there-any-particular-areas-that-youd-recommend" class="hash-link" aria-label="Direct link to Personally, do you have any tips on how best to grow as an Front End engineer? Are there any particular areas that you'd recommend?" title="Direct link to Personally, do you have any tips on how best to grow as an Front End engineer? Are there any particular areas that you'd recommend?">​</a></h3><p>Learn your fundamentals well. There are many UI and CSS libraries out there, but a good Front End developer still needs to know how to build a website without them. Peek beneath the abstraction layers and understand the problems these libraries are trying to solve, do not use them blindly. Keep building stuff - try to build a simple version of the libraries you frequently use, build interesting user interfaces and products, etc.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="what-do-you-think-about-developing-breadth-wise-vs-depth-wise-for-example-do-you-think-its-important-for-a-software-engineer-to-know-more-about-other-fields-besides-the-end-heshe-is-currently-working-at-in-particular-what-do-you-think-about-an-front-end-engineer-that-knows-be-ie-a-full-stack-developer-or-an-front-end-engineer-that-knows-mobile-development-with-the-advent-of-react-native-or-flutter">What do you think about developing breadth-wise vs depth-wise? For example, do you think it's important for a software engineer to know more about other fields besides the end he/she is currently working at? In particular, what do you think about an Front End engineer that knows BE (i.e. a full-stack developer), or an Front End engineer that knows mobile development (with the advent of React Native or Flutter)?<a href="#what-do-you-think-about-developing-breadth-wise-vs-depth-wise-for-example-do-you-think-its-important-for-a-software-engineer-to-know-more-about-other-fields-besides-the-end-heshe-is-currently-working-at-in-particular-what-do-you-think-about-an-front-end-engineer-that-knows-be-ie-a-full-stack-developer-or-an-front-end-engineer-that-knows-mobile-development-with-the-advent-of-react-native-or-flutter" class="hash-link" aria-label="Direct link to What do you think about developing breadth-wise vs depth-wise? For example, do you think it's important for a software engineer to know more about other fields besides the end he/she is currently working at? In particular, what do you think about an Front End engineer that knows BE (i.e. a full-stack developer), or an Front End engineer that knows mobile development (with the advent of React Native or Flutter)?" title="Direct link to What do you think about developing breadth-wise vs depth-wise? For example, do you think it's important for a software engineer to know more about other fields besides the end he/she is currently working at? In particular, what do you think about an Front End engineer that knows BE (i.e. a full-stack developer), or an Front End engineer that knows mobile development (with the advent of React Native or Flutter)?">​</a></h3><p>I somewhat answered this in another <a href="/blog/are-front-end-development-skills-enough-for-a-career/">blog post</a>. Lemme know if your question isn't answered after reading it.</p>]]></content>
        <author>
            <name>Yangshun Tay</name>
            <uri>https://github.com/yangshun</uri>
        </author>
        <category label="front end" term="front end"/>
        <category label="career" term="career"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Facebook Career Q&A]]></title>
        <id>https://www.techinterviewhandbook.org/blog/facebook-career-questions-and-answers</id>
        <link href="https://www.techinterviewhandbook.org/blog/facebook-career-questions-and-answers"/>
        <updated>2021-08-19T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[A number of students from the Project Intern group have been asking me questions related to Facebook internships, working at Facebook, and my personal journey. I decided to write down my answers in the form of a blog post so they can be shared more broadly and I can point people to this blog post in future whenever I get asked similar questions.]]></summary>
        <content type="html"><![CDATA[<p>A number of students from the Project Intern group have been asking me questions related to Facebook internships, working at Facebook, and my personal journey. I decided to write down my answers in the form of a blog post so they can be shared more broadly and I can point people to this blog post in future whenever I get asked similar questions.</p><p><strong><em>I am not a recruiter and I might have answered some of the recruiting or internship-related questions wrongly, so take them with a grain of salt. Opinions expressed are my own and do not represent the views of my employer.</em></strong></p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="glossary">Glossary<a href="#glossary" class="hash-link" aria-label="Direct link to Glossary" title="Direct link to Glossary">​</a></h2><ul><li>APAC - Asia Pacific Region</li><li>CVWO - Computing for Voluntary Welfare Organizations</li><li>DSA - Data Structures and Algorithms</li><li>EE - Enterprise Engineer/ing</li><li>FRL - Facebook Reality Labs</li><li>FTE - Full-time Employee</li><li>IANACP - I am not a career portal</li><li>IANAR - I am not a recruiter</li><li>IANAL - I am not a lawyer</li><li>IINW - If I'm not wrong</li><li>RA - Residential Assistant</li><li>SWE - Software Engineer/ing</li><li>TPM - Technical Program Manager</li></ul><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="caveats">Caveats<a href="#caveats" class="hash-link" aria-label="Direct link to Caveats" title="Direct link to Caveats">​</a></h2><ul><li>These replies are tailored towards the Facebook interview process for interns and fresh grads. They may or may not apply to other companies, especially smaller ones.</li><li>Most of these answers apply across the board for every engineer role but there are exceptions for certain specialized engineering roles like Security Engineering or Front End Engineering.</li></ul><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="applicationreferral">Application/Referral<a href="#applicationreferral" class="hash-link" aria-label="Direct link to Application/Referral" title="Direct link to Application/Referral">​</a></h2><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="whats-the-application-process-like-for-internships">What's the application process like (for internships)?<a href="#whats-the-application-process-like-for-internships" class="hash-link" aria-label="Direct link to What's the application process like (for internships)?" title="Direct link to What's the application process like (for internships)?">​</a></h3><p>Apply on <a href="https://www.facebook.com/careers" target="_blank" rel="noopener noreferrer">https://www.facebook.com/careers</a>. Recruiters will reach out to you if there's interest and chat with you over the phone. If it goes well, there will be two rounds of coding interviews.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="what-are-some-qualitiesexperiences-that-facebook-looks-for-in-a-resume">What are some qualities/experiences that Facebook looks for in a resume?<a href="#what-are-some-qualitiesexperiences-that-facebook-looks-for-in-a-resume" class="hash-link" aria-label="Direct link to What are some qualities/experiences that Facebook looks for in a resume?" title="Direct link to What are some qualities/experiences that Facebook looks for in a resume?">​</a></h3><p>IANAR and I don't filter any resumes, so I don't exactly know. But from experience, write stuff that makes you stand out from the rest. Have good grades? Add it in. Scholarships/awards, write them down. Have extensive internship experience? Include them in an organized format. Built cool hacks/side projects? Add the GitHub links and demos. Won hackathons/competitions? Put them in. One thing is for sure - few companies would want to hire candidates who only have academic credentials and no industry experience.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="does-gpa-affect-a-lot-on-the-resume-screening">Does GPA affect a lot on the resume screening?<a href="#does-gpa-affect-a-lot-on-the-resume-screening" class="hash-link" aria-label="Direct link to Does GPA affect a lot on the resume screening?" title="Direct link to Does GPA affect a lot on the resume screening?">​</a></h3><p>GPA/CAP/grades is just one of the signals that can be extracted from the resume. As mentioned above, there are many other qualities and achievements a candidate can possess. Personally if I had my own company, I would rather hire a candidate with a high second upper and fantastic open source portfolio with multiple internship experiences at big companies over a student with CAP 5.00 but has nothing else to show for. Not that one candidate is stronger than the other, but the former would probably be a safer choice.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="in-general-hows-the-barrier-of-entry-for-big-tech-companies-like-fb-in-terms-of-grades-would-a-second-lower-35-39-even-get-pass-the-resume-screening-stage">In general, how's the barrier of entry for big tech companies like FB in terms of grades, would a second lower (3.5-3.9) even get pass the resume screening stage?<a href="#in-general-hows-the-barrier-of-entry-for-big-tech-companies-like-fb-in-terms-of-grades-would-a-second-lower-35-39-even-get-pass-the-resume-screening-stage" class="hash-link" aria-label="Direct link to In general, how's the barrier of entry for big tech companies like FB in terms of grades, would a second lower (3.5-3.9) even get pass the resume screening stage?" title="Direct link to In general, how's the barrier of entry for big tech companies like FB in terms of grades, would a second lower (3.5-3.9) even get pass the resume screening stage?">​</a></h3><p>Grades matter less the longer someone has left school. For students, because there's a lack of working experience, grades might play a larger part in the resume screening, but it's by no means the only thing that matters.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="is-the-resume-screening-done-by-ai--human-recruiter-what-is-being-looked-out-for-on-the-resume-as-someone-who-isnt-strong-academically-will-i-be-able-to-compete-purely-based-on-experience-on-my-resume">Is the resume screening done by AI / human recruiter? What is being looked out for on the resume? As someone who isn't strong academically, will I be able to compete purely based on experience on my resume?<a href="#is-the-resume-screening-done-by-ai--human-recruiter-what-is-being-looked-out-for-on-the-resume-as-someone-who-isnt-strong-academically-will-i-be-able-to-compete-purely-based-on-experience-on-my-resume" class="hash-link" aria-label="Direct link to Is the resume screening done by AI / human recruiter? What is being looked out for on the resume? As someone who isn't strong academically, will I be able to compete purely based on experience on my resume?" title="Direct link to Is the resume screening done by AI / human recruiter? What is being looked out for on the resume? As someone who isn't strong academically, will I be able to compete purely based on experience on my resume?">​</a></h3><p>IANAR. Usually people suck at their studies because instead of studying they spent their time elsewhere. If it was spent on related stuff like hacking on side projects and internships, that probably makes up for the subpar academic grades. But if you suck at studies and spent your time clubbing instead, then I'm sorry you probably won't get past the screening. Note that CS is such a hot course now that only the best students can get in these days. A fair amount of students have both good grades AND non-academic achievements. Competition is tough!</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="are-there-any-languagesframeworks-that-are-helpful-to-know-before-applying">Are there any languages/frameworks that are helpful to know before applying?<a href="#are-there-any-languagesframeworks-that-are-helpful-to-know-before-applying" class="hash-link" aria-label="Direct link to Are there any languages/frameworks that are helpful to know before applying?" title="Direct link to Are there any languages/frameworks that are helpful to know before applying?">​</a></h3><p>For Software Engineering (SWE) positions, Facebook doesn't require you to have experience in specific languages/frameworks before joining. Likewise, there aren't any of such restrictions for SWE interviews. You can do your interviews in your programming language of choice. One exception to this is if you're applying for a Front End Engineer or Mobile Engineer position, then you will be asked domain-specific questions and by extension, required to use JavaScript/Java/Kotlin/Objective-C/Swift to answer the questions.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="are-intern-applications-and-hence-the-spots-based-on-first-come-first-served">Are intern applications (and hence, the spots) based on first-come-first-served?<a href="#are-intern-applications-and-hence-the-spots-based-on-first-come-first-served" class="hash-link" aria-label="Direct link to Are intern applications (and hence, the spots) based on first-come-first-served?" title="Direct link to Are intern applications (and hence, the spots) based on first-come-first-served?">​</a></h3><p>IANAR. But as with all jobs, there are definitely limited spots and once they're filled up there isn't a need to hire anymore. Applying in 2022 for the internship which application opens in September, is almost definitely too late. You can apply later (October) if you want more time to prepare, but there might be fewer slots left. Moral of the story - prepare early.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="hows-the-referral-process-aboutlike">How's the referral process about/like?<a href="#hows-the-referral-process-aboutlike" class="hash-link" aria-label="Direct link to How's the referral process about/like?" title="Direct link to How's the referral process about/like?">​</a></h3><p>Facebook will send you a form (initiated by me) where you can fill up your name, email, upload your resume, and select the roles you would like to apply. From there on, from an applicant perspective it's not different from them applying themselves on the Facebook Careers Portal.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="may-i-know-until-when-your-referral-is-valid-i-was-hoping-to-start-my-application-a-bit-later-so-was-hoping-to-reach-out-to-you-then-for-a-referral-is-there-any-last-date-to-claim-this-in-any-way">May I know until when your referral is valid? I was hoping to start my application a bit later so was hoping to reach out to you then for a referral. Is there any last date to "claim" this in any way?<a href="#may-i-know-until-when-your-referral-is-valid-i-was-hoping-to-start-my-application-a-bit-later-so-was-hoping-to-reach-out-to-you-then-for-a-referral-is-there-any-last-date-to-claim-this-in-any-way" class="hash-link" aria-label="Direct link to May I know until when your referral is valid? I was hoping to start my application a bit later so was hoping to reach out to you then for a referral. Is there any last date to &quot;claim&quot; this in any way?" title="Direct link to May I know until when your referral is valid? I was hoping to start my application a bit later so was hoping to reach out to you then for a referral. Is there any last date to &quot;claim&quot; this in any way?">​</a></h3><p>As long as I remain employed at Facebook, I'm happy to refer you if I feel that you stand a good chance passing the interviews. As mentioned earlier, if you apply when unprepared, you risk wasting the chance. Take too long and apply too late, then you risk the slots being all filled up. I don't know the last date to be referred but I recommend not later than end of September.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="any-tips-for-a-good-resume-to-apply-for-fb">Any tips for a good resume to apply for FB?<a href="#any-tips-for-a-good-resume-to-apply-for-fb" class="hash-link" aria-label="Direct link to Any tips for a good resume to apply for FB?" title="Direct link to Any tips for a good resume to apply for FB?">​</a></h3><p>Answered above. I don't think most students need to worry about the resume screening stage. Worry about the interviews. Use a neat and standard template and you should be fine.</p><p>If you're applying for US positions, it'd be helpful to do the following:</p><ul><li>Mention expected year of graduation (month as well if you know)</li><li>If you're applying to US roles, mention US work eligibility. This is straightforward for Singaporeans (mention eligibility for H-1B1 visa)</li><li>Use GPA instead of CAP</li></ul><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="if-i-build-my-projects-must-some-of-them-be-pushed-to-production-before-applying">If I build my projects must some of them be pushed to production before applying?<a href="#if-i-build-my-projects-must-some-of-them-be-pushed-to-production-before-applying" class="hash-link" aria-label="Direct link to If I build my projects must some of them be pushed to production before applying?" title="Direct link to If I build my projects must some of them be pushed to production before applying?">​</a></h3><p>Best if you can, but I'm not sure if recruiters actually click on your project links. Maybe just don't include the link if it's not really usable?</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="do-you-have-any-tips-in-applying-for-a-fresh-grad-swe-role-in-facebook">Do you have any tips in applying for a fresh grad SWE role in facebook?<a href="#do-you-have-any-tips-in-applying-for-a-fresh-grad-swe-role-in-facebook" class="hash-link" aria-label="Direct link to Do you have any tips in applying for a fresh grad SWE role in facebook?" title="Direct link to Do you have any tips in applying for a fresh grad SWE role in facebook?">​</a></h3><p>Make sure you know your algorithms at the back of your hand. Fresh grad SWE role interviews also have a behavioral round, so be prepared to talk about your past experiences. There's a section in this handbook which covers those.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="apart-from-preparing-for-dsa-questions-are-there-other-areas-you-would-recommend-preparing-for-either-for-the-interviews--a-better-chance-to-get-shortlisted-for-them">Apart from preparing for DSA questions, are there other areas you would recommend preparing for (either for the interviews / a better chance to get shortlisted for them)?<a href="#apart-from-preparing-for-dsa-questions-are-there-other-areas-you-would-recommend-preparing-for-either-for-the-interviews--a-better-chance-to-get-shortlisted-for-them" class="hash-link" aria-label="Direct link to Apart from preparing for DSA questions, are there other areas you would recommend preparing for (either for the interviews / a better chance to get shortlisted for them)?" title="Direct link to Apart from preparing for DSA questions, are there other areas you would recommend preparing for (either for the interviews / a better chance to get shortlisted for them)?">​</a></h3><p>If you're going for a SWE intern/grad position, DSA is the most important. The bulk of the assessment is on DSA. Grind your LeetCode.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="would-love-to-find-out-what-the-interviewers-at-facebook-usually-look-out-for-in-candidates">Would love to find out what the interviewers at Facebook usually look out for in candidates!<a href="#would-love-to-find-out-what-the-interviewers-at-facebook-usually-look-out-for-in-candidates" class="hash-link" aria-label="Direct link to Would love to find out what the interviewers at Facebook usually look out for in candidates!" title="Direct link to Would love to find out what the interviewers at Facebook usually look out for in candidates!">​</a></h2><p>DSA. DSA. DSA. Communication skills - You must be able to also communicate your thought process well throughout the interview.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="am-i-able-to-apply-for-both-local-and-overseas-in-the-usa-roles-for-fb-and-be-considered-for-both-or-would-i-only-be-considered-for-sgs-openings-since-fb-has-an-office-here-and-im-already-located-in-sg">Am I able to apply for both local and overseas (in the USA) roles for FB and be considered for both? Or would I only be considered for SG's openings since FB has an office here and I'm already located in SG?<a href="#am-i-able-to-apply-for-both-local-and-overseas-in-the-usa-roles-for-fb-and-be-considered-for-both-or-would-i-only-be-considered-for-sgs-openings-since-fb-has-an-office-here-and-im-already-located-in-sg" class="hash-link" aria-label="Direct link to Am I able to apply for both local and overseas (in the USA) roles for FB and be considered for both? Or would I only be considered for SG's openings since FB has an office here and I'm already located in SG?" title="Direct link to Am I able to apply for both local and overseas (in the USA) roles for FB and be considered for both? Or would I only be considered for SG's openings since FB has an office here and I'm already located in SG?">​</a></h3><p>IANAR. Typically you will only be interviewed for one location. Candidates based in Singapore are free to apply to non-Singapore positions and intern there.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="what-is-the-application-process-like-for-the-software-engineer-role-is-it-any-different-from-the-enterprise-and-front-end-engineer-role">What is the application process like for the Software Engineer role? Is it any different from the Enterprise and Front End Engineer role?<a href="#what-is-the-application-process-like-for-the-software-engineer-role-is-it-any-different-from-the-enterprise-and-front-end-engineer-role" class="hash-link" aria-label="Direct link to What is the application process like for the Software Engineer role? Is it any different from the Enterprise and Front End Engineer role?" title="Direct link to What is the application process like for the Software Engineer role? Is it any different from the Enterprise and Front End Engineer role?">​</a></h3><p>For SWE, I've answered above. I'm not sure about Enterprise Engineers, I suspect it wouldn't be too different. For Front End Engineers, the questions will be domain-specific, hence will require candidates to be familiar with HTML/CSS/JS/Vanilla JS DOM manipulation methods, and less emphasis on Data Structures and Algorithms. I would expect most students to not have enough domain expertise to pass a Front End Interview, so don't anyhow apply for it. Simple litmus test - can you build a TODO list app in pure vanilla JavaScript, without using React/jQuery?</p><p>Note that Facebook Singapore currently does not hire Front End Engineers and interns. If you're interested in a Front End Engineer internship/FTE position, you'd have to look overseas.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="is-there-anything-i-can-doprepare-to-improve-my-chances-of-getting-through-the-recruiter-screen">Is there anything I can do/prepare to improve my chances of getting through the recruiter screen?<a href="#is-there-anything-i-can-doprepare-to-improve-my-chances-of-getting-through-the-recruiter-screen" class="hash-link" aria-label="Direct link to Is there anything I can do/prepare to improve my chances of getting through the recruiter screen?" title="Direct link to Is there anything I can do/prepare to improve my chances of getting through the recruiter screen?">​</a></h3><ol><li>Get a referral</li><li>Have a solid neat resume that showcases your abilities</li></ol><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="how-much-does-a-referral-help-in-landing-a-interview">How much does a referral help in landing a interview?<a href="#how-much-does-a-referral-help-in-landing-a-interview" class="hash-link" aria-label="Direct link to How much does a referral help in landing a interview?" title="Direct link to How much does a referral help in landing a interview?">​</a></h3><p>Referrals tend to have a higher visibility than someone who applies on the Careers Portal directly, but that's about it.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="are-there-any-related-full-time-openings-at-fb-and-if-so-how-can-i-help-you-decide-if-im-a-good-candidate-to-refer">Are there any related full time openings at FB, and if so how can I help you decide if I'm a good candidate to refer?<a href="#are-there-any-related-full-time-openings-at-fb-and-if-so-how-can-i-help-you-decide-if-im-a-good-candidate-to-refer" class="hash-link" aria-label="Direct link to Are there any related full time openings at FB, and if so how can I help you decide if I'm a good candidate to refer?" title="Direct link to Are there any related full time openings at FB, and if so how can I help you decide if I'm a good candidate to refer?">​</a></h3><p>I look through your transcript and resume and look for stuff that suggests you'd make a good employee. What things I look out for - excellent grades in the relevant modules, notable internships, interesting side projects, ICPC/IOI awards. Bonus: Open Source experience. I'm a huge fan of Open Source and if you have built something really cool that's Open Source, I'd refer you even if your grades are terrible.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="do-i-stand-a-good-chance-if-im-from-a-info-systems-background-but-gotten-good-grades-for-programming-modules-currently-taking-some-cs-modules-now-too">Do I stand a good chance if I'm from a Info Systems background but gotten good grades for programming modules? Currently taking some CS modules now too.<a href="#do-i-stand-a-good-chance-if-im-from-a-info-systems-background-but-gotten-good-grades-for-programming-modules-currently-taking-some-cs-modules-now-too" class="hash-link" aria-label="Direct link to Do I stand a good chance if I'm from a Info Systems background but gotten good grades for programming modules? Currently taking some CS modules now too." title="Direct link to Do I stand a good chance if I'm from a Info Systems background but gotten good grades for programming modules? Currently taking some CS modules now too.">​</a></h3><p>There are many IS folks who are good engineers. As long as you can demonstrate that you have mastery of programming and DSA, it shouldn't be an issue.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="would-you-know-whether-facebooks-hiring-process-has-a-preference-for-single-page-resumes">Would you know whether Facebook's hiring process has a preference for single-page resumes?<a href="#would-you-know-whether-facebooks-hiring-process-has-a-preference-for-single-page-resumes" class="hash-link" aria-label="Direct link to Would you know whether Facebook's hiring process has a preference for single-page resumes?" title="Direct link to Would you know whether Facebook's hiring process has a preference for single-page resumes?">​</a></h3><p>As an interviewer for FB senior-ish candidates, I have seen some horrendously long resumes. So I would think single-page is not a hard rule, more of a recommendation. If you are exceeding a single page, then you are likely including too many things. <a href="https://docs.google.com/document/d/13c8KsKSsP5biJT8N70aLULyq-I5ywuWrxRxr2faQTK4/" target="_blank" rel="noopener noreferrer">My own resume</a> is a 2-column one with small-ish font which I used in my last job hunt in 2017. It has got me replies from recruiters. This was before I started working at Facebook, so the Facebook branding isn't the main reason.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="im-an-international-student-at-smu-does-facebook-sponsor-employment-pass">I'm an international student at SMU, does Facebook sponsor employment pass?<a href="#im-an-international-student-at-smu-does-facebook-sponsor-employment-pass" class="hash-link" aria-label="Direct link to I'm an international student at SMU, does Facebook sponsor employment pass?" title="Direct link to I'm an international student at SMU, does Facebook sponsor employment pass?">​</a></h3><p>IANAL. But we have had international students interning at Facebook before and are currently working at Facebook. Please check with the recruiter.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="im-from-sutd-and-my-schedule-is-pretty-weird-im-graduating-next-year-so-should-i-apply-for-internship-or-a-job">I'm from SUTD and my schedule is pretty weird! I'm graduating next year so should I apply for internship or a job?<a href="#im-from-sutd-and-my-schedule-is-pretty-weird-im-graduating-next-year-so-should-i-apply-for-internship-or-a-job" class="hash-link" aria-label="Direct link to I'm from SUTD and my schedule is pretty weird! I'm graduating next year so should I apply for internship or a job?" title="Direct link to I'm from SUTD and my schedule is pretty weird! I'm graduating next year so should I apply for internship or a job?">​</a></h3><p>If you have any spare summers left, you can and should go for an internship. IMO passing an internship interview is easier than a full-time interview, and likely leads to a better conversion package also if you have performed well during the internship.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="am-i-eligible-to-work-overseas-in-uslondoncanada">Am I eligible to work overseas in US/London/Canada?<a href="#am-i-eligible-to-work-overseas-in-uslondoncanada" class="hash-link" aria-label="Direct link to Am I eligible to work overseas in US/London/Canada?" title="Direct link to Am I eligible to work overseas in US/London/Canada?">​</a></h3><p>IANAR. If you're Singaporean, you'd have no problems working anywhere. If you're a foreign student, you could check with your seniors or just ask the recruiter when you get the chance.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="i-want-to-intern-in-sg-and-work-in-us-is-that-possible">I want to intern in SG and work in US. Is that possible?<a href="#i-want-to-intern-in-sg-and-work-in-us-is-that-possible" class="hash-link" aria-label="Direct link to I want to intern in SG and work in US. Is that possible?" title="Direct link to I want to intern in SG and work in US. Is that possible?">​</a></h3><p>For interns, your return offer will be for the location you interned in. So you should also factor in where you want to work full-time and strive to intern at the same location.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="how-long-do-i-have-to-wait-if-i-get-rejected">How long do I have to wait if I get rejected?<a href="#how-long-do-i-have-to-wait-if-i-get-rejected" class="hash-link" aria-label="Direct link to How long do I have to wait if I get rejected?" title="Direct link to How long do I have to wait if I get rejected?">​</a></h3><p>There's a 6-month to 1-year cooldown period for each role - E.g. if you've interviewed for SWE in the US and failed, you'd have to wait some amount of time before interviewing for the SWE position again in SG (or any location). This cooldown is per role, so you're free to apply again immediately and interview for another role, e.g Front End Engineer, assuming your resume gets picked up.</p><p>As of writing, internships in FB SG are run annually so if you fail this year you'd have to wait for the next.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="interviews">Interviews<a href="#interviews" class="hash-link" aria-label="Direct link to Interviews" title="Direct link to Interviews">​</a></h2><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="whats-the-interview-process-like">What's the interview process like?<a href="#whats-the-interview-process-like" class="hash-link" aria-label="Direct link to What's the interview process like?" title="Direct link to What's the interview process like?">​</a></h3><p>For all roles, there should be an initial contact (e.g. phone call) with recruiters. For interns, it would be 2 rounds of online coding interviews where the focus is on DSA. For fresh graduates, it would be 2 rounds of online coding interviews and 1 behavioral round.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="based-on-your-past-experience-if-a-candidate-does-not-get-full-marks-for-the-online-coding-test-what-are-the-chances-of-him-or-her-getting-a-face-to-face-interview-just-curious-about-the-level-of-competition-haha-this-is-because-im-not-that-worried-about-whiteboard-interviews-but-afraid-that-i-may-not-even-get-a-chance-to-go-through-it">Based on your past experience, if a candidate does not get full marks for the online coding test, what are the chances of him or her getting a face to face interview? Just curious about the level of competition haha (This is because I'm not that worried about whiteboard interviews but afraid that I may not even get a chance to go through it)<a href="#based-on-your-past-experience-if-a-candidate-does-not-get-full-marks-for-the-online-coding-test-what-are-the-chances-of-him-or-her-getting-a-face-to-face-interview-just-curious-about-the-level-of-competition-haha-this-is-because-im-not-that-worried-about-whiteboard-interviews-but-afraid-that-i-may-not-even-get-a-chance-to-go-through-it" class="hash-link" aria-label="Direct link to Based on your past experience, if a candidate does not get full marks for the online coding test, what are the chances of him or her getting a face to face interview? Just curious about the level of competition haha (This is because I'm not that worried about whiteboard interviews but afraid that I may not even get a chance to go through it)" title="Direct link to Based on your past experience, if a candidate does not get full marks for the online coding test, what are the chances of him or her getting a face to face interview? Just curious about the level of competition haha (This is because I'm not that worried about whiteboard interviews but afraid that I may not even get a chance to go through it)">​</a></h3><p>I don't even think there's an online coding test for Facebook. Can't answer this.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="would-fb-us-hire-sg-citizens-considering-that-theres-an-fb-sg-office-already">Would FB US hire SG citizens considering that there's an FB SG office already?<a href="#would-fb-us-hire-sg-citizens-considering-that-theres-an-fb-sg-office-already" class="hash-link" aria-label="Direct link to Would FB US hire SG citizens considering that there's an FB SG office already?" title="Direct link to Would FB US hire SG citizens considering that there's an FB SG office already?">​</a></h3><p>Yes.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="how-i-could-improve-my-chances-on-landing-an-internship">How I could improve my chances on landing an internship?<a href="#how-i-could-improve-my-chances-on-landing-an-internship" class="hash-link" aria-label="Direct link to How I could improve my chances on landing an internship?" title="Direct link to How I could improve my chances on landing an internship?">​</a></h3><p>Study your DSA, grind LeetCode, do mock interviews with your peers to get used to talking out loud/communicating your thoughts while coding.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="i-wanna-learn-as-much-as-possible-from-you-about-topics-that-might-benefit-me">I wanna learn as much as possible from you about topics that might benefit me<a href="#i-wanna-learn-as-much-as-possible-from-you-about-topics-that-might-benefit-me" class="hash-link" aria-label="Direct link to I wanna learn as much as possible from you about topics that might benefit me" title="Direct link to I wanna learn as much as possible from you about topics that might benefit me">​</a></h3><p>Benefit you in terms of what, and when? For passing the interviews, DSA and LeetCode. For the actual internship, that'll be a much longer answer which I shan't go into because that's a problem for later, if you pass the interviews.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="i-heard-fb-doesnt-ask-dynamic-programming-questions-correct-me-if-im-wrong-are-there-any-topics-i-should-be-focusing-more-on">I heard FB doesn't ask dynamic programming questions, correct me if I'm wrong. Are there any topics I should be focusing more on?<a href="#i-heard-fb-doesnt-ask-dynamic-programming-questions-correct-me-if-im-wrong-are-there-any-topics-i-should-be-focusing-more-on" class="hash-link" aria-label="Direct link to I heard FB doesn't ask dynamic programming questions, correct me if I'm wrong. Are there any topics I should be focusing more on?" title="Direct link to I heard FB doesn't ask dynamic programming questions, correct me if I'm wrong. Are there any topics I should be focusing more on?">​</a></h3><p>I can neither confirm nor deny this. General tip for coding interviews - focus on the most common data structures and algorithms. If a particular topic is really obscure, most likely you won't be asked on it because asking obscure stuff sometimes work against the interviewers as it'd be harder for them to extract the right signals out of it. Look at the recommended practice questions in the handbook.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="how-many-rounds-of-interviews-are-there-does-fb-ask-system-design-on-the-live-interviews">How many rounds of interviews are there? Does FB ask system design on the live interviews?<a href="#how-many-rounds-of-interviews-are-there-does-fb-ask-system-design-on-the-live-interviews" class="hash-link" aria-label="Direct link to How many rounds of interviews are there? Does FB ask system design on the live interviews?" title="Direct link to How many rounds of interviews are there? Does FB ask system design on the live interviews?">​</a></h3><p>For internships, typically two coding. For fresh grads, typically two coding with one behavioral. No system design for internships and fresh grad interviews.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="would-i-be-tested-on-specific-tech-stacksreal-project-experience-or-is-it-purely-algo-based">Would I be tested on specific tech stacks/real project experience, or is it purely algo based?<a href="#would-i-be-tested-on-specific-tech-stacksreal-project-experience-or-is-it-purely-algo-based" class="hash-link" aria-label="Direct link to Would I be tested on specific tech stacks/real project experience, or is it purely algo based?" title="Direct link to Would I be tested on specific tech stacks/real project experience, or is it purely algo based?">​</a></h3><p>If you're applying for a SWE position, you won't be tested on a specific tech stacks/languages. The algorithm questions asked can be implemented in most programming languages (but you probably want to avoid using wenyan). If you're applying for a specialized position, then you might be asked to use domain-specific languages, which the recruiter should (will?) let you know ahead of time.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="internship">Internship<a href="#internship" class="hash-link" aria-label="Direct link to Internship" title="Direct link to Internship">​</a></h2><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="what-are-3-qualities-of-a-internnew-hire-fellow-fb-engineers-look-out-for">What are 3 qualities of a intern/new hire fellow FB engineers look out for?<a href="#what-are-3-qualities-of-a-internnew-hire-fellow-fb-engineers-look-out-for" class="hash-link" aria-label="Direct link to What are 3 qualities of a intern/new hire fellow FB engineers look out for?" title="Direct link to What are 3 qualities of a intern/new hire fellow FB engineers look out for?">​</a></h3><p>This is a long answer and there are more than 3 qualities. But to get a conversion offer, in summary, interns have to show productivity and complete their assigned projects within the internship duration, product high quality code/work, demonstrate fast learning speed, actively communicate and collaborate, and show initiative and independence. Pretty much common sense if you ask me.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="what-are-the-different-types-of-internship-roles-that-are-opening-in-fb-both-here-in-sg-and-overseas">What are the different types of internship roles that are opening in FB (both here in SG and overseas)!<a href="#what-are-the-different-types-of-internship-roles-that-are-opening-in-fb-both-here-in-sg-and-overseas" class="hash-link" aria-label="Direct link to What are the different types of internship roles that are opening in FB (both here in SG and overseas)!" title="Direct link to What are the different types of internship roles that are opening in FB (both here in SG and overseas)!">​</a></h3><p>IANACP. FB SG is quite limited in the sense we primarily only hiring SWE, EE interns. But I think I have seen TPM interns before. For overseas, almost every role is available.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="are-there-machine-learningdata-science-internship-roles-at-facebook-sg-how-about-in-other-countries">Are there machine learning/data science internship roles at Facebook SG? How about in other countries?<a href="#are-there-machine-learningdata-science-internship-roles-at-facebook-sg-how-about-in-other-countries" class="hash-link" aria-label="Direct link to Are there machine learning/data science internship roles at Facebook SG? How about in other countries?" title="Direct link to Are there machine learning/data science internship roles at Facebook SG? How about in other countries?">​</a></h3><p>Not that I know of. Yes there should be for overseas, but then you'll be competing with a global pool of candidates.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="what-does-the-swe-role-entail-tech-stack-and-what-to-expect">What does the SWE role entail? Tech stack and what to expect?<a href="#what-does-the-swe-role-entail-tech-stack-and-what-to-expect" class="hash-link" aria-label="Direct link to What does the SWE role entail? Tech stack and what to expect?" title="Direct link to What does the SWE role entail? Tech stack and what to expect?">​</a></h3><p>Software engineering of course. To answer seriously, it really depends on the team and their work. Most (all?) SWEs write code to solve problems. FB is big enough such that there are teams using almost every language out there.</p><p>Here's an oversimplified overview:</p><ul><li>Web Products - JavaScript/React/CSS/GraphQL/Relay/Hack (typed version of PHP)</li><li>Mobile - Objective-C/Java/React Native/Proprietary frameworks</li><li>Back End Services - Java/C++/Python</li></ul><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="what-is-the-internship-format-in-facebook-like-for-example-are-the-interns-inserted-into-a-team-to-work-on-issues-or-are-they-handed-a-project-to-work-on-throughout-their-internship">What is the internship format in Facebook like? For example, are the interns inserted into a team to work on issues or are they handed a project to work on throughout their internship?<a href="#what-is-the-internship-format-in-facebook-like-for-example-are-the-interns-inserted-into-a-team-to-work-on-issues-or-are-they-handed-a-project-to-work-on-throughout-their-internship" class="hash-link" aria-label="Direct link to What is the internship format in Facebook like? For example, are the interns inserted into a team to work on issues or are they handed a project to work on throughout their internship?" title="Direct link to What is the internship format in Facebook like? For example, are the interns inserted into a team to work on issues or are they handed a project to work on throughout their internship?">​</a></h3><p>Under normal circumstances, interns would be given one project that should take them the entire internship duration (10 weeks or so out of a 12-week internship) to complete. They will be assigned an Intern Manager that would serve as their mentor throughout the internship. The mentor is typically the one who came up with the project which is broken down into multiple milestones. Responsibilities of an intern manager include: onboarding the intern, giving the intern regular feedback on how they are doing, reviewing their code (typically together with other members of the team), evaluating whether the intern will get a return offer.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="hows-the-mentorship-like-for-fb-interns-do-a-mentor-work-together-with-intern-on-the-same-project-are-mentors-randomly-assigned-within-the-company-or-do-they-volunteer-for-it">How's the mentorship like for FB interns? Do a mentor work together with intern on the same project? Are mentors randomly assigned within the company or do they volunteer for it?<a href="#hows-the-mentorship-like-for-fb-interns-do-a-mentor-work-together-with-intern-on-the-same-project-are-mentors-randomly-assigned-within-the-company-or-do-they-volunteer-for-it" class="hash-link" aria-label="Direct link to How's the mentorship like for FB interns? Do a mentor work together with intern on the same project? Are mentors randomly assigned within the company or do they volunteer for it?" title="Direct link to How's the mentorship like for FB interns? Do a mentor work together with intern on the same project? Are mentors randomly assigned within the company or do they volunteer for it?">​</a></h3><p>Intern managers may or may not work with the intern on the same project, but they definitely should have context over the intern's project and be able to review (or at the very least, find suitable people) the intern's work. Employees can sign up to be an intern manager for a specific internship season. It is not random. It would be a disastrous and unpleasant experience for both the intern and the intern manager if an employee got randomly assigned to be a manager.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="what-are-some-products-that-interns-will-get-to-work-on-in-facebook-singapore">What are some products that interns will get to work on in Facebook Singapore?<a href="#what-are-some-products-that-interns-will-get-to-work-on-in-facebook-singapore" class="hash-link" aria-label="Direct link to What are some products that interns will get to work on in Facebook Singapore?" title="Direct link to What are some products that interns will get to work on in Facebook Singapore?">​</a></h3><p>Intern projects are typically self-contained and achievable within the internship duration. Some example of intern projects in FB SG - rebuilding Oculus Accounts Portal (<a href="https://secure.oculus.com" target="_blank" rel="noopener noreferrer">https://secure.oculus.com</a>) using a modern React design system, building a self-serve order return flow into Oculus Accounts Portal. Outside of FB SG - Building the settings page of facebook.com, building an internal debugging tool (something like Redux Devtools).</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="what-kind-of-projects-are-interns-usually-given-like-internal-tooling-or-external-products">What kind of projects are interns usually given (like internal tooling or external products)<a href="#what-kind-of-projects-are-interns-usually-given-like-internal-tooling-or-external-products" class="hash-link" aria-label="Direct link to What kind of projects are interns usually given (like internal tooling or external products)" title="Direct link to What kind of projects are interns usually given (like internal tooling or external products)">​</a></h3><p>Answered above. Can be both, depends on the team. In Singapore, we primarily have product teams, so the projects are likely about adding product features.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="will-there-be-any-chances-of-being-transferred-to-an-overseas-office-after-being-accepted-as-an-intern">Will there be any chances of being transferred to an overseas office after being accepted as an intern?<a href="#will-there-be-any-chances-of-being-transferred-to-an-overseas-office-after-being-accepted-as-an-intern" class="hash-link" aria-label="Direct link to Will there be any chances of being transferred to an overseas office after being accepted as an intern?" title="Direct link to Will there be any chances of being transferred to an overseas office after being accepted as an intern?">​</a></h3><p>Yes I know of that happening to some ex-interns. However, that could be due to special COVID circumstances which might not necessarily apply in following years. You'd have to check with the recruiter.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="how-many-interns-is-fb-looking-to-onboard-next-summer-not-sure-if-this-can-revealed-but-thought-ill-ask-nonetheless">How many interns is FB looking to onboard next summer? Not sure if this can revealed but thought I'll ask nonetheless<a href="#how-many-interns-is-fb-looking-to-onboard-next-summer-not-sure-if-this-can-revealed-but-thought-ill-ask-nonetheless" class="hash-link" aria-label="Direct link to How many interns is FB looking to onboard next summer? Not sure if this can revealed but thought I'll ask nonetheless" title="Direct link to How many interns is FB looking to onboard next summer? Not sure if this can revealed but thought I'll ask nonetheless">​</a></h3><p>Don't know and even if I knew, I can't say. We had 4 interns in 2019 and around 10 interns in 2020. FB Singapore office is growing quite rapidly.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="im-actually-more-interested-in-mobile-dev-are-there-open-internship-roles-for-this-in-the-sg-office">I'm actually more interested in mobile dev, are there open internship roles for this in the SG office?<a href="#im-actually-more-interested-in-mobile-dev-are-there-open-internship-roles-for-this-in-the-sg-office" class="hash-link" aria-label="Direct link to I'm actually more interested in mobile dev, are there open internship roles for this in the SG office?" title="Direct link to I'm actually more interested in mobile dev, are there open internship roles for this in the SG office?">​</a></h3><p>There are some teams in FB SG which work on mobile. Prior to starting internship at FB, interns will get to indicate their preference of tech stack and they will be matched to teams/projects which match their preferences.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="do-you-get-to-try-out-different-parts-of-engineering-as-an-intern--junior-swe-in-facebook-eg-if-i-were-doing-back-end-but-i-would-like-to-try-front-end-later-down-the-road">Do you get to try out different parts of engineering as an intern / junior swe in facebook? e.g. if I were doing back end but I would like to try front end later down the road<a href="#do-you-get-to-try-out-different-parts-of-engineering-as-an-intern--junior-swe-in-facebook-eg-if-i-were-doing-back-end-but-i-would-like-to-try-front-end-later-down-the-road" class="hash-link" aria-label="Direct link to Do you get to try out different parts of engineering as an intern / junior swe in facebook? e.g. if I were doing back end but I would like to try front end later down the road" title="Direct link to Do you get to try out different parts of engineering as an intern / junior swe in facebook? e.g. if I were doing back end but I would like to try front end later down the road">​</a></h3><p>Short answer: for interns, not so much. For FTEs, much more autonomy.</p><p>Longer answer: Interns are assigned a project which usually have a pre-defined tech stack. So the engineering work and stack that an intern will be doing is highly dependent on the assigned team and project. If the intern finishes the work early, it's possible to ask for more work from their manager and possibly try out other things. If the internship duration coincides with one of the internal hackathons, interns can participate in them and work on anything they want. For SWEs, there's a process called bootcamp after joining where employees find their own team to join. That gives them more flexibility in deciding what kind of work they want to do. Internal mobility is very good within FB as well. Personally I've done both front end and back end at Facebook.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="fb-culture">FB Culture<a href="#fb-culture" class="hash-link" aria-label="Direct link to FB Culture" title="Direct link to FB Culture">​</a></h2><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="whats-the-difference-between-software-engineer-swe-enterprise-engineer-ee-and-front-end-engineer-this-is-because-i-heard-from-previous-fb-interns-that-they-worked-on-the-full-stack">What's the difference between Software Engineer (SWE), Enterprise Engineer (EE), and Front End Engineer? This is because I heard from previous FB interns that they worked on the full stack.<a href="#whats-the-difference-between-software-engineer-swe-enterprise-engineer-ee-and-front-end-engineer-this-is-because-i-heard-from-previous-fb-interns-that-they-worked-on-the-full-stack" class="hash-link" aria-label="Direct link to What's the difference between Software Engineer (SWE), Enterprise Engineer (EE), and Front End Engineer? This is because I heard from previous FB interns that they worked on the full stack." title="Direct link to What's the difference between Software Engineer (SWE), Enterprise Engineer (EE), and Front End Engineer? This is because I heard from previous FB interns that they worked on the full stack.">​</a></h3><ul><li>SWE - Generalists, they are expected to be able to work on software-related problem given to them and should be able to work across the stack.</li><li>EE - Taken from Facebook's Career Portal: "Facebook's Enterprise Products team is responsible for building integrated, scalable, and robust Enterprise Applications. As a member of Enterprise Products team, you will play a key role in re-imagining productivity by shipping transformative products that serve diverse aspects of the enterprise"</li><li>Front End Engineers - SWE with front end specialization. The interview is in HTML/CSS/JavaScript and there's more focus on domain-specific questions. That doesn't mean Front End Engineers can only work on front end stuff, they can work on anything as long as it is what their team needs and they have alignment with their manager. In my experience, Front End Engineers at FB are highly skilled in front end but can do back end work too. Btw I'm a Front End Engineer 😉</li></ul><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="what-are-the-opportunities-that-are-currently-available-for-the-fb-sg-office-and-perhaps-what-kind-of-people-do-you-typically-look-for-eg-in-terms-of-technical-skills-or-perhaps-other-metrics">What are the opportunities that are currently available for the FB SG office? And perhaps what kind of people do you typically look for? (e.g., in terms of technical skills or perhaps other metrics)<a href="#what-are-the-opportunities-that-are-currently-available-for-the-fb-sg-office-and-perhaps-what-kind-of-people-do-you-typically-look-for-eg-in-terms-of-technical-skills-or-perhaps-other-metrics" class="hash-link" aria-label="Direct link to What are the opportunities that are currently available for the FB SG office? And perhaps what kind of people do you typically look for? (e.g., in terms of technical skills or perhaps other metrics)" title="Direct link to What are the opportunities that are currently available for the FB SG office? And perhaps what kind of people do you typically look for? (e.g., in terms of technical skills or perhaps other metrics)">​</a></h3><p>There are two main orgs in FB SG - Commerce Engineering and Ads &amp; Business Products. The Commerce Engineering teams in Singapore build e-commerce websites to sell Facebook's hardware devices (Quest, Portal) and also sees through the rest of the lifecycle of a purchase - support center, returns, warranties. I'm in the Commerce Engineering org and my team manages <a href="https://www.oculus.com" target="_blank" rel="noopener noreferrer">https://www.oculus.com</a> and <a href="https://portal.facebook.com." target="_blank" rel="noopener noreferrer">https://portal.facebook.com.</a> I don't know too much about the Ads side of things.</p><p>Read an <a href="https://www.facebook.com/careers/life/help-10-peopleor-billions/" target="_blank" rel="noopener noreferrer">article about my manager, Nishita Agarwal</a>, which mentions empathy as a key trait.</p><p>There's also an <a href="https://www.facebook.com/careers/life/software-engineering-in-apac" target="_blank" rel="noopener noreferrer">article about Software Engineering in APAC</a> on the Facebook Careers blog.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="how-is-facebook-singapore-different-from-that-at-hacker-way-in-san-francisco">How is Facebook Singapore different from that at Hacker Way in San Francisco?<a href="#how-is-facebook-singapore-different-from-that-at-hacker-way-in-san-francisco" class="hash-link" aria-label="Direct link to How is Facebook Singapore different from that at Hacker Way in San Francisco?" title="Direct link to How is Facebook Singapore different from that at Hacker Way in San Francisco?">​</a></h3><p>First and foremost, check out the following (old but still relevant) <a href="https://vulcanpost.com/648705/facebook-singapore-office-marina-one/" target="_blank" rel="noopener noreferrer">article</a>.</p><p>Nit - Hacker Way is not in San Francisco, it is in Menlo Park. Perhaps you meant SF Bay Area. Anyway, FB SG and FB US differ is quite a lot of ways. There are too many to list but I'll list the most obvious ones.</p><ul><li>Career Progression - FB US, being the HQ and where the company started, has the most number of teams and you have all levels of seniority of folks there. In FB SG, there are fewer teams and due to the size of the office now, there isn't a need for extremely senior engineers yet. So if you're talking about long term career progression, SG definitely loses out here. But don't need to think so far la, FB SG is still big enough for you to get to senior engineer position and earn enough to live comfortably for the rest of your life.</li><li>Projects - Primarily product teams and hires primarily SWEs and EEs, while FB US has a good mix of teams, including infrastructure teams and hires across all roles. So if you're interested in working on infra stuff like our internal logging framework, GraphQL, our internal ORM, you'd have to look at non-SG offices.</li><li>Changing Teams - SG has fewer teams, so if you were looking to change teams but remain in Singapore, the choices are more limited.</li><li>Company Culture - You don't get to attend the events held only at the HQ in-person, such as Zuck's Q&amp;A or company town halls or the summer and holiday parties (but there are local versions of them).</li><li>Food - Smaller selection of cafes in SG. The food is still pretty darn good though. There's nothing to complain about free food.</li><li>Office - Smaller office in SG, but still one of the coolest in SG. Menlo Park Headquarters is amazing, there's an arcade, board games room, a barber, ice cream shop, a gadgets vending machine, and more. It looks like Universal Studios at night. I'll just leave this <a href="https://www.youtube.com/watch?v=cY3sMN3wohg" target="_blank" rel="noopener noreferrer">video</a> here.</li><li>$$$ - FB pay is top tier in both US and SG. However in SG, you have to pay less tax and cheaper living expenses. In SG, I earn less but save more due to the large difference in taxes.</li><li>Taxes - SG tax is crazy low compared to US. US taxes you on every damn thing, including the capital gains from your stocks and bank interest earned (WTF), but SG doesn't.</li><li>Engineering Culture - Similar-ish because quite a number of engineers in FB SG moved here from FB US, including myself. But being a smaller office, we don't have as many extremely senior engineers.</li><li>Social Security - I thought Bay Area was relatively safer than the smaller US states, but these days <a href="https://www.youtube.com/watch?v=0ybiHCxNb3w" target="_blank" rel="noopener noreferrer">driving on the highway also can get shot</a>, so I don't know anymore. I think SG is definitely safer, at least you definitely won't receive any racist remarks or comments while walking on the streets.</li><li>Personal Happiness - Obviously you'd have fewer friends and family if you're in the US. If that's important to you then life there might be hard. But you can make new angmoh friends or hang out with the steadily growing SG community over there.</li><li>Dating Scene - If you're single, it might be hard to find a long-term partner there. The female Singaporean engineers there are mostly taken, those that are not, probably want to stay single. Dating there will be quite hard! I know of friends who got together with Americans/immigrants and then they get a green card and plan to stay there for good. You can consider that too.</li></ul><p>I would describe myself as a small fish in a big pond when I was in FB US and am now a big fish in a smaller pond in FB SG. I enjoy my current work and team in FB SG and I see myself being in this role for a few more years at least.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="are-facebook-internal-hackathons-only-within-branches-eg-only-within-fb-singapore">Are Facebook internal hackathons only within branches? Eg. only within FB Singapore?<a href="#are-facebook-internal-hackathons-only-within-branches-eg-only-within-fb-singapore" class="hash-link" aria-label="Direct link to Are Facebook internal hackathons only within branches? Eg. only within FB Singapore?" title="Direct link to Are Facebook internal hackathons only within branches? Eg. only within FB Singapore?">​</a></h3><p>They are kinda global in the sense that the timelines are global but each region has different people leading it for the regional offices. Participating teams will take part in the regional selection and winners of the regional ones come together to present to the global heads.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="what-is-the-difference-between-software-engineer-and-front-end-engineer-at-facebook-and-considering-that-my-experience-lies-mostly-in-front-end-engineering-should-i-only-be-applying-to-the-fe-role">What is the difference between Software Engineer and Front end Engineer at Facebook, and considering that my experience lies mostly in Front End Engineering, should I only be applying to the FE role?<a href="#what-is-the-difference-between-software-engineer-and-front-end-engineer-at-facebook-and-considering-that-my-experience-lies-mostly-in-front-end-engineering-should-i-only-be-applying-to-the-fe-role" class="hash-link" aria-label="Direct link to What is the difference between Software Engineer and Front end Engineer at Facebook, and considering that my experience lies mostly in Front End Engineering, should I only be applying to the FE role?" title="Direct link to What is the difference between Software Engineer and Front end Engineer at Facebook, and considering that my experience lies mostly in Front End Engineering, should I only be applying to the FE role?">​</a></h3><p>Differences answered above. If you're solid in your Front End web fundamentals (HTML/CSS/JS), and suck horribly with DSA, I think you might stand a better chance going through the Front End interview loop. Unfortunately as of writing FB SG doesn't hire Front End Engineers so you'd have to look overseas for such a role.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="in-the-past-one-year-i-have-been-hearing-quite-a-lot-of-things-about-fb-reality-labs-and-i-heard-that-quite-a-significant-portion-of-fb-engineers-are-working-on-it-now-and-i-think-you-are-as-well-do-you-have-any-thoughts-about-how-it-feels-to-work-there-and-perhaps-the-future-prospects">In the past one year, I have been hearing quite a lot of things about FB Reality Labs, and I heard that quite a significant portion of FB engineers are working on it now (and I think you are as well?)... do you have any thoughts about how it feels to work there and perhaps the future prospects?<a href="#in-the-past-one-year-i-have-been-hearing-quite-a-lot-of-things-about-fb-reality-labs-and-i-heard-that-quite-a-significant-portion-of-fb-engineers-are-working-on-it-now-and-i-think-you-are-as-well-do-you-have-any-thoughts-about-how-it-feels-to-work-there-and-perhaps-the-future-prospects" class="hash-link" aria-label="Direct link to In the past one year, I have been hearing quite a lot of things about FB Reality Labs, and I heard that quite a significant portion of FB engineers are working on it now (and I think you are as well?)... do you have any thoughts about how it feels to work there and perhaps the future prospects?" title="Direct link to In the past one year, I have been hearing quite a lot of things about FB Reality Labs, and I heard that quite a significant portion of FB engineers are working on it now (and I think you are as well?)... do you have any thoughts about how it feels to work there and perhaps the future prospects?">​</a></h3><p>I work on selling FRL hardware, not directly on FRL hardware/software itself. If you haven't heard of the <a href="https://www.theverge.com/22588022/mark-zuckerberg-facebook-ceo-metaverse-interview" target="_blank" rel="noopener noreferrer">metaverse</a>, you should read up about it. I don't have too many opinions on the future of FRL but I can say that Quest 2 is the market leader in terms of VR headsets and <a href="https://www.roadtovr.com/zuckerberg-quest-2-mainstream-vr-headset-facebook-q4-2020-earnings/" target="_blank" rel="noopener noreferrer">Quest 2 was a major driver behind FB's $885 million 2020 Q4 non-ad revenue</a>.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="what-engineers-is-facebook-looking-for---especially-for-new-grads-at-the-moment-i-have-knowledge-on-a-breadth-of-tools-but-when-asked-on-under-the-hood-stuff-i-can-only-explain-what-the-tool--framework-is-trying-to-extract-instead-of-going-in-depth-as-to-how-stuff-actually-works-is-the-firm-looking-for-new-grad-engineers-who-are-language--tool--framework-agnostic-and-can-work-towards-building-the-skillset-within-the-firm---or-people-who-already-have-a-speciality">What engineers is Facebook looking for - especially for New Grads? At the moment, I have knowledge on a breadth of tools but when asked on under the hood stuff, I can only explain what the tool / framework is trying to extract instead of going in depth as to how stuff actually works. Is the firm looking for new grad engineers who are language / tool / framework agnostic and can work towards building the skillset within the firm - or people who already have a speciality?<a href="#what-engineers-is-facebook-looking-for---especially-for-new-grads-at-the-moment-i-have-knowledge-on-a-breadth-of-tools-but-when-asked-on-under-the-hood-stuff-i-can-only-explain-what-the-tool--framework-is-trying-to-extract-instead-of-going-in-depth-as-to-how-stuff-actually-works-is-the-firm-looking-for-new-grad-engineers-who-are-language--tool--framework-agnostic-and-can-work-towards-building-the-skillset-within-the-firm---or-people-who-already-have-a-speciality" class="hash-link" aria-label="Direct link to What engineers is Facebook looking for - especially for New Grads? At the moment, I have knowledge on a breadth of tools but when asked on under the hood stuff, I can only explain what the tool / framework is trying to extract instead of going in depth as to how stuff actually works. Is the firm looking for new grad engineers who are language / tool / framework agnostic and can work towards building the skillset within the firm - or people who already have a speciality?" title="Direct link to What engineers is Facebook looking for - especially for New Grads? At the moment, I have knowledge on a breadth of tools but when asked on under the hood stuff, I can only explain what the tool / framework is trying to extract instead of going in depth as to how stuff actually works. Is the firm looking for new grad engineers who are language / tool / framework agnostic and can work towards building the skillset within the firm - or people who already have a speciality?">​</a></h3><p>FB uses Flow (for JavaScript typechecking) and Hack (typed version of PHP) which most people outside of FB won't use. If we were to hire only people who have prior experience with them, then we'd have a really hard time filling our head count.</p><p>When tech companies hire SWEs, usually it's for a generalist position and they would expect the employees to pick up any new language or tool to get the job down. If you master your fundamentals, doing that shouldn't be too hard. So really most companies would want to hire people who can learn fast and adapt. The exception is if you're a super senior person (think principal level and above), then you'd be hired for your specialized skillsets probably because the company needs some subject-matter expert in that area. But most of you are still undergrads, that doesn't apply to you.</p><p>At the end of the day, many language and tools are similar-ish. New technologies learn from existing technologies and improve on them, learning new technologies isn't always that foreign.</p><p>However, to be a good SWE, I would recommend peeking beneath the abstraction layers and understanding what problem this technology is trying to solve, how it works under the hood, and what advantages/disadvantages it has compared to similar technologies. That's why I love Open Source, all the code is public - you can read the code, look at how the projects are structured, and even contribute to them. I also love reading articles comparing technologies so that I know what tradeoffs the projects are making and what's the right tool for the job. Don't be a mindless drone who uses technologies without knowing why you are using it instead of alternatives. That'll be an easy way to get phased out really soon, especially considering how fast technologies move.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="in-my-conversations-with-most-engineers-from-us-tech-companies-i-often-hear-that-one-of-the-major-shortcomings-of-working-in-the-singapore-offices-is-that-they-are-more-auxiliary-in-their-functions-and-that-opportunities-for-core-engineering-work-are-few-and-far-between-since-you-have-worked-in-both-the-menlo-park-and-sg-offices-id-love-to-hear-your-response-to-this-within-the-context-of-facebook">In my conversations with most engineers from US tech companies, I often hear that one of the major shortcomings of working in the Singapore offices is that they are more auxiliary in their functions, and that opportunities for "core" engineering work are few and far between. Since you have worked in both the Menlo Park and SG offices, I'd love to hear your response to this within the context of Facebook.<a href="#in-my-conversations-with-most-engineers-from-us-tech-companies-i-often-hear-that-one-of-the-major-shortcomings-of-working-in-the-singapore-offices-is-that-they-are-more-auxiliary-in-their-functions-and-that-opportunities-for-core-engineering-work-are-few-and-far-between-since-you-have-worked-in-both-the-menlo-park-and-sg-offices-id-love-to-hear-your-response-to-this-within-the-context-of-facebook" class="hash-link" aria-label="Direct link to In my conversations with most engineers from US tech companies, I often hear that one of the major shortcomings of working in the Singapore offices is that they are more auxiliary in their functions, and that opportunities for &quot;core&quot; engineering work are few and far between. Since you have worked in both the Menlo Park and SG offices, I'd love to hear your response to this within the context of Facebook." title="Direct link to In my conversations with most engineers from US tech companies, I often hear that one of the major shortcomings of working in the Singapore offices is that they are more auxiliary in their functions, and that opportunities for &quot;core&quot; engineering work are few and far between. Since you have worked in both the Menlo Park and SG offices, I'd love to hear your response to this within the context of Facebook.">​</a></h3><p>Answered above in the US vs SG comparison.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="personal-experience">Personal Experience<a href="#personal-experience" class="hash-link" aria-label="Direct link to Personal Experience" title="Direct link to Personal Experience">​</a></h2><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="can-i-know-about-the-project-youre-involved-with-in-fb">Can I know about the project you're involved with in FB?<a href="#can-i-know-about-the-project-youre-involved-with-in-fb" class="hash-link" aria-label="Direct link to Can I know about the project you're involved with in FB?" title="Direct link to Can I know about the project you're involved with in FB?">​</a></h3><p>I'm currently working on a multi-year project which I can't reveal the details until we launch next year. Last year, I worked on Facebook's e-commerce websites - <a href="https://www.oculus.com" target="_blank" rel="noopener noreferrer">https://www.oculus.com</a> and <a href="https://portal.facebook.com." target="_blank" rel="noopener noreferrer">https://portal.facebook.com.</a> I built design systems in React and a CMS framework to allow non-engineers to change the marketing content on oculus.com anytime they wish. One of the problems my team works on solving is to decouple marketing launches from engineering work, enabling the business teams to launch new products and campaigns on our e-commerce websites.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="why-did-you-choose-front-end-engineering-and-separately-how-do-you-think-the-workload-at-facebook-compares-to-that-of-other-top-companies-such-as-google">Why did you choose front end engineering, and separately, how do you think the workload at Facebook compares to that of other "top" companies such as Google?<a href="#why-did-you-choose-front-end-engineering-and-separately-how-do-you-think-the-workload-at-facebook-compares-to-that-of-other-top-companies-such-as-google" class="hash-link" aria-label="Direct link to Why did you choose front end engineering, and separately, how do you think the workload at Facebook compares to that of other &quot;top&quot; companies such as Google?" title="Direct link to Why did you choose front end engineering, and separately, how do you think the workload at Facebook compares to that of other &quot;top&quot; companies such as Google?">​</a></h3><p>As a student I also liked to do design, so it was very cool for me to be able to implement my own designs on the web. That's why I chose to do client side engineering. As to why the web, I like the fast iteration and release cycle of building on web platforms. My first hardcore CS course was actually CS3217 (I only took CS1010E and CS1020E prior to that), so the first proper software I wrote was on iOS platform. Developing on mobile is too troublesome for my liking, because I often need a physical device, compiling the app takes so long, and you have to play by the platform's rules. They could take down your app anytime they want. On the other hand, the web is much more open and anyone can launch any website they want in a matter of hours. Being able to show people what I built by giving them a URL is an exciting experience that never gets old.</p><p>I haven't worked at Google so I can't comment on workload at Google. But Google is known as a good company to "rest and vest" whereas Facebook has faster promo cycles and rewards their top performing employees disproportionately.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="am-i-correct-to-interpret-that-you-started-at-grab-after-graduation-what-internships-did-you-do-during-your-studies">Am I correct to interpret that you started at Grab after graduation? What internships did you do during your studies?<a href="#am-i-correct-to-interpret-that-you-started-at-grab-after-graduation-what-internships-did-you-do-during-your-studies" class="hash-link" aria-label="Direct link to Am I correct to interpret that you started at Grab after graduation? What internships did you do during your studies?" title="Direct link to Am I correct to interpret that you started at Grab after graduation? What internships did you do during your studies?">​</a></h3><p>Yes I worked at Grab for two years after graduation, you can check out my LinkedIn. Regarding university internships, Year 2 I did CVWO, Year 3 NOC in Silicon Valley for EasilyDo (now called Edison), Year 4 I was a Game Producer (non-programmer!) in SUTD Game Lab (previously MIT Gambit program). Back during my time, overseas internships weren't common. The number of Google and FB interns each year was fewer than 10.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="im-also-curious-about-what-you-do-in-your-role-as-a-front-end-engineer-and-why-you-decided-to-work-at-facebook">I'm also curious about what you do in your role as a Front End engineer, and why you decided to work at Facebook?<a href="#im-also-curious-about-what-you-do-in-your-role-as-a-front-end-engineer-and-why-you-decided-to-work-at-facebook" class="hash-link" aria-label="Direct link to I'm also curious about what you do in your role as a Front End engineer, and why you decided to work at Facebook?" title="Direct link to I'm also curious about what you do in your role as a Front End engineer, and why you decided to work at Facebook?">​</a></h3><p>As a Front End Engineer at Facebook, I primarily write JavaScript and some Hack (PHP with types). Being at Facebook is fun because I get to do front end work which isn't product, such as building React-based design systems, front end tooling, lint rules, CSS frameworks (Infima), Static site generators (Docusaurus).</p><p>Facebook is the leader in terms of front end web technologies. If you develop on the web, you would more likely than not, be using some of Facebook's open source work, whether directly or not. There's React, Flux, Jest, GraphQL, React Native, Docusaurus, Draft.js, Relay, Flow, just to name a few. By working at Facebook, I also got the chance to work on Docusaurus and for two years, led the development of Docusaurus v2, which is one of the projects I am most proud of in my career. Today, Docusaurus is powering most of Facebook's open source websites. Many of the open source leaders I look up to were also at Facebook. I got to contribute to many high profile open source front end projects by Facebook and also work alongside the creator of React (Jordan Walke) on improving the front end of Facebook's Ads Interfaces. Not to mention that Facebook employees will be the first to dogfood React's new APIs and participate in design discussions and influence the future roadmap of React.</p><p>On the culture and working environment front, I have always vibed with Facebook's hacker culture and products more than Google's, so naturally I chose Facebook over Google even though their offers were comparable and I was given a chance to work on Google's search results page.</p><p>Facebook is the best place for a Front End Engineer to grow and learn from the very best. So it was the most obvious choice for me and I'm glad I made that decision. It's the best place I've worked at thus far (almost 4 years!) and also financially a great choice.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="could-i-ask-about-your-personal-experiences-at-fb-in-terms-of-learning-opportunities-and-the-work-you-do-">Could I ask about your personal experiences at FB in terms of learning opportunities and the work you do? :)<a href="#could-i-ask-about-your-personal-experiences-at-fb-in-terms-of-learning-opportunities-and-the-work-you-do-" class="hash-link" aria-label="Direct link to Could I ask about your personal experiences at FB in terms of learning opportunities and the work you do? :)" title="Direct link to Could I ask about your personal experiences at FB in terms of learning opportunities and the work you do? :)">​</a></h3><p>The learning opportunities depend on many factors - individual preferences, team, projects, luck. Facebook is such a large company that covers virtually almost every domain of technology one can be interested in. With great internal mobility, it isn't hard to find a project that one will be passionate about. The benefits (and also downsides) of working at such a large company is that you often have to think about scalability in your work. How do you scale your work to the tens of thousands of engineers using your libraries or the billions of users using your product?</p><p>Facebook is also a company which takes the growth of employees very seriously. We have clear levels and expectations for engineers, supportive managers who really care about the growth of their team, mentorship programs available for anyone who wants to grow in a particular area. One of a manager's core responsibilities is to grow their team and employees, and they are being evaluated on that, so you can be sure that they treat it seriously. We have weekly 1:1s with managers and with our leads. Personally I'm mentoring around 3-4 junior engineers and helping them to grow into senior engineers in both their technical and organizational skills.</p><p>I've answered about my work above.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="what-made-you-and-the-team-came-up-with-the-idea-of-nusmods-and-nuswhispers-i-think-its-really-great-to-code-for-good-and-fulfilling-stuff-rather-than-coding-for-corporate-means">What made you and the team came up with the idea of NUSMods and NUSWhispers? I think its really great to code for good and fulfilling stuff rather than coding for corporate means<a href="#what-made-you-and-the-team-came-up-with-the-idea-of-nusmods-and-nuswhispers-i-think-its-really-great-to-code-for-good-and-fulfilling-stuff-rather-than-coding-for-corporate-means" class="hash-link" aria-label="Direct link to What made you and the team came up with the idea of NUSMods and NUSWhispers? I think its really great to code for good and fulfilling stuff rather than coding for corporate means" title="Direct link to What made you and the team came up with the idea of NUSMods and NUSWhispers? I think its really great to code for good and fulfilling stuff rather than coding for corporate means">​</a></h3><p>I didn't come up with NUSMods. <a href="https://nusmods.com/team" target="_blank" rel="noopener noreferrer">Beng</a> did. I helped to build features (my favorite being theming and dark mode), recruit members into the team, and also started the v3 rewrite which is the one you are using now. Most of the credit would go to <a href="https://www.github.com/ZhangYiJiang" target="_blank" rel="noopener noreferrer">Yi Jiang</a>, <a href="https://www.github.com/li-kai" target="_blank" rel="noopener noreferrer">Li Kai</a> and <a href="https://www.github.com/taneliang" target="_blank" rel="noopener noreferrer">E-Liang</a> for the current version. NUSMods code base isn't exactly that big, but it took us over a year of work to rewrite it on a modern stack.</p><p>Shout-out to <a href="https://www.github.com/chrisgzf" target="_blank" rel="noopener noreferrer">Christopher Goh</a> for taking the helm now! Joining NUSMods was one of the best decisions in my life, as impacted the lives of so many students (I daresay above 100k), learnt so much from working on it (it's a relatively complex web application), and it helped me grow my network of like-minded individuals. <strong>We need more people to contribute so that the project can live on.</strong> Notice that the NUSMods core team (and alumni) have pretty zai backgrounds? Correlation or causation? Maybe both.</p><p>I came up with the idea for NUSWhispers but I didn't write much code for it. I was tutor for a web development course (CP3101B) back in 2015 and I proposed that idea to some students. I'm glad they did a darn good job of it. Back then I wanted to create a platform that could connect and help students around the school and the idea of an anonymous platform/page sounded like fun.</p><p>I like building stuff that people use, and after graduation I try to open source my stuff. This website you're reading now is also one of my largest open source work (in terms of popularity).</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="i-understand-that-youve-been-in-fb-for-a-couple-of-years-and-worked-in-tech-companies-like-grab-as-well-given-your-prevcurrent-experiences--what-youve-heard-from-fellow-colleagues-and-peers-in-your-opinion-what-makes-fb-different-from-the-other-tech-companies-in-terms-of-work-done-and-how-an-entry-engineer-could-expect-to-contribute">I understand that you've been in FB for a couple of years, and worked in tech companies like Grab as well, given your prev/current experiences + what you've heard from fellow colleagues and peers, in your opinion what makes FB different from the other tech companies in terms of work done and how an entry engineer could expect to contribute?<a href="#i-understand-that-youve-been-in-fb-for-a-couple-of-years-and-worked-in-tech-companies-like-grab-as-well-given-your-prevcurrent-experiences--what-youve-heard-from-fellow-colleagues-and-peers-in-your-opinion-what-makes-fb-different-from-the-other-tech-companies-in-terms-of-work-done-and-how-an-entry-engineer-could-expect-to-contribute" class="hash-link" aria-label="Direct link to I understand that you've been in FB for a couple of years, and worked in tech companies like Grab as well, given your prev/current experiences + what you've heard from fellow colleagues and peers, in your opinion what makes FB different from the other tech companies in terms of work done and how an entry engineer could expect to contribute?" title="Direct link to I understand that you've been in FB for a couple of years, and worked in tech companies like Grab as well, given your prev/current experiences + what you've heard from fellow colleagues and peers, in your opinion what makes FB different from the other tech companies in terms of work done and how an entry engineer could expect to contribute?">​</a></h3><p>I have only worked at two companies, so I wouldn't say I have seen a lot. But a few things stand out to me about FB as compared to other smaller companies:</p><ul><li>Top of the market compensation. It's really crazy a lot. Maybe not as much as quant trading firms, but if you also factor in other stuff like interesting work, social impact, then to me FB still comes up on top.</li><li>Bottom-up culture. In some companies, engineers are treated like mindless drones and expected to just execute. But not at FB. At FB, engineers are expected to do a fair bit of product and project management, propose ideas and lead the roadmap for their team, especially if their team's product is a highly technical one. We have lots of flexibility and autonomy to manage our own work and what we want to do with our time. As someone who has many ideas and likes to build them, it suits me well.</li><li>Lots of responsibilities given. FB trusts you to do the right thing. You could technically bring down facebook.com on your first day of work if you were careless (or evil).</li></ul><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="how-do-you-run-your-team-this-question-is-relating-to-the-culture-you-foster-within-your-own-team">How do you run your team? This question is relating to the culture you foster within your own team.<a href="#how-do-you-run-your-team-this-question-is-relating-to-the-culture-you-foster-within-your-own-team" class="hash-link" aria-label="Direct link to How do you run your team? This question is relating to the culture you foster within your own team." title="Direct link to How do you run your team? This question is relating to the culture you foster within your own team.">​</a></h3><p>We have very few processes. My team is excellent so I trust them to do the right things and they don't disappoint. In my current multi-year project, I broke it down into smaller parts and pieces and assigned them to my teammates according to their interests and expertise. I set the guidelines and some general engineering principles, make sure my team is aware of them and we stick to them when developing. We set goals for the half and then we're pretty much running the project each on our own. On a day-to-day basis, I spent about half my time writing code and the other half reviewing code and attending meetings. I'm also mentoring a few engineers and I guide the newer engineers more and provide them with constant feedback on technical work and behavioral changes that could help them to grow.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="how-has-facebook-impacted-your-career-in-terms-of-learning-and-growth-and-since-you-probably-have-many-fang-companies-to-choose-from-what-is-facebook-unique-selling-point-to-you-personally">How has Facebook impacted your career in terms of learning and growth and since you probably have many FANG companies to choose from, what is Facebook unique selling point to you personally?<a href="#how-has-facebook-impacted-your-career-in-terms-of-learning-and-growth-and-since-you-probably-have-many-fang-companies-to-choose-from-what-is-facebook-unique-selling-point-to-you-personally" class="hash-link" aria-label="Direct link to How has Facebook impacted your career in terms of learning and growth and since you probably have many FANG companies to choose from, what is Facebook unique selling point to you personally?" title="Direct link to How has Facebook impacted your career in terms of learning and growth and since you probably have many FANG companies to choose from, what is Facebook unique selling point to you personally?">​</a></h3><p>By working at Facebook, I got to see how large engineering teams operate at scale, how products are developed and launched to millions of users, and learn from the very best engineers in the world.</p><p>Front end and open source. I answered in more detail above.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="are-most-of-the-projects-at-facebook-internal-tools-for-the-company-or-more-for-the-publicusers-or-does-this-depend-on-the-team-you-work-at">Are most of the projects at Facebook internal tools for the company or more for the public/users? Or does this depend on the team you work at?<a href="#are-most-of-the-projects-at-facebook-internal-tools-for-the-company-or-more-for-the-publicusers-or-does-this-depend-on-the-team-you-work-at" class="hash-link" aria-label="Direct link to Are most of the projects at Facebook internal tools for the company or more for the public/users? Or does this depend on the team you work at?" title="Direct link to Are most of the projects at Facebook internal tools for the company or more for the public/users? Or does this depend on the team you work at?">​</a></h3><p>There's a good mix. Yes it depends on location as well. Most infra teams and in the bigger engineering offices (US, London). Singapore is still new and growing rapidly.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="career">Career<a href="#career" class="hash-link" aria-label="Direct link to Career" title="Direct link to Career">​</a></h2><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="id-like-to-seek-your-advice-on-what-i-should-be-prioritizing-in-my-next-two-years-of-school-in-order-to-gain-relevant-skillsexperience-to-stand-out-to-fb-recruiters-when-i-graduate">I'd like to seek your advice on what I should be prioritizing in my next two years of school in order to gain relevant skills/experience to stand out to FB recruiters when I graduate.<a href="#id-like-to-seek-your-advice-on-what-i-should-be-prioritizing-in-my-next-two-years-of-school-in-order-to-gain-relevant-skillsexperience-to-stand-out-to-fb-recruiters-when-i-graduate" class="hash-link" aria-label="Direct link to I'd like to seek your advice on what I should be prioritizing in my next two years of school in order to gain relevant skills/experience to stand out to FB recruiters when I graduate." title="Direct link to I'd like to seek your advice on what I should be prioritizing in my next two years of school in order to gain relevant skills/experience to stand out to FB recruiters when I graduate.">​</a></h3><p>Work on being a good engineer who has mastery of the fundamentals. Good grades, impressive internship experiences, side projects, etc are important but only for getting the interview. At the end of the day it doesn't matter how much your CAP is if you can't answer the interview questions, which boils down to your mastery of the skills needed to being a SWE. Do things that you are interested in AND also benefits you.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="just-wanted-to-hear-your-opinion-on-how-much-emphasis-i-should-place-on-personal-projects-grades-leetcode-hackathonscoding-challenges-job-experiences-cca-involvement-etc">Just wanted to hear your opinion on how much emphasis I should place on personal projects, grades, LeetCode, hackathons/coding challenges, job experiences, CCA involvement, etc.<a href="#just-wanted-to-hear-your-opinion-on-how-much-emphasis-i-should-place-on-personal-projects-grades-leetcode-hackathonscoding-challenges-job-experiences-cca-involvement-etc" class="hash-link" aria-label="Direct link to Just wanted to hear your opinion on how much emphasis I should place on personal projects, grades, LeetCode, hackathons/coding challenges, job experiences, CCA involvement, etc." title="Direct link to Just wanted to hear your opinion on how much emphasis I should place on personal projects, grades, LeetCode, hackathons/coding challenges, job experiences, CCA involvement, etc.">​</a></h3><p>This is a hard question to answer because everyone is different. Some people are just born smart and don't have to study much and still get their grades. Some people are just not cut out for studying, but are great at building impactful side projects. Know your comparative advantage and leverage it. Personally, I could probably do back end work if I tried hard enough but I just don't enjoy doing it. I leverage my passion for design and attention to detail to build user interfaces and related tooling instead.</p><p>Strike a balance between breadth and depth. As undergrads, you can have a lot of room to explore and also relatively low stakes environment to fail. Take this chance to try out a lot of things, then choose what you really like and are good at. You can specialize after you have tried out enough things and know what you want and are good at. I've tried out back end, mobile, game development and prefer front end development the most.</p><p>By now you should know that not every investment reaps the same level of rewards. CCAs which aren't related to CS can be fun, widen your social circle and improve your soft skills. If that's important to you, by all means go ahead. But if you suck at programming, and spend all your spare time on random CCAs which doesn't help you in your craft, then you'll probably end up as a mediocre programmer. Back in school, I never really had an official CCA - I chose to do tutoring, work on open source stuff like NUSMods, and working as a boarding councillor at NUS High (sort of like RA but for NUS High Students), which gave me free accommodation near school). I liked the balance and diversity of the activities I had.</p><p>My CAP isn't that high - got first class but not near 5.00. I reckon I could get A+ for every module if I really spent all my time studying, but studying isn't exactly my favorite activity to do. I got my As usually from modules which were project-heavy. I value and enjoy the hands on experience more than the mugging experience.</p><p>I'm very lucky that Software Engineering exists so that there's something meaningful which I can spend my time on, I enjoy doing, and also pays the bills.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="i-want-to-learn-as-much-as-possible-from-you-about-topics-that-might-benefit-me-as-im-graduating-next-year">I want to learn as much as possible from you about topics that might benefit me as I'm graduating next year.<a href="#i-want-to-learn-as-much-as-possible-from-you-about-topics-that-might-benefit-me-as-im-graduating-next-year" class="hash-link" aria-label="Direct link to I want to learn as much as possible from you about topics that might benefit me as I'm graduating next year." title="Direct link to I want to learn as much as possible from you about topics that might benefit me as I'm graduating next year.">​</a></h3><p>DSA. No DSA mastery, no passing of interviews, no Facebook job offer.</p><hr><p><strong><em>I am not a recruiter and I might have answered some of the recruiting or internship-related questions wrongly, so take them with a grain of salt. Opinions expressed are my own and do not represent the views of my employer.</em></strong></p>]]></content>
        <author>
            <name>Yangshun Tay</name>
            <uri>https://github.com/yangshun</uri>
        </author>
        <category label="career" term="career"/>
        <category label="facebook" term="facebook"/>
        <category label="meta" term="meta"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Importance of Communicating Effectively as Engineers]]></title>
        <id>https://www.techinterviewhandbook.org/blog/importance-of-communicating-effectively-as-engineers</id>
        <link href="https://www.techinterviewhandbook.org/blog/importance-of-communicating-effectively-as-engineers"/>
        <updated>2021-04-12T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[_tl;dr: communicating effectively broadly and frequently helps you grow as an engineer and we have many tools built to do that!_]]></summary>
        <content type="html"><![CDATA[<p><strong><em>tl;dr: communicating effectively broadly and frequently helps you grow as an engineer and we have many tools built to do that!</em></strong></p><p>At Facebook where I work at, strong communication is crucial for a successful career. As engineers, sometimes we get too focused on execution and it's easy to forget about communicating our work broadly. Perhaps some of us are new to a large engineering organization and previously did not have the tools to foster communication nor was it emphasized by the company.</p><p>I love to code. Personally, I would love to shut off all communication channels and focus entirely on coding if I could. However, doing that will probably have disastrous effects. Communication is super important and I learnt that the hard way when I first started at Facebook. In my first year at Facebook, I made a few painful mistakes related to communication. I changed the project plans and timeline without informing my tech lead, resulting in my teammate having to cover me at the last minute and do the work I reprioritized without telling anyone. In another instance, I didn't communicate that I was going to do some work that my teammate had planned to do, resulting in wasted efforts. From then on, I made a mental note to myself to communicate broadly and early wherever possible and seek alignment. I'd err on the side of over-communicating rather than under-communicating (though sometimes I still forget).</p><div class="text--center"><figure><img loading="lazy" alt="You cannot have bad communication if you never communicate" src="/assets/images/bad-communication-f27562ebe06bd05ccc778cd741145ba1.jpg" class="img_ev3q"><figcaption>Just like you can't cause any bugs if you don't write any code.</figcaption></figure></div><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="why-is-communication-important">Why is communication important?<a href="#why-is-communication-important" class="hash-link" aria-label="Direct link to Why is communication important?" title="Direct link to Why is communication important?">​</a></h2><p>Most engineers in organizations don't work alone. When you work with people, you have to communicate with them — to set expectations, seek feedback, align on decisions, what not. However, given that remote working is the norm for most of us now, we rarely see each other face to face (I haven't met anyone on the team in person since remote work started). In product teams like the ones we have in Commerce Engineering Singapore, we work with a myriad of XFN partners across the globe in different timezones. These factors make it challenging to be in regular touch and makes it even more important to communicate widely. We have to explicitly communicate through stand ups, weekly syncs, retros, Work Chat messages, Workplace posts, etc.</p><p>Communicating well frequently and broadly helps you to:</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="broaden-your-impact">Broaden your impact<a href="#broaden-your-impact" class="hash-link" aria-label="Direct link to Broaden your impact" title="Direct link to Broaden your impact">​</a></h3><p>If you have built something that's useful for yourself/your team, chances are, they will be useful for others as well, so tell more people about it! My first project at Facebook was to build Sentinel, an internal code attribution tool for the humongous Ads code base with nearing a decade's history. The tool solved the problem of people/bots changing a set of files which they were unfamiliar with and not knowing who the best reviewers for those changes were. Nothing about the tool was specific to Ads. After building an MVP (Minimum Viable Product) version of the tool, we reached out to various tools within Facebook which use their own bespoke code attribution approach and we eventually helped to replace them with Sentinel attribution. We also integrated it with popular tools like our IDE (a FB-specific VS Code), our internal component library, and our internal in-browser code explorer. At the end of that half (2018 H1), Sentinel was used by 2% of all diffs at Facebook, which was a pretty significant number. As of writing, over half a million diffs at Facebook have used Sentinel and I would say a huge part of its success was due to the network effects generated by word-of-mouth advertising by our early adopters, our push to integrate it into popular tools, and links within these tools that Sentinel was powering the attribution.</p><p>Takeaway — Make a noise! <strong>A good product that many people use has more impact than an excellent product that few people use.</strong> Sentinel wasn't perfect at the time of launch but it worked well enough. One of the easiest ways to get people to use your product is to tell people about it! It can't get any easier. Getting some people to use your product early also gives you the chance to iterate on feedback and make it better before you launch it to a wider audience.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="improve-your-career-performance-and-progression">Improve your career performance and progression<a href="#improve-your-career-performance-and-progression" class="hash-link" aria-label="Direct link to Improve your career performance and progression" title="Direct link to Improve your career performance and progression">​</a></h3><p>Communication has a huge impact on one's performance. If you aren't able to effectively update your manager on what you are doing, it is hard for them to help you stay on track to ensure you meet expectations for the half. At Facebook, Communication is explicitly stated as an evaluation axis of our performance review, but realistically, every axis involves communication. We saw how effective communication helps expand one's project impact in the Sentinel example above. Better engineering practices should be communicated to folks who work on the same code base so as to efficiently deliver products of excellent implementation quality. Strong communication also leads to successful conflict resolution, mentorship and recruiting.</p><p>Here's a scenario on how communication impacts calibrations - Alice's manager put her up for promotion to Staff Engineer after successfully delivering on an impactful project. However, due to lack of communication and visibility about her project, it's the first time other managers in the room heard about this project and many raised questions regarding it due to their unfamiliarity with it. This made the calibration process much harder than it should have been had Alice communicated about her project broadly earlier on.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="influence">Influence<a href="#influence" class="hash-link" aria-label="Direct link to Influence" title="Direct link to Influence">​</a></h3><p>Influence is a core skill you need to develop as you grow your career, and communication is at the core of it. Senior folks are leaders and influential and are effective communicators. This is true regardless of IC (individual contributor) track or management track. Senior Engineers are expected to be able to influence the engineering culture in the broader team and possess strong communication skills to be able to explain technical information effectively. Recently I attended a meeting with a very senior Software Engineer and was blown away by how he managed to explain the concept of cookies in such simple terms to the non-technical folks in the meeting and how effective communication helps you to get things done. For those who are interested in embarking on the manager track in future, please also know that most of an engineering manager's job involves communication.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="foster-alignment-and-save-effort-down-the-road">Foster alignment and save effort down the road<a href="#foster-alignment-and-save-effort-down-the-road" class="hash-link" aria-label="Direct link to Foster alignment and save effort down the road" title="Direct link to Foster alignment and save effort down the road">​</a></h3><p>At large companies of similar scale as Facebook, it's not uncommon for two teams at Facebook to face the same problem. I'll use Sentinel as an example again. By communicating about the project broadly and early, we reduced the possibility of teams working in silos to solve the same problem and leading to duplicated efforts. By knowing which teams faced similar problems and understanding their unique circumstances, we were able to collaborate on the problem and accounted for the different needs of the various teams, achieving a 1 + 1 = 3 effect.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="facilitate-project-planning-and-ensure-timelines-are-met">Facilitate project planning and ensure timelines are met<a href="#facilitate-project-planning-and-ensure-timelines-are-met" class="hash-link" aria-label="Direct link to Facilitate project planning and ensure timelines are met" title="Direct link to Facilitate project planning and ensure timelines are met">​</a></h3><p>Imagine this extreme (but still plausible) scenario - Bob and his team have spent a few months working on a huge project which was slated to launch next week. However, the project is only half-completed due to unforeseen technical difficulties and lack of manpower. If Bob had communicated about the difficulties and progress earlier, his manager could have allocated more manpower earlier to help out, and the team would probably be in a better position to meet their deadlines. This scenario is unrealistic at Facebook in the sense that such issues would probably be caught earlier because of weekly syncs and progress update posts. However, it is still possible for smaller projects where there aren't any/many syncs.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="ways-to-communicate-effectively">Ways to communicate effectively<a href="#ways-to-communicate-effectively" class="hash-link" aria-label="Direct link to Ways to communicate effectively" title="Direct link to Ways to communicate effectively">​</a></h2><p>Hopefully by now you agree with me that communicating effectively broadly and frequently is important! Here are some tips on how to go about doing that:</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="leverage-communication-channels">Leverage Communication Channels<a href="#leverage-communication-channels" class="hash-link" aria-label="Direct link to Leverage Communication Channels" title="Direct link to Leverage Communication Channels">​</a></h3><p>Each company has its own communication channel - Slack, Discord, Google Suite, etc. At Facebook, we use <a href="https://workplace.com/" target="_blank" rel="noopener noreferrer">Workplace</a>, which is similar to the core Facebook app, but for your company and every co-worker is a friend. Workplace is literally a communication tool and it is also the easiest way to get the word out about something. Draft a Workplace post/note and post it in the relevant groups. Attach screenshots/videos to better illustrate the point and catch peoples' attention. Add tl;drs at the top of your posts. Structure your posts according to sections for better organization. If you are unsure about what content should go in your post, seek a review from your manager/tech lead, most likely they'll be happy to help.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="write-wikis">Write Wikis<a href="#write-wikis" class="hash-link" aria-label="Direct link to Write Wikis" title="Direct link to Write Wikis">​</a></h3><p>Write wikis for posterity and so that your work appears in intern search results. Add links to your new wiki in existing relevant wikis. Doing all these improves the discoverability of your work.</p><h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="shamelessly-reach-out-to-folks">Shamelessly reach out to folks<a href="#shamelessly-reach-out-to-folks" class="hash-link" aria-label="Direct link to Shamelessly reach out to folks" title="Direct link to Shamelessly reach out to folks">​</a></h3><p>If you know of someone/another team that would benefit from your work or the information, reach out to them and let them know! Even if they don't have an immediate need for your work, they might in future, or can inform others about it. The relationships you build along the way might surprise you.</p><hr><p>Thanks to my manager <a href="https://www.linkedin.com/in/nishita-agarwal-51872514/" target="_blank" rel="noopener noreferrer">Nishita Agarwal</a> and my teammate, <a href="https://www.linkedin.com/in/leow-yao-yang/" target="_blank" rel="noopener noreferrer">Yao Yang Leow</a> for proofreading and giving feedback on earlier drafts.</p>]]></content>
        <author>
            <name>Yangshun Tay</name>
            <uri>https://github.com/yangshun</uri>
        </author>
        <category label="career" term="career"/>
        <category label="communication" term="communication"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Summing Root To Leaf Numbers]]></title>
        <id>https://www.techinterviewhandbook.org/blog/summing-root-to-leaf-numbers</id>
        <link href="https://www.techinterviewhandbook.org/blog/summing-root-to-leaf-numbers"/>
        <updated>2020-05-28T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Sum Root to Leaf Numbers is an interesting problem from LeetCode. The problem is of medium difficulty and is about binary trees. This post is an explains the solution to the problem.]]></summary>
        <content type="html"><![CDATA[<p>Sum Root to Leaf Numbers is an <a href="https://leetcode.com/problems/sum-root-to-leaf-numbers/" target="_blank" rel="noopener noreferrer">interesting problem from LeetCode</a>. The problem is of medium difficulty and is about binary trees. This post is an explains the solution to the problem.</p><p>I assume that you're familiar with Python and the concept of binary trees. If you're not, you can read <a href="https://www.tutorialspoint.com/python_data_structure/python_binary_tree.htm" target="_blank" rel="noopener noreferrer">this article</a> to get started.</p><p><img loading="lazy" src="https://user-images.githubusercontent.com/29497717/82636662-b01b4b80-9c35-11ea-9ffa-e84b1e13c599.jpeg" alt="leetcode1" class="img_ev3q"></p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="the-problem">The Problem<a href="#the-problem" class="hash-link" aria-label="Direct link to The Problem" title="Direct link to The Problem">​</a></h2><p>Given a binary tree whose nodes contain values <code>0-9</code>, we have to find the sum of all numbers formed by root-to-leaf paths. A leaf is a node that doesn't have any child nodes. <strong>In a binary tree, a root-to-leaf path is always unique</strong>. Here below is the expected behavior of the solution required:</p><p><img loading="lazy" src="https://user-images.githubusercontent.com/29497717/82636816-0be5d480-9c36-11ea-8b2d-78bb36c865ee.jpeg" alt="leetcode2" class="img_ev3q"></p><p>In the tree on the left, the output is <code>25</code>. <code>25</code> is the sum of <code>12</code> and <code>13</code>, which are the two numbers formed when starting from <code>1</code> and visiting every leaf. In the tree on the right, the output is <code>1026</code> as it is the sum of the three numbers <code>495</code>, <code>491</code> and <code>40</code>.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="the-observations-and-insights">The Observations and Insights<a href="#the-observations-and-insights" class="hash-link" aria-label="Direct link to The Observations and Insights" title="Direct link to The Observations and Insights">​</a></h2><ol><li><p>To construct a number, we traverse the tree from the root to the leaf, appending digits where the most significant digit is at the root, and the least significant digit is at the leaf. We visit some leaves before other nodes that are closer to the root. This suggests that a depth-first search will be useful.</p></li><li><p>The <em>construction</em> of numbers is incremental and similar of sorts: the only difference between <code>495</code> and <code>491</code> (from the tree on the right) is the last digit. If we remove the <code>5</code> and insert a <code>1</code> in its place, we have the next required number. A number essentially comprises of the leaf's digit appended to all the digits in ancestor nodes. Thus, numbers within the same subtree have common digits.</p></li><li><p>Finally, notice that this problem involves a tree, so a recursive solution is helpful.</p></li></ol><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="the-solution">The Solution<a href="#the-solution" class="hash-link" aria-label="Direct link to The Solution" title="Direct link to The Solution">​</a></h2><p>We can do a <code>pre-order</code> traversal of the tree where we incrementally construct a number and exploit the fact that numbers formed by nodes in the same sub-tree have common digits. When we're done forming numbers in a sub-tree, we can backtrack and go to another sub-tree.</p><p>Let's create a <code>Solution</code> class to encompass our solution.</p><div class="language-py codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-py codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">class</span><span class="token plain"> </span><span class="token class-name">Solution</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">sum_numbers</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> root</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> TreeNode</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(189, 147, 249)">int</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>The method signature given to us in the problem has one argument: root, which is of the type <code>TreeNode</code> . A <code>TreeNode</code> class is as follows (from LeetCode):</p><div class="language-py codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-py codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">class</span><span class="token plain"> </span><span class="token class-name">TreeNode</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">__init__</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> val</span><span class="token operator">=</span><span class="token number">0</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> left</span><span class="token operator">=</span><span class="token boolean">None</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> right</span><span class="token operator">=</span><span class="token boolean">None</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    self</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token plain">val </span><span class="token operator">=</span><span class="token plain"> val</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    self</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token plain">left </span><span class="token operator">=</span><span class="token plain"> left</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    self</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token plain">right </span><span class="token operator">=</span><span class="token plain"> right</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>From observation #2, notice that appending a node's digit to its ancestors can be achieved by <em>moving</em> all the digits of the number formed by ancestors to the right by 1 place and adding the current node's digit. The digits can be <em>moved</em> by multiplying the number formed by ancestors by 10 (since we're in base-10). For example:</p><p><code>495 = 49 x 10 + 5</code></p><p>Thus, we can keep track of the <em>current</em> digits in an integer. This is important because we won't incur extra storage space for higher input sizes. We can pass around this value in the function parameter itself. Since the method signature given can only have one parameter, let's create a <code>sum_root_to_leaf_helper</code> method.</p><p>We can think of the <code>sum_root_to_leaf_helper</code> method recursively and process each node differently based on whether or not it is a leaf.</p><ul><li><p>If the node is a leaf, we want to add its digit to our current digits by moving all the other digits to the right. We also want to return this value (since we'll backtrack from here).</p></li><li><p>If it is not a leaf, we want to add the digit to our current digits by moving all the other digits to the right. We also want to continue constructing the number by traversing down this node's left and right subtrees.</p></li></ul><p>If the current node is a <code>None</code>, we can simply return 0 because it doesn't count.</p><p>Thus, our <code>sum_root_to_leaf_helper</code> method will be as follows:</p><div class="language-py codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-py codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">sum_root_to_leaf_helper</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">node</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> partial_sum</span><span class="token operator">=</span><span class="token number">0</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">not</span><span class="token plain"> node</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> </span><span class="token number">0</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  partial_sum </span><span class="token operator">=</span><span class="token plain"> partial_sum </span><span class="token operator">*</span><span class="token plain"> </span><span class="token number">10</span><span class="token plain"> </span><span class="token operator">+</span><span class="token plain"> node</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token plain">val</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token comment" style="color:rgb(98, 114, 164)"># Leaf</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">not</span><span class="token plain"> node</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token plain">left </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">and</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">not</span><span class="token plain"> node</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token plain">right</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> partial_sum</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token comment" style="color:rgb(98, 114, 164)"># Non Leaf</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">sum_root_to_leaf_helper</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">node</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token plain">left</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> partial_sum</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token operator">+</span><span class="token plain"> \</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    sum_root_to_leaf_helper</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">node</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token plain">right</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> partial_sum</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>We use a default value for the partial sum to be 0.</p><p>In our main method, we want to include the <code>sum_root_to_leaf_helper</code> method as a nested method and simply pass on the node parameter. Finally, this is how our solution looks:</p><div class="language-py codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-py codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">class</span><span class="token plain"> </span><span class="token class-name">Solution</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">sumNumbers</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> root</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> TreeNode</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(189, 147, 249)">int</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">sum_root_to_leaf_helper</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">node</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> partial_sum</span><span class="token operator">=</span><span class="token number">0</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">      </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">not</span><span class="token plain"> node</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">        </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> </span><span class="token number">0</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">      partial_sum </span><span class="token operator">=</span><span class="token plain"> partial_sum </span><span class="token operator">*</span><span class="token plain"> </span><span class="token number">10</span><span class="token plain"> </span><span class="token operator">+</span><span class="token plain"> node</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token plain">val</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">      </span><span class="token comment" style="color:rgb(98, 114, 164)"># Leaf</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">      </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">not</span><span class="token plain"> node</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token plain">left </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">and</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">not</span><span class="token plain"> node</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token plain">right</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">        </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> partial_sum</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">      </span><span class="token comment" style="color:rgb(98, 114, 164)"># Non Leaf</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">      </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">sum_root_to_leaf_helper</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">node</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token plain">left</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> partial_sum</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token operator">+</span><span class="token plain"> \</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">        sum_root_to_leaf_helper</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">node</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token plain">right</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> partial_sum</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> sum_root_to_leaf_helper</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">root</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="the-algorithmic-complexity">The Algorithmic Complexity<a href="#the-algorithmic-complexity" class="hash-link" aria-label="Direct link to The Algorithmic Complexity" title="Direct link to The Algorithmic Complexity">​</a></h2><p>When we come up with a solution, it is important to analyze its algorithmic complexity not only to estimate its performance but also to identify areas for improvement and reflect on our problem-solving skills. We should always ask the question: <em>can we do better than X?</em> Where X is the current complexity of our solution.</p><p>Time:</p><p>Our solution is a modification of the depth-first-search pre-order traversal where we visit all nodes exactly once and perform a trivial computation (moving digits by integer multiplication). Thus, our runtime is simply <code>O(N)</code> where <code>N</code> represents the number of nodes in the given tree. A solution better than <code>O(N)</code> doesn't seem possible because to construct a number from digits, we need to know all the digits (and thus visit all nodes).</p><p>Space:</p><p>In terms of storage, we incur a high cost in the recursion call stack that builds up as our <code>sum_root_to_leaf_helper</code> calls itself. These calls <em>build-up</em> as one waits for another to finish.</p><p>The maximum call stack is dependent upon the height of the binary tree (since we start backtracking after we visit a leaf), giving a complexity of <code>O(H)</code> where <code>H</code> is the height of the binary tree. In the worst case, the binary tree is skewed in either direction and thus <code>H = N</code>. Therefore, the worst-case space complexity is <code>O(N)</code>.</p><p>You can read <a href="https://www.freecodecamp.org/news/how-recursion-works-explained-with-flowcharts-and-a-video-de61f40cb7f9/" target="_blank" rel="noopener noreferrer">this article</a> to know more about recursion call stacks.</p><p>It is possible to do better than <code>O(N)</code> by using a Morris Preorder Traversal. The basic idea is to link a node and its predecessor temporarily. You can read more about it <a href="https://www.sciencedirect.com/science/article/abs/pii/0020019079900681" target="_blank" rel="noopener noreferrer">here</a>.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="the-conclusion">The Conclusion<a href="#the-conclusion" class="hash-link" aria-label="Direct link to The Conclusion" title="Direct link to The Conclusion">​</a></h2><p>I hope this post helped! Please do let me know if you have any feedback, comments or suggestions by responding to this post.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="acknowledgements">Acknowledgements<a href="#acknowledgements" class="hash-link" aria-label="Direct link to Acknowledgements" title="Direct link to Acknowledgements">​</a></h2><p>Advay, Kevin, Louie for reviewing this post and Yangshun for the idea of adding it as a blog post.</p>]]></content>
        <author>
            <name>Raivat Shah</name>
            <uri>https://github.com/raivatshah</uri>
        </author>
        <category label="leetcode" term="leetcode"/>
        <category label="trees" term="trees"/>
        <category label="problem-solving" term="problem-solving"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Are Front End Development Skills Enough for a Career?]]></title>
        <id>https://www.techinterviewhandbook.org/blog/are-front-end-development-skills-enough-for-a-career</id>
        <link href="https://www.techinterviewhandbook.org/blog/are-front-end-development-skills-enough-for-a-career"/>
        <updated>2019-11-03T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Recently, an undergrad freshmen I met at an event asked me a question regarding Front End development as a career.]]></summary>
        <content type="html"><![CDATA[<p>Recently, an undergrad freshmen I met at an event asked me a question regarding Front End development as a career.</p><blockquote><p>I'm honestly quite into front end development — web technologies, UI/UX, web design and stuff. But with there being more and more accessible to new developers (create-react-app, parcel and such), I just can't help but wonder if these skills are sufficient to survive in the tech industry today. Not that it's a bad thing! Lowering the barrier to entry for programmers is always good. However, for those like myself who would like to pursue front end development as a career, I'm just wondering if having these skills are enough.</p></blockquote><p>Interesting question. I've wondered the same question to myself before but convinced myself that I'm probably fine just dabbling in Front End development for now. 😌</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="front-end-is-complex-and-getting-increasingly-so">Front End is complex and getting increasingly so<a href="#front-end-is-complex-and-getting-increasingly-so" class="hash-link" aria-label="Direct link to Front End is complex and getting increasingly so" title="Direct link to Front End is complex and getting increasingly so">​</a></h2><p>Most people would have used websites like facebook.com, youtube.com and gmail.com. These applications have hundreds of engineers working on them (thousands if you include the back end) due to the demanding nature of the application - it has to load fast, it has to be secure, it has to look pretty. These days, front end development is no longer just about building websites rendering a static HTML. Many websites these days are in fact web applications and a lot of thought has to be put into the application architecture, and that requires good software engineering capabilities.</p><p>That's why you see many Front End tools these days like React, Redux, Relay, CSS modules, webpack, etc. These tools exist because of the ever-increasing requirements of building rich and performant user experiences on the web. <a href="https://www.toptal.com/front-end/how-to-hire" target="_blank" rel="noopener noreferrer">Being a good Front End developer</a> is very hard, there are many aspects to know about - HTML, CSS, JavaScript, Browser APIs, Security, Performance, Animation, SEO, Networking, the list is non-exhaustive and growing. There are always new problems to solve and new things to learn. <a href="https://medium.com/@ericclemmons/javascript-fatigue-48d4011b6fc4" target="_blank" rel="noopener noreferrer">JavaScript fatigue</a> was a term pretty common a few years back due to the explosion of tools in the Front End ecosystem. Things have gotten more stable but the JavaScript community is currently still one of the most fast-moving communities.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="does-the-rise-of-mobile-threaten-the-existence-of-web-developers">Does the rise of mobile threaten the existence of web developers?<a href="#does-the-rise-of-mobile-threaten-the-existence-of-web-developers" class="hash-link" aria-label="Direct link to Does the rise of mobile threaten the existence of web developers?" title="Direct link to Does the rise of mobile threaten the existence of web developers?">​</a></h2><p>Many products now have a native mobile app version and that might make people think that the existence of Front End (web) developers could be threatened. I think that is only true to a small extent. Certain applications like Uber and Lyft make sense to be mobile-first, but there are also many complex professional applications where web (or any interface with a larger screens) will always prevail, such as office productivity and design software. Viewing things at a more macro scale, both mobile apps and web apps fall under the category of client-side applications. Many core skills important for being a good web developer are also important for mobile app development - they are transferable across platforms.</p><p>Tools like <a href="https://reactnative.dev" target="_blank" rel="noopener noreferrer">React Native</a> and <a href="https://flutter.dev" target="_blank" rel="noopener noreferrer">Flutter</a> have also been created to help engineers build products across platforms by only writing the code "once" (in quotes because that dream is still in development). This approach is not a silver bullet solution and has yet to prove itself adequately, but for prototyping small apps or even just certain parts of your mobile app, it works pretty well. In React Native, you write your application in JavaScript using React Native primitives, and the React Native runtime runs the code on the JavaScript engine in the platform to construct native app UI views and handle application logic. It's pretty similar to writing typical web front end code. Facebook's Ads Manager App and the Marketplace tab are built using React Native. There are numerous technologies that enable you to build native apps on mobile platforms by knowing web front end development.</p><p>Even though mobile usage is on the rise, there still exists many use cases where the desktop still excels at. Google Suite, Microsoft Office, Design tools are still more efficiently operated on desktops. In fact, many desktop applications these days are built on HTML5 technologies instead of native desktop code using tools like Electron to package web application code into an executable shipped to users. You might already be using some of them without knowing - Slack, Discord, WhatsApp Desktop, VS Code, Atom Editor, just to name a few. I think developers who are only familiar with native desktop platform engineering skills have more reasons to worry than Front End developers.</p><p>The web is incredibly cross-platform!</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="jack-of-all-trades-master-of-one">Jack of all trades, master of one<a href="#jack-of-all-trades-master-of-one" class="hash-link" aria-label="Direct link to Jack of all trades, master of one" title="Direct link to Jack of all trades, master of one">​</a></h2><p>However, I think that being a Front End development in many regards, is considered a specialized position. That's why it's important to be "T-shaped". I first got introduced to this term through my ex-manager at Grab, Tim Goh. He advised me to have a specialization (front end), yet still know a bit about everything. In other words, you are strong in your core fundamentals, but you also specialize in a particular area.</p><p>This is good advice and it's not new advice. In most university courses, students are expected to study the fundamental courses before choosing their area of specialization. In the context of a School of Computing in National University of Singapore, students start their in school by taking basic classes in Algorithms, Data Structures, Software Engineering, Operating Systems, Computer Networks, before choosing their specialization in deeper areas like Compilers, Computer Graphics, AI and Machine Learning, Media, Networking and more.</p><p>Having a strong foundation enables someone to make switching domains a possibility. There will definitely be a ramp-up process, but it can be made smoother with solid foundations, and with the skill of learning how to learn fast. In the extreme case where the web becomes irrelevant, and no companies want to hire front end developers anymore, front end developers with strong fundamentals can always slightly switch tracks by doing mobile or back end engineering, or even the hottest UI platform (AR/VR?) out there.</p><p>Having good tools to use (like Create React App, Parcel) doesn't eradicate the need for Front End developers to possess good software engineering skills. What will happen if you are the person tasked to build the tools? Great Front End developers (or Software Engineers really) go beneath the abstractions layer, understand how their tools work, and what problems the tool set out to solve. They also constantly seek to challenge and improve the status quo by building better technologies to cater to the ever-increasing demands.</p><p>At Facebook, the Front End Engineers are Software Engineers first, domain experts second. Many of the Front End engineers I know at Facebook have a deep understanding of the technical stack and don't just work on stuff related to the browser. At Facebook scale, front end work also involves building a lot of infrastructure to make our front end code base scale well with the growing technical and people needs. That means writing <a href="https://github.com/facebook/jscodeshift" target="_blank" rel="noopener noreferrer">codemods</a> to do large-scale refactoring, inventing new <a href="https://reactjs.org" target="_blank" rel="noopener noreferrer">UI</a> <a href="http://facebook.github.io/flux/" target="_blank" rel="noopener noreferrer">paradigms</a>, performant <a href="https://jestjs.io" target="_blank" rel="noopener noreferrer">testing frameworks</a>, creating <a href="https://flow.org" target="_blank" rel="noopener noreferrer">type-checkers</a> for untyped languages, changing the ways we <a href="https://graphql.org" target="_blank" rel="noopener noreferrer">fetch data</a> from our servers and <a href="https://relay.dev" target="_blank" rel="noopener noreferrer">managing it on clients</a>. These tools wouldn't exist if the Front End engineers at Facebook didn't possess strong software engineering skills.</p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="pick-up-new-relevant-skills">Pick up new, relevant skills<a href="#pick-up-new-relevant-skills" class="hash-link" aria-label="Direct link to Pick up new, relevant skills" title="Direct link to Pick up new, relevant skills">​</a></h2><p>It can be hard to pick up new skills at work in an unrelated domain if there are no opportunities to do so. Thankfully (or not), due to the explosion of tools in the Front End ecosystem, I've found an area which I have gained a new-found interest in - Programming Languages Theory (Static Analysis, Compilers, and Intepreters). Static analysis is incredibly important in tools that I use on a daily basis - it's being used by the module bundlers for bundling JavaScript files together, generating CSS from more user-friendly CSS syntaxes, compiling modern JavaScript into older versions of JavaScript that more common browsers can run, and even this blog post written in Markdown uses static analysis to be converted into HTML.</p><p>I've been toying with writing my own interpreter after learning this awesome book called <a href="http://www.craftinginterpreters.com" target="_blank" rel="noopener noreferrer">Crafting Interpreters</a> and will be further exploring this domain in my spare time, possibly building Front End-related tooling in future that leverages static analysis and compilation.</p><p>Adding new skills to my arsenal in a related but different domain helps me to stay relevant in the event that the industry no longer needs Front End developers 😱</p><hr><p>In summary, although Front End development is considered quite specialized, there's enough demand and complexity for it to stay relevant in the years to come. What would threaten the web would be an entire shift of the way users interact with apps, perhaps to a non-visual paradigm like a brain-controlled interface. However, paradigm shifts don't happen overnight and there will be sufficient time to react (pun intended) in the case that ever happens. Being strong in your Software Engineering fundamentals and knowing how to learn new skills fast will help you in switching domains (and also careers).</p><p><em>Opinions are my own and do not represent the views of my employer.</em></p>]]></content>
        <author>
            <name>Yangshun Tay</name>
            <uri>https://github.com/yangshun</uri>
        </author>
        <category label="front end" term="front end"/>
        <category label="career" term="career"/>
    </entry>
</feed>