cswork / libraryOpen practice workspace

Interview guides · Loureiro Engineering Associates

Loureiro Engineering Associates Software Engineer Interview Guide

Loureiro Engineering Associates Software Engineer interview guide: reported rounds, questions and how candidates describe the process.

The 60-second brief

At Loureiro Engineering Associates, a Software Engineer plays a unique and highly impactful role that bridges the gap between advanced technology and physical-world engineering. Unlike traditional tech companies where software is the standalone product, software engineering at Loureiro directly empowers multidisciplinary teams of civil, electrical, environmental, and construction engineers. You will design, build, and maintain the critical systems, automation tools, and data platforms that allow these teams to deliver complex infrastructure and environmental projects efficiently. Your work will have a tangible impact on how physical infrastructure is designed, monitored, and executed.

This guide is scoped to a Software Engineer candidate at Loureiro Engineering Associates.

Focus areas

  • Software Engineering (Role Expectations)
  • Problem Solving
  • Engineering Domain Awareness

The Loureiro Engineering Associates interview process

Loureiro Engineering Associates candidates report 3 rounds over 3-5 weeks. The stages below are what candidates describe, not a published process.

Preliminary Screening Call

Initial call with a Human Resources representative to discuss your background, career goals, and alignment with company values.

What to demonstrate

  • Initial call with a Human Resources representative to discuss your background, career goals, and alignment with company values
  • Depth in Software Engineering (Role Expectations)

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.

Primary Technical Interview

Remote interview with two higher-level engineers or a division lead focusing on past project experience and technical capabilities.

What to demonstrate

  • Remote interview with two higher-level engineers or a division lead focusing on past project experience and technical capabilities
  • Depth in Software Engineering (Role Expectations)

How to prepare

  • Answer aloud and timed: How do you ensure code quality and maintainability when working on internal tools that may have long lifespcycles?
  • Answer aloud and timed: Describe a time you had to write a script to automate a highly repetitive manual task. What language did you choose and why?

In-Person Interview

Visit to the Plainville, CT headquarters to meet with upper management and discuss long-term career alignment and team fit.

What to demonstrate

  • Visit to the Plainville, CT headquarters to meet with upper management and discuss long-term career alignment and team fit
  • Depth in Software Engineering (Role Expectations)

How to prepare

  • Answer aloud and timed: Describe a situation where you had to gather software requirements from a stakeholder who did not understand programming. How did you ensure you built the right tool?
  • Answer aloud and timed: Tell me about a time you faced a tight deadline on a project with shifting requirements. How did you prioritize your tasks?

Where candidates lose points

Research the Core Business

Before your interview, take the time to understand Loureiro's primary business lines, including environmental remediation, civil engineering, and construction services. Showing that you understand the company's broader mission will set you apart from candidates who only focus on the software side.

Highlight Your Adaptability

Be ready to share examples of how you have successfully learned new technologies or domains quickly. In a multidisciplinary firm, your ability to adapt to different engineering requirements is highly valued.

Emphasize Your Communication Skills

Use your behavioral questions to demonstrate that you can translate complex software concepts into simple, business-oriented terms. This is a critical skill for a role that interfaces constantly with non-technical stakeholders.

Questions & practice

Canonicalise a request body into a stable idempotency fingerprint

Medium · parsing · canonicalisation · hashing

idempotency_key.request_fingerprint is a SHA-256 over the method, path and canonicalised body, and a retry whose fingerprint differs must be rejected with 422 rather than served the stored response. Write the canonicaliser. Bodies are JSON up to 256 KB nested at most 32 levels; clients vary key order, whitespace and unicode escaping, and some send 64-bit ids as JSON numbers. Produce a deterministic byte string such that semantically identical bodies match and any semantic difference does not. State your complexity and name two normalisations you refuse to perform.

Approach

  1. Parse once into a tree, then re-serialise under fixed rules: object keys sorted, array order preserved, one escaping convention, no insignificant whitespace. Parsing is O(n) and sorting keys is O(k log k) per object, so O(n log n) overall with O(depth) stack, and the 32-level cap is enforced during parsing because hostile nesting is how a canonicaliser becomes a stack overflow.
  2. Sort keys by their UTF-8 bytes and say why the obvious implementation is wrong in some runtimes: a default string comparison that orders by UTF-16 code units places surrogate pairs, meaning code points from U+10000 up, below U+E000 to U+FFFF, which is not UTF-8 byte order, so two services written in different languages disagree on the same document.
  3. Do not re-encode numbers through a double. IEEE-754 binary64 represents integers exactly only up to 2^53, so normalising a 19-digit id through a float changes it, and 1 against 1.0 cannot be reconciled without deciding whether they are the same value. Preserve the literal token, and require ids as strings at the API boundary if you want them comparable.
  4. Reject duplicate keys rather than picking one. JSON permits them and parsers disagree, most keeping the last, so any choice you make ties the fingerprint to a parser detail that the code handling the request does not necessarily share.

