摘要: The one question I get more than any other is "How does Google test?" It's been explained in bits and pieces on this blog but the explanation is due an update
閱讀全文
摘要: Dependency injection asks us to separate the new operators from the application logic. This separation forces your code to have factories which are responsible for wiring your application together. However, better than writing factories, we want to use automatic dependency injection such as GUICE to do the wiring for us. But can DI really save us from all of the new operators?
閱讀全文
摘要: Everyone seems to think that they are writing OO after all they are using OO languages such as Java, Python or Ruby. But if you exam the code it is often procedural in nature
閱讀全文
By James Whittaker
I’ve had a number of questions about the SET role and it seems I have confused folks when I say that the SWE is a tester and the SET is a tester and at the same time the SWE is a developer and the SET is a developer. What could possibly be confusing about that?
Oh, yeah. Right.
My next series of posts are going to detail the role of the SET and all will eventually be clear but some clarification on career path seems worthwhile.
SETs are developers who write test code and automation as their primary task. They are in every sense of the word a developer. When we interview SETs, SWEs are on the interview loop and SWE questions are asked. They are not all of the interview, but they are part of it.
This means that the skill set that our SETs possess makes them perfect candidates for switching to the SWE role. There is neither incentive nor deterrent to do so. SETs and SWEs are on the same pay scale and bonus structure (I have both roles reporting to me so I have real visibility into salary data) and their promotion velocity (again based on actual data) is roughly equivalent. This means that SETs have no outside influences to prompt them one way or the other.
The key factor is really the type of work you are doing. SETs who find themselves involved in SWE work usually convert to SWE. SWEs are also drawn in the opposite direction. Much of this happens through our 20% time work. Any SET interested in SWE work can take on a 20% task doing feature development. Any SWE interested in automation can find a group and sign up for a 20%. Right now I have both SWEs and SETs involved in such cross pollination.
The ideal situation is that the title reflects the actual work that you are involved in. So if an SET starts doing more feature dev work than automation, he or she should convert, same for SWEs doing automation work. In my time here, conversions in both directions have happened, but it is not all that common. The work of both roles is engaging, interesting and intense. Few Googlers are walking around bored.
Bottom line: do the work you are passionate about and capable of and the right job title will find you.
一、概念
靜態分派(Static Dispatch),發生在編譯時期,分派是根據靜態類型信息發生的,方法重載就是靜態分派。
動態分派(Dynamic Dispatch),發生在運行時期,動態分派動態地置換掉某個方法。面向對象的語言用動態分派實現多態性。
Java語言支持靜態多分派和動態的單分派,利用設計模式Java可以實現Double Dispatch,即訪問者模式。
二、Visitor Pattern
目的:封裝一些施加于某種數據結構元素之上的操作。
UML圖:

主要原理:“反傳球”,Element來Visitor之間二輪調用,調用過程中用sinlge dispatch確定類型
記錄關于REST的一些技術:
1、REST簡介:http://zh.wikipedia.org/zh/REST
2、InfoQ 深入淺出REST: http://www.infoq.com/cn/articles/rest-introduction
摘要: 要設計良好的架構,必須做到關注點分離,這樣可以產生高內聚、低耦合的系統,這是美麗架構的終極原則
閱讀全文
摘要: A synchronization aid that allows a set of threads to all wait for each other to reach a common barrier point. CyclicBarriers are useful in programs involving a fixed sized party of threads that must occasionally wait for each other. The barrier is called cyclic because it can be re-used after the waiting threads are released.
閱讀全文
摘要: A java.util.concurrent.CountDownLatch is a concurrency construct that allows one or more threads to wait for a given set of operations to complete
閱讀全文