7 ms·
> You have three hours. Go! Cool challenge, but isn't it a bit of a red flag? I don't expect you to ask me to get familiar with a codebase, test, and implement
by mkl95 3y ago
> You have three hours. Go!
Cool challenge, but isn't it a bit of a red flag? I don't expect you to ask me to get familiar with a codebase, test, and implement a feature in 3 hours. Ever. It's also oddly specific, if you know what I mean...
- Aeolun 3y agoI'm not sure, if there's no gotchas in this question I feel like it'd be mostly copy and paste from the addition or subtraction command? Doesn't necessarily mean that it's a good question of course.
- mkl95 3y agoI'd assume there's some kind of gotcha that makes naive solutions not scale. I may just be cynical, though.
- simonw 3y agoNo gotchas in there. It's a realistic and straight forward problem that exercises your ability to navigate and modify a well-written C codebase.
- JoshTriplett 3y agoTake a look at part 2 for a step by step walkthrough of solving the problem.
- salomonk_mur 3y agoSpoiler, it's basically copy paste of addition replacing + with *.
- yuliyp 3y agoThat's part (not the only) of the signal thing being evaluated: can you efficiently familiarize yourself with a codebase. I'd encourage you to try it. It's not that big a codebase: 140 files, 80k lines of code. Given that similar commands (incr/decr) exist, finding a way to get multiplication to work shouldn't be out of most qualified candidates' skillsets for a software engineer job (language skills aside).
- xw31099 3y agoI'm not sure if this was made clear in the interview but... Do I have to modify memcached or can I just man-in-the-middle it with a python telnet client à la telnetlib?
- MrJohz 3y agoMy biggest criticism of the task is that the article doesn't make the goals of the task - i.e. what the signals are that they're looking for - clear at the start. You can see in the comments that a lot of people have gone in looking for a kind of trick and made the whole thing more complicated than it needs to be. I can imagine in the real interview, there'd be more build up to the task, and a description of what the interviewer was actually looking for. That way the interviewee understands what the purpose of the exercise is and doesn't end up lost down rabbit holes. The more I think about this idea, the more it grows on me though, if you frame it well and find a task that can be explored in the given time frame.
- deleted 3y ago[deleted]
- zepolen 3y agoYea 3 hours is way too long, this is a 30 min task tops.
- isbvhodnvemrwvn 3y agoThe OP, who had already done the task before, took more than an hour to complete it.
- deleted 3y ago[deleted]
- zepolen 3y agoOk, that doesn't bode well for the op. Note, I haven't used C in 15 years, have never looked at memcached code and in fact the last time I used memcached was before redis even existed. It took me ~26 mins which included reading the article, googling the memcached repo, downloading all dependencies, compiling a first build, grepping for references to incr and adding mult with support for negative arguments, refactoring the guts of incr into two functions to support the changes, compiling, fixing a few compiler bugs then testing, given a few more minutes I'd probably be able to get it PR ready with a full test suite.
- amne 3y agoAll I see is a company that is developing a database engine and looking for people that can do exactly that.
- JoshTriplett 3y ago> I don't expect you to ask me to get familiar with a codebase, test, and implement a feature in 3 hours. In any given day, I might find an issue or missing feature in one of my dependencies, clone that repository, make a change, submit a pull request, and move on with my day a few minutes later. This is absolutely an important skill. I don't expect someone to be able to become an expert with a codebase in 3 hours, or even become deeply familiar with it. I do expect someone to be able to get familiar enough to make a simple change, and to feel comfortable working in a codebase that's new to them.
- mkl95 3y agoIf that thing is in production I wouldn't just change the code, submit a PR and move on with my day. For interviewing purposes it could work, but in the real world it's a reckless attitude.
- toast0 3y agoWhat's your alternative plan for when a dependency is discovered to be broken? I've done Josh's plan a bunch of times. It's why I prefer my dependencies to be open source. Everything is broken, but if it's open source, it's easy to fix it when it's noticed, push to production to fix it for my users, and send a PR to fix it for the world (eventually, if they take my patch; not everyone does, but I've had many accepted)
- simonw 3y agoNothing reckless about submitting a PR - that's what code review is for, to let people discuss changes with other people to reduce the risk of bad code being committed because the developer misses something that someone else could have spotted.