躲在一个角落吧 关注:123贴子:15,725
  • 9回复贴,共1

interview prep

只看楼主收藏回复

Common Interview Questions
There are several question types you should anticipate an employer asking at an interview. It is also common to receive questions related to skills important to the organization/position, such as decision-making, analysis/problem-solving, initiative, interpersonal attributes, teamwork, communication, and leadership development.
Although you can never anticipate the exact questions you will receive during an interview, the following list will serve as a general guide as you prepare:
Personal
Tell me about yourself.
What short term and long term goals have you set for yourself?
How are you planning to achieve them?
Who or what has had the greatest influence on the development of your career interests?
What two or three things are most important to you in a position?
What two or three accomplishments have given you the most satisfaction?
What are your strengths and weaknesses?
What has been your greatest challenge?
Are you willing to relocate or travel as part of your job?
Education
Why did you choose your major?
Do you feel your GPA reflects your academic ability?
How has your major helped you prepare for this position?
What is the most important lesson you have learned in or outside of school?
How do you think you have changed personally since you started college?
Knowing what you know now about your college experience, would you make the same decisions?
What has been your favorite or least favorite course and why?
Company
What expectations do you have for your future employer?
Why are you interested in this organization?
Why are you the best person for this position?
What can you contribute to this company?
What challenges are you looking for in a position?
How have your educational and work experiences prepared you for this position?
What do you expect from a supervisor?
Experience
What are your team-player qualities? Give examples.
Describe your leadership style.
What is your approach to handling conflict? Solving problems?
How do you motivate others?
Describe a leadership role of yours and tell why you’ve committed time to it.
What work experience has been the most valuable to you?
What was the most useful criticism you received and who provided it?
How did you decide which extracurricular activities to join? What did you gain from these experiences?
What contributions have you made to a group project?
What types of situations put you under pressure? How do you deal with the pressure?
What have you found most frustrating in your work experience?
Behavioral
Take me through a project where you applied __________skills.
Describe a situation when you displayed your critical thinking skills.
Describe the project or situation that best demonstrates your analytical skills.
Describe a situation where you had a conflict with another individual and how you handled it.
Give an example of a problem you solved and the process you used to arrive at the solution.
Describe an idea that you developed and implemented that you felt was particularly creative or innovative.
Tell me about a difficult decision you have made.
Tell me about a time you set a goal and failed to reach it.
Give an example of a situation in which you failed and how you handled it.
Tell me about a time when you had to persuade another person to your point of view.
Tell me about a project you initiated.
Tell me about a team project that you are particularly proud of and what your contribution was to the project.


