A working session, not an exam. Show me how you think, how you dig into something unfamiliar, and how you carry yourself when a problem doesn't hand you the answer.
A few ground rules, plainly put:
Answer from what you already know — no need to look these up.
You don't need to have run these. Tell me what each one does, in plain English.
1) ls -la 2) cd /var/www && tail -n 50 error.log 3) chmod 600 id_rsa 4) ssh deploy@203.0.113.10
Each log line begins with a level — ERROR, WARN, or INFO. Write tallyLevels(lines) so it takes a list of log strings and returns a count of each level, e.g. {ERROR:2, INFO:1}. Use JavaScript — it runs right here.
This part uses git. If you've never used it, that's completely fine — here's the whole idea in four lines. Read it, then reason through the questions below. I care how you pick it up, not whether you already knew it.
# git, in 30 seconds commit → a saved snapshot of your code, with a note on what changed push → send your commits up to the shared copy everyone works from branch → a separate line of work, so experiments don't touch the real thing main → the primary branch — usually what goes live to real users
Now here's a file that runs automatically whenever code is pushed. You won't have seen this syntax — read it, use the docs if you like, and work it out.
stages:
- test
- deploy
run_tests:
stage: test
script:
- npm install
- npm test
deploy_site:
stage: deploy
script:
- npm run build
- ./deploy.sh
only:
- main
An ordinary afternoon. Someone messages: "your site won't load." You check — they're right. You don't yet know why.
A teammate is about to push the setup below to a public repository and take it live. Look it over the way someone trying to break in would.
# committed to the repo — config.js
const config = {
dbPassword: "admin123",
apiKey: "sk_live_9f8a7b6c5d",
adminEmail: "boss@company.com"
};
# on the server:
# - SSH login allowed with a password (root enabled)
# - firewall: every port open
# - the .env secrets file committed into git — the shared code everyone pulls — "so the team has it"
When you're ready, send your answers to me on WhatsApp — one tap.
Prefer to send it yourself? Two backups: