Dan Abramov(@dan_abramov): We’ve updated the wording we send to the Front End Engineer candidates to better reflect the Facebook interview process for that role. I hope this helps folks prepare for their interviews!
我们更新了发给前端工程师候选人的措辞,以更好地反映该角色在 Facebook 的面试过程。希望能帮助大家准备面试!(以下为具体措辞)
We’ll try to keep it practical and focus on things you might encounter when building apps. We won’t ask you to write a sorting algorithm from scratch. But we expect you to know the relative performance of JavaScript object and array operations. You should be able to find and fix bottlenecks in your code, and articulate the tradeoffs you’ve made.
我们将尽量保持实用性,并关注你在构建应用时可能遇到的问题。我们不会要求你从头写一个排序算法,但我们希望你了解进行 JavaScript 对象和数组操作时相关的性能。你得能找出并修复代码瓶颈,并解释你所做的权衡。
We won’t ask you to implement obscure data structures like red-black trees. But it will help to recap data structures common in UI engineering like arrays, maps, sets, and DOM trees. You’ll also find it helpful to read about Computer Science topics like Big O notation and tree traversal. We don’t expect you to memorize any particular algorithms. It is more important that you can apply these principles in practice to create fast and responsive user interfaces.
我们不会要求你实现红黑树之类的模糊数据结构,但这能帮你总结概括 UI 工程化中常见的数据结构,如数组(arrays), 映射(maps), 集合(sets)和 DOM 树(DOM trees). 你还会发现阅读大 O 表示法(Big O notation, 一般用于时间/空间复杂度)和树遍历(tree traversa)等计算机科学主题大有裨益。我们不要求你记住某个特定的算法。我们更看重你能在实践中应用这些原则,来创建快速的响应式用户界面。
We expect you to know the JavaScript language and its primitives well. This includes topics like iteration, closures, scope, and writing asynchronous code. We don’t ask about particular libraries - so don’t worry about learning React or something similar. However, we expect UI engineers to understand what’s beneath the abstractions they use. For example, if you only worked with UI libraries before, spend some time learning the raw DOM APIs. If you only used a utility library like Lodash, try to implement some of its methods from scratch. Check how well your solutions work with large inputs, and think about memory consumption and the edge cases you need to handle. As you practice, talk through your solution and feel free to sketch on paper to aid your thinking. This is a good way to practice for the interview!
我们希望你能够掌握 JavaScript 语言及其基本用法,包括迭代(iteration), 闭包(closures), 作用域(scope)以及编写异步代码(writing asynchronous code)等。我们不会考你某个特定的库 - 所以不要担心 React 或类似框架的学习。但是,我们希望 UI 工程师能够理解他们所使用的抽象语法之下有什么内容。例如,如果你之前只用过 UI 库,请花点时间学习原生 DOM API. 如果你只用过 Lodash 之类的工具库,请尝试从头开始实现它的一些方法。检查你的方案在输入空间大的情况下表现如何,并考虑内存消耗和需要处理的边缘情况。在练习的时候,建议你多和人讨论你的方案,并在纸上画草图来帮助你思考。这是练习面试的好办法!