There are a few tools that can export your spotify playlists into folders of audio files. That's what I used a few years ago for my initial spotify -> navidrome migration.
But they're not that good. They look for the songs on youtube, and the versions uploaded there are often modified (or just very low quality). And I've had some issues with metadata. I'd say about 5% of my songs had some issues, and 1% were completely off.
Once they release the actual torrents and not just the metadata, I'm assuming that new playlist export tools will soon show up, and they'll use these new torrents as source instead of youtube. They'll be a lot more reliable. I'd wait for that to happen. In fact I may end up re-exporting my old spotify playlist.
I do think running the code would be a tiny bit faster, even if it's merely seconds either way. Opening a python REPL and pasting that would take around 5 seconds in my case. Running the code in my head would take roughly the same at first, but then if it's in an interview I'd take the time to double check. And then check a few more times because I'd expect some kind of trick here.
Considering there's no (explicit) instruction forbidding or discouraging it, I'd consider the REPL solution to be perfectly valid. In fact some interview tests specifically look for this kind of problem solving.
I get it still, I'd expect some valuable signal from this test. Candidates who execute this code are likely to do so because they really want to avoid running the code in their head, not just because it's more straightforward, and that's probably a bad sign. And pasting that into an LLM instead of a REPL would be a massive red flag.
I just don't think answering "-11" here is a signal strong enough to disqualify candidates on its own.
They already have the tool, it's python interpreter with `random`.
I just tested with a mistral's chat: I asked it to answer either "foo" or "bar" and that I need either option to have the same probability. I did not mention the code interpreter or any other instruction. It did generate and execute a basic `random.choice(["foo", "bar"])` snippet.
I'm assuming more mainstream models would do the same. And I'm assuming that a model would figure out that randomness is important when playing poker.
If you're interested, there's actually several other team members who made talks about different parts of the project in the "railway and open transport" track
But they're not that good. They look for the songs on youtube, and the versions uploaded there are often modified (or just very low quality). And I've had some issues with metadata. I'd say about 5% of my songs had some issues, and 1% were completely off.
Once they release the actual torrents and not just the metadata, I'm assuming that new playlist export tools will soon show up, and they'll use these new torrents as source instead of youtube. They'll be a lot more reliable. I'd wait for that to happen. In fact I may end up re-exporting my old spotify playlist.