{"slug": "real-live-coding-tasks-from-9000-tech-interviews-go-java-python-react", "title": "Real live-coding tasks from 9,000+ tech interviews: Go, Java, Python, React", "summary": "A developer behind Sottena, an AI interview assistant, analyzed live-coding tasks from 9,247 technical interviews at large employers and found that Go accounted for roughly 34% of sessions, with most Go tasks centered on concurrency. The writeup details recurring problems such as a backend load balancer requiring atomic counters and context cancellation, a six-line goroutine code review with a loop-variable capture bug and a race on a shared max, and a streaming compression pipeline that must handle 1 TB backups in 100 MB chunks. The developer reports that about 70% of candidates forget to make the round-robin counter atomic and another 20% add a mutex but never check the context between retries.", "body_md": "I build [Sottena](https://sottena.com), an [AI interview assistant](https://sottena.com/ai-interview-assistant/). By now it has sat in on 9,247 technical interviews. I went through that data to see what companies really ask.\n\nThis post is about one slice of it: the live-coding round. The tasks below came up at large tech employers: a search company, a social network, two e-commerce marketplaces, several banks, a telecom operator and two security vendors. I have left the names out and kept the type of company, because the type explains the task. They hire thousands of engineers a year and their interview loops look a lot like the ones in the US and Europe.\n\nA note on how the data was collected. Sottena does not store screenshots of a candidate's screen. It stores a text description of the task that a vision model extracts from what is on screen, something like \"Go code, a function takes a slice, there is a loop with goroutines, a variable `i`\". I rebuilt the task statements from those descriptions and from interview transcripts, grouped similar wordings and matched them to employers. It felt like a 2,000-piece puzzle where half the pieces are the same colour.\n\n`typeof null` to a full component that talks to an API.\nOne thing is common to every stack: edge cases. The question is rarely \"can you solve it\". It is \"did you remember the empty array, `nil`, overflow, a cancelled context\". Being careful matters more than being clever.\n\nGo made up about 34% of the live-coding sessions in my sample, and most of the Go tasks were about concurrency. Companies hire Go developers for high-load services and want to know you won't ship a data race on day one.\n\nYou are given a `Backend` interface. Instances are unreliable: they crash, hang and get overloaded. Write a `Balancer` that spreads requests across them.\n\nThe minimum is round-robin. Good is retrying on the next backend and respecting `ctx.Done()`. Excellent is health checks, a circuit breaker and a word about thundering herd.\n\nIt sounds simple until you start typing. About 70% of candidates forget to make the round-robin counter atomic. Another 20% add a mutex but never check the context between retries.\n\n```\n// A middle-level answer: what they expect to see\nfunc (b *Balancer) Invoke(ctx context.Context, req Request) (Response, error) {\n    n := len(b.backends)\n    start := int(atomic.AddUint64(&b.next, 1)-1) % n\n\n    var lastErr error\n    for i := 0; i < n; i++ {\n        select {\n        case <-ctx.Done():\n            return nil, ctx.Err()\n        default:\n        }\n        idx := (start + i) % n\n        resp, err := b.backends[idx].Invoke(ctx, req)\n        if err == nil {\n            return resp, nil\n        }\n        lastErr = err\n    }\n    return nil, fmt.Errorf(\"all %d backends failed: %w\", n, lastErr)\n}\n```\n\nNot \"write it from scratch\" but \"your predecessor wrote this on a Friday evening, tell me what is wrong\". A small code review with a catch.\n\n```\nfor i := 1000; i > 0; i-- {\n    go func() {\n        if i%2 == 0 && i > max {\n            max = i\n        }\n    }()\n}\nfmt.Printf(\"Maximum is %d\", max)\n```\n\nThree problems in six lines. The closure captures the loop variable: a guaranteed bug before Go 1.22, version-dependent after, and you get a point for knowing that. There is a race on `max`. And my favourite: `fmt.Printf` runs before the goroutines have done anything.\n\nA backup of up to 1 TB. Compression ratio between 1.5x and 3x. Storage accepts at most 100 MB per file. Design and write the pipeline: read, compress, write. It does not fit in memory.\n\nThis sits between system design and code. You get a skeleton with interfaces and have to write a working pipeline with workers. The most common follow-up: \"what if the ratio turns out worse than 1.5 and the chunk doesn't fit in 100 MB?\" People who think about that up front pass. \"We'll just take a smaller chunk\", with no specifics, does not.\n\nAn array of 0s and 1s; seat a new viewer as far from everyone as possible. This is LeetCode 849, and it showed up nine times word for word across different candidates.\n\nThe trap is at the edges. When the free seats touch a wall, the distance is counted differently than in the middle. Half the candidates only handle gaps between viewers and get `[0,0,0,1]` wrong.\n\nTwo tasks in 20 minutes, machine-gun style: solve one, get the next. Checking that a slice is monotonic is the warm-up (two flags, one pass). Power of two is the filter. A loop with division is acceptable. `x & (x-1) == 0` with an explanation is good. The bit trick plus a remark about negative numbers and `math.MinInt` gets top marks.\n\nThe pool takes tasks from a channel, processes them with N goroutines and stops cleanly on `context.Done()`. Rate limiting is a possible extension.\n\nThe classic mistake: a goroutine reads from a closed channel and silently receives a zero value. The candidate thinks everything works while half the tasks are lost.\n\nJava rounds have fewer algorithms and more \"do you understand what happens under the hood\". The banks in particular like code that compiles, runs and passes its tests, and then quietly mixes up data in production.\n\n`Person` class (large bank)\nA class with `Serializable`, `Externalizable`, `clone()` and JAXB annotations. Eight bugs. Find them all. I saw this task or a variation of it dozens of times.\n\n`Externalizable` fails on deserialization.`clone()` without `Cloneable` always throws `CloneNotSupportedException`.` hashCode()` returns `1`, so every key lands in the same bucket.` writeExternal` writes name, surname, phone, address; `readExternal` reads name, surname, address, phone.\nThe last one is the nastiest. Everything compiles, tests pass if phone and address are both null in the fixtures, and in production somebody's phone number becomes a street address. In banking software that kind of bug costs money, which is why the banks ask about it.\n\n`[1, 4, 5, 2, 3, 9, 8, 11, 0]` becomes `\"0-5,8-9,11\"`. Sort, then one linear pass.\n\nThe algorithm is trivial and there are four reliable mistakes: forgetting to sort (surprisingly common), losing the last range after the loop, a trailing comma, and an out-of-bounds exception on an empty array. The interviewer is grading accuracy here. A clean solution in 12 minutes beats a correct one that needed three bug fixes.\n\nA notification has an id, a type (EMAIL/SMS/PUSH), a recipient and a text. A recipient has allowed channels and blocked senders. Filter, and deduplicate within 24 hours. No storage, just contracts and logic.\n\nThis tests design, not typing. The typical failure is spending 20 minutes on data models and never reaching the filtering. Nobody needs perfect DTOs. They need a working `NotificationFilter` with three checks inside.\n\nWrite your own simplified thread-safe map with segment locking. Many candidates start with \"wrap a `HashMap` in `synchronized`\" and then cannot explain why segments exist.\n\nThere are fewer Python tasks, and they centre on generators, decorators and data processing.\n\n**Rate limiter as a decorator (security vendor, middle).** Write `@rate_limit(max_calls=5, period=60)`. Almost everyone writes the basic version. Fewer make it thread-safe with `threading.Lock`. A sliding window instead of a fixed one is rare.\n\n**Streaming a log file (marketplace, middle).** A 10 GB log; find the top 10 URLs by request count. Anyone who calls `file.readlines()` has failed before counting anything. The expected answer is a generator, line-by-line reading and `Counter.most_common(10)`. Then comes the follow-up: \"what if there are millions of unique URLs and the `Counter` doesn't fit in memory?\"\n\nC# was about 6% of live coding. The most common task (a security vendor, middle/senior): an event bus whose subscribers must not be kept alive by the bus, so you use `WeakReference`. Everyone writes the basic observer. Weak references come from people who have chased a memory leak through event subscriptions in a long-running app. The most common mistake is not checking that the subscriber is still alive before calling it.\n\nFront-end rounds are the densest. One interview can hold a quiz, a pattern task, a React component with an API call and a question about re-renders.\n\nSeven `console.log` questions in a row. The one that catches people:\n\n``` js\nconst a = {}, b = {}, c = {}\na[b] = '1'\na[c] = '2'\nconsole.log(a) // { '[object Object]': '2' }\n```\n\nObjects used as keys are converted to the string `[object Object]`. Both of them. The second assignment overwrites the first. About half the candidates get it wrong.\n\n`this`, EventEmitter (online bank, middle)\nA series of mini-tasks of growing difficulty: the output order of promises and `setTimeout`, a lost `this` inside a `.filter()` callback, and an `EventEmitter` with chaining written from scratch.\n\n`EventEmitter` was the single most frequent front-end task in my sample; I saw it at five different companies. It tests closures, objects and chaining in one go. It takes five minutes if you know the pattern and twenty-five if you don't.\n\nFirst, explain which components re-render on a click. Then write a Star Wars character search against SWAPI with debounce, `AbortController` and a loading indicator, in about 20 minutes.\n\nJudging by the transcripts, only 30–40% add `AbortController`. Everyone else ships a race condition: you type \"sky\", the request goes out, you clear it and type \"luke\", the \"sky\" response arrives late, and the screen shows Skywalkers instead of Luke.\n\nYou get a JSX template with deliberate mistakes: `disable` instead of `disabled`, `for` instead of `htmlFor`, a `useEffect` with no dependency array that adds a `dblclick` listener on every render. The task checks attention to detail and whether you know where JSX differs from HTML.\n\n| Company type | Stack | Format | Focus | \n|---|---|---|---|\n| Search company | Go, Java | 1 task, 30–45 min | Design plus code; interfaces are given | \n| Large bank | Java | Code review, 20 min | Language contracts, attention to detail | \n| Social network | Go, Java | 1–2 tasks, 15–20 min | Algorithms, boundary cases | \n| Marketplace | Go, Python | 2–3 tasks in a row | Speed, bit operations, data processing | \n| Online retailer | Go | Code with bugs | Concurrency, channels, races | \n| Online bank | JS/React | 3–5 mini-tasks | Quiz, patterns, React, API | \n| Telecom operator | JS/React | Quiz plus a component | JS knowledge, JSX mistakes | \n| Classifieds platform | Go | 1 task, 30 min | Infrastructure patterns: pools, pipelines | \n| Bank, senior roles | Java | 1 task, 40 min | Depth: concurrency, JDK internals | \n| Security vendor | Python, Go | 1–2 tasks | Decorators, generators, systems work | \n\nNone of the tasks in my sample needed hard algorithms. No segment trees, no graph DP, no suffix arrays. Every one of them needed care. An empty array, `nil`, a cancelled context, fields read in the wrong order: that is where the score drops.\n\n`equals`/` hashCode` and serialization.`AbortController` and `EventEmitter` by heart, and understand `useCallback` and `React.memo` instead of just using them.\nIf you have a live-coding round coming up, Sottena works as a [coding interview assistant](https://sottena.com/coding-interview-assistant/): it listens to the interview, reads the task from a screenshot and shows answer points as the questions come in. I also keep a short list of [coding interview tips](https://sottena.com/blog/coding-interview-tips/) on the blog.\n\nWhich live-coding format do you think is the fairest: one long task, a series of short ones, or reviewing someone else's code? When I polled developers, code review won with almost half the votes.", "url": "https://wpnews.pro/news/real-live-coding-tasks-from-9000-tech-interviews-go-java-python-react", "canonical_source": "https://dev.to/sottena/real-live-coding-tasks-from-9000-tech-interviews-go-java-python-react-h1d", "published_at": "2026-12-03 12:36:30+00:00", "updated_at": "2026-12-03 12:46:57.027314+00:00", "lang": "en", "topics": ["ai-tools", "ai-products"], "entities": ["Sottena", "Go", "Java", "Python", "React"], "also_reported_by": [], "takeaway": "In Go concurrency interview tasks, roughly 70% of candidates omit an atomic round-robin counter and 20% never check ctx.Done() between retries, so guarding shared state and honoring context cancellation are the differentiators.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/real-live-coding-tasks-from-9000-tech-interviews-go-java-python-react", "markdown": "https://wpnews.pro/news/real-live-coding-tasks-from-9000-tech-interviews-go-java-python-react.md", "text": "https://wpnews.pro/news/real-live-coding-tasks-from-9000-tech-interviews-go-java-python-react.txt", "jsonld": "https://wpnews.pro/news/real-live-coding-tasks-from-9000-tech-interviews-go-java-python-react.jsonld"}}