1. json vs xml

  2. http
    hypertext transport protocal

yelp phone 面经整合

网络

DNS

dns怎么工作的 http://369369.blog.51cto.com/319630/812889/

DNS怎么工作,如何用DNS做Load balancing以及location定位

定位技术基本都是通过IP+DNS来实现的,一般CDN常常采用这种技术。当访问一个网站时,会先进行域名解析,在域名解析的时候,智能dns获取用户IP,进行定位,然后选择离用户近的服务器。网站的dns一般获取的是用户端的local dns的ip,所以当你把你得dns修改了之后,有些网站无法获取你的真实ip了。然而,解决这个问题的方法就是,google提交的ends-client-subnet协议,该协议允许dns传递用户真实ip到权威dns服务器。如果支持该协议,那么可以拿到用户真实ip,可以准确定位了。

http post get区别

post get区别 怎么保证post请求不被中间人篡改
https://www.biaodianfu.com/post-get-restful.html
encrypt

TCP/UDP

TCP UDP 区别,
http://feinibuke.blog.51cto.com/1724260/340272

cache

什么是cache这类
Cache怎么工作,Page Rendering
https://www.bittiger.io/blog/post/nhtsY2zPzcEvA4Nzv

What is the complete process from entering a url to the browser's address bar to get the rendered page in browser?

然后他还问了下,HTML,CSS,Javascript我们可以caching哪几个?

image, js, css static recourses
(我说CSS吧,因为不常变动)
Some websites use highly volatile, often-changing CSS and JavaScript files. In the case of these files, it's important that the developer prevent browsers from caching them?
server can set an expiration date

如何判断缓存中的网页是否过期,哪些文件需要存入缓存

Expires策略:Web服务器响应消息头字段,在响应http请求时告诉浏览器在过期时间前浏览器可以直接从浏览器缓存取数据
Cache-control:
http协议头Cache-Control web服务器返回的Cache-Control头的值为max-age=300,即5分钟。

输入url

的在浏览器里输入一个链接后发生了什么的问题
输入URL会怎么样,我把知道的全部说了,比如说,
http://edusagar.com/articles/view/70/What-happens-when-you-type-a-URL-in-browser

网站反应慢

我有个网页,用户反映每次打开加载都很慢,说3个原因为什么?
(我也不是那么清楚。。。就想起什么说什么,说了bandwidth,说了database优化不够,数据量大很多join,还说了网页做的太次,全是image,可以用caching解决)

网站变慢,可能有什么因素? load balancing有问题,图片太多,数据库操作
太频繁,服务器自身的硬件能力有问题

说yelp有个页面访问量大,比较卡,怎么解决。如果不是数据库的问题,怎么解决, 加了cache还慢怎么解决

add server

如果美国用户快法国用户慢怎么解决,如果在欧洲安了服务器还慢怎么解决。。。安了服务器怎么判断是美国还是法国的用户请求

user ip addresses

XSS

什么是XSS? (这我就不知道了。。。)

OS

1.举例说明deadlock。我就说了下CC上面那个拿筷子和放筷子的例子,又说了下不同thread访问一个文件。后来引申问有什么么检测的方法。我說了可以 timeout 和用其他的service建graph遍历来检测,后来又问了为什么dfs比bfs检测graph的环好。

数据库

数据库index什么原理,B树和hash table优缺点

( 这里出糗了,他最后问hash table的缺点,... range... blabla没听懂,他直接pass了),我说了b树查询速度相对慢是logN,没说出其他有营养的东西。嘴贱意淫说了hash table修改的时间复杂度高,貌似说错了 囧。 望大牛指点.

B tree 的search time 是logN, 但是好處是range search的時候快。Hash table的edit, search time都是O(1), 缺點是range search的時候非常慢。

SQL index以及如何进一步优化,有什么tradeoff

Database: Left join and Inner Join
database join的一些知识

数据库慢

如果一个Database的查询速度很慢,如何改进。如果denormalization之后还是不给力,怎么办?
SQL里面如何优化query的速度,query里的aggregator函数的用法
数据库查询慢为啥,怎么解决。Index,只能想到这个。

Denormalization

http://www.vertabelo.com/blog/technical-articles/denormalization-when-why-and-how

