Wednesday, May 8, 2013

I xxking love science

Take a look at this face book page, you will love it! https://www.facebook.com/IFeakingLoveScience

Friday, March 1, 2013

Entity framework and varchar

Just learned about EF and varchar types. EF strings are unicode and when querying database, it will cause performance problems (I was surprised by this, one would assume it should cast to varchar first...). There are 2 solutions, one is to use EntityFunctions.AsNonUnicode, i.e. from t in table where t.id == EntityFunctions.AsNonUnicode(id) The other is use attribute, [Column(TypeName = "varchar")] on the field.

Sunday, February 17, 2013

The reality of a developer's life

Very funny link for us developers :-) http://www.lordofthejars.com/

Wednesday, February 13, 2013

EF decimal precision

Encountered a strange problem at work. Entity framework code first, entity's decimal field always save to 2 decimal points even though the field has 4. Turned out in EF4 you need to specify percision: modelBuilder.Entity().Property(e=> e.property).HasPrecision(x, d);

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