| I failed an onsite interview for a senior position because I didn’t have a mental model of the subtask before coding each function during a 90 minute pair programming test. I only used javascript in a text editor. I ran node in console after small changes and additions to print, test, debug. The feedback was you can’t do this when compiling time is long and development will be slow. I’ve heard of developers that don’t use debuggers because they have a mental model in their head. Do most senior software engineers take time to build a mental model before coding and testing? I prefer to create a draft quickly to build a mental model. Is my way of logging to console frequently and coding before building a mental model a junior habit that I should work on? Am I unlikely to pass a FAANG interview like this? Edit: It wasn’t a LeetCode problem. I had to implement an API where each call would change the state of the application on certain conditions. I heard the problem and clarified it on the whiteboard. I coded each function while talking and ask for clarifications. |
Doing the design work is what separates senior and non-senior engineers. The more details you get worked out before they are solidified by having 10 other systems depending on them, the better.
If you just do stuff with a rough idea of the direction you want to go in, it's very easy to get sidetracked by something that doesn't matter. It's also very easy to build something nobody wants. By having people agree on some sort of semi-detailed design that describes assumptions, corner cases, the API, etc... you dramatically increase your chances of building the computer program that people want.
I am not sure how you test for this in an interview... but it is important. If you don't design things before building them, that is something you should start working on.