Technical interviews come in all shapes and sizes. Some companies go for the traditional algorithm challenges, others tend to be more creative, such as this Fullstack Engineer interview I had the other day.
技术面试有各种形式和规模。 一些公司寻求传统算法的挑战,另一些公司则更具创造力,例如前几天我接受全栈工程师采访时。
Toward the end of a fun, relaxing conversation, the interviewer gave me a quick challenge: Answer a series of trivia-like tech questions that involve varying levels of knowledge in software development.
在一次有趣,轻松的交谈的结尾,面试官给了我一个快速的挑战:回答一系列琐事式的技术问题,这些问题涉及软件开发中的不同知识水平。
I got roughly a third of them right, which wasn’t too bad considering the time constraints and my “freshness” in the field.
我大约占了三分之一,考虑到时间限制和我在现场的“新鲜度”,这还不错。
During the 5-minute exercise, I also jotted down as many questions as I could in order to share with you all, my beloved Medium community.
在5分钟的练习中,我还写下了尽可能多的问题,以便与大家分享我心爱的Medium社区。
So grab a timer, fasten your seat belt, see if you can answer these 10 questions in 5 minutes.
因此,抓住一个计时器,系好安全带,看看是否可以在5分钟内回答这10个问题。
Ready,
准备,
Set,
组,
Go!
走!
⏳
⏳
问题清单 (Questions List)
What’s the difference between
git fetch
andgit pull
?git fetch
和git pull
什么区别?What does
git rebase
do?git rebase
做什么?In HTML, what’s the difference between
div
tag andspan
tag?在HTML中,
div
标签和span
标签有什么区别?- What are CSS vendor prefixes? 什么是CSS供应商前缀?
- Is JavaScript single-threaded or multi-threaded? JavaScript是单线程还是多线程?
- In JavaScript, what is an arrow function? 在JavaScript中,箭头功能是什么?
- In SQL, what are primary keys and foreign keys? 在SQL中,什么是主键和外键?
- What is caching in terms of different layers/stages? 关于不同的层/阶段,缓存是什么?
- What are generators? 什么是发电机?
- In unit testing, what are some quantitative metrics for testing a codebase? 在单元测试中,用于测试代码库的一些定量指标是什么?
If those questions seem easy to you, well, congratulations, you are definitely more than a junior developer!
如果这些问题对您来说很容易,那么恭喜您,您绝对不仅仅是初级开发人员!
If you had trouble answering many of the questions above, worry not, here are some resources I’ve collected from the world wide web:
如果您在回答上述许多问题时遇到麻烦,请不用担心,以下是我从万维网上收集的一些资源:
1. Git抓取和Git拉取有什么区别? (1. What’s the difference between Git fetch and Git pull?)
git fetch
is the command that tells your local git to retrieve the latest meta-data info from the original.
git fetch
是告诉您本地git从原始数据库检索最新元数据信息的命令。
git pull
does whatgit fetch
does AND brings (copy) those changes from the remote repository.
git pull
完成git fetch
并从远程存储库带来(复制)这些更改。
Source: freeCodeCamp
资料来源: freeCodeCamp
2. Git rebase做什么? (2. What does Git rebase do?)
We use
git rebase
when we want to take all commits from our feature branch, and move them into the main branch.当我们想从功能分支中获取所有提交并将它们移入主分支时, 我们使用
git rebase
。Rebasing is often used as an alternative to merging. Rebasing a branch updates one branch with another by applying the commits of one branch on top of the commits of another branch.
重新定级通常用作合并的替代方法。 通过在一个分支的提交之上应用一个分支的提交,对一个分支重新设置基础即可。
Source: Rebase — One of the Most Powerful Git Commands
资料来源: Rebase —最强大的Git命令之一
3.在HTML中, div
标签和span
标签之间有什么区别? (3. In HTML, what’s the difference between a div
tag and a span
tag?)
<div>
: block-level, primarily used to organize the layout of the page.
<div>
:块级,主要用于组织页面的布局。
<span>
: inline-level, mainly used to style a part of a text.
<span>
:内联级别,主要用于设置文本的一部分样式。
4. CSS供应商前缀是什么? (4. What are CSS vendor prefixes?)
Vendor prefixes are one way browsers use to give CSS developers access to newer features not yet considered stable.
供应商前缀是浏览器用来使CSS开发人员访问尚未稳定的新功能的一种方式。
Source: CSS Vendor Prefixes
来源: CSS供应商前缀
5. JavaScript是单线程还是多线程? (5. Is JavaScript single-threaded or multi-threaded?)
Single-threaded. Here’s a cool explainer on how JavaScript can be asynchronous AND single-thread at the same time.
单线程。 这是一个很好的解释器 ,介绍了JavaScript如何同时实现异步和单线程。
6.在JavaScript中,箭头功能是什么? (6. In JavaScript, what is an arrow function?)
An arrow function is a part of ES6 syntax. It does NOT have its own ‘this’ keyword. Instead, an arrow function will use the ‘this’ keyword of whatever ‘this’ was outside then function when it was created.
箭头功能是ES6语法的一部分。 它没有自己的“ this”关键字。 取而代之的是,箭头函数将使用创建时在函数之外的所有“ this”关键字使用“ this”关键字。
You can take “this” quiz (pun intended) I created to become more familiar with the this
keyword.
您可以参加我为了更加熟悉this
关键字而创建的“ this”测验 (双关语)。
7.在SQL中,什么是主键和外键? (7. In SQL, what are primary keys and foreign keys?)
Primary key: unique ID/address of each row of the table.Foreign key: a set of columns in a table that refers to the primary key or a unique key of another table.
主键:表每一行的唯一ID /地址。外键:表中的一组列,引用了主键或另一个表的唯一键。
8.在不同的层/阶段,什么是缓存? (8. What is caching in terms of different layers/stages?)
I found a caching overview on the AWS site, which has a nice diagram and table explaining the use case for each layer: client-side, DNS, Web, App, and Database.
我在AWS网站上找到了缓存概述, 该站点上有一个漂亮的图表和表格,解释了每一层的用例:客户端,DNS,Web,应用程序和数据库。
Feel free to also check out an intro to caching in Django documentation.
还可以随时查看Django文档中的缓存介绍。
9.什么是发电机? (9. What are generators?)
In some programming languages, e.g. Python, a generator is “an iterator in the style of iterating by need.”
在某些编程语言中,例如Python,生成器是“按需要进行迭代的迭代器”。
We won’t calculate and store the values at once but generate them on the fly when we’re iterating.
我们不会立即计算和存储值,而是在迭代时动态生成它们。
Source: What Are Generators, Yields, and Streams in Python?
资料来源: 什么是Python中的生成器,产量和流?
In JavaScript, there is the concept of a generator function.
在JavaScript中,有一个generator function的概念。
10.在单元测试中,用于测试代码库的一些定量指标是什么? (10. In unit testing, what are some quantitative metrics for testing a codebase?)
According to my interviewer, code coverage is one way of verifying the extent to which the code has been executed.
根据我的采访者所说, 代码覆盖率是验证代码执行程度的一种方法。
If you’re interested in learning more about testing metrics, I found a post that introduces 25 metrics you can use in a continuous testing process.
如果您有兴趣了解有关测试指标的更多信息,我发现了一篇文章介绍了可以在连续测试过程中使用的25个指标 。
As always, if you have other helpful resources or tutorials on any of the questions, please let me know in the comments.
与往常一样,如果您有其他有用的资源或有关任何问题的教程,请在评论中让我知道。
Happy learning!
学习愉快!