Wednesday, October 31, 2007

Why Tablet PC is not a good Idea

at least not when you have small kids at home...

I love my x60 Tablet (Lenovo's ThinkPad) and as Photography is one of my main hobbies I work on it quite a lot in its Tablet state.

Now, I have 3 kids at home - they all love to paint.

So when they saw me playing with the wonderful application - ArtRage, they have automatically joined the party.

This was fine with me - why not giving my little baby to draw with the WACOM pen instead of soiling gouache all over the place?

Until today the little one saw her big brother using the Tablet, and because the WACOM pen was taken - she just picked up a Mechanical pencil from somewhere and...

OUCH... a Scratch.

Lesson learned: Buy a tablet for each kid so yours will be safe!

Lesson learned (for not that rich people): KISS - Keep It Shut, Stupid!

See what Silverlight can do... or is it ???

I just read Jason Langridge's WebLog about Microsoft's new Windows Mobile site.

It is an interesting UI concept, and my first thought was that I need to send it to some guys in our R&D group to show them what can be done with Silverslight.

I have an email already open with the link Pasted, when I decided to check which Silverlight version were they using.

What Have I found - this site is ADOBE FLASH based...

Tuesday, October 30, 2007

Beware of Obsolete

Short time before moving to Production with our application after upgrading it to .Net 2.0 - we have discover a major problem:

"Invalid Handle Exception" was thrown multiple times under Load Test.
It was thrown from SqlConnection.Open()

When looked in Reflector I saw the responsible for this exception was GetLastWin32Error method which is called somewhere in the call stack.

I have tried to understand why does it happen - and came to conclusion that this exception is originally thrown from other place in the system - and this GetLastWin32Error just catch it  - Also it shouldn't:

"Multiple threads do not overwrite each
other's last-error code" (from MSDN)

 

So now I looked for the real source, I made a search on all our source code to find where we use Handles. Finally I have found a usage of System.Threading.WaitHandle.

I looked at MSDN and Voila, this WaitHandle.Handle is Obsolete...

just changed it to SafeWaitHandle and the problem disappeared!!!

 

Lesson Learned - Always remove Obsolete methods and classes.
They are obsolete for a reason...

My Flickr



Originally uploaded by Yonatan Leonov
So yes - I have a flickr user and I have upload some interesting pictures over there - You are invited...