Friday, September 23, 2005

Dynamic interfaces in VB 9

VB 9.0. One of hte coolest features is dynamic interfaces or strong duck typing, which will let you cast any type to any interface, and the cast succeeds as long as the all the methods in the interface match the methods in the object. Very cool!

Language feature

New thing from Microsoft: LINQ. Somewhat brings you closer to languages like Smalltalk or Ruby, but not quite. Will probably confuse prople a lot, because this is SQL, but a lame one: with SELECT at the end.

Wednesday, September 21, 2005

Boundary test

How often you find yourselves writing a unit test that really tests an external system, like database, external web service, etc.? XP does not recommend to write such tests, and recommends instead to write a harness for database, web service, etc. The reasoning is very simple: these tests are easier to write, they run much faster and testing only the code you wrote, not the code of third party. However I still believe there is a great value in these tests, which I will call boundary tests to distinguish it from unit tests, which are usually layer tests. The value of boundary tests is in testing connectivity to the services your application relies on. And if you use the principle of testing anything that can possible break, I can guarantee that connectivity to external services (and the services themselves!) break as often (or even more often) than the code we are writing.