Google Interview Question for Software Engineer / Developers


Country: United States




Comment hidden because of low score. Click to expand.
26
of 26 vote

[1] Random variable being generated and used in some way in the code, some of the random number might cause the test to fail
[2] Loading an external library
[3] contacting the server may get timeout sometime and pass some other times
[3.1] Or any other kind of network related problem might occur on and off
[4] Race conditions
[5] Memory leaks
[6] The state of the code might depend on some other process's output and that may cause a failure sometime
[7] Use of extern variables which are set by other processes
[8] Use of shared memory locations
[9] Faulty RAM, (hardware problem)
[10] Multithreading
[11] When the code is using Singleton design pattern, unit testing is difficult for singleton as the state of the functions using singleton class's object may not be deterministic.
[12] Rarely though, but it can be due to a bug in the IDE being used eg Eclipse... sometime we need to restart the Eclipse and program starts working fine again

- Ashupriya September 17, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

Memory leak, Hardware Dependent

- chandershivdasani September 17, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

1. MultiThreading
2. If code depends on system time

- loveCoding September 17, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

1. Code has dependency on current time.
2. Code has asserts by assuming certain order of records returned..
E.g. List records = getRecordsFromDataStore();
assertTrue(records.get(0).getName().equals("FirstRecord"));

- suji September 30, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

Actually Two main types of bugs can occur: Physical Bugs and Functional Bugs

Physical bugs are the ones like network issues, DB is down, Memory is corrupted, shared resource is not available or is locked or corrupted for some reason.

Functional bugs are like Multithreading issues (race condition, mutex waithandlers), improper locking of database or objects in code, timezone difference between server client not handled, random variable usage in code etc.

gather more info about the bug and capture data like Memory usage in Task manager, Event log etc.

- Debdeep March 04, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Invalid memory access ( provided memory is allocated during runtime ).

- Cerberuz September 17, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Race condition in threads.

- Anonymous September 17, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

when the program is nondeterministic

- kang September 18, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

The wonderful global variables, or reliance on another systems which may have a changed behavior.

- Erion October 01, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

It can be due to many reasons e.g.:

1. Memory pressure, vmsize limit reached, connection limits or open file handle limits
2. Network is unreliable
3. Hardware Failure
4. Using Debug v/s regular binary
5. Race conditions (no locks in multi-threaded program)
6. Dynamic Backend(e.g. no. of nodes in a social graph can increase/decrease)
7. Memory leaks.
8. Bugs in shared memory code/data
9. Time Difference b/w your node and another server.
10. Timeouts/ Max Time to Live expired e.g. Session Expiration

- mytestaccount2 October 10, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
-2
of 2 vote

@Noogler: How many interview you had Noogler?

- Andy2000 September 18, 2012 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More