Follow-up

  • A client sends the same logical request with an extra field your API ignores. Same key, different fingerprint, so you return 422. Is that the right answer?
  • Where does the fingerprint get computed relative to request decompression and the body-size limit?

Diff a projection against the primary without per-row point reads

Hard · reconciliation · range hashing · throttling

The listing projection has drifted and some rows show a stale version. The primary holds 40,000,000 resource rows across 12,000 tenants while serving 1,200 writes and 14,000 reads per second. The obvious repair, reading each resource row and comparing its version against the projection, is correct and would eventually finish. Explain precisely why it is unacceptable here, then give a diff that finds the differing rows, state its complexity, and make it safe to run against a live primary. Replication lag is usually under 100 ms and is not bounded.

Approach

  1. Quantify the naive cost rather than calling it slow: 40,000,000 point reads at even 0.5 ms each is over five hours serialised, and the only lever is concurrency, which is exactly what you cannot spend. The primary's pool is sized for the write path, and 40,000,000 random reads evict the buffer cache that sustains the 85 percent cache hit rate, so the audit degrades the system it is auditing.
  2. Replace random access with one ordered pass per side. Both sides can be read in (tenant_id, resource_id) order, which is a sequential scan on each and a merge join in O(n) time and O(1) memory. For a dense diff that is the whole answer, and it reads the primary once instead of 40,000,000 times.
  3. For the expected sparse case, compare range hashes instead of rows: partition the key space, compute per range an order-independent aggregate over hash(resource_id, version), compare aggregates, and descend only into ranges that differ. With d differing rows and branching factor B, at most d ranges mismatch per level, so the drill-down examines O(d log_B(n/d)) ranges and reads full rows only in mismatching leaves.
  4. Aggregate with a sum modulo 2^64 or a multiset hash, never XOR. XOR is order-independent but self-cancelling, so two rows wrong in the same way, or a row duplicated on one side, leave the range aggregate matching and the range is declared clean.

Follow-up

  • The diff reports 900 stale rows. How do you decide between patching those rows and rebuilding the projection from resource_revision?
  • Same job, but the projection lives in a search index that cannot be scanned in key order. What changes?

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

  1. 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.
  2. 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.
  3. 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.
  4. 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?

Hold a per-tenant active cap against concurrent creates

Hard · write skew · isolation levels · constraints

A tenant on the standard plan may hold at most 50 resources with status='active'. The create handler runs SELECT count(*) FROM resource WHERE tenant_id = $1 AND status = 'active', compares to 50, then inserts. Two creates arrive 3 ms apart on different instances and the tenant lands at 51. Name the anomaly, say whether PostgreSQL 16 READ COMMITTED or REPEATABLE READ prevents it and why, then give an implementation that holds the cap at READ COMMITTED with the exact statements. Finally, say what changes when the cap is 'at most one running export per tenant' on job_run.

Approach

  1. Name it: write skew. The two transactions read an overlapping set and write disjoint rows, so there is no row-level conflict for the engine to detect and each commit is individually legal.
  2. Rule out the levels precisely. READ COMMITTED takes a fresh snapshot per statement and takes no lock on the counted rows, so both see 49. PostgreSQL's REPEATABLE READ is snapshot isolation: it removes non-repeatable reads and phantoms within the snapshot but still admits write skew, because the anomaly is not a re-read of a changed row, it is a read of a set that a concurrent transaction invalidates. Only SERIALIZABLE closes it, by tracking the read dependency and aborting one transaction with SQLSTATE 40001 — a guarantee that exists only if the application re-runs the whole transaction from the read.
  3. Convert the set predicate into a single-row conflict: keep tenant.active_resource_count and run UPDATE tenant SET active_resource_count = active_resource_count + 1 WHERE tenant_id = $1 AND active_resource_count < 50 in the same transaction as the INSERT. Zero affected rows is the cap, returned as 409. The row lock serialises the decision at any isolation level, and contention is bounded to one tenant's row — which is also the fair-scheduling unit, unlike a global counter that would convoy every tenant behind one row.
  4. State the cost you just took on: a counter is a second source of truth that can drift, so every path that changes status must adjust it inside the same transaction, and a periodic reconciliation has to exist, with resource_revision as the authority for what the count should have been.

Follow-up

  • A resource moves from archived back to active. Which statements change, and what breaks if the counter update and the status change land in different transactions?
  • The cap becomes plan-dependent and a plan can change mid-month. Where does the number 50 live, and who reads it?

Find version gaps and relay lag with window functions

Medium · window functions · event tables · frame semantics

