Git Source Code Mirror - This is a publish-only repository but pull requests can be turned into patches to the mailing list via GitGitGadget (https://gitgitgadget.github.io/). Please follow Documentation/SubmittingPatches procedure for any of your improvements.
I would pass the shit out of this question because it's right in my wheelhouse, but I don't consider myself a particularly exceptional programmer. I have a CS degree, but I'm positive I'd fail a FAANG interview w/o advance prep. I'm really comfortable at modifying existing code, gluing together existing solutions, and know enough C to get through this question.
But the OP says this:
> When you’re maintaining a large codebase, there are always going to be codepaths you don’t fully understand
Ugh... I hate modifying code I don't understand. That doesn't mean I need to understand the entire code base. But if I'm modifying a portion of the code base, I'm loath to touch it till I understand what it's doing.
memcached development tree
Protip: if you're interviewing for a more senior position, the correct answer would not be to go and waste 3 hours implementing something that then you have to maintain forever. The best answer, from an engineering perspective, would be noticing or (knowing) that memcached supports a CAS command (https://github.com/memcached/memcached/wiki/Commands#cas) that would allow to implement equivalent functionality, and try to understand why that would not be a viable solution. If, and only if, it's confirmed it's not a viable solution then you should spend the 3 hours (+ all the maintenance effort required until the end of life for that solution).
Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
Improve Git monorepo performance with a file system monitor
6 projects | news.ycombinator.com | 29 Jun 2022
Review Release Highlights from Git 2.37
1 project | reddit.com/r/github | 28 Jun 2022
Highlights from Git 2.37
2 projects | news.ycombinator.com | 27 Jun 2022
Git branch switching
1 project | reddit.com/r/learnprogramming | 21 Jun 2022
2 projects | reddit.com/r/ProgrammerHumor | 17 Jun 2022