Google Interview Question
Principal Software EngineersCountry: United States
Interview Type: In-Person
ad 3) connect with socket (TCP port + IP), not IP address.
there is much more happening, such as:
- NAT, if host has no public to map private IP to external IP
- routing the IP packets from the client machine to the server (or a proxy)
- IP to MAC address translations (ARP)
Probably I still missed some protocols/steps...
1. figure out what code changes between today and yesterday, only consider covered code changes by the input test cases.
2. use some runtime performance tools to check affected functions
3. read source code, guess, reverse back... check it again.
Any experienced programmers have better ways to handle this?
Programmatically these are the approaches that I would take.
1. Test it on multiple browsers and check if the behavior(delay) is same or occurring only particular browser.
2. use the time collected from past few weeks and observe for any patterns.
3. Write some complete end to end integration/regression test cases.
4. Rely on some unit tests that are written for the code developed from yesterday to today.
5. see if there are any data structures in the back end are changed.
6. see if the datasource/database queries are changed.
On top of my head, the url will first go to either your local cache or DNS server to get ip. It will then send to http request to the target ip and get response from the server with that ip.
I might think the other way, if my browser cache is cleaned, it would take more time then yesterday. It would also because the website was updated yesterday. More css, js or resource file need to be parsed. I would try a few more times before give the conclusion that there were something wrong with my code.
- Danish Shaikh (danishshaikh556@gmail.com) March 24, 2014