这是两种设计数据库表的模式,Normalization对应的数据属于干净非冗余型,而Denormalization则允许数据冗余或者同样的数据存储于多处。下面主要列出了Normalization的优点和缺点,
优点:1、数据更新更迅速;
2、数据存储空见通常更小;
3、在查询时减少了distinct和group by的使用
缺点:1、查询时可能需要设计多个表,增加了join的使用;
2、一些并要的值需要在每次查询时计算(比如各种率值)
综合以上的优缺点,Normalization模式比较适合的场合是更新操作比较频繁的应用,即write-heavy。
同样的Denormalization则适合于read-heavy。

什么是SQL injection?

(上过Security,大概有点印象)

JAVA

用过Python嘛? Python vs C++的不同

(dynamic vs compiled language)

c++和java区别 (本人主要语言C++)

C++语言与Java语言的区别有哪些?
java GC 工作机制. smart pointers
c++ multi inheritance, java implements interfaces
auto
no pointer
java all heap, c++ heap or stack
compare string: == .equals

What do you like about Java.

How can Java improve.
Primitive types don't inherit from Object

How does Java compile code

transform source file into byte code. The bytecode is platform independent, because it's targeted at Java Virtual Machine.
jvm -> machine code
You invoke javac pointing to your source code file. The internal reader (or tokenizer) of javac reads your file and builds an actual AST out of it. All syntax errors come from this stage.

The javac hasn't finished it job yet. When it has the AST(Abstract Syntax Tree) the true compilation can begin. It's using visitor pattern to traverse AST and resolves external dependencies to add meaning (semantics) to the code. Finished product is saved as a .class file containing bytecode.
Now it's time to run the thing. You invoke java with the name of .classfile. Now the JVM starts again, but to interpret Your code. The JVM may, or may not compile Your abstract bytecode into native assembly. The Sun's HotSpot compiler in conjunction with Just In Time compilation may do so if needed. The running code is constantly being profiled by the JVM and recompiled to native code if certain rules are met. Most commonly the hot code is the first to compile natively.

How to print "Hello World" in Java, 就大概问下Java基本操作吧。

public class HelloWorld {
   public static void main(String[] args) {
      // Prints "Hello, World" in the terminal window.
      System.out.println("Hello, World");
   }
}

% javac HelloWorld.java
% java HelloWorld

Java: pass by reference or pass by value?

what does pass by value mean?

像C++ vector list等等数据结构查找删除 size()的时间复杂度.

比如interface vs abstract class. 为什么用interface. 为什么用abstract class.

Interface vs Abstract Class (general OO)

I think the answer they are looking for is the fundamental or OPPS philosophical difference.

The abstract class inheritance is used when the derived class shares the core properties and behaviour of the abstract class. The kind of behaviour that actually defines the class.

On the other hand interface inheritance is used when the classes share peripheral behaviour, ones which do not necessarily define the derived class.

For eg. A Car and a Truck share a lot of core properties and behaviour of an Automobile abstract class, but they also share some peripheral behaviour like Generate exhaust which even non automobile classes like Drillers or PowerGenerators share and doesn't necessarily defines a Car or a Truck, so Car, Truck, Driller and PowerGenerator can all share the same interface IExhaust.

Data structure

hashtable的原理

HashMap的操作 复杂度
Android

比如MVC是什么,大概说说MVC三个东西都是干什么的

The MVC pattern is essentially this:
Model: What to display, logic, rule
View: How it’s displayed
Controller: Formatting the model for display and handling events like user input,such as activity

测试

unit test和integrity test的区别

单元测试(unit testing),是指对软件中的最小可测试单元进行检查和验证。对于单元测试中单元的含义,一般来说,要根据实际情况去判定其具体含义,如C语言中单元指一个函数,Java里单元指一个类,图形化的软件中可以指一个窗口或一个菜单等。总的来说,单元就是人为规定的最小的被测功能模块
整合测试又称组装测试,即对程序模块采用一次性或增殖方式组装起来,对系统的接口进行正确性检验的测试工作。整合测试一般在单元测试之后、系统测试之前进行。实践表明,有时模块虽然可以单独工作,但是并不能保证组装起来也可以同时工作。
individual software modules are combined and tested as a group。It occurs after unit testing and before validation testing. Integration testing takes as its input modules that have been unit tested, groups them in larger aggregates, applies tests defined in an integration test plan to those aggregates, and delivers as its output the integrated system ready for system testing.[1]

Behavirol questions

  1. 介绍你自己
  2. 为什么选我们公司?
  3. 公司网站需要什么改进的?

results matching ""

    No results matching ""