outbox_event holds event_id, aggregate_type, aggregate_id, aggregate_version, event_type, payload, status ('pending','published','dead'), attempts, created_at, published_at. A projection is missing rows and you must decide whether the relay skipped events or the consumer dropped them. Write three queries over the last seven days: one listing every aggregate_id whose published aggregate_version sequence has a hole, one giving per-day counts with a running total, and one returning the newest published event per aggregate. For each, say where the window function is evaluated relative to WHERE and LIMIT. PostgreSQL 16.

Approach

  1. Gaps: compute lead(aggregate_version) OVER (PARTITION BY aggregate_id ORDER BY aggregate_version) in a subquery, then filter next_version <> aggregate_version + 1 in the outer query. Window functions are evaluated after WHERE, GROUP BY and HAVING and before the outer ORDER BY and LIMIT, so the predicate cannot sit in the same WHERE clause and PostgreSQL 16 has no QUALIFY.
  2. Say what the seven-day filter does to the answer: it truncates every partition, so the first row per aggregate has no predecessor inside the window and a hole spanning the boundary is invisible. Widen the window, or join to resource.version as the authority for the true maximum.
  3. Running total: SELECT date_trunc('day', created_at) AS d, count() AS n, sum(count()) OVER (ORDER BY date_trunc('day', created_at) ROWS UNBOUNDED PRECEDING). An aggregate inside a window call is legal because grouping runs before windowing. The grouping key is unique per row here so ROWS and RANGE agree, but write the frame anyway — over ungrouped rows with tied timestamps the default RANGE frame pulls in every peer row and the total jumps.
  4. Newest per aggregate: DISTINCT ON (aggregate_id) ... ORDER BY aggregate_id, aggregate_version DESC is the cheap PostgreSQL-only form when an index matches that order; row_number() OVER (PARTITION BY aggregate_id ORDER BY aggregate_version DESC) = 1 is the portable form and needs a subquery for the same evaluation-order reason as the gap query.

Follow-up

  • Relay failover redelivers events. Does a duplicate break the gap query, and how would you detect one from this table alone?
  • Turn the gap check into a continuous monitor rather than a query someone runs after an incident. What does it watch?

Explain how you would design a database schema to track real-time environmental sensor data across multiple mu

Medium · Technical & Systems Integration

Explain how you would design a database schema to track real-time environmental sensor data across multiple municipal locations.

Approach

  1. Fix the scope first: who calls this, how often, and what they do when it fails.
  2. Name the read and write paths separately; they rarely have the same bottleneck.
  3. Choose a partition key and say what query it makes expensive.
  4. State the consistency you need, and where you are willing to be stale.

Follow-up

  • What breaks first when traffic grows ten times?
  • How does this behave when that dependency is down for an hour?

Walk us through your preferred process for integrating third-party APIs into an existing internal application.

Medium · Technical & Systems Integration

Approach

  1. Say who the caller is and what they do when the call fails halfway.
  2. Define the identity of a request so a retry cannot double-apply it.
  3. Separate accepted, pending, failed and confirmed; they are different facts.
  4. Design the error taxonomy before the success shape; callers branch on it.

Follow-up

  • What happens if the caller retries after a timeout?
  • How does a client discover it is on an old version of this contract?

How do you ensure code quality and maintainability when working on internal tools that may have long lifespcyc

Medium · Technical & Systems Integration

How do you ensure code quality and maintainability when working on internal tools that may have long lifespcycles?

Approach

  1. Say who the caller is and what they do when the call fails halfway.
  2. Define the identity of a request so a retry cannot double-apply it.
  3. Separate accepted, pending, failed and confirmed; they are different facts.
  4. Design the error taxonomy before the success shape; callers branch on it.

Follow-up

  • What happens if the caller retries after a timeout?
  • How does a client discover it is on an old version of this contract?

If an internal engineering application is suddenly experiencing slow database queries, what steps do you take

Medium · Problem-Solving & Logic

If an internal engineering application is suddenly experiencing slow database queries, what steps do you take to diagnose and resolve the bottleneck?

Approach

  1. Clarify what is being asked and what a complete answer contains.
  2. State your assumptions explicitly before working the problem.
  3. Say what you would check first and why it is the highest-information step.
  4. 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 approach building a minimum viable product (MVP) when the end-users are unsure of their exact requi

Medium · Problem-Solving & Logic

How do you approach building a minimum viable product (MVP) when the end-users are unsure of their exact requirements?

Approach

  1. Clarify what is being asked and what a complete answer contains.
  2. State your assumptions explicitly before working the problem.
  3. Say what you would check first and why it is the highest-information step.
  4. Work from the requirement backwards to the design.

Follow-up

  • What assumption would you test first?
  • How would you know your answer was wrong?

