Wednesday, March 28, 2012

Best Practices for Speeding Up Your Web Site

http://developer.yahoo.com/performance/rules.html



Lock and condition java 5 concurrent api


old way:
use synchronized keyword

Object monitorObject;

synchronized(monitorObject){
//critical section
}

new way: use Lock.lock() and Lock.unlock()
Lock lockObject;

try{
lockObject.lock();
}
finally{
lockObject.unlock();
}

----

old way: use wait() and notify() in the critical section

//insdie your critical section

boolean somecondition;
while(somecondition){
wait();
}

boolean someOtherCondition;
if(someOtherCondition){
notify();
}

new way: use await() and signal() on condition variables

Condition conditionVariable = lockObject.newCondition();

boolean somecondition;
while(somecondition){
conitionVariable.await();
}

boolean someothercondition;
if(someOtherCondition){
conditionVariable.signal();
}

Thursday, March 22, 2012

Google question

Tell me what you know about security
What is cursor
Tell me about event system
Dealer inventory, what data structure, if large data,how you display partial while getting the whole
Junit ,what things you need pay attention

Wednesday, March 21, 2012

Python interview questions

http://techpreparation.com/python-interview-questions-answers1.htm