Wednesday, December 5, 2012

Tuesday, September 18, 2012

Parasits and brain tumor

I was reading some thing about parasites, some parasites that usually inhabits in our digestive systems actually ends up in our brain and can cause a lot of issues. However, this reminded me of something. I have recently learned that brain tumor is very hard to treat because there is a blood barrier between brain and blood vessels. What if we can use the parasites (or borrow the way it went into the brain) to deliver cancer treatment drugs for brain cancel patients?

Friday, July 13, 2012

Best Starcraft match so far

Janbi vs Zero Was such a surprise ending, keep me on the entire match :-). Enjoy!

Thursday, May 24, 2012

dead lock with insert

Recently I encountered a strange problem of dead lock. Our code deadlocks when 2 process insert record into the same table (Both process insert into table A with different record). I was amazed that this could happen, since a deadlock always requires 2 resources and the table only have 1 index. A closer look and the table was selected before, got rangeS-S lock, and the insert tries to upgrade to rangeI-N, which dead locked with the first. But why this have not happened before? Well this will only happen for serialize isolation level. Our database is on read committed, and after I took the code out and run in multiple test programs they are all fine, this lead me to the last suspect, nservicebus (we use it to receive messages). NserviceBus default to serialized isolation level, so one line of code to set it to read committed fixed the dead lock.