1楼2015-10-23 02:10回复
    Sample Questions to Ask an Employer
    Below is a list of sample questions. It is advised that you only use these questions as a guide for developing your own. The questions you ask an employer should be based on what additional information you would like to gain.
    How would you describe the corporate culture?
    Upon what criteria will my performance be evaluated?
    How will this be done and by whom?
    How are employees rewarded for excellent performance?
    Describe the kind of people who thrive in your company.
    What are the key competencies of a successful employee?
    What are the company's values and ethics?
    How are these manifested in relationships with employees, customers, and suppliers?
    How would you describe the company's management style and the philosophy of its top executives?
    Is my boss's performance evaluated on how well he/she develops his/her subordinates? On the success of the department?
    What commitment does the company have to the career development and training of its employees? How will the company help me achieve my maximum potential?
    What are the major issues this organization and industry currently face? In the next three to five years?
    How do current employees feel about their jobs and the company?
    What is your attrition rate of new hires within one year? Three years? Five years? Why do they leave?
    What are the opportunities for progression and increased responsibility within the organization?
    How secure is this position? If I were to be laid off, what assistance would I receive?
    Is there a commitment to promote from within? What percentage of your top managers were promoted from inside the organization?
    What is the company doing to ensure it will be a viable and profitable organization ten years from now? What is the strategic vision of the organization and how do individuals contribute to it?
    What will be expected of me in this position?
    How does this job and department fit into the organization as a whole?
    Describe working relationships with other departments in the company.
    What are the expected work hours, start date, work locations, travel requirements, dress code, and relocation prospects?


    2楼2015-10-23 02:11
    回复
      Interviewing Do's & Don'tsInterview Do's...
      Research the industry and organization
      Practice with a NCA staff member
      Prepare questions to ask the employer
      Review your resume
      Dress appropriately for the job, company, and industry
      Bring extra copies of your resume, an unofficial transcript, and your list of references
      Offer a firm handshake
      Convey enthusiasm for the company and position
      Maintain strong eye contact
      Use moderate hand gestures
      Maintain appropriate posture
      Be mindful of your tone of voice and rate of speech
      Ask for clarification if you don’t understand a question
      Take time to think before answering difficult questions
      Speak specifically about your role in any previous successes
      Obtain a business card from each interviewer
      Send a thank-you note to the interviewer(s) within 48 hours
      Interview Don'ts...
      Arrive late. Instead, arrive early, at least 10 minutes prior to the interview start time
      Leave your cell phone on, take a call, or look at a text message; if it does sound, apologize and ignore it
      Refer to your interviewer by first name until asked to do so; address the interviewer by title (Ms., Mr., Dr.) and last name
      Chew gum or smell like smoke/alcohol
      Use acronyms or slang language
      Look at the floor or ceiling while speaking to the interviewer
      Have bad posture
      Speak too quickly or too slowly
      Use filler words like “um” or “like”
      Lie or exaggerate
      Speak negatively about anything- a previous employer, professor, or colleague
      Interrupt the interviewer
      Act overbearing, overaggressive, or conceited
      Discuss salary, holidays, or bonuses, unless the interviewer raises these topics


      3楼2015-10-23 02:12
      回复
        http://blog.est.im/post/84684285685
        略搞。


        4楼2015-10-27 04:47
        回复
          1、当一个有限队列充满后,线程池的饱和策略开始起作用。
          2、ThreadPoolExecutor的饱和策略通过调用setRejectedExecutionHandler来修改。不同的饱和策略如下:
          1)AbortPolicy:中止,executor抛出未检查RejectedExecutionException,调用者捕获这个异常,然后自己编写能满足自己需求的处理代码。
          2)DiscardRunsPolicy:遗弃最旧的,选择丢弃的任务,是本应接下来就执行的任务。
          3)DiscardPolicy:遗弃会默认放弃最新提交的任务(这个任务不能进入队列等待执行时)
          4)CallerRunsPolicy:调用者运行,既不会丢弃哪个任务,也不会抛出任何异常,把一些任务推回到调用者那里,以此减缓新任务流。它不会在池线程中执行最新提交的任务,但它会在一个调用了execute的线程中执行。
          3、创建一个可变长的线程池,使用受限队列和调用者运行饱和策略。
          ThreadPoolExecutor executor=new ThreadPoolExecutor(N_THREADS,N_THREADS,0L,TimeUnit.MILLISECONDS,new LinkedBlockingQueue<Runnable>(CAPACITY));
          executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
          4、当线程队列充满后,并没有预置的饱和策略来阻塞execute。但是,使用Semaphore信号量可以实现这个效果。Semaphore会限制任务注入率。
          @ThreadSafe
          public class BoundedExecutor{
          private final Executor exec;
          private final Semaphore semaphore;
          public BoundedExecutor(Executor exec,int bound){
          this.exec=exec;
          this.semaphore=new Semaphore(bound);
          }
          public void submitTask(final Runnable command) throws InterruptedException{
          semaphore.acquire();
          try{
          exec.execute(new Runnable(){
          public void run(){
          try{
          command.run();
          }
          finally{
          semaphore.release();
          }
          }
          });
          }catch (RejectedExecutionException e){
          semaphore.release();
          }
          }
          }


          IP属地:上海7楼2016-04-13 09:28
          回复
            2)软引用(SoftReference)
            如果一个对象只具有软引用,则内存空间足够,垃圾回收器就不会回收它;如果内存空间不足了,就会回收这些对象的内存。只要垃圾回收器没有回收它,该对象就可以被程序使用。软引用可用来实现内存敏感的高速缓存(下文给出示例)。
            软引用可以和一个引用队列(ReferenceQueue)联合使用,如果软引用所引用的对象被垃圾回收器回收,Java虚拟机就会把这个软引用加入到与之关联的引用队列中。


            IP属地:上海8楼2016-04-13 09:58
            回复
              too long no see


              IP属地:广东来自手机贴吧9楼2016-04-13 22:52
              收起回复
                多线程和并发性并不是什么新内容,但是 Java 语言设计中的创新之一就是,它是第一个直接把跨平台线程模型和正规的内存模型集成到语言中的主流语言。核心类库包含一个 Thread 类,可以用它来构建、启动和操纵线程,Java 语言包括了跨线程传达并发性约束的构造 —— synchronized 和volatile 。在简化与平台无关的并发类的开发的同时,它决没有使并发类的编写工作变得更繁琐,只是使它变得更容易了。
                synchronized 快速回顾
                把代码块声明为 synchronized,有两个重要后果,通常是指该代码具有 原子性(atomicity)和 可见性(visibility)。原子性意味着一个线程一次只能执行由一个指定监控对象(lock)保护的代码,从而防止多个线程在更新共享状态时相互冲突。可见性则更为微妙;它要对付内存缓存和编译器优化的各种反常行为。一般来说,线程以某种不必让其他线程立即可以看到的方式(不管这些线程在寄存器中、在处理器特定的缓存中,还是通过指令重排或者其他编译器优化),不受缓存变量值的约束,但是如果开发人员使用了同步,如下面的代码所示,那么运行库将确保某一线程对变量所做的更新先于对现有synchronized 块所进行的更新,当进入由同一监控器(lock)保护的另一个 synchronized 块时,将立刻可以看到这些对变量所做的更新。类似的规则也存在于 volatile 变量上。
                [java] view plain copy
                synchronized (lockObject) {
                // update object state
                }
                所以,实现同步操作需要考虑安全更新多个共享变量所需的一切,不能有争用条件,不能破坏数据(假设同步的边界位置正确),而且要保证正确同步的其他线程可以看到这些变量的最新值。通过定义一个清晰的、跨平台的内存模型(该模型在 JDK 5.0 中做了修改,改正了原来定义中的某些错误),通过遵守下面这个简单规则,构建“一次编写,随处运行”的并发类是有可能的:
                不论什么时候,只要您将编写的变量接下来可能被另一个线程读取,或者您将读取的变量最后是被另一个线程写入的,那么您必须进行同步。
                不过现在好了一点,在最近的 JVM 中,没有争用的同步(一个线程拥有锁的时候,没有其他线程企图获得锁)的性能成本还是很低的。(也不总是这样;早期 JVM 中的同步还没有优化,所以让很多人都这样认为,但是现在这变成了一种误解,人们认为不管是不是争用,同步都有很高的性能成本。)
                对 synchronized 的改进
                如此看来同步相当好了,是么?那么为什么 JSR 166 小组花了这么多时间来开发 java.util.concurrent.lock 框架呢?答案很简单-同步是不错,但它并不完美。它有一些功能性的限制 —— 它无法中断一个正在等候获得锁的线程,也无法通过投票得到锁,如果不想等下去,也就没法得到锁。同步还要求锁的释放只能在与获得锁所在的堆栈帧相同的堆栈帧中进行,多数情况下,这没问题(而且与异常处理交互得很好),但是,确实存在一些非块结构的锁定更合适的情况。
                ReentrantLock 类
                java.util.concurrent.lock 中的 Lock 框架是锁定的一个抽象,它允许把锁定的实现作为 Java 类,而不是作为语言的特性来实现。这就为 Lock的多种实现留下了空间,各种实现可能有不同的调度算法、性能特性或者锁定语义。 ReentrantLock 类实现了 Lock ,它拥有与 synchronized 相同的并发性和内存语义,但是添加了类似锁投票、定时锁等候和可中断锁等候的一些特性。此外,它还提供了在激烈争用情况下更佳的性能。(换句话说,当许多线程都想访问共享资源时,JVM 可以花更少的时候来调度线程,把更多时间用在执行线程上。)
                reentrant 锁意味着什么呢?简单来说,它有一个与锁相关的获取计数器,如果拥有锁的某个线程再次得到锁,那么获取计数器就加1,然后锁需要被释放两次才能获得真正释放。这模仿了 synchronized 的语义;如果线程进入由线程已经拥有的监控器保护的 synchronized 块,就允许线程继续进行,当线程退出第二个(或者后续) synchronized 块的时候,不释放锁,只有线程退出它进入的监控器保护的第一个 synchronized 块时,才释放锁。
                在查看清单 1 中的代码示例时,可以看到 Lock 和 synchronized 有一点明显的区别 —— lock 必须在 finally 块中释放。否则,如果受保护的代码将抛出异常,锁就有可能永远得不到释放!这一点区别看起来可能没什么,但是实际上,它极为重要。忘记在 finally 块中释放锁,可能会在程序中留下一个定时炸弹,当有一天炸弹爆炸时,您要花费很大力气才有找到源头在哪。而使用同步,JVM 将确保锁会获得自动释放。
                清单 1. 用 ReentrantLock 保护代码块。
                [java] view plain copy
                Lock lock = new ReentrantLock();
                lock.lock();
                try {
                // update object state
                }
                finally {
                lock.unlock();
                }


                IP属地:上海10楼2016-04-15 10:43
                回复
                  除此之外,与目前的 synchronized 实现相比,争用下的 ReentrantLock 实现更具可伸缩性。(在未来的 JVM 版本中,synchronized 的争用性能很有可能会获得提高。)这意味着当许多线程都在争用同一个锁时,使用 ReentrantLock 的总体开支通常要比 synchronized 少得多。
                  比较 ReentrantLock 和 synchronized 的可伸缩性
                  Tim Peierls 用一个简单的线性全等伪随机数生成器(PRNG)构建了一个简单的评测,用它来测量 synchronized 和 Lock 之间相对的可伸缩性。这个示例很好,因为每次调用 nextRandom() 时,PRNG 都确实在做一些工作,所以这个基准程序实际上是在测量一个合理的、真实的 synchronized 和Lock 应用程序,而不是测试纯粹纸上谈兵或者什么也不做的代码(就像许多所谓的基准程序一样。)
                  在这个基准程序中,有一个 PseudoRandom 的接口,它只有一个方法 nextRandom(int bound) 。该接口与 java.util.Random 类的功能非常类似。因为在生成下一个随机数时,PRNG 用最新生成的数字作为输入,而且把最后生成的数字作为一个实例变量来维护,其重点在于让更新这个状态的代码段不被其他线程抢占,所以我要用某种形式的锁定来确保这一点。( java.util.Random 类也可以做到这点。)我们为 PseudoRandom 构建了两个实现;一个使用 syncronized,另一个使用 java.util.concurrent.ReentrantLock 。驱动程序生成了大量线程,每个线程都疯狂地争夺时间片,然后计算不同版本每秒能执行多少轮。图 1 和 图 2 总结了不同线程数量的结果。这个评测并不完美,而且只在两个系统上运行了(一个是双 Xeon 运行超线程 Linux,另一个是单处理器 Windows 系统),但是,应当足以表现 synchronized 与 ReentrantLock 相比所具有的伸缩性优势了。

                  图 1 和图 2 中的图表以每秒调用数为单位显示了吞吐率,把不同的实现调整到 1 线程 synchronized 的情况。每个实现都相对迅速地集中在某个稳定状态的吞吐率上,该状态通常要求处理器得到充分利用,把大多数的处理器时间都花在处理实际工作(计算机随机数)上,只有小部分时间花在了线程调度开支上。您会注意到,synchronized 版本在处理任何类型的争用时,表现都相当差,而 Lock 版本在调度的开支上花的时间相当少,从而为更高的吞吐率留下空间,实现了更有效的 CPU 利用。


                  IP属地:上海11楼2016-04-15 10:43
                  回复