Interview Question
Country: United States
Interview Type: Phone Interview
When there is a repro
1) Figure out what you expect the state to be vs what the state actually is.
2) Trace the state back in the call stack to find where the state became corrupt
3) For multithreaded applications, this will require multiple "goes", as state may be set from one thread that has already returned.
When there is no repro, you need to create one. To set yourself up for success:
1) Create better instrumentation - Reason about the code and ensure that you at least log all exceptions before crashing (crashing is good).
2) Set up machines to give create a dump file.
3) LOG LOG LOG
Obviously, this question is to identify how you would solve the problem which has not enough data to start. The interviewer expects you to start asking questions about the technology and the bug itself to resolve ambiguity. I would start from the following:
- helen2211 November 15, 20121) When speaking about technology, does it mean I have application written in that technology? If yes, is this application desktop or web? In which part of the application is the bug? ETC.
2) When said "solve a bug", it meant to fix it or to develop a test-case to find it and document? ETC.
Every next question is based on what the interviewer already replied to you. Usually after 10-12 questions you asked you will be stopped because it would be clear how smart you are in getting data you need for work. :)