Describe a complex technical bug you recently solved. What was your methodology for isolating the root cause?

Medium · Problem-Solving & Logic

Approach

  1. Establish what changed and when, before forming any theory.
  2. Pick a bisection that eliminates candidates whichever way it turns out.
  3. Check the instrumentation before believing the symptom.
  4. 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 Loureiro Engineering Associates candidates report.

Day 1 — Map the Loureiro Engineering Associates loop

  • Write out the reported sequence: Preliminary Screening Call, Primary Technical Interview, In-Person Interview.
  • 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 Software Engineering (Role Expectations)

  • Spend the session on Software Engineering (Role Expectations), which Loureiro Engineering Associates candidates report being tested on.
  • Write one worked example in Software Engineering (Role Expectations) and time yourself on it.

Deliverable: One timed worked example in Software Engineering (Role Expectations).

Day 3 — Work Problem Solving

  • Spend the session on Problem Solving, which Loureiro Engineering Associates candidates report being tested on.
  • Write one worked example in Problem Solving and time yourself on it.

Deliverable: One timed worked example in Problem Solving.

Day 4 — Work Engineering Domain Awareness

  • Spend the session on Engineering Domain Awareness, which Loureiro Engineering Associates candidates report being tested on.
  • Write one worked example in Engineering Domain Awareness and time yourself on it.

Deliverable: One timed worked example in Engineering Domain Awareness.

Day 5 — Answer out loud: Technical & Systems Integration

  • Answer aloud, timed: Explain how you would design a database schema to track real-time environmental sensor data across multiple municipal locations.
  • Answer aloud, timed: Walk us through your preferred process for integrating third-party APIs into an existing internal application.

Deliverable: Spoken answers to 2 reported Technical & Systems Integration question(s), under time.

Day 6 — Answer out loud: Behavioral & Collaboration

  • Answer aloud, timed: Describe a situation where you had to gather software requirements from a stakeholder who did not understand programming. How did you ensure you built the right tool?
  • Answer aloud, timed: Tell me about a time you faced a tight deadline on a project with shifting requirements. How did you prioritize your tasks?

Deliverable: Spoken answers to 2 reported Behavioral & Collaboration question(s), under time.

Day 7 — Answer out loud: Problem-Solving & Logic

  • Answer aloud, timed: If an internal engineering application is suddenly experiencing slow database queries, what steps do you take to diagnose and resolve the bottleneck?
  • Answer aloud, timed: How do you approach building a minimum viable product (MVP) when the end-users are unsure of their exact requirements?

Deliverable: Spoken answers to 2 reported Problem-Solving & Logic question(s), under time.

Behavioural preparation

Behavioural rounds judge the decision you made and what it cost.

Describe a time you had to write a script to automate a highly repetitive manual task. What language did you c

Medium · Technical & Systems Integration

Describe a time you had to write a script to automate a highly repetitive manual task. What language did you choose and why?

Approach

  1. Pick a story where you made the decision, not one where you watched it.
  2. State the situation in two sentences and spend the rest on the reasoning.
  3. Give the blast radius: what could have broken, and what you measured.
  4. 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?

Describe a situation where you had to gather software requirements from a stakeholder who did not understand p

Medium · Behavioral & Collaboration

Describe a situation where you had to gather software requirements from a stakeholder who did not understand programming. How did you ensure you built the right tool?

Approach

  1. Pick a story where you made the decision, not one where you watched it.
  2. State the situation in two sentences and spend the rest on the reasoning.
  3. Give the blast radius: what could have broken, and what you measured.
  4. 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 faced a tight deadline on a project with shifting requirements. How did you prioritiz

Medium · Behavioral & Collaboration

Tell me about a time you faced a tight deadline on a project with shifting requirements. How did you prioritize your tasks?

Approach

  1. Pick a story where you made the decision, not one where you watched it.
  2. State the situation in two sentences and spend the rest on the reasoning.
  3. Give the blast radius: what could have broken, and what you measured.
  4. 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?

Walk us through a conflict you had with a team member regarding a technical decision. How did you resolve it?

Medium · Behavioral & Collaboration

Approach

  1. Pick a story where you made the decision, not one where you watched it.
  2. State the situation in two sentences and spend the rest on the reasoning.
  3. Give the blast radius: what could have broken, and what you measured.
  4. 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?

Why do you want to work as a Software Engineer at an engineering and construction firm rather than a tradition

Medium · Behavioral & Collaboration

Why do you want to work as a Software Engineer at an engineering and construction firm rather than a traditional software-as-a-service company?

Approach

  1. Pick a story where you made the decision, not one where you watched it.
  2. State the situation in two sentences and spend the rest on the reasoning.
  3. Give the blast radius: what could have broken, and what you measured.
  4. 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?