Interview guides · Farzi Engineer
Farzi Engineer Software Engineer Interview Guide
Farzi Engineer Software Engineer interview guide: reported rounds, questions and how candidates describe the process.
The 60-second brief
As a Software Engineer at Farzi Engineer, you are at the heart of our technical operations, building robust solutions that drive our core business logic. This role is critical because you are responsible for bridging the gap between high-level architectural goals and the clean, efficient code that powers our applications. You will work within a dynamic team to tackle real-world problems that require both deep technical knowledge and a pragmatic, user-focused mindset. The work at Farzi Engineer is characterized by its focus on core language proficiency and practical application. You will be expected to contribute to complex projects, requiring you to navigate both legacy systems and modern frameworks.
This guide is scoped to a Software Engineer candidate at Farzi Engineer.
Focus areas
- JavaScript
- Debounce
- Throttling
The Farzi Engineer interview process
Farzi Engineer candidates report 3 rounds over 3-5 weeks. The stages below are what candidates describe, not a published process.
Resume Screening
Initial review of submitted resumes to assess qualifications and fit.
What to demonstrate
- Initial review of submitted resumes to assess qualifications and fit
- Depth in JavaScript
How to prepare
- Be able to walk your CV end to end in two minutes, and say why this company specifically.
- Have your salary expectations, notice period and location constraints ready, and ask for the rest of the loop in writing.
Technical Assessments
A series of technical evaluations that increase in complexity, including live coding and concept-based questions.
What to demonstrate
- A series of technical evaluations that increase in complexity
- Including live coding and concept-based questions
How to prepare
- Answer aloud and timed: Discuss key differences between C++ and other languages you have used.
- Answer aloud and timed: How do you optimize code performance in your current environment?
Behavioral Assessment
Final evaluation focusing on behavioral aspects to understand cultural fit and potential for growth.
What to demonstrate
- Final evaluation focusing on behavioral aspects to understand cultural fit and potential for growth
- Depth in JavaScript
How to prepare
- Prepare three examples from your own work, each with a decision you made and an outcome you can quantify.
- Re-read the description of the behavioral assessment above and write down what you would ask to confirm before it.
Where candidates lose points
Articulate your thought process
Even if you are stuck, talk through what you are thinking. This helps the interviewer understand your problem-solving style.
Review your resume
Be prepared to discuss every project you have listed. Know the technologies you used and why you chose them.
Ask meaningful questions
At the end of your interview, ask about the team's current challenges or the company's roadmap. It shows you are invested in the role.
Do not attempt to memorize solutions to common coding problems
We value unique approaches and clear logic over rote memorization.
Questions & practice
There are 10 mangoes, each weighing 10 units; identify the one that is defective.
Medium · Problem Solving and Logic
Approach
- Restate the input: its shape, its size, and what is guaranteed about it.
- Name the brute-force solution and its complexity before improving on it.
- Choose the data structure from the access pattern, not from familiarity.
- State the target complexity and say which constraint rules the naive version out.
Follow-up
- How does this change if the input no longer fits in memory?
- What is the worst case, and how likely is it on real data?
How do you break down a complex feature request into manageable technical tasks?
Medium · Problem Solving and Logic
Approach
- Restate the input: its shape, its size, and what is guaranteed about it.
- Name the brute-force solution and its complexity before improving on it.
- Choose the data structure from the access pattern, not from familiarity.
- State the target complexity and say which constraint rules the naive version out.
Follow-up
- How does this change if the input no longer fits in memory?
- What is the worst case, and how likely is it on real data?
Collapse a redelivered event batch into per-aggregate high-water marks
Easy · hashing · at-least-once · aggregation
You drain a batch of up to 5,000,000 events, each (aggregate_id BIGINT, aggregate_version INT, event_type, payload). The log guarantees order within one aggregate only; the batch merges 64 partitions, and a relay failover has redelivered a range, so an older version for an aggregate can appear after a newer one. Given a map of last_applied_version per aggregate, produce the events worth applying, at most one per (aggregate_id, version), plus the count discarded. Target O(n) time. State the memory for 2,000,000 distinct aggregates and what you do when it does not fit.
Approach
- One pass, one hash map from aggregate_id to the highest version kept, and a discard counter. An event whose version is at or below last_applied_version for its aggregate is dropped without further work, which is the whole reason the event carries its version rather than a delta. O(n) expected time, O(d) space in distinct aggregates.
- Keep the maximum, never the last occurrence. The redelivered range means the final appearance of an aggregate in the batch can be an older version than one seen earlier in the same batch, so last-wins applies stale state over newer state and the projection regresses with no error anywhere.
- Cost the memory instead of calling it large: an 8-byte key plus a 4-byte version is 12 bytes of payload, and an open-addressed table held at a 0.7 load factor costs roughly 17 bytes per entry before per-slot metadata, so 2,000,000 aggregates is tens of megabytes in a native layout and several times that in a runtime that boxes both key and value.
- If the distinct set exceeds memory, partition on hash(aggregate_id) mod P and reduce each partition independently. Every event for one aggregate hashes to the same partition, so the per-partition result is exact and the merge is concatenation rather than a second reduction.
Follow-up
- The payload is a patch rather than a snapshot, so applying only the highest version loses the intermediate changes. What changes in your reduction?
- How do you detect that version 7 arrived while version 6 was never delivered, and what should the consumer do about the gap?
Stop tag and share joins from fanning out a page
Medium · join fan-out · semi-joins · many-to-many
resource_tag is (resource_id, tag_id) with PK (resource_id, tag_id); resource_share is (resource_id, shared_with_user_id, permission). The tagged-and-shared listing inner-joins resource to both, filters tenant_id, tag_id = ANY($2) and shared_with_user_id = $3, orders by updated_at DESC and takes 50. Pages come back with fewer than 50 distinct resources and the total in the header is far too high. Explain the row multiplication, rewrite both the page query and the count query so each is correct, and name the index each one needs. PostgreSQL 16.
Approach
- Do the arithmetic against the predicates that are actually there. An inner join emits one row per matching child row, and both joins are filtered: tag_id = ANY($2) admits only the requested tags, shared_with_user_id = $3 admits one user's share rows. So a resource holding three of the requested tags and shared with $3 once yields three rows, not one — the multiplier is its count of matching tags times its share rows for that single user, and that second factor is 1 unless the table admits duplicate (resource_id, shared_with_user_id) pairs. LIMIT 50 then limits rows rather than resources, and COUNT(*) counts pairs — the header is the product, not the population.
- Reject DISTINCT as the fix. It deduplicates after the product has been built, so the planner must materialise and sort the fanned-out set before the LIMIT can apply, and it leaves any SUM or AVG in the same select list wrong.
- Rewrite both filters as semi-joins, keeping resource as the only row source: AND EXISTS (SELECT 1 FROM resource_tag rt WHERE rt.resource_id = r.resource_id AND rt.tag_id = ANY($2)) and the same shape against resource_share. A semi-join stops at the first match per resource and preserves the driving index order, so ORDER BY updated_at DESC, resource_id DESC LIMIT 50 still stops after 50 rows.
- Count with the same predicates and no join at all: SELECT count(*) FROM resource r WHERE r.tenant_id = $1 AND r.status = 'active' AND EXISTS (...) AND EXISTS (...). Nothing multiplies a resource, so the number is the population.
Follow-up
- The filter changes from 'any of these tags' to 'all of these tags'. Rewrite it and state what it costs relative to the ANY form.
- A resource can be shared with the same user twice under different permissions. Does your count change, and should it?
Keep soft-deleted accounts from blocking re-registration
Easy · soft delete · unique constraints · engine differences
app_user holds user_id, tenant_id, email CITEXT, password_hash (NULL for SSO principals), email_verified_at, auth_version, status ('invited','active','suspended','deactivated'), created_at, updated_at, deleted_at. Two live accounts for one address inside a tenant must be impossible, but an address freed by a soft delete must be reusable, and the same tenant may delete and re-register it repeatedly. Write the uniqueness DDL for PostgreSQL 16, then the equivalent for MySQL 8 where partial indexes do not exist, and say what each permits once three deleted rows already hold that address.
Approach
- Start from what is actually unique: not (tenant_id, email), but (tenant_id, email) among live rows. PostgreSQL says that directly — CREATE UNIQUE INDEX app_user_live_email ON app_user (tenant_id, email) WHERE deleted_at IS NULL. A full constraint over the same two columns burns the address permanently the first time someone deletes an account.
- Keep case-insensitivity in the type or the index, never in the application: CITEXT as given, or UNIQUE (tenant_id, lower(email)) as an expression index where the extension is unavailable. A case-sensitive unique column is exactly how two accounts for one human appear.
- For MySQL 8 the predicate has to move inside the key: add a discriminator column that is a constant 0 while the row is live and is set to user_id on delete, with UNIQUE (tenant_id, email, deleted_marker). Live rows share the constant and still collide; deleted rows differ from each other and stop colliding.
- State the NULL variant and its dependency: leaving the marker NULL for deleted rows also works, because a unique index treats NULLs as distinct — true in MySQL, and true in PostgreSQL only under the default NULLS DISTINCT, which PostgreSQL 15 lets you reverse. Check the polarity against the three existing deleted rows: constant-on-live is what preserves the collision you want, and reversing it silently admits duplicate live accounts.
Follow-up
- A deleted account re-registers with the same address the next day. Do the old resource rows follow the new user_id, and how does the API keep the two principals apart?
- How do you honour an erasure request while resource_revision.actor_user_id still references this table?
Explain the core concepts of JavaScript and Django.
Medium · Technical Fundamentals
Approach
- Clarify what is being asked and what a complete answer contains.
- State your assumptions explicitly before working the problem.
- Say what you would check first and why it is the highest-information step.
- Work from the requirement backwards to the design.
Follow-up
- What assumption would you test first?
- How would you know your answer was wrong?
Write code to implement debounce and throttling in JavaScript.
Medium · Technical Fundamentals
Approach
- Clarify what is being asked and what a complete answer contains.
- State your assumptions explicitly before working the problem.
- Say what you would check first and why it is the highest-information step.
- Work from the requirement backwards to the design.
Follow-up
- What assumption would you test first?
- How would you know your answer was wrong?
Discuss key differences between C++ and other languages you have used.
Medium · Technical Fundamentals
Approach
- Clarify what is being asked and what a complete answer contains.
- State your assumptions explicitly before working the problem.
- Say what you would check first and why it is the highest-information step.
- Work from the requirement backwards to the design.
Follow-up
- What assumption would you test first?
- How would you know your answer was wrong?
How do you optimize code performance in your current environment?
Medium · Technical Fundamentals
Approach
- Clarify what is being asked and what a complete answer contains.
- State your assumptions explicitly before working the problem.
- Say what you would check first and why it is the highest-information step.
- Work from the requirement backwards to the design.
Follow-up
- What assumption would you test first?
- How would you know your answer was wrong?
Walk me through how you would debug a critical issue in a production environment.
Medium · Problem Solving and Logic
Approach
- Establish what changed and when, before forming any theory.
- Pick a bisection that eliminates candidates whichever way it turns out.
- Check the instrumentation before believing the symptom.
- Separate the trigger from the cause; the deploy is rarely the bug.
Follow-up
- What would you look at first, and what would it rule out?
- How would you tell a cause from a coincidence here?
Suggested practice checklist
Built from the rounds and topics Farzi Engineer candidates report.
Day 1 — Map the Farzi Engineer loop
- Write out the reported sequence: Resume Screening, Technical Assessments, Behavioral Assessment.
- For each round, write one sentence on what it is judging, from the description above, and mark the one you are least ready for.
Deliverable: A one-page map of the 3 reported rounds, with the weakest marked.
Day 2 — Work JavaScript
- Spend the session on JavaScript, which Farzi Engineer candidates report being tested on.
- Write one worked example in JavaScript and time yourself on it.
Deliverable: One timed worked example in JavaScript.
Day 3 — Work Debounce
- Spend the session on Debounce, which Farzi Engineer candidates report being tested on.
- Write one worked example in Debounce and time yourself on it.
Deliverable: One timed worked example in Debounce.
Day 4 — Work Throttling
- Spend the session on Throttling, which Farzi Engineer candidates report being tested on.
- Write one worked example in Throttling and time yourself on it.
Deliverable: One timed worked example in Throttling.
Day 5 — Answer out loud: Technical Fundamentals
- Answer aloud, timed: Explain the core concepts of JavaScript and Django.
- Answer aloud, timed: Write code to implement debounce and throttling in JavaScript.
Deliverable: Spoken answers to 2 reported Technical Fundamentals question(s), under time.
Day 6 — Answer out loud: Problem Solving and Logic
- Answer aloud, timed: There are 10 mangoes, each weighing 10 units; identify the one that is defective.
- Answer aloud, timed: Walk me through how you would debug a critical issue in a production environment.
Deliverable: Spoken answers to 2 reported Problem Solving and Logic question(s), under time.
Day 7 — Answer out loud: Behavioral and Leadership
- Answer aloud, timed: Describe a scenario where you had to manage a conflict within a team you were leading.
- Answer aloud, timed: How do you handle feedback from peers or senior stakeholders on your code?
Deliverable: Spoken answers to 2 reported Behavioral and Leadership question(s), under time.
Behavioural preparation
Behavioural rounds judge the decision you made and what it cost.
Describe a scenario where you had to manage a conflict within a team you were leading.
Medium · Behavioral and Leadership
Approach
- Pick a story where you made the decision, not one where you watched it.
- State the situation in two sentences and spend the rest on the reasoning.
- Give the blast radius: what could have broken, and what you measured.
- Name the disagreement and how you resolved it with evidence.
Follow-up
- What would you do differently if you ran that again?
- How did you know your change caused the improvement?
How do you handle feedback from peers or senior stakeholders on your code?
Medium · Behavioral and Leadership
Approach
- Pick a story where you made the decision, not one where you watched it.
- State the situation in two sentences and spend the rest on the reasoning.
- Give the blast radius: what could have broken, and what you measured.
- Name the disagreement and how you resolved it with evidence.
Follow-up
- What would you do differently if you ran that again?
- How did you know your change caused the improvement?
Tell me about a time you had to pivot your approach due to changing project requirements.
Medium · Behavioral and Leadership
Approach
- Pick a story where you made the decision, not one where you watched it.
- State the situation in two sentences and spend the rest on the reasoning.
- Give the blast radius: what could have broken, and what you measured.
- Name the disagreement and how you resolved it with evidence.
Follow-up
- What would you do differently if you ran that again?
- How did you know your change caused the improvement?