DEV Community

Discussion on: #discuss What language do you think in?

Collapse
 
speculative profile image
Jeffrey Tao

I'm kind of confused about this question because I don't think I "think" in any language. When I'm breaking down a problem I'm mentally working with fundamental units of work that need to be done and what data structures I need to represent it, which is different from what the code for it actually looks like. "Perform this function on each element of a collection and save the result" is the same work regardless of whether you write it with a map or a for loop or a list comprehension.

For lack of a better way to state it, I might say that I think in English :)

A more practical answer: for interviews I use python, because it's easy to write on a whiteboard and has lots of nice, concise ways of expressing the kinds of data structures and algorithms I usually need to exercise in a coding interview. Lists, dictionaries, tuples, list/generator comprehensions... a standard library that I can guess at functions existing and having a 95% chance of them really existing. I love python for interviews!