Microsoft Interview Question
Software Engineer InternsCountry: United States
Interview Type: In-Person
The production environment may contribute to the bug. Check the users error log and the users configuration. It's easy to blame the user when you have the latest pc and the user is on a 10 year old thinkpad. After finding out the users setup, create a virtualized environment with those settings, then attempt to repro the bug.
There are so many factors/scenarios where things might go wrong and internal tests many a times fail to cover them all, mostly because of feasibility constraints. Before even making some changes in appp to detect the root cause of the error (like adding extra logging, etc) we should try to reproduce the error at our end. And for that, we should try to run the app in configuration which is similar to that of user. So we should try to match following factors -
1. Device resolution
2. Memory and processing power.
3. Network connectivity (some time slow/flaky network lead to unexpected behaviors if your app is heavily dependent on network usage)
4. User region and language settings.
5. User's personalization settings in the app
6. User's data (note that user might not always agree to share this with you. But it might be that there are some entities in the personal data which are causing the error.)
7. App version (User might not have installed latest updates)
8. OS version (this is less likely to be the cause)
Actually, even before starting to investigate the issue, we should do a quick analysis of how many users are seeing the error. If the number is very less, you might want to focus on some other task.
We should not assume user error until we have further info. Based on the bug report, we should know which functionality area of the application isn't working right. In that area, we can add more logging we should be able to further analyze the problem when it next occurs for the user. The app could be made to automatically upload error logs or allow the user to capture the logs and submit it as additional details to the bug report. Additional information added to the log could include: variable values during that time (watch out for privacy violation), business\functional logic validation, device it is running on, memory device has, mobile operating system, language or any other possible dependencies of the code. The code may also have external dependencies such as accessing another server or database and these external dependencies could fail in-deterministically.
- LC October 30, 2014