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 DEV community.
So grab a timer, fasten your seat belt, see if you can answer these 10 questions in 5 minutes.
Ready,
Set,
Go!
⏳
Questions List
- What's the difference between
git fetch
andgit pull
? - What does
git rebase
do? - In HTML, what's the difference between
div
tag andspan
tag? - What are CSS vendor prefixes?
- Is JavaScript single-threaded or multi-threaded?
- In JavaScript, what is an arrow function?
- In SQL, what are primary keys and foreign keys?
- 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. 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 pull
does whatgit fetch
does AND brings (copy) those changes from the remote repository.
Source: freeCodeCamp
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.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
3. In HTML, what's the difference between div
tag and span
tag?
<div>
: block-level, primarily used to organize the layout of the page.
<span>
: inline-level, mainly used to style a part of a text.
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.
Source: CSS Vendor Prefixes
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.
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 the function when it was created.
You can take "this" quiz (pun intended) I created to become more familiar with the this
keyword.
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 of another table.
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.
Feel free to also check out an intro to caching in Django documentation.
9. What are generators?
In some programming languages, e.g. Python, a generator is "an iterator in the style of iterating by need."
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?
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.
As always, if you have other helpful resources or tutorials on any of the questions, please let me know in the comments.
Happy learning!