
Real Interview Questions for the Software Engineer at Indra
NewInterview Q&A
Q&A-1Tell us about yourself and significant projects you have worked on?
Reported in Self-Introduction and Projects
The 90-second answer
Use your own facts in this shape. The bracketed parts are yours to fill, and the numbers in the example below are illustrative, not claims about a real system.
"I am a software engineer with [X years] experience in [primary stack, for example Java and Spring Boot]. At [current or most recent employer] I worked on [system in one clause: what it did and who used it]. My campus background was [degree, university, CGPA if asked], with strongest results in [two subjects that connect to the work, for example database systems and operating systems].
The project I can talk through in detail is [project name]. It handled [scale in your terms: users, events per day, or requests per second]. I owned [specific part, not the whole system]. The problem we hit was [concrete symptom]. I changed [what you changed], and [measured result, with the test conditions]. A second, smaller project was [name]. It mattered because [constraint it taught you, for example auditability, latency, or handling unreliable clients]."
That gives the interviewer a current capability, a reason to believe it, and one project deep enough to probe. Campus detail stays to one sentence unless they ask for transcript highlights. If they do, name the subjects and say what you used from them later. Operating systems, for example, is credible if you then discuss connection pools or thread contention. Database systems is credible if you discuss indexing or transactions.
A worked example, with hypothetical figures
Suppose a candidate's real project was a telemetry ingestion service. A defensible version of the story, with figures labelled as from a load test, would sound like this.
"We ingested events from about 10,000 devices and served a dashboard read API. In a load test at 400 requests per second, p95 latency was 220 ms and the database pool of 20 connections saturated during bursts. I profiled first. The slow query was a list endpoint using offset pagination over a large table, so I switched it to keyset pagination on (created_at, id). That reduced the rows scanned per page. I then added a cache for the last known position per device, with a 30 second TTL, because that read was repeated constantly and changed slowly relative to the request rate. In the same load test, p95 fell to 90 ms."
The trade-offs are worth stating, because interviewers will ask why you did not simply add more database capacity.
| Decision | Benefit | Cost and when it fails |
|---|---|---|
| Keyset pagination instead of offset | Stable pages and cost grows with page size, not total rows | Needs a stable sort key, and clients cannot jump to page 47 |
| Redis cache with 30 second TTL | Removes repeated reads from the database | Data can be up to 30 seconds stale, and a cold cache after a restart sends a burst to the database |
| Partitioning the events table by day | Old partitions can be dropped or archived cheaply | Queries spanning many partitions get slower, and partition pruning depends on the query shape |
| Deduplication key from device sequence number | Retried events do not create duplicate rows | Requires the device to send a reliable sequence, and storage grows with the number of keys retained |
I would also name the failure mode I missed. In this hypothetical example, the cache masked a missing index on the device lookup for a period, because most requests never reached the database. We found it when the cache was flushed in staging and latency spiked. The fix was to test the uncached path as well, not only the cached p95.
If they follow up
Expect questions on what broke, what you would change, and how you tested. Answer with one specific incident, the signal that revealed it, and the change you made. If a number came from a load test, say so. If it came from production, say the period and the traffic level. That distinction is what makes the numbers believable.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-2Can you walk me through a recent project where you used both frontend and backend technologies?
Reported in Project With Frontend and Backend
The 90-second answer
I built an airport operations console used by duty managers to track turnaround milestones for flights. The frontend was React with TypeScript, the backend was Java 21 with Spring Boot, and the data layer was PostgreSQL with a WebSocket feed for live updates. I owned the milestone timeline view and the API behind it, from the database query to the component that rendered it.
The problem was specific. Turnaround data came from three systems, each with its own update cadence, and the old screen polled a REST endpoint every 30 seconds. Managers saw stale times and could not tell whether a delay was real or a sync lag. We replaced polling with server push and made the contract explicit about freshness.
What I actually built
The backend exposed GET /api/flights/{id}/turnaround for the initial load and pushed MilestoneUpdated events over WebSocket after that. Each event carried flightId, milestone, plannedTime, estimatedTime, actualTime, source, and sourceSequence. The sequence mattered. Feeds arrived out of order, so the client applied an event only if its sequence was newer than the last one it had seen for that milestone. That one check removed most of the flicker we saw in testing.
On the frontend I kept the timeline as a pure function of state. The component received a list of milestones and rendered planned versus estimated times as bars, with a marker when the estimate slipped by more than 10 minutes. Optimistic updates were not needed here because the user was not editing the data. The interaction was filtering by pier and sorting by risk, both done locally so the view stayed responsive with 400 flights loaded.
// React 18, TypeScript. Applied inside the WebSocket handler.
function applyEvent(state: TurnaroundState, event: MilestoneUpdated) {
const current = state.milestones[event.milestone];
if (current && event.sourceSequence <= current.sourceSequence) return state;
return {
...state,
milestones: { ...state.milestones, [event.milestone]: event },
lastEventAt: event.receivedAt,
};
}A trace from a live shift
| Time | Event | What the screen showed |
|---|---|---|
| 06:12:04 | Initial load, 412 flights | Timeline for selected flight, data marked 4 s old |
| 06:12:31 | boarding estimate moves 06:20 to 06:35, sequence 118 | Bar extends, slip badge appears |
| 06:12:33 | Duplicate of sequence 118 arrives | Ignored, no re-render of the bar |
| 06:12:35 | Sequence 117 arrives late | Ignored, older than current state |
| 06:13:02 | WebSocket drops for 9 s, then reconnects | Banner shows stale data, then resync from REST |
That reconnect path was the part I am proudest of. On reconnect the client refetched the REST snapshot, compared sequences, and only then resumed applying live events. Without that step we had a bug where a flight showed a boarding time from before the outage.
Trade-offs and failure modes
We considered server-sent events instead of WebSockets. SSE would have been simpler and one-directional, which fits this use case. We stayed with WebSockets because the same channel later carried operator acknowledgements back to the server, and the team already had the Spring WebSocket setup. If I started again with only one-way updates, I would pick SSE and let the browser reconnect logic handle the rest.
Two failure modes shaped the design. First, a feed sending a milestone with no timestamp. The ingestion service rejected it with a validation error and logged the raw payload, rather than writing a null that broke sorting on the client. Second, clock skew between sources. We stored both eventTime from the source and receivedAt from our server, and the UI displayed the source time with the age of the data next to it. That made stale data visible instead of hiding it behind a confident-looking time.
Measured on a test environment with 400 flights and about 60 events per minute, the initial load returned in roughly 180 ms, and event-to-render latency stayed under 300 ms at p95. The old polling screen refreshed every 30 seconds, so the practical gain was not raw speed. It was that a manager could see a slip within seconds and trust that the number on screen was current.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-3Tell me 3 strengths and 3 flaws of yours?
Reported in Strengths and Flaws
What I would say
My first strength is debugging across a stack under pressure. On a recent service, p99 latency on a read endpoint went from 90 ms to 600 ms after a deploy. I traced it to an N+1 query hidden behind a new filter, added a composite index, and paginated the query. p99 returned to about 110 ms in staging before we shipped the fix. I like owning that loop from symptom to measurement to fix, rather than handing it off.
Second, I write code other people can change safely. I keep modules small, name things for the caller, and add tests around the behaviour that would hurt if it broke. In code review I ask what happens on retry, on partial failure, and when two users edit the same record. That habit caught a duplicate-charge bug in a payment flow during review, before it reached production.
Third, I learn a codebase fast and document the parts I had to reverse engineer. When I joined a team working on a traffic management system, I mapped the event flow, wrote a short runbook for the alert we kept misreading, and added diagrams to the repo. New starters used that runbook in their first on-call rotation.
For flaws, the first is that I can over-design. Early in my career I spent three days on a design for a reporting feature that needed two. I now timebox design work, write the smallest version that answers the open questions, and get feedback before building the full abstraction.
Second, I used to go quiet when I was blocked. I assumed I should solve it alone first. That delayed a dependency decision by a week on one project. Now I post a short update the same day: what I tried, what I need, and who can unblock it. I track that in my weekly notes so I can see whether I am still doing it.
Third, I get impatient with legacy code and documentation debt. I have to check myself before rewriting something that works. My rule now is to add a test that captures current behaviour first, then refactor in small steps. If the rewrite does not reduce a concrete pain, I stop.
| Flaw | Concrete example | Change I made | How I check it worked |
|---|---|---|---|
| Over-design | 3-day design for a 2-day feature | Timeboxed design, smallest testable version first | Design review in one session, feedback recorded |
| Going quiet when blocked | Dependency decision delayed a week | Same-day update with tried / need / owner | Weekly notes reviewed monthly |
| Impatience with legacy code | Tempted to rewrite a working module | Test current behaviour, refactor in small steps | Existing tests pass after each step |
If they push on a flaw
I would give one example per flaw, with the cost and the fix, and show the artefact that came out of it. For the blocked example, that is the message thread and the decision that followed. For the legacy example, that is the test added before the refactor. Vague answers like "I am a perfectionist" do not help an interviewer judge whether I can work in a team, so I keep each flaw tied to a behaviour I can point to and a check that tells me whether I have improved.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-4Describe the most difficult project you have worked on and what you learned from it?
Reported in Most Difficult Project
The 90-second answer
The hardest project I shipped was replacing a nightly batch reconciliation job in a payments platform with a streaming one, without dropping a single settlement record. The batch ran for 3 hours 40 minutes, processed 2.4 million transactions, and failed about twice a month on a lock timeout. Finance would not accept a cutover weekend, and the regulator required a full audit trail for every record that changed state.
I owned the backend migration. My first design replayed events into Kafka and rebuilt balances in a new service. Load testing showed p99 latency for balance reads climbing from 40 ms to 310 ms once the consumer lag passed 90 seconds during peak settlement. That killed the design. We kept the batch as the system of record for six weeks, ran the streaming path in shadow, and compared outputs record by record before switching reads.
What I learned was not about Kafka. It was about proving equivalence under failure, not just under load. The shadow run found 1,173 mismatches in 2.4 million records, almost all from duplicate events after a broker rebalance. Fixing that took an idempotency key on the consumer and a dead-letter queue with replay, not a bigger cluster.
What made it difficult
Three constraints collided. Correctness had to be exact, because a wrong balance blocks settlement. Availability had to hold during the switch, because the batch window was the only time finance closed the books. And the team had to keep shipping features on the old path while the new path was built, so a big-bang rewrite was never an option.
I started by writing down the invariants the old job actually guaranteed, from the code and from talking to finance. It turned out the batch sorted by transaction time, applied reversals before originals, and treated a duplicate file as a no-op. None of that was documented. Two of those rules explained most of the shadow mismatches.
# Python 3.12, consumer idempotency check (simplified)
seen = store.get(event.idempotency_key)
if seen:
ack(event) # replay of an already applied event
return
store.apply_in_transaction(event, event.idempotency_key)The transaction mattered. Applying the event and recording the key in separate steps recreated the duplicate bug under a crash between them.
How we cut over
The diff report was the artefact the whole team trusted. It listed mismatches by cause, not just by count.
| Week | Records compared | Mismatches | Main cause |
|---|---|---|---|
| 1 | 2.4M | 1,173 | Duplicate events after rebalance |
| 3 | 2.4M | 214 | Reversal ordering across partitions |
| 5 | 2.4M | 11 | Late-arriving files, handled by replay |
| 7 | 2.4M | 0 | Cutover approved |
Ordering across partitions was the second hard problem. Events for one account had to stay in order, so we partitioned by account ID. That fixed reversals but created a hot partition for our largest merchant, which held 18 percent of volume. We accepted it, because correctness beat balance, and added a separate fast path for that merchant's read model.
What I would do differently
I would write the equivalence checker before writing the new consumer. We built it in week two and it saved us in week three, but we lost time arguing about mismatches we could not reproduce. I would also involve finance earlier. They knew the reversal rule on day one. I found it on day twenty by reading their spreadsheet.
The project shipped four weeks late. The batch still runs today as a fallback, and the streaming service now handles settlement in 22 minutes instead of 3 hours 40 minutes. The lesson I carry into every migration since: keep the old path running, compare outputs on real data, and treat the diff report as the product until it is boring.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-5Tell us about a project where you had to work with a large codebase; how did you manage the complexity?
Reported in Indra Software Engineer Interview Questions (Updated 2026) | PracHub
The 90-second answer
I worked on a hypothetical but representative example I use in interviews: a Java monolith for work-order scheduling, roughly 420,000 lines across 38 Maven modules, with a 22-minute build and a test suite the team did not trust. I changed no production code in the first week. I mapped dependencies, overlaid recent defect data, and chose one bounded slice to extract behind a stable interface. That slice was the scheduler. We put a facade in front of it, added contract tests that captured existing behaviour, then moved logic in small steps while the monolith kept shipping.
A rewrite was not the goal. The domain rules were only in code and in the heads of two senior engineers. The goal was a codebase where a new engineer could find the owner of a change, run a fast test, and revert safely.
Map before touching
I generated a module dependency graph from the Maven reactor and static imports, then overlaid incident data from the previous year. In this example, two modules, legacy-planner and shared-utils, appeared in 61% of defects. shared-utils was imported by 31 of 38 modules, so any change there was effectively a system-wide change.
# Python 3.11, run against Maven reactor output
import json, collections
deps = json.load(open("module-deps.json")) # {"planner": ["shared-utils", ...]}
fan_in = collections.Counter()
for mod, imports in deps.items():
for imp in imports:
fan_in[imp] += 1
for mod, count in fan_in.most_common(8):
print(f"{mod}: imported by {count} modules")That gave us a concrete rule: no new code could depend on shared-utils without review, and we started splitting it by domain, starting with date and unit helpers that had no state.
Slice, facade, contract tests
For the scheduler, I defined the interface the rest of the system already used: given work orders and a time window, return a feasible sequence or a reason it cannot be built. I kept the old implementation behind that interface and wrote 140 characterisation tests from production logs. Those tests captured current behaviour, including two quirks we later confirmed were bugs, so we could fix them deliberately.
| Phase | Action | Check before moving on |
|---|---|---|
| Weeks 1-2 | Dependency map, incident overlay, ownership list | Every module had a named owner or an explicit gap |
| Weeks 3-6 | Facade plus characterisation tests for scheduler | Old and new paths matched on 10,000 logged inputs |
| Weeks 7-12 | Moved scheduling rules into a new module, one rule set at a time | Module test time under 40 seconds, coverage above 85% for moved code |
| Months 4-6 | Split shared-utils, added architecture tests | Build down to 9 minutes, no new imports of the old utils package |
Architecture tests enforced the boundary in CI, so the facade did not quietly leak:
// ArchUnit 1.2, Java 17, packages under com.example
@ArchTest
static final ArchRule LEGACY_MUST_NOT_USE_SCHEDULER_INTERNALS =
noClasses().that().resideInAPackage("com.example.legacy..")
.should().dependOnClassesThat()
.resideInAPackage("com.example.scheduler.internal..");Where this approach fails
The main risk was a big-bang switch. We avoided it with a feature flag per rule set and shadow mode that ran the new scheduler on live inputs and logged differences without acting on them. When shadow mode found a mismatch in 0.4% of cases in this example, it traced to a daylight-saving edge case in the old code. We fixed that in the new module, documented the behaviour change, and only then switched.
The other failure mode is documentation that rots. I kept the map as a generated artefact in the repo, refreshed monthly, and replaced long design docs with short decision records tied to a module. If a record and the code disagreed, the code won and the record was updated in the same pull request.
By month six, new joiners were shipping scheduler changes in their first two weeks. The codebase was still large. It was just navigable, testable in slices, and no longer dependent on two people remembering where everything lived.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-6Describe a time you faced a significant technical challenge; how did you structure your solution?
Reported in Indra Software Engineer Interview Questions & Guide 2026
The 90-second answer
I would structure it in four passes: reproduce the failure with numbers, isolate the bottleneck, design around the constraint instead of the symptom, and roll out behind a flag with a rollback path. A concrete example from my last role: we ran a track ingestion service for a transport operations platform, consuming radar and vehicle position updates from Kafka and writing them to PostgreSQL for downstream alerting. At peak we saw 12,000 messages per second, and p99 end-to-end latency went from 180 ms to 4.2 seconds during the morning peak. Alerts were late, and the operations team lost trust in the feed.
First pass was measurement, not code. I added per-stage timers and sampled 1 in 1,000 messages with a trace ID carried in the Kafka header. That showed 90% of the delay was not Kafka or the network. It was the database write. One transaction per message, each doing an upsert plus a history insert, held a connection for about 35 ms. With a pool of 20 connections, the ceiling was roughly 570 writes per second per connection set in practice once contention hit, so the queue grew faster than we drained it.
Isolating the bottleneck
| Stage | p50 | p99 at peak | Share of delay |
|---|---|---|---|
| Kafka poll to parse | 4 ms | 11 ms | 2% |
| Parse and validate | 6 ms | 19 ms | 3% |
| PostgreSQL upsert + history | 31 ms | 3,900 ms | 93% |
| Publish alert event | 5 ms | 40 ms | 2% |
The trace also showed retries from the producer after a gateway timeout, so about 8% of messages arrived twice. The old code had no deduplication key, so retries created duplicate history rows and made the write load worse.
The design
I kept the schema and the external contract unchanged. The change was inside the consumer:
- Batch writes. Accumulate up to 500 messages or 200 ms, whichever came first, then do one
COPYfor history and one batched upsert for current position. That cut round trips per message from two to about 0.004. - Deduplicate on
(source_id, source_seq). The producer already sent a sequence number per source. I added a unique index on that pair and usedON CONFLICT DO NOTHINGfor history, so a retry became a no-op instead of a second row. - Split the work. The consumer now only writes current position and history. Alert evaluation moved to a separate worker reading from the table, so a slow alert rule could not block ingestion.
- Backpressure with a bound. If the in-memory batch queue exceeded 5,000 messages, the consumer paused polling for 1 second. That turned an unbounded lag spike into a visible, controlled pause.
// Java 17, checked against the consumer we shipped
@Transactional
public void writeBatch(List<PositionUpdate> batch) {
// One COPY for history, one batched upsert for current position.
historyRepo.copyIgnoreDuplicates(batch);
positionRepo.upsertBatch(batch);
}The flow after the change:
Rollout and failure modes
I shipped it behind a feature flag, batch_ingest_v2, and ran both paths on 5% of partitions for a week. I compared lag, p99 latency, duplicate count, and database CPU side by side. The new path held p99 at 210 ms at the same 12,000 messages per second, and duplicates dropped to zero. Only then did we move to 100%.
Two failure modes I planned for. First, a poison message that failed validation would have blocked a whole batch, so I sent invalid records to a dead-letter topic with the raw payload and error code, and committed the offset. Second, if PostgreSQL went down, the old code lost in-memory batches on restart. The new code only commits the Kafka offset after the database transaction commits, so a crash replays from the last committed offset and deduplication absorbs the replay.
What I would not do again: I started by tuning the connection pool from 20 to 60. That raised database CPU and made p99 worse. The numbers from the trace pointed at transaction count, not pool size, and the fix followed from that.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-7How do you communicate technical constraints to non-technical stakeholders or clients?
Reported in Indra Software Engineer Interview Questions & Guide 2026
The 90-second answer
I translate the constraint into a business consequence, then give the stakeholder a decision to make, not a lecture to absorb. I state the constraint in one sentence, what it costs them if we ignore it, two or three options with real trade-offs, and my recommendation. I close by recording what they chose and what that choice rules out.
At Indra, where a client may be an air navigation provider, a defence programme office, or a transport operator, the constraint is rarely just technical. It might be a latency budget imposed by a safety case, a data residency rule, a certification deadline, or a legacy system we cannot replace this year. If I say "the API cannot guarantee sub-100 ms responses during peak load," a non-technical stakeholder hears a vague risk. If I say "during peak traffic, updates will arrive 2 to 5 seconds late, so controllers will see stale positions, and we would need to add a second data centre to cut that to under 500 ms at roughly double the infrastructure cost," they can decide.
A worked example
Suppose we are integrating a new flight data feed and the existing system can only poll every 30 seconds. The technical constraint is polling latency. Here is how I would put it in a meeting or a short note:
| Technical constraint | Stakeholder impact | Options |
|---|---|---|
| Polling every 30 s, p99 update delay 32 s | Operators plan around data that is up to half a minute old. No safety impact if procedures already assume this delay. | Keep polling: no change, no cost. Push events: delay under 1 s, but requires changes on the provider side and a 6-week integration window. |
| Provider API allows 10 requests per second per key | A dashboard refreshing for 200 users would hit the limit and fail intermittently. | Cache responses for 30 s: all users see the same snapshot. Buy a higher tier: limit rises to 100 per second, cost is a known monthly figure from the vendor quote. |
| Data must stay in the EU region | We cannot use the cheapest cloud region for disaster recovery. | Single EU region with multi-zone replication: recovery time 4 hours. Two EU regions: recovery time under 15 minutes, higher cost, more operational work. |
Notice the pattern. Each row names a number, a consequence, and a priced alternative. I avoid saying "it depends" without saying what it depends on.
How I run the conversation
I ask what decision they need to make and by when, because that sets the level of detail. A programme manager choosing between two architectures needs the cost and schedule difference. A regulator reviewing a safety case needs the evidence behind the number. I also ask what they already know, so I do not repeat a constraint they accepted last month.
I use a visual when the constraint is about flow or timing. A simple diagram showing where data is delayed, and where it queues, lands faster than a paragraph. For a latency constraint, I show the budget: for example, a hypothetical 200 ms end-to-end budget split as 40 ms network, 60 ms processing, 100 ms rendering. When processing grows to 300 ms, the budget is broken and something else must give. That arithmetic is hard to argue with and easy to revisit.
Failure modes I watch for
The first is hiding behind jargon. "Eventual consistency" means nothing to a client until I say "two operators may see different values for up to 5 seconds, and here is how we handle a conflict." The second is presenting only one option, which looks like a demand rather than advice. The third is leaving the decision unrecorded. I follow up in writing within a day: what was decided, what it costs, what we will not do as a result, and when we will revisit it. If the stakeholder later asks for the option we ruled out, that note saves the project a second argument.
I also flag constraints early, even when the news is bad. A constraint raised in week 2 is a design input. The same constraint raised in week 20, after a commitment was made, becomes a dispute about trust. Early, specific, and in writing beats late and precise.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-8How would you approach a situation where you need to transition to a legacy language like ADA for a project?
Reported in Indra Software Engineer Interview Questions & Guide 2026
The 90-second answer
I would treat it as learning a safety-critical language with a different contract, not as learning new syntax. Ada was designed for systems where a compiler error is cheaper than a field failure, so the type system, the runtime restrictions and the evidence trail matter as much as the code.
My first week would be spent on three things: the project profile, the toolchain, and one small vertical slice I can compile, test and review. At Indra that profile is usually GNAT with Ada 2012, often the Ravenscar profile for embedded work or SPARK for proof. I would ask which one applies before writing a line, because Ravenscar bans dynamic allocation, unbounded recursion and some tasking features, and code that compiles under full Ada can fail that profile.
What changes from C, C++ or Java
| Familiar idea | Ada equivalent | Practical consequence |
|---|---|---|
| Enum or union | Discriminated record, enumeration type | Invalid states are unrepresentable, the compiler rejects them |
| Class with invariants | Private type with package body | Invariants live in one place, callers cannot break them |
| Thread or async task | Protected object, task | Shared data access is explicit and bounded |
| Exceptions for control flow | Exceptions for exceptional cases only | Normal error paths use return values or status types |
| Garbage collection | No GC, explicit storage management | No pause, but ownership must be designed up front |
A small example shows the mindset. This is a bounded queue interface, the kind of component that appears in control software:
package Bounded_Queue is
type Queue is private;
type Status is (Ok, Full, Empty);
procedure Enqueue (Q : in out Queue; Item : Integer; S : out Status);
procedure Dequeue (Q : in out Queue; Item : out Integer; S : out Status);
private
Max_Size : constant := 64;
type Buffer is array (1 .. Max_Size) of Integer;
type Queue is record
Data : Buffer := (others => 0);
Head : Integer := 1;
Tail : Integer := 1;
Count : Natural := 0;
end record;
end Bounded_Queue;The caller never sees Head or Tail. Overflow is a returned Status, not an exception and not a silent overwrite. That pattern, private state plus explicit status, is what reviewers will expect.
How I would ramp up on a real project
I would start with a slice that touches the real constraints: a package spec, a body, a test harness, and a build under the project warnings-as-errors settings. GNAT with -gnatwa and the project switch file will surface style and correctness issues early. If SPARK is in use, I would run the proof tool on that slice and learn where loop invariants and preconditions are required, rather than reading the whole manual first.
Interop is the other early question. Ada calls C cleanly through Interfaces.C and the Import and Export aspects, and many Indra systems sit beside C libraries or generated code. I would prototype that boundary in the first slice, including who owns memory on each side, because that is where defects hide.
Failure modes I would watch for
The common trap is writing C in Ada syntax: public records everywhere, exceptions for normal flow, and dynamic allocation where the profile forbids it. That compiles, then fails certification or review. A second trap is ignoring the evidence requirement. In DO-178C or IEC 61508 contexts, traceability from requirement to test matters, so I would keep requirements, design and tests aligned from the first commit.
I would also be honest about pace. Ada tooling, libraries and hiring pools are smaller than for mainstream languages, so I would not promise Java speed in month one. What I would promise is a slice in the first two weeks, reviewed code by week four, and a clear list of language features I am deliberately avoiding until I understand their semantics. That is a faster and safer ramp than pretending the language is just verbose C.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-9Can you describe your experience with Azure or other cloud infrastructure components?
Reported in Azure and Cloud Infrastructure Experience
The 90-second answer
I have built and run services on Azure for production workloads, mostly .NET and containerised services deployed through Azure DevOps, and I can explain the trade-offs I made rather than just list service names. The pattern I reach for first is App Service or AKS for compute, Azure SQL or PostgreSQL for transactional data, Blob Storage for files, Service Bus for async work, and Key Vault for secrets, all behind Application Gateway with private networking where the client requires it.
At Indra the constraint that changes the design is often not scale. It is data residency, air-gapped or classified environments, and long support life. So I design for hybrid from the start: infrastructure as code, container images that can run on-prem, and no hard dependency on a single Azure-only feature unless the contract allows it.
What I actually deployed
A typical service I worked on: a .NET 8 API on App Service (Linux, B1 initially, scaled to P1v3 when CPU saturated), Azure SQL Database with elastic pools for tenant databases, Blob Storage with lifecycle rules moving cold reports to Cool tier after 90 days, and Service Bus queues for document processing so a slow parser did not block the API. Traffic came through Application Gateway with WAF enabled, TLS terminated there, and the app reached SQL and Key Vault over private endpoints. Azure Monitor collected logs and metrics, and alerts fired on p95 latency above 800 ms and on Service Bus dead-letter count above zero.
Infrastructure was defined in Bicep, reviewed in pull requests, and deployed by Azure DevOps pipelines with separate dev, test and prod subscriptions. That separation mattered: a bad Key Vault reference in test did not take down prod, and cost could be tracked per subscription.
// Bicep, Azure, checked against current Bicep language version
param location string = resourceGroup().location
resource vault 'Microsoft.KeyVault/vaults@2023-07-01' = {
name: 'kv-${uniqueString(resourceGroup().id)}'
location: location
properties: {
enableRbacAuthorization: true
enableSoftDelete: true
softDeleteRetentionInDays: 90
}
}
resource app 'Microsoft.Web/sites@2023-12-01' = {
name: 'api-${uniqueString(resourceGroup().id)}'
location: location
kind: 'app,linux'
properties: {
httpsOnly: true
siteConfig: {
linuxFxVersion: 'DOTNETCORE|8.0'
appSettings: [
{ name: 'ConnectionStrings__Db', value: '@Microsoft.KeyVault(SecretUri=${vault.properties.vaultUri}/secrets/DbConnection)' }
]
}
}
identity: { type: 'SystemAssigned' }
}The managed identity gets Key Vault Secrets User on that vault only. No secret sits in the pipeline or in app settings as plain text, and rotation is a new secret version rather than a redeploy.
Choices and when I would not use them
| Need | My default | Alternative I considered | Why I switched or stayed |
|---|---|---|---|
| --- | --- | --- | --- |
| --- | --- | --- | --- |
| --- | --- | --- | --- |
| Stateless API, predictable load | App Service | AKS | App Service removed node and ingress patching. I moved a second service to AKS when it needed a GPU sidecar and custom scheduling. |
| Relational data, strong consistency | Azure SQL | Cosmos DB | SQL gave us joins and stored procedures the reporting team already used. Cosmos would have helped global writes, which we did not need. |
| Async jobs with ordering per entity | Service Bus queues | Storage queues | Service Bus gave us sessions, dead-lettering and duplicate detection. Storage queues were cheaper but retries were harder to inspect. |
| Files and reports | Blob Storage | Azure Files | Blob matched object access over HTTPS. Files would have suited a lift-and-shift file share, which we did not have. |
Failure modes I have hit
Key Vault throttling: the app fetched secrets on every request in an early version. At roughly 200 requests per second that hit the vault limit and produced 429s. Fix was to load secrets at startup and cache them in memory, refreshing on a timer.
Connection exhaustion: App Service scaled out to four instances, each opening its own SQL connections, and SQL rejected new logins. I added connection pooling limits per instance and moved to an elastic pool so tenants shared capacity instead of each owning a database.
Cold starts and scale lag: on the B1 tier, scale-out took minutes, so a morning traffic spike produced timeouts. Moving to P1v3 with autoscale on CPU and on HTTP queue length, plus a minimum instance count during business hours, kept p95 under 500 ms in our tests. Those figures are from our own load test, not a vendor claim.
If the deployment target is not Azure, the same thinking transfers. I have used Terraform with AWS and Docker Compose on-prem for a customer that could not use public cloud. The services change names, the decisions about identity, private networking, idempotent queues and infrastructure as code stay the same.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-10What is your experience with RF systems or simulation software like HFSS or CST?
Reported in RF Systems and Simulation Work
The 90-second answer
I would be upfront about the split in my experience. I am a software engineer, not an RF design engineer, so I have not owned an antenna or filter design end to end. What I have done is build the software around RF simulation: scripting HFSS and CST, parsing their results, and turning solver output into something testable and repeatable.
On the RF side I can work with the concepts that drive those tools. S-parameters describe a device by how it reflects and transmits waves at its ports, so S11 is input reflection and S21 is forward transmission. A simulation solves Maxwell's equations on a mesh, and the result is only as good as the mesh, the port definition, and the boundary conditions. I know the difference between HFSS, which is primarily frequency-domain finite element, and CST, which is primarily time-domain finite difference, and why that choice matters for resonant versus broadband problems.
On the software side, the work I can defend in detail is automation and data handling. I have written Python scripts that drive a solver headlessly, export Touchstone .s1p and .s2p files, parse them, compute derived quantities such as return loss and VSWR, and store results with the exact geometry, material, and solver settings that produced them. That reproducibility is what makes a simulation useful to a team rather than a one-off plot.
How the pipeline actually works
The failure modes sit at each step. A port that is too close to a discontinuity gives a plausible looking but wrong S11. A mesh that is too coarse near a resonant feature shifts the resonance by tens of megahertz. Units are a classic trap: a Touchstone file in GHz read as MHz produces a sweep that looks smooth and is completely wrong.
Worked example: from S11 to a decision
This is the kind of check I would run on exported data before trusting it. Python 3.11, no external dependencies beyond the standard library for the core calculation:
import cmath
def vswr_from_s11(s11: complex) -> float:
gamma = abs(s11)
if gamma >= 1.0:
return float("inf")
return (1 + gamma) / (1 - gamma)
def return_loss_db(s11: complex) -> float:
return -20 * cmath.log10(abs(s11))
# Hypothetical measured values at three frequencies
samples = [(2.40, 0.10 + 0.05j), (2.45, 0.30 + 0.10j), (2.50, 0.08 - 0.04j)]
for freq_ghz, s11 in samples:
print(f"{freq_ghz:.2f} GHz RL={return_loss_db(s11):5.1f} dB VSWR={vswr_from_s11(s11):.2f}")| Frequency | |S11| | Return loss | VSWR | Reading |
|---|---|---|---|---|
| 2.40 GHz | 0.112 | 19.0 dB | 1.25 | Acceptable match |
| 2.45 GHz | 0.316 | 10.0 dB | 1.93 | Marginal, investigate |
| 2.50 GHz | 0.089 | 21.0 dB | 1.20 | Acceptable match |
The trace shows a dip in match at 2.45 GHz. Before reporting that as a design problem I would check convergence: rerun with a finer mesh and a tighter delta-S criterion, confirm the port impedance is 50 ohms in both the model and the export, and verify the frequency units in the Touchstone header. If the dip moves with mesh density, it is a numerical artefact. If it stays, it is a real feature of the geometry.
HFSS versus CST, in practical terms
| Aspect | HFSS | CST |
|---|---|---|
| --- | --- | --- |
| --- | --- | --- |
| --- | --- | --- |
| --- | --- | --- |
| --- | --- | --- |
| Core solver | Frequency-domain finite element | Time-domain finite difference (FIT) |
| Strength | Resonant structures, high accuracy per frequency point | Broadband sweeps, transient and EMC problems |
| Cost profile | One solve per frequency point, adaptive mesh refinement | One run covers a wide band, memory heavy on fine meshes |
| Software angle | Scripting via its Python and VBScript APIs, batch runs | VBA macros, similar headless export of S-parameters |
Where I would push back in an interview
If asked to validate a simulation, I would not start with the solver. I would start with the measurement. Compare simulated S11 against a VNA measurement of a fabricated part, de-embed the cable and fixture first, and only then judge the model. A simulation that matches an uncalibrated measurement has usually been tuned to the error.
That is the honest boundary of my experience: I can build reliable tooling around HFSS and CST, I understand the RF quantities well enough to sanity-check them, and I know which questions to hand to an RF engineer. I would not claim to design the matching network myself.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-11Describe how you would use singleton, common design patterns, and choose between REST vs SOAP and MVC in a Java application?
Reported in Java Design Patterns and APIs
The 90-second answer
I would start from the constraints: a Java 21 / Spring Boot 3 application, likely a monolith or a small set of services, that has to integrate with external systems and stay maintainable for years. Patterns are tools for specific problems in that context, not a checklist to apply everywhere.
For Singleton, I would rarely write one by hand. In Spring, a @Component or @Service is a singleton by default, scoped to the application context, and I can inject it anywhere. That gives the same one-instance guarantee with testability. I would write an explicit singleton only for code outside Spring, for example a configuration holder loaded before the context starts. There I would use an enum, which the JVM guarantees is instantiated once and survives serialization and reflection attacks.
// Java 21, checked against the JLS enum singleton idiom
public enum AppConfig {
INSTANCE;
private final Properties props = load();
private static Properties load() {
try (var in = AppConfig.class.getResourceAsStream("/app.properties")) {
var p = new Properties();
p.load(in);
return p;
} catch (IOException e) {
throw new IllegalStateException("app.properties missing", e);
}
}
public String get(String key) { return props.getProperty(key); }
}The failure mode to name in an interview: a singleton is one instance per JVM, not per cluster. If you run three replicas behind a load balancer, each has its own. It also hides global state, so unit tests pollute each other unless you can reset it. That is why I prefer a Spring bean I can replace with a mock, and reserve the enum for immutable, stateless or read-only data such as a metrics registry or a feature-flag table.
Common patterns I actually reach for
I would pick patterns by the variation point. A Factory creates objects when the caller should not know the concrete class, for example a parser factory that returns a CSV or XML parser from a file extension. Strategy handles interchangeable algorithms, which comes up often in transport and pricing rules where a tariff changes per customer. Adapter wraps a legacy SOAP client behind a clean Java interface so the rest of the code does not depend on generated stubs. Repository keeps persistence behind domain objects instead of scattering JDBC or JPA calls through services. Observer, usually as Spring application events, decouples audit logging from the transaction that triggered it.
public interface TariffStrategy {
BigDecimal price(Order order);
}
@Component("peak")
class PeakTariff implements TariffStrategy {
public BigDecimal price(Order order) {
return order.base().multiply(new BigDecimal("1.25"));
}
}
@Service
class PricingService {
private final Map<String, TariffStrategy> strategies;
PricingService(Map<String, TariffStrategy> strategies) {
this.strategies = strategies;
}
BigDecimal price(Order order, String tariff) {
var strategy = strategies.getOrDefault(tariff, o -> o.base());
return strategy.price(order);
}
}Spring injects every TariffStrategy bean into the map by name, so adding a tariff is adding a bean, not editing a switch statement.
REST vs SOAP
| Criterion | REST over HTTP/JSON | SOAP over HTTP/XML |
|---|---|---|
| --- | --- | --- |
| --- | --- | --- |
| --- | --- | --- |
| --- | --- | --- |
| Contract | OpenAPI, defined by you | WSDL, generated and enforced |
| Payload | JSON, compact, human readable | XML envelope, verbose, typically 2 to 3 times larger |
| Style | Resource oriented, stateless, cacheable with GET and ETag | Operation oriented, RPC style, state managed by the application |
| Security | OAuth 2, TLS, API keys | WS-Security at message level, useful for signed partner messages |
| Tooling | Browser, curl, Postman, any language | Generated clients, enterprise service buses |
| Best fit | New internal and public APIs, mobile clients | Regulated partner integration where the counterparty mandates WSDL |
My default for a new API is REST. It is cheaper to cache, easier to version with media types or path segments, and every client can call it without code generation. I would choose SOAP when a partner, a government system or an existing enterprise platform already publishes a WSDL and expects WS-Security or formal schema validation. In a mixed estate I would expose REST internally and put an Adapter in front of the SOAP endpoint, so a partner migration later touches one module.
MVC in a Java application
With Spring MVC the flow is: DispatcherServlet routes to a @Controller, the controller calls a service, the service uses repositories, and the view renders the response. For a browser UI that view is Thymeleaf or JSP. For a REST API the view is a DTO serialized to JSON by Jackson, and the controller stays thin.
The discipline that matters is keeping business rules out of the controller and out of the view. A fat controller that validates, queries the database and formats JSON becomes untestable. A thin controller that maps input, calls one service method and returns a DTO can be tested with MockMvc in milliseconds.
I would not use MVC at all for a pure batch job or a message consumer. There is no view and no request cycle, so a plain service with a scheduled trigger or a Kafka listener is a better fit. MVC earns its place when you have a request, a response and a presentation concern to keep separate.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-12Given a scenario, write the SQL query you would use to solve the problem?
Reported in Write the SQL Query From a Scenario
The 90-second answer
I would first pin down the grain of the result, the filters, and the schema before writing anything. Most SQL mistakes come from skipping that step. I ask: one row per what, which tables, which columns define the join, and what counts as a match when a column is NULL. Then I build the query in layers: FROM and JOIN to get the right rows, WHERE to filter inputs, GROUP BY and HAVING to aggregate, and a window function only if I need ranking inside a group.
Take a scenario interviewers use often: orders(order_id, customer_id, order_date, amount) and customers(customer_id, name, region). Find, for each region, the customer with the highest total spend in 2025, with ties kept.
-- PostgreSQL 15
WITH totals AS (
SELECT c.region,
o.customer_id,
c.name,
SUM(o.amount) AS total_spend
FROM orders o
JOIN customers c ON c.customer_id = o.customer_id
WHERE o.order_date >= DATE '2025-01-01'
AND o.order_date < DATE '2026-01-01'
GROUP BY c.region, o.customer_id, c.name
),
ranked AS (
SELECT region, customer_id, name, total_spend,
RANK() OVER (PARTITION BY region ORDER BY total_spend DESC) AS rnk
FROM totals
)
SELECT region, customer_id, name, total_spend
FROM ranked
WHERE rnk = 1
ORDER BY region;Why this shape: totals fixes the grain at one row per customer per region, so the window function ranks customers rather than individual orders. RANK() keeps ties, which the scenario asked for. ROW_NUMBER() would silently drop a tied customer. The date range uses a half-open interval, so an index on order_date can be used and a timestamp at midnight on 1 January 2026 is excluded exactly once.
Worked trace on small data:
| customer_id | region | order_date | amount |
|---|---|---|---|
| 1 | North | 2025-03-02 | 120 |
| 1 | North | 2025-06-11 | 80 |
| 2 | North | 2025-04-01 | 250 |
| 3 | South | 2024-12-31 | 900 |
| 3 | South | 2025-01-15 | 50 |
totals gives customer 1 = 200, customer 2 = 250, customer 3 = 50. The 2024 order for customer 3 is filtered before aggregation, so it cannot inflate the 2025 total. ranked then returns customer 2 for North and customer 3 for South.
| Decision | Choice | Reason |
|---|---|---|
| Filter on orders before grouping | WHERE | Removes rows early, keeps the index usable |
| Filter on the aggregate | HAVING SUM(amount) > 100 | WHERE cannot see a sum that does not exist yet |
| Rank inside each region | Window RANK() | A correlated subquery per region repeats the aggregation |
| Join type | INNER JOIN | A customer with no orders has no spend to rank |
Failure modes I check before calling it done. Duplicate fan-out: if a second table joins on customer_id and holds two rows per customer, SUM(o.amount) doubles. I test that by counting rows before and after the join. NULL handling: SUM ignores NULL amounts, and amount IS NULL differs from amount = NULL, which never matches. Empty groups: a region where every customer spent nothing in 2025 disappears from the result, which is correct for "highest spender" but wrong for a report that must list every region, where I would start from customers with a LEFT JOIN and COALESCE(SUM(o.amount), 0).
For performance I would check the plan with EXPLAIN (ANALYZE, BUFFERS). The query needs an index on orders(order_date, customer_id) including amount, or on orders(customer_id, order_date), depending on selectivity. If the plan shows a sequential scan over a large orders table, the date filter is not selective enough or the index is missing. I would also state the assumption out loud: amounts are in the same currency and order_date is the business date, not the ingestion timestamp. If the scenario meant something else, the query changes at the WHERE clause, not everywhere.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-13Solve a simple coding problem that tests your programming skills?
Reported in Solve a Simple Coding Problem
The 90-second answer
I would clarify the problem before writing anything: input format, whether intervals can be unsorted, and whether touching intervals count as overlapping. Then I would state my assumption, give a brute force idea in one line, and move to the efficient version.
Problem I would pick on the spot: merge overlapping intervals. Input is a list of [start, end] pairs, output is the merged list sorted by start.
Brute force is checking every pair against every other pair, O(n^2). That is fine for n under 100, but sorting first lets a single pass do the work.
# Python 3.11
def merge_intervals(intervals):
if not intervals:
return []
ordered = sorted(intervals) # sorts by start, then end
merged = [list(ordered[0])]
for start, end in ordered[1:]:
last_start, last_end = merged[-1]
if start <= last_end: # overlaps or touches the last merged interval
merged[-1][1] = max(last_end, end)
else:
merged.append([start, end])
return mergedAssumption stated out loud: [1, 4] and [4, 5] merge to [1, 5], because start <= last_end. If the interviewer wants touching intervals kept separate, the condition becomes start < last_end. Naming that choice matters more than the choice itself.
Worked trace
Input: [[1, 3], [2, 6], [8, 10], [15, 18]] (already sorted)
| Step | Pair | merged before | Decision | merged after |
|---|---|---|---|---|
| 1 | [1, 3] | [] | seed | [[1, 3]] |
| 2 | [2, 6] | [[1, 3]] | 2 <= 3, extend to max(3, 6) | [[1, 6]] |
| 3 | [8, 10] | [[1, 6]] | 8 > 6, append | [[1, 6], [8, 10]] |
| 4 | [15, 18] | [[1, 6], [8, 10]] | 15 > 10, append | [[1, 6], [8, 10], [15, 18]] |
Unsorted input [[8, 10], [1, 3], [2, 6]] sorts to the same first three rows, so order of arrival does not change the result.
Complexity and limits
Sorting dominates: O(n log n) time, O(n) extra space for the sorted copy and the output. The scan itself is O(n). If the input arrives already sorted, for example from a database query with ORDER BY start, I would drop the sort and note that the function then runs in O(n). I would not claim that optimisation without the guarantee.
Edge cases I would test before finishing
| Case | Expected |
|---|---|
[] | [] |
[[5, 7]] | [[5, 7]] |
[[1, 10], [2, 3], [4, 5]] (nested) | [[1, 10]] |
[[1, 4], [4, 5]] (touching) | [[1, 5]] under my stated assumption |
[[3, 3], [3, 3]] (zero length, duplicate) | [[3, 3]] |
Two failure modes worth naming: mutating the caller's list in place, which sorted() avoids but list.sort() would not, and assuming end >= start for every pair. If a pair arrives reversed, I would either validate and reject it or swap, and say which. Silently producing a wrong merge is worse than raising ValueError.
If the interviewer then asks for a follow-up, the natural extensions are merging a new interval into an already merged list in O(n), or handling intervals on a circular timeline, which breaks the sort order assumption and needs a different approach.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-14Explain what inversion of control is?
Reported in Inversion of Control
The 90-second answer
Inversion of control means the framework decides when your code runs and which dependencies it receives, instead of your code creating its dependencies and driving the flow itself. In a conventional program, main calls A, A calls B, and A does new B(). With inversion of control, you register a component with a container or framework, and the framework instantiates it, supplies its collaborators, and calls its methods at the right point in the lifecycle. Dependency injection is the most common mechanism for that, but the two are not synonyms. Inversion of control is the broader principle about who controls the flow. Dependency injection is one way to implement it.
A concrete case from work on a tracking service: the tracker needs a feed of radar plots. In production that feed comes from a live sensor adapter. In a test or a replay of a recorded scenario, it needs a file-backed adapter with the same interface. If the tracker constructs the live adapter itself, I cannot substitute the replay without editing the tracker and recompiling it.
// Java 17, tight coupling
public class Tracker {
private final LiveRadarFeed feed = new LiveRadarFeed("sensor-04");
public void run() {
for (Plot p : feed.nextBatch()) {
update(p);
}
}
}With constructor injection, the tracker declares what it needs and the container supplies it:
// Java 17, constructor injection
public class Tracker {
private final RadarFeed feed;
public Tracker(RadarFeed feed) { // container passes the implementation
this.feed = feed;
}
public void run() {
for (Plot p : feed.nextBatch()) {
update(p);
}
}
}// Wiring, done once at startup
RadarFeed feed = args.contains("--replay")
? new RecordedFeed("scenario-118.dat")
: new LiveRadarFeed("sensor-04");
Tracker tracker = new Tracker(feed);
tracker.run();The tracker code is identical in both runs. Only the wiring changes. That is the inversion: the container, not Tracker, decides which RadarFeed exists and when run is called.
| Aspect | Direct instantiation | Constructor injection |
|---|---|---|
| --- | --- | --- |
| --- | --- | --- |
| --- | --- | --- |
| --- | --- | --- |
| Who picks the implementation | Tracker hard-codes it | Container or composition root |
| Unit test | Needs the real sensor or a subclass hack | Pass a fake RadarFeed in the constructor |
| Missing dependency | Fails at first use, possibly mid-run | Fails at startup, before any plot is processed |
| Lifecycle | Manual, scattered across call sites | Centralised: singleton, scoped, or per-request |
Where it earns its keep, and where it does not
It pays off when there are multiple implementations of the same interface, when components need lifecycle management, or when the framework must call your code at points you do not control, such as request handlers, scheduled jobs, or event listeners. Spring, Jakarta CDI, and .NET's built-in container all work this way. In an air traffic or defence codebase, that is how the same processing pipeline runs against live data, recorded data, and a simulator without code changes.
It costs you traceability. A new engineer reading Tracker cannot see where feed comes from without finding the wiring. With a large container graph, a startup failure can be a chain of unsatisfied dependencies rather than a single stack trace. Circular dependencies, where A needs B and B needs A, are a design smell the container will report, but only if you let it fail fast instead of papering over it with setter injection or lazy proxies.
I avoid it in two places. First, in a tight inner loop, for example processing individual RF samples at high rate, where I want explicit allocation and no container lookup on the hot path. Second, in a short-lived script or a single composition root, where a plain new in main is clearer than pulling in a framework. The principle is about control of flow and dependencies, not about using a framework everywhere.
Failure modes I watch for
Hidden dependencies through field injection or service locators. The class looks self-contained but silently depends on a global registry, which makes tests pass in isolation and fail in the assembled system. Constructor injection makes every dependency visible in the signature, so I prefer it and treat field injection as a review flag.
Mocks that hide integration faults. Injecting a fake feed makes the tracker easy to test, but if the fake returns batches in a different shape or timing than the live adapter, the tests stay green while production breaks. I keep at least one test that runs the real wiring against recorded data.
Lifecycle mismatch. A singleton tracker holding a request-scoped feed, or a feed that is created before its configuration is loaded, produces stale or empty data that looks like a sensor problem. The fix is to match scope to lifetime and to fail startup if required configuration is absent, rather than defaulting silently.
If an interviewer pushes further, I would name the related ideas: the Hollywood principle ("don't call us, we'll call you"), the strategy pattern as a manual form of the same idea, and the difference between a service locator, which inverts control but hides dependencies, and dependency injection, which inverts control and declares them.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-15What is your experience with PowerBuilder and Java, and how did you integrate or transition between them?
Reported in PowerBuilder and Java Experience
The 90-second answer
I maintained a PowerBuilder 12.6 client for an operations system backed by Oracle, and I built the Java replacement services it called. The PowerBuilder app owned the forms and DataWindows. Java, Spring Boot 3 on Java 17, owned the business rules that needed to be shared with a web front end and with batch jobs. I did not rewrite the client in one pass. I kept PowerBuilder in production, extracted one workflow at a time behind an HTTP API, and retired the DataWindow only after the Java path had run in parallel on the same data.
That order matters. PowerBuilder code in our estate was not just UI. A DataWindow did retrieve, validation, update and commit in a few lines, and other modules depended on its side effects. Moving the screen first would have broken those assumptions. Moving the transaction first, while the old screen still called it, kept one owner for the write.
How the integration worked
| Option | What we used it for | Why not everywhere |
|---|---|---|
REST from PowerBuilder HTTPClient | New Java services, JSON payloads | Needs explicit error and transaction handling in PowerScript |
| SOAP via a Java service | One partner system that only exposed SOAP | Verbose contracts, harder to version |
| Direct JDBC / SQL from PowerBuilder | Read-only lookups during transition | Two writers to the same tables, no shared validation |
| EJB / CORBA bridge | Rejected | Extra container, poor tooling support by then, hard to debug from PowerBuilder |
The Java side exposed a narrow contract, not a table mirror:
// Java 17, Spring Boot 3. Checked against Spring Web 6.
@PostMapping("/api/v1/work-orders/{id}/close")
public ResponseEntity<CloseResult> close(
@PathVariable String id,
@RequestHeader("Idempotency-Key") String key,
@RequestBody CloseRequest req) {
var result = service.close(id, key, req);
return ResponseEntity.ok(result);
}The PowerBuilder side called it and treated a non-200 as a failed update, not as a successful DataWindow update:
// PowerBuilder 12.6 PowerScript, illustrative
ls_key = guo_util.NewGuid()
ls_json = '{"reason":"' + ls_reason + '","closedBy":"' + gs_user + '"}'
lo_http.SetRequestHeaders("Content-Type: application/json")
lo_http.SetRequestHeaders("Idempotency-Key: " + ls_key)
li_status = lo_http.Post("https://java-svc/api/v1/work-orders/" + ls_id + "/close", ls_json)
IF li_status <> 200 THEN
MessageBox("Close failed", lo_http.GetResponseBody())
RETURN -1
END IFTransition sequence
First, I traced one workflow end to end: the DataWindow update, its SQL, its commit point, and the triggers that fired on update. Then I reimplemented that transaction in Java with the same preconditions, and added an idempotency key because the old client could retry after a timeout and we could not tell a retry from a second close. We ran both paths against a copy of production data, compared row counts and audit rows, and only then switched the PowerBuilder button to call Java. The old PowerScript stayed behind a flag for one release.
Failure modes I hit
DataWindow Update() commits the buffer as a unit. Java code that saved row by row left partial updates when a later row failed validation. The fix was a single database transaction in Java and a test that failed the last row on purpose.
The second was date and null handling. PowerBuilder sent empty strings where Java expected null, and Oracle DATE values came back with a time component the old screen ignored. We pinned the contract to ISO-8601 strings and explicit nulls, and added contract tests with those cases.
The third was session state. Some PowerBuilder windows assumed a database connection stayed open across screens. Once Java owned the write, that assumption was false. We moved the shared context, user and site, into the request and stopped relying on connection state.
If I started again I would keep the same rule: extract the transaction, not the form, prove equivalence on production-shaped data, and delete the PowerBuilder path only after the Java path had handled retries and failures in production.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-16Describe your approach to contributing to group dynamics and how you assess your performance within a team?
Reported in Group Dynamics Performance
The 90-second answer
I treat group dynamics as an engineering problem with inputs I can observe. I make ownership explicit, I keep decisions in writing where the next shift or the next team can find them, and I measure my own contribution with signals other people produce, not with how busy I felt.
At Indra that matters more than in a single-site product team. Work crosses sites, sometimes countries, and touches safety or operational systems where a handover gap becomes a defect. So my default is: one named owner per work item, a short written update in the team channel instead of a verbal aside, and no private side agreements about scope or priority.
For self-assessment I use three external checks. Peer review turnaround and quality, delivery against the commitments I made in planning, and whether my handover notes let someone else continue without asking me to reconstruct context. If those three drift, I change behaviour before the next appraisal cycle.
How I contribute in practice
In a sprint or a project increment I start by clarifying the interface between my work and everyone else's. Who consumes the API, the simulation model, the test evidence? I write that down in the ticket or the design note, with the contract and the open questions. That prevents the common failure where two engineers build to different assumptions and discover it at integration.
During execution I keep the team informed at a predictable cadence. A daily note with done, in progress, blocked, and what I need from a named person. Blockers get raised the same day, with the evidence I have already gathered, not after I have exhausted every option alone. When I disagree on a technical approach, I put the trade-off in writing, propose a small experiment or a decision deadline, and accept the decision once it is made. Dissent in the thread, commitment outside it.
I also watch for uneven participation. If stand-ups are dominated by two voices, or a quieter engineer has not spoken in a review for two weeks, I will ask them directly for their view on a specific decision and credit it in the record. That is not social decoration. In safety-related work, the person closest to a failure mode is often not the most senior person in the room.
How I assess my own performance
I do not rely on a self-rating form at the end of the year. I collect evidence during the work.
| Signal | How I check it | What makes me change course |
|---|---|---|
| Review quality | Median time to first review, and defects found in my code after merge | If my median exceeds 24 hours or post-merge defects cluster in one area, I pair on that area and shrink my work items |
| Commitment reliability | Planned versus delivered items per increment, excluding scope changes agreed in writing | Two increments below 80 percent delivery triggers a conversation with my lead about estimation, not a claim that the team underestimated |
| Handover quality | A peer picks up my ticket or branch and tries to continue for 30 minutes without contacting me | If they stall, I rewrite the note and add the missing traceability, test data location, or decision log |
| Feedback pattern | Anonymous peer feedback and retrospective actions I own | If the same point appears twice, I treat it as a defect in my process and set a dated check |
A concrete example from a distributed project, figures from my own tracking: my review turnaround slipped to a median of 31 hours over one month because I batched reviews on Fridays. Two colleagues waited on interface changes, and integration slipped by three days. I moved to twice-daily review slots, capped work in progress at two items, and the median fell to 9 hours the next month. I kept that rule afterwards because the data, not the intention, showed the problem.
I also ask for a mid-cycle review rather than waiting for the formal one. I bring the table above, filled in, and ask my lead which signal they weight differently. That conversation usually surfaces one blind spot, for example that I optimise for code quality but under-invest in test evidence that the verification team needs. I then adjust the next increment plan explicitly.
What I avoid is judging myself by effort or by comparison with a teammate on a different workstream. Effort is invisible to the team. The artefacts, the turnaround, and whether the next person can proceed are not.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-17How do you handle polymorphism and access specifiers in C++?
Reported in Indra Software Engineer Interview Questions & Guide 2026
The 90-second answer
I treat polymorphism and access as two separate decisions. Polymorphism decides which function runs. Access specifiers decide who is allowed to call it, and that check happens at compile time on the static type. In C++ I use runtime polymorphism with virtual functions for a stable interface, templates for compile-time polymorphism where the type is known early, and I keep the public interface narrow so access control does not leak implementation details.
// C++17
#include <memory>
#include <vector>
class Shape {
public:
virtual ~Shape() = default; // virtual dtor: safe delete via base*
virtual double area() const = 0; // interface
double scaledArea(double k) const { // non-virtual, public, fixed policy
return area() * k * k; // dispatches to derived area()
}
protected:
double scale_ = 1.0; // derived classes only
private:
int id_ = 0; // nobody outside Shape
};
class Circle : public Shape {
public:
explicit Circle(double r) : r_(r) {}
double area() const override { return 3.14159 * r_ * r_; }
private:
double r_;
};
void print(const Shape& s) { /* s.area() dispatches at runtime */ }Access specifiers in practice
| Specifier | Member access | Typical use |
|---|---|---|
public | class, derived classes, clients | interface, constructors, area() |
protected | class and derived classes | shared state or helpers derived classes need, e.g. scale_ |
private | class only | invariants, r_, id_ |
Three details interviewers probe. First, access is checked on the static type, dispatch on the dynamic type. A private virtual function in the base can still be called through a public base pointer, because the call site sees public and the override runs anyway. Second, an override may change access. The derived class can make area() private, and Shape* p = new Circle(1); p->area(); still compiles and calls it. That surprises people, so I keep overrides public unless there is a reason not to. Third, friend grants access without inheritance. I use it sparingly for operators or test helpers, because it bypasses encapsulation silently and does not inherit.
Choosing the mechanism
Templates give zero-cost dispatch and work with concepts for constraints, but every instantiation bloats the binary and errors surface late without concepts. Virtual functions cost an indirection and a vtable per class, and they prevent inlining across translation units in most cases. std::variant suits a closed set, such as message types in a simulator, where exhaustive handling matters more than open extension.
Failure modes I watch for
Slicing: passing Circle by value as Shape copies only the base subobject and loses r_. Take const Shape& or std::unique_ptr<Shape>. Missing virtual destructor: deleting a derived object through a base pointer with a non-virtual destructor is undefined behaviour, often a leak or a corrupted teardown in long-running services. Name hiding: a derived overload hides all base overloads of that name, so using Shape::area; or matching signatures avoids silent breakage. Protected inheritance, rarely used, makes public base members protected in the derived class and breaks substitutability, so I default to public inheritance for interfaces and composition elsewhere.
In a codebase like a simulation or control component, I would put the interface in a header with a virtual destructor, keep data members private with accessors that enforce invariants, and expose only the operations clients need. That keeps access control meaningful instead of decorative.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-18How do you prioritize tasks when working on multiple project streams?
Reported in Indra Software Engineer Interview Questions & Guide 2026
The 90-second answer
I sort by deadline hardness first, then by dependency and risk, not by who shouted loudest. At Indra that distinction matters because streams run to different clocks. A safety certification gate for an air traffic system or a contractual delivery date for a rail signalling release cannot slip the way an internal refactor can. So my first pass separates fixed external dates from flexible internal work. Inside each bucket I score the remaining tasks on impact, urgency, and how many other people or releases they unblock, then I timebox the top items and re-score every Monday and whenever a stream lead changes a date.
How I run it in practice
I keep one visible list across streams, with an owner, a due date, and the consequence of missing it. That stops a task hiding in a stream backlog while it blocks another team. When I pick up a new task I ask three questions: Is there a fixed date set by a customer, regulator, or certification authority? Does other work depend on my output? What breaks if this slips one sprint? If the answer to the first is yes, it goes to the top regardless of effort. If not, I use a simple weighted score so the trade-off is explicit and can be challenged.
Worked example from a typical week with three streams, figures are illustrative but the arithmetic is what I would show a lead:
| Task | Fixed date? | Blocks others? | Impact 1-5 | Urgency 1-5 | Effort days | Score |
|---|---|---|---|---|---|---|
| Fix defect in certified build | Yes, audit in 10 days | Yes, 2 teams | 5 | 5 | 2 | 10.0 |
| Add reporting view for one client | No | No | 3 | 2 | 3 | 2.5 |
| Refactor shared logging library | No | Yes, 3 streams | 4 | 3 | 5 | 3.5 |
Score = (Impact + Urgency) / Effort days. The defect scores 10.0 and goes first even though the refactor unblocks more people in the long run, because the audit date is immovable. The refactor beats the reporting view because its output is a dependency. If the audit slipped by a month, I would re-score and the order would flip, which is the point of making the formula visible.
Failure modes I watch for
Priority inflation is the common one. Every stream marks its work P1, so I ask for the date and the consequence in writing. If a lead cannot name either, it is not P1. Second, context switching. I cap myself at two active streams at a time and batch reviews and meetings into fixed blocks, because switching between a safety-critical codebase and a client-facing feature costs more than the task time suggests. Third, silent dependency drift. A task that scored low in January can block a release in March, so I check the dependency column at the weekly re-score, not just at intake.
When two leads disagree, I do not split the difference by doing both badly. I put both scores and both dates on one page, name the work that will not happen this sprint, and let the leads trade explicitly. That gives the team a decision they can defend to a customer, instead of a quiet delay discovered at the milestone.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-19Design a telemetry ingestion system for thousands of aircraft that must handle intermittent connectivity while ensuring data integrity?
Reported in Indra Software Engineer Interview Questions
The 90-second answer
I would split this into an aircraft edge and a ground ingestion service, because intermittent connectivity is the normal case, not an exception. On the aircraft, a store-and-forward buffer writes every telemetry frame to local persistent storage before any transmission attempt. Each frame carries a globally unique ID, a monotonic sequence number per aircraft and sensor stream, a device timestamp, and a checksum. The ground side accepts frames idempotently, deduplicates on that ID, and only then publishes them to the processing pipeline. That gives at-least-once delivery from the aircraft and effectively-once effect on the ground, without requiring a live connection.
Assume 5,000 aircraft reporting at 1 Hz with 2 KB frames. That is 10 MB/s sustained, about 864 GB per day before replication. A single region can absorb that, but the burst after a fleet-wide outage is the design case. If 20% of the fleet reconnects at once and drains a 6-hour buffer, the ground side sees roughly 5x normal rate for the drain window. I would size ingestion for that burst and shed or delay non-critical streams first.
Edge: buffer, sequence, sign
The edge buffer is an append-only log on disk, not RAM. RAM loses hours of data on a power cycle, which is exactly when connectivity is also likely to be poor. The sync agent reads from the last acknowledged offset, sends in batches, and deletes or archives only after the ground side acknowledges durable receipt. If the link drops mid-batch, it resumes from that offset.
Each frame needs three integrity fields. A UUID or (aircraft_id, stream_id, sequence) pair identifies it for deduplication. A CRC32 or SHA-256 checksum over the payload detects corruption in storage or transit. A device timestamp plus a ground receipt timestamp lets us detect clock drift and late data. For a defence or air traffic customer I would also sign frames at source, so the ground side can reject forged or tampered data before it reaches analytics. Keys rotate per aircraft and are provisioned on the ground, never generated in flight.
# Python 3.11, edge sync agent sketch
def send_batch(buffer, transport, last_acked_seq):
batch = buffer.read_after(last_acked_seq, max_frames=500)
if not batch:
return last_acked_seq
payload = serialize(batch) # includes seq, checksum, signature
ack = transport.post("/v1/telemetry", payload, timeout=10)
if ack.ok and ack.highest_contiguous_seq >= batch[-1].seq:
buffer.mark_acked(ack.highest_contiguous_seq)
return ack.highest_contiguous_seq
return last_acked_seq # retry from same offset, no data lossGround: idempotent ingestion, not exactly-once magic
The ingestion API is a thin, stateless service behind a load balancer. It validates the signature and checksum, writes the raw frame to durable storage, and returns the highest contiguous sequence it has stored per stream. Returning a contiguous watermark matters. If frames 100, 101 and 103 arrive, the aircraft should resend 102, not assume the whole batch landed.
Deduplication happens in two places. A short-lived cache catches immediate retries. A durable store keyed on the frame ID catches retries after a restart or a long outage. The trace below shows why both are needed.
| Arrival | Frame | Ground state | Response to aircraft |
|---|---|---|---|
| 1 | seq 102, id a-7 | stored | ack up to 102 |
| 2 | seq 103, id a-8 | stored | ack up to 103 |
| 3 | seq 102, id a-7 again | duplicate, discarded | ack up to 103 |
| 4 | seq 105, id a-10 | gap at 104, stored but not acked as contiguous | ack up to 103, request 104 |
| 5 | seq 104, id a-9 | gap filled, 104 and 105 now contiguous | ack up to 105 |
Only after dedup and validation does the service publish to an event log, partitioned by aircraft_id so ordering per aircraft is preserved and one aircraft cannot block another. Downstream consumers then handle late data explicitly. A frame arriving 3 hours late should update aggregates with a late-data policy, not silently rewrite history. I would keep raw frames immutable and build corrected views on top.
Failure modes I would name in the interview
Buffer overflow on the aircraft is the worst case. If storage fills, the edge must drop by policy, for example keep safety-critical streams and drop cabin or diagnostic streams, and record the drop in a gap marker so the ground side knows data is missing rather than assuming silence means nominal. Clock drift is next. Device timestamps can jump after maintenance, so ordering relies on sequence numbers, and timestamps are treated as observations, not truth. Finally, a poison frame that fails validation repeatedly must go to a dead letter queue with the raw bytes preserved. Retrying it forever would stall the partition.
I would not use a synchronous request per frame, and I would not promise exactly-once delivery across a satellite link. Batching, persistent buffering, and idempotent processing get the same result with far less coupling.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-20Walk me through a time you identified a critical performance bottleneck in a system that was already in production?
Reported in Indra Software Engineer Interview Questions
The 90-second answer
In production at my previous role we ran a Java order service behind a load balancer, about 40 requests per second at peak. One Tuesday p99 on GET /orders/{id} went from 180 ms to 2.4 seconds over 20 minutes, and the thread pool started queueing. I did not start by tuning the JVM. I checked whether the shape of traffic had changed, then traced where time was actually spent, then reproduced it with the same data volume before touching code.
The bottleneck was an N+1 query that only appeared when an order had many line items. A customer with 300 lines triggered 301 queries. Normal orders had 3 to 5 lines, so load tests with synthetic data had missed it.
How I found it
First, I ruled out infrastructure. CPU on the app hosts was at 55%, database CPU at 40%, no GC pause over 200 ms, and the other endpoints on the same hosts were normal. That pointed to one code path.
Second, I looked at distributed traces for slow requests. The trace for a slow order showed one orders query at 4 ms, then 287 order_lines queries at 6 to 9 ms each, sequential. The code was:
// Java 17, Spring Data JPA, before
Order order = orderRepository.findById(id).orElseThrow();
for (LineItem item : order.getLineItems()) {
item.setProduct(productRepository.findById(item.getProductId()));
}getLineItems() was lazy, and each findById was a separate round trip. No cache, no batching.
Third, I confirmed with a worked trace from production logs, anonymised:
| Order | Line items | DB queries | DB time | p99 response |
|---|---|---|---|---|
| --- | --- | --- | --- | --- |
| --- | --- | --- | --- | --- |
| --- | --- | --- | --- | --- |
| --- | --- | --- | --- | --- |
| 1042 | 4 | 5 | 31 ms | 165 ms |
| 1043 | 12 | 13 | 88 ms | 210 ms |
| 1044 | 287 | 288 | 1,940 ms | 2,410 ms |
That table is what I took to the incident review. It shows the failure is linear in line count, not a sudden database outage.
The fix, without a risky restart
We could not deploy a schema change that day, and a full restart during peak would have dropped connections. I shipped a small change behind a feature flag: fetch lines and products in two batched queries.
// after, same endpoint contract
Order order = orderRepository.findById(id).orElseThrow();
List<LineItem> items = lineItemRepository.findByOrderId(id);
Map<Long, Product> products = productRepository.findAllById(
items.stream().map(LineItem::getProductId).toList()
).stream().collect(toMap(Product::getId, p -> p));
items.forEach(i -> i.setProduct(products.get(i.getProductId())));That took order 1044 from 288 queries to 3. In staging, with a copy of that order's data, p99 fell from 2,410 ms to 190 ms. We rolled the flag to 5% of traffic, watched p99 and DB query rate for an hour, then to 100%. Query rate per request dropped from a mean of 14 to 3, and the thread pool queue cleared without raising pool size.
What I changed afterwards
I added a regression test that builds an order with 300 lines and asserts the query count stays under 5, using Hibernate query count assertions. I also added a dashboard panel plotting p99 against mean line items per order, because the trigger was data shape, not traffic volume. The follow-up I proposed, and the team accepted, was a composite index on order_lines(order_id, product_id), which we had already confirmed existed, so no migration was needed.
If I had tuned first, I would have raised the thread pool from 50 to 200. That would have moved the queue from the app to the database, increased connection contention, and hidden the real cause until the next large order arrived.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-21A legacy simulation module is intermittently crashing when processing high-frequency sensor inputs. How do you isolate the race condition?
Reported in Indra Software Engineer Interview Questions
The 90-second answer
I would not start by adding locks. I would start by making the crash reproducible and capturing the exact interleaving that causes it. Intermittent crashes under high-frequency input usually mean a shared buffer, a sequence counter, or a callback registration is touched by the sensor thread and the simulation thread without a happens-before edge. My first move is to get a core dump and a thread backtrace, then run the same input under ThreadSanitizer to see if the compiler and runtime can name the two accesses for me.
Assume the module is C or C++ on Linux, which is typical for this kind of legacy code. I would build a sanitizer variant without changing the production binary:
# Checked against GCC 13 / Clang 17 on Linux x86_64
g++ -std=c++17 -g -O1 -fsanitize=thread -fno-omit-frame-pointer \
sim_module.cpp sensor_ingest.cpp -o sim_tsan -pthread
./sim_tsan --replay capture_2024_11_02.bin --threads 4ThreadSanitizer reports the two stacks, the memory addresses, and the size of the access. That turns a guess about "a race" into a specific pair of lines. If the crash is a heap corruption or a segfault rather than a wrong value, AddressSanitizer in a separate build often shows the first invalid write earlier than the crash site.
Narrowing it when sanitizers are not enough
Legacy simulation code often hides the race behind timing. A sensor callback at 10 kHz, for example 10,000 samples per second, fills a ring buffer while the simulation step drains it at a lower rate. If the drain reads the head index, then the writer advances it, then the drain reads the sample, the sample can be torn or skipped. The crash may only appear when the buffer wraps.
I would add sequence numbers at the producer and consumer and log only on mismatch, not on every sample. Logging every sample at 10 kHz changes timing enough to hide the bug.
struct Sample { uint64_t seq; double value; };
// Producer: write sample, then publish seq with release semantics
ring[head].seq = seq;
ring[head].value = v;
std::atomic_ref<uint64_t>(ring[head].seq).store(seq, std::memory_order_release);
// Consumer: acquire-load seq before reading value
if (std::atomic_ref<uint64_t>(ring[head].seq).load(std::memory_order_acquire) != expected) {
log_mismatch(expected, head); // rare path, safe to log
}A worked trace from a captured run looks like this. The numbers are from a replay harness, labelled as hypothetical, but the shape is what I look for:
| Time | Sensor thread | Simulation thread | Result |
|---|---|---|---|
| t0 | writes ring[63].seq = 1001 | reads head = 63 | ok |
| t1 | writes ring[63].value = 4.2 | reads ring[63].seq = 1001 | ok |
| t2 | advances head to 0, wraps | reads ring[63].value | reads stale or partially written value |
| t3 | writes ring[0] | uses index 63 as if still valid | crash or silent corruption |
That pattern points to a missing release-acquire pair or to a buffer that is too small for the burst rate. Sizing matters here. At 10 kHz with a simulation step every 10 ms, the consumer must tolerate 100 samples per step plus jitter. A 64-slot ring will wrap under a 20 ms scheduling delay. I would check the high-water mark before blaming the locking.
Failure modes I check next
Callback lifetime is the other common culprit. A sensor driver registers a callback with the simulation object, then the object is destroyed or reconfigured while a callback is still queued. ThreadSanitizer will not always flag that as a data race because the access may be through a function pointer. I look for unregister paths that do not wait for in-flight callbacks to finish, and for global state that is reset between test runs.
I also separate a data race from a logic race. If two threads each increment a counter correctly with an atomic but the simulation assumes the counter and the buffer position move together, the fix is not a bigger lock. It is making the pair update under one critical section or passing a snapshot. Adding a mutex around everything would hide the symptom and could add contention at 10 kHz, so I would measure lock hold time before choosing that route.
The fix I would ship is the smallest change that makes the sanitizer build clean on the captured input, plus a regression test that replays that input with --threads 4 and fails on any sequence mismatch. I would keep the production build unchanged until that test passes, because a lock added without evidence tends to move the crash to a rarer interleaving.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-22You are presented with a log file showing intermittent memory leaks in a long-running service. How do you narrow down the source of the leak?
Reported in Indra Software Engineer Interview Questions
The 90-second answer
I would not start by reading the log line by line. I would turn it into a timeline and correlate memory against traffic. A leak that is intermittent usually tracks a specific request type, tenant, error path or cache key, not total load. So I extract timestamp, RSS, heap used after GC, GC pause, request count by endpoint and error count, then look for which series moves with RSS.
If the service is Java, which is common in the systems Indra builds, I check whether heap after GC climbs while live set grows, or whether RSS climbs while heap stays flat. The first points to retained objects. The second points to off-heap buffers, direct ByteBuffers, native libraries or thread stacks. That split decides the next tool.
# Python 3.11, checked against CPython 3.11
import re, csv
from collections import defaultdict
pat = re.compile(r'(?P<ts>\S+) .*rss_mb=(?P<rss>[\d.]+) heap_mb=(?P<heap>[\d.]+) endpoint=(?P<ep>\S+) status=(?P<st>\d+)')
rows = []
for line in open('service.log'):
m = pat.search(line)
if m:
rows.append(m.groupdict())
by_ep = defaultdict(list)
for r in rows:
by_ep[r['ep']].append(float(r['rss']))
for ep, vals in sorted(by_ep.items(), key=lambda kv: -kv[1][-1]):
print(ep, len(vals), round(vals[-1] - vals[0], 1))That gives a first ranking. An endpoint whose RSS delta is large while its request count is flat is a stronger suspect than a busy endpoint whose memory tracks volume.
Worked trace
Hypothetical figures from a 72 hour run, labelled as an example:
| Window | RSS (MB) | Heap after GC (MB) | Requests | Dominant endpoint | Errors |
|---|---|---|---|---|---|
| 0-24 h | 900 to 1,050 | 420 to 430 | 41k | /orders | 12 |
| 24-48 h | 1,050 to 1,480 | 430 to 435 | 39k | /orders | 31 |
| 48-72 h | 1,480 to 2,210 | 435 to 440 | 40k | /reports/export | 118 |
Heap after GC is flat, RSS climbs, and the climb accelerates with /reports/export and errors. That pattern rules out a simple Java object leak and points to off-heap retention on the export path, for example a direct buffer or a native charting library that only frees on success. I would then check the code for that endpoint for buffers allocated per export, cached in a static map, or held in a thread local that is never removed.
Confirming the source
For a retained-object leak I take two heap dumps, ideally with -XX:+HeapDumpOnOutOfMemoryError already set, or trigger them with jmap -dump:live,format=b,file=heap1.hprof <pid> at a low watermark and again after traffic. I compare histograms, not full dumps first:
jmap -histo <pid> > histo1.txt
# after the suspect traffic runs
jmap -histo <pid> > histo2.txt
diff histo1.txt histo2.txtA class whose instance count grows while its instances stay reachable from a static cache, a listener list or a ThreadLocal will stand out. In Eclipse MAT or jhat I then ask for the dominator tree and the GC roots for that class. The root path is the answer, not the class name alone. A HashMap keyed by session id that never evicts, or a static List of callbacks in a long-lived registry, shows up there.
For off-heap growth I use the same split. I check jmap -histo for direct buffer count, look at NMT output if -XX:NativeMemoryTracking=summary was enabled, and on Linux check /proc/<pid>/smaps for anonymous mappings growing between dumps. Allocation profiling with async-profiler in alloc mode, or JFR with jdk.ObjectAllocationInNewTLAB, names the allocation site that produces the suspect class or buffer.
Fix and proof
I fix the retention point, not the symptom. If it is a cache, I bound it with size and TTL and log evictions. If it is a listener or thread local, I remove it in a finally block and add a test that runs the suspect request repeatedly and asserts heap after GC returns to baseline. I would also add a metric for the suspect count, such as cache size or open buffers, with an alert at 70% of the bound, so the next leak is caught in minutes rather than at OOM. Restarting the service buys time, but without the root path from the dump it will leak again on the same traffic.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-23Tell me about a time you had to push back on a feature request from a stakeholder because it would have compromised the system's real-time constraints?
Reported in Indra Software Engineer Interview Questions
The 90-second answer
I pushed back on adding inline enrichment to a surveillance track-processing loop, because the request would have broken the hard deadline the loop was certified against. I did not refuse the feature. I measured it, showed the stakeholder the budget, and shipped the same capability off the critical path.
Context: I was on a backend service feeding air traffic surveillance tracks to controllers. The processing cycle was 100 ms. Every cycle had to publish an updated track or the downstream display and conflict detection would work from stale data. The deadline was not a target. Missing it repeatedly was a safety and certification issue.
A stakeholder asked for a new field on every track update: a live weather and terrain risk score, computed synchronously from an external service, so controllers saw it in real time. On paper it was one extra field. In the loop it was a network call plus a database lookup per track.
I prototyped it behind a flag and measured it on the target hardware, not my laptop. That is the part I would stress in the interview. The numbers below are from that prototype, labelled as a worked example with the real budget from our system.
| Item in 100 ms cycle | Before | With inline enrichment |
|---|---|---|
| Track update and publish | 22 ms | 22 ms |
| Weather service call, p95 | 0 ms | 38 ms |
| Terrain lookup, p95 | 0 ms | 14 ms |
| Serialisation and logging | 6 ms | 9 ms |
| Total p95 | 28 ms | 83 ms |
| Worst observed, 200 tracks | 41 ms | 137 ms |
At low load it looked fine. At 200 tracks, which we hit during peak traffic, the worst case crossed 100 ms. That meant dropped cycles, jitter in track timestamps, and downstream consumers seeing tracks jump forward and then stall. I showed that trace, not an opinion about latency.
What I proposed instead
I kept the loop doing only track update and publish. The risk score moved to an async sidecar that consumed the published tracks, computed the score, and wrote it to a separate store keyed by track ID. The display merged the two streams and marked the score with its age.
// Loop thread: never blocks on external services
void onCycle() {
auto deadline = cycleStart + 100ms;
for (auto& track : tracks) {
updateTrack(track);
publish(track); // downstream sees fresh data
if (now() > deadline - 5ms) { // protect the deadline
deferRemaining();
break;
}
}
enqueueForEnrichment(publishedTracks); // non-blocking
}
// Sidecar thread: may lag, never blocks the loop
void enrichmentWorker() {
for (auto batch : queue.pop()) {
auto scores = computeRiskScores(batch); // 50-200 ms is fine here
store.put(batch.ids(), scores, ttl = 2s);
}
}The stakeholder got the field in the UI within the same release. The difference was freshness: the score could be 200 to 500 ms old instead of computed in the same cycle. I made that trade explicit and let the operational user decide whether 500 ms old risk data was acceptable. It was, because controllers were already working with radar updates at a similar rate.
How the pushback went
I did not start with "that is impossible." I started with the constraint we both owned: the 100 ms cycle and the certification evidence behind it. Then I showed the prototype trace at peak load. Then I offered the alternative with its cost stated plainly, the staleness window.
Two failure modes came up in review and I had to handle them. First, the sidecar falling behind under load and serving very old scores. I added an age field and a rule in the UI: if the score is older than 2 seconds, show it greyed out with its timestamp instead of pretending it is current. Second, the enrichment queue growing unbounded. I capped it and dropped the oldest batches, because a dropped enrichment is recoverable and a missed track cycle is not.
If I were doing it again I would add one thing earlier: a load test that replays a recorded peak traffic scenario, so the argument is settled by a repeatable run rather than a one-off measurement. That test now runs in CI and fails if the loop exceeds 60 ms p95 at 200 tracks, which leaves headroom before the 100 ms deadline.
The lesson I took from it: push back with a budget and a trace, and always bring the version of the feature that fits inside the budget.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-24Design a secure authentication and authorization service for an aerospace command-and-control platform that operates in disconnected environments?
Reported in Indra Software Engineer Interview Questions
The 90-second answer
I would not put a central OAuth server in the critical path. A disconnected command-and-control node has to authenticate operators and authorise commands with no network, then reconcile later. So I split it into three planes: identity issued before deployment, verification done locally, and audit synced when a link returns.
Identity is X.509 certificates from a mission PKI, stored on a TPM or smart card, plus a second factor for privileged roles. Authorisation is local policy evaluation against signed role and clearance attributes carried in the certificate, not a live call to an IdP. Revocation is handled by a signed CRL bundle issued for the whole mission window, delta CRLs pushed over any available channel, and short-lived local session tokens.
How it works offline
The node caches the root CA, intermediate CA, CRLs and policy bundle at mission start. Each is signed and versioned. Verification is pure local crypto, so a 30-day disconnection does not break login. The trade-off is revocation lag. I bound it by issuing the CRL bundle for the mission window and by physical control of the node, not by pretending revocation is instant offline.
| Artefact | Lifetime in disconnected mode | Why |
|---|---|---|
| Operator identity certificate | Mission window, for example 90 days | Lets the operator re-authenticate locally for the whole deployment |
| Local session token | 72 hours, reissued locally after card plus PIN check | Limits a stolen unlocked session without needing network reissue |
| CRL bundle | Covers the mission window, for example 90 days, refreshed on any contact | A 30-day disconnection stays inside the signed revocation horizon |
| Policy bundle | Tied to mission window, signed by mission authority | Prevents stale policy silently authorising a new mission |
| Audit log segment | Hash-chained, signed every 1,000 entries | Tamper evidence survives node capture and later sync |
Authentication detail
Mutual TLS for service-to-service calls inside the node, with certificates pinned to the mission CA. Human login uses the smart card private key for a challenge-response, plus PIN. I would avoid passwords stored on the node and avoid SMS or TOTP from a phone that may not be present. If a card is lost, the CRL bundle is the containment, and the node can also be instructed to deny that serial number through a one-way channel such as a data diode or physical media. A break-glass account exists for emergency access, requires two-person rule, and writes a high-priority audit entry that cannot be deleted locally.
For APIs between components, short-lived JWTs are still useful, but issued by the local node after certificate verification, not by a remote IdP. The node holds its own signing key in the TPM and rotates it every 15 minutes. Services verify the JWT against the cached public key, so they never call out.
// Checked against Java 17 and Nimbus JOSE JWT 9.37. Verification is offline.
import com.nimbusds.jose.JWSAlgorithm;
import com.nimbusds.jose.JWSVerifier;
import com.nimbusds.jose.crypto.RSASSAVerifier;
import com.nimbusds.jwt.SignedJWT;
SignedJWT jwt = SignedJWT.parse(tokenString);
if (jwt.getHeader().getAlgorithm() != JWSAlgorithm.RS256) {
throw new SecurityException("unexpected algorithm");
}
JWSVerifier verifier = new RSASSAVerifier(nodePublicKey);
if (!jwt.verify(verifier)) {
throw new SecurityException("bad signature");
}
if (jwt.getJWTClaimsSet().getExpirationTime().before(new Date())) {
throw new SecurityException("expired");
}
// Claims checked next: role, clearance, missionId, jti against replay cacheAuthorisation detail
RBAC alone is too coarse for C2. I would use RBAC for the baseline role (operator, supervisor, commander, maintainer) and ABAC attributes for the decision: clearance level, mission assignment, geographic sector, and time window. Policy is a signed Rego or Cedar bundle evaluated locally. Example rule in plain terms: a supervisor may approve a weapons release only if clearance is at least SECRET, missionId matches the current mission, and the action occurs inside the authorised window. Deny is the default. Every deny is logged with the policy version that produced it, so a later review can replay the decision.
Failure modes I would name in the interview
Clock skew. Certificates and JWTs depend on time. I would use a secure time source on the node, reject tokens more than 5 minutes from node time, and alert on drift above 60 seconds. A node with a wrong clock either locks everyone out or accepts expired credentials.
Stale CRL. If the node passes the CRL bundle expiry, it drops to read-only for command functions. That is a deliberate availability hit. The alternative, continuing to trust a possibly revoked operator past the signed horizon, is worse in this domain.
Sync conflict. When the link returns, the audit log is merged by hash chain, not overwritten. A forked chain from a captured node is flagged for investigation, not auto-merged.
I would close by stating the assumption I am making: the root CA private key never leaves a protected environment, and the mission authority signs policy and CRL bundles out of band. If that assumption fails, no amount of local verification saves the system.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Q&A-25Given our long-lifecycle product requirements, what draws you to building systems that must remain maintainable for decades rather than just years?
Reported in Indra Software Engineer Interview Questions
The 90-second answer
What draws me is that the engineering problem changes. On a three-year product you optimise for shipping the next feature. On a thirty-year product you optimise for the tenth engineer, the third hardware refresh and the compiler nobody can upgrade, all touching code you wrote. I like that constraint because it rewards boring, explicit decisions over clever ones.
At Indra that is concrete. Air traffic, defence and rail systems stay in service while the processors, operating systems and even the standards around them change twice. My job is to make sure a change in 2045 is a localised change, not an archaeology project. That means stable interfaces between layers, data formats I can migrate, and tests that describe behaviour rather than implementation.
What I actually do differently
I separate what changes often from what changes rarely, and I put a narrow interface between them. Business rules and safety logic sit behind a domain interface. Drivers, radio hardware, file formats and vendor SDKs sit behind adapters. When the hardware is replaced, I replace one adapter and re-run the same contract tests.
// Java 17. Checked against the interface, not the vendor type.
public interface SensorSource {
Sample read() throws SensorFault;
}
public final class RadarAdapter implements SensorSource {
private final VendorHandle handle;
public RadarAdapter(VendorHandle handle) {
this.handle = handle;
}
@Override
public Sample read() throws SensorFault {
try {
return Sample.from(handle.poll());
} catch (VendorException e) {
throw new SensorFault(e.code(), e);
}
}
}The domain code never imports VendorHandle. That one decision is what lets a 2038 hardware swap stay inside one class.
I also treat documentation and data as part of the product. A comment rots. A recorded trace does not. For long-lived modules I keep golden input files, the expected outputs, and the rationale for non-obvious limits in the repository, versioned with the code. When a format must evolve, I version it explicitly and keep a reader for the previous version.
The trade-off, in numbers
The cost is real and I would name it in design review. Suppose, as a hypothetical, a module has 40% more interface and test code than a direct implementation. That is paid once, in year one. If it avoids one forced rewrite of that module in year 15, and a rewrite costs six engineer-months plus re-certification, the interface pays for itself many times over. If the hardware never changes, I have spent extra effort for nothing. I accept that bet when the platform is known to outlive two hardware generations, which is the normal case here.
| Decision | Short-lived product | Long-lifecycle product |
|---|---|---|
| Framework choice | Adopt the current popular one | Prefer the standard library and long-supported standards |
| Data format | Change it when the schema changes | Version it, keep old readers, migrate with a tested tool |
| Coupling | Call the vendor API directly | Hide it behind an adapter with contract tests |
| Knowledge | Code comments | Golden traces, decision records, executable tests |
| Dependencies | Latest release | Pinned versions, with a documented upgrade path |
Failure modes I watch for
The first is dependency drift. A library that was current at delivery becomes unmaintainable because its maintainer moved on. I pin versions, keep the dependency surface small, and record why each external component is there.
The second is silent format drift. A writer starts emitting a field the reader ignores, and five years later nobody knows if that field mattered. Versioned formats and round-trip tests catch that early.
The third is knowledge loss. The original author leaves and the system keeps running, so nobody touches it until it breaks. That is why I write tests that a new engineer can run on day one and that fail for a clear reason when behaviour changes.
I am not drawn to decades-long maintenance for its own sake. I am drawn to systems where a careful decision in year one still makes the work possible, and safer, in year twenty. That is the kind of engineering I want to keep doing.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.
Curated: · Written: · Reviewed: