Thursday, January 24, 2013

Cool HTML5 page

Very cool, roll and see some of the tricks :-) http://fff.cmiscm.com/#!/main Also some tests seems run faster with IE, but some can't be run on IE.

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.

Thursday, November 17, 2011

NHibernate metadata reader closed problem

Encountered that exception, had no idea what it is. Googled and some people suggest it is a bad table, some suggested it is the session out of scope. None fits my situation. So I go ahead setup the nhibernate/active record/fluent source, did some debugging. What happened is someone is using StructureMap's ObjectFactory.Get() method inside a domain model's constructor, and while nhibernate is constructing that object, the constructor is doing more nhibernate calls via IOC. That is just bad, and now it is solved :-)

Tuesday, October 18, 2011

R.I.P Dennis Ritchie

Such tragedy. Just a few days ago it was Steve Jobs, now Ritchie. I am so sorry I didn't post this on time. Ritchie is not as famous as Jobs, but I do fee just as important. He is the co-funder of C language, I still remember the feel when I switched from basic to C. C is simple and flexible (so flexible my wife still have nightmares with pointers), I feel in love with it more and more. Of course time moves on and we went to C++/Java/C#, but you can see C in all of them. Attached is a link to The Development of the C Language.