Hacker News new | ask | show | jobs
by prepend 1907 days ago
Yes and I usually say that. It’s not meant as a trick question. Sometimes I’ll prefix it with “While you would never do this is real life, please walk me through how you would design and implement a database connection pool...”
1 comments

I got asked a python question that involved a couple of list comprehensions. I did it and got asked how to do it without an intermediate variable. It involved nesting the list comprehensions, and I nearly didn't get it, not because I didn't understand how to do it, just that I have a personal rule never to do that, as it makes code quite difficult to read.