This morning I passed exam 70-553 "UPGRADE: MCSD Microsoft .NET Skills to MCPD Enterprise Application Developer by Using the Microsoft .NET Framework: Part 1". A beast of an exam if you ask me. As if you would do 5!, that is five!, regular exams all at once. But hey, I did it, I'm passed and I can leave this behind me now with a few free evenings to come as I no longer have to study, at least for now... until I go for Part2.
This exam gives me two more titles:
This is a great way to end the year!
I needed an easy way to verify if the system under test (sut) was calling the correct methods with the correct parameters as recorded. Rhino Mocks does this by default but my parameters are objects, or even small object trees. Rhino Mocks will compare the pointers of the expected and actual objects instead of comparing the contents of both objects.
I know this can be done with the Property constraint but it works string based and when the object has a lot of properties you must program as many Property constraints as there are poperties.
To overcome this cumbersome task I've created the AllPropertiesMatchConstraint class which can be used through a ReferenceType helper. The syntax looks like this:
Now when HasInventory is called with a different product instance who has the same property values the expectation will still be met. However, if HasInventory is called with a different product who has other property values the constraint will tell you execly which property is different and therefore does not match your expectation.
The way this works it with a pinch of reflection
Through reflection all public properties and public fields of the expected object are checked with the properties and fields of the actual object. This works recursive so if a property, in it's self, is an object, that object will also be matched.
Collections are supported through the IEnumerable interface, which means the constraint will check if the actual and expected collection contain the same values in the same order. The values contained by the collection can have properties and fields of their own that will be checked as well because of the recursive nature of the constraint.
Indexed properties are not supported, they will just be skipped.
I have supplied a patch for Rhino Mocks today and I am hoping Ayende will accept it for the next release of Rhino Mocks.
Download code This is a Visual Studio 2005 solution containing the constraint code and unitttests.
A few days after I've pointed my RSS reader to the Rhino.Mocks Google Group There is an announcement form the author of RhinoMocks that a brand new version 3.0 is released yesterday.
On top of this he has been making a screen cast that explains how to use RhinoMocks. The video is almost one hour long but I think is definitely worth watching as it shows you how it all works very well. In order to see the video you must install the Camtasia TSCC codec wich you can download here (it's the first link on the page)
One tip for the author, Ayende: could you please turn off Resharper next time you do a screen cast. Seeing you edit code with that tool is a little hard to follow if you don't use it yourself.
Happy mocking indeed ![]()
Scott Guthrie points out that Microsoft is offerring a free online course where you can learn all about ASP.Net AJAX. Click te link below to check it out. You'll need to have a Live ID to sign in though.
Developing Enhanced Web Experiences with Microsoft ASP.NET AJAX Extensions
Here is the discription of the course (taken from the Microsft eLearning web site):
In this 2-hour clinic you will learn about the rich functionality that ASP.NET AJAX Extensions provides for building highly responsive and enhanced web applications. In addition to learning about the different server and client components of ASP.NET AJAX, you will also learn how to build new ASP.NET AJAX applications and how to upgrade existing ASP.NET applications to take advantage of ASP.NET AJAX.
This clinic is appropriate for experienced .NET Web Developers and Software Architects who are looking to incorporate ASP.NET AJAX within their existing and future solutions.
I'm looking for an open source implementation of a stable, easy customizable, well supported ecommerce application like OsCommerce or CubeCart. To be able to try one or two of these apps for myself I installed a complete LAMP stack on a virtual windows XP image a while back.
I used MySQL 5 for that was the latest version at the time. Not aware of some of the changes in the default configuration, every ecommerce package that I tried to run gave me an error message at the point I tried to add something to the database. Be it a new category or item. OsCommerce as well as CubeCart could not insert anything into the database and gave me a message similar to this one:
1366: Incorrect decimal value: '' for column 'per_ship' at row 1
QUERY = INSERT INTO store_CubeCart_category (`cat_name`, `cat_father_id`, `cat_image`, `per_ship`, `item_ship`, `item_int_ship`, `per_int_ship`) VALUES ('test', '1', '', '', '', '', '')
The cause of this error can be traced back to the configuration of MySQL 5 and a new 'feature' called STRICT_TRANS_TABLES that is turned on by default. At least for the windows version of MySQL. The following line in the configuration file my.ini was causing these PHP applications to fail:
# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
The MySQL documentation gives the following information about STRICT_TRANS_TABLES: If a value could not be inserted as given into a transactional table, abort the statement. For a non-transactional table, abort the statement if the value occurs in a single-row statement or the first row of a multiple-row statement. More detail is given later in this section. (Implemented in MySQL 5.0.2)
The solution to the errors is simple. Remove the STRICT_TRANS_TABLES from the sql-mode setting and everything runs smoothly.
Yesterday I did a post about the Windows XP wallpaper 'Serenity' and how a man named nick tosches tried to find the place where the photo was shot.
Today I found out that the same story made it to a big Dutch news site webwereld.nl. I think it's fun that I beat them to it this time!
Every release of Windows comes with a stock of desktop wallpaper art. Usualy photographs of beautiful landscapes.
The latest Windows release Vista comes with a photo of a sand dune with small bushes and grass on it which I like very much and have currently installed as my active desktop wallpaper.
Have you ever wondered where these photographs where taken? If you knew, would you visit the place you look at on your computer screen every day? As it turns out there are people who can get quite obsessive about it.
Take the photo of the Windows XP desktop wallpaper named 'Serenity' (shown here). Someone by the name of Nick Tosches actually wrote an entertaining article about his obsession for this particular photo and how he tried to find the man responsible for it and the place it was shot.
Yes that's right! The :hover style normally only works with <a> tags in IE while it should work for any other element as well. Other browsers like FireFox did a better job supporting this but since the majority is using IE we're stuck with a broken :hover implementation.
There is a cure however. A pretty smart piece of javascript by Peter Nederlof fixes this particular problem very elegant. He created a behavior for IE which can read your stylesheets and attach onmouseover and onmouseout events to the HTML elements that needs them to enable the :hover effect.
To enable the :hover style for almost any element in IE, all you would have to do is to attach the behaviour the the body element in your stylesheet like this:
For a full explanation and the behavior code turn to Peter Nederlof's site: Whatever:hover
This is a real Gem!
First let me explain what table based layout is all about. Before the era of Netscape and Internet explorer version 4 we already used tables to create complex layouts for our web sites. We use tables to create separate containers (cells) that allow us to place our content exactly where we want it. Best of all we could stretch these cells to fill up the available space so that everything is aligned nicely.
E.g. tables allow us to have a small column on the left with the site’s navigation links while the main content is in a second column taking up the rest of the screen. Perhaps you used to add a row above these two columns spanning them both to show the site’s title and a banner.
I do a lot of web applications which, basically, use this kind of layout. And I used to do this with tables, just the way as you are probably still doing, not realizing that there are better, more efficient, cleaner ways to do it. A friend opened my eyes a few years back and for that I am thankful. Now let me open your eyes so you can be thankful to me ![]()
Eight months after I started digging the pond in my back yard is finally finished! I promised to post a picture when I was done so here it is.
It was a bit dark when I took this photo, but you can get a pretty good idea of what it's like. It's 4 by 2 meters and 90 cemtimetres deep. There went 3000 litres of water in. I ran the tap for two hours!
Yesterday I got tagged by two people. First by Ramon and later that day by Raimond. If you don't know what this tagging is all about: When you get tagged you must write 5 different thing about yourself that you would normally not blog about. Then you must Tag five other people who must do the same. This should be a simple task. So here we go...
All the people I could Tag already have been tagged by others... I know of one other person though. Twan, you are now tagged!
In the line of great tools for the Oracle RDBMS, yet an other one: Schemester.
Schemester is a database modelling tool for Oracle with the capabilities of reverse engineering a diagram from a live database. It is also capable to find related tables referenced by foreign keys or references made to the table's primary key. I find this tool extremely useful when I have to find my way in an unknown database. And I use it to make prints of part of the database model.
It's a small single executable that's easy to take with you on the job. Not to worry about licences because it's freeware. I've seen Oracle consultants use this tool. It's a shame Oracle doesn't offer this little gem themselves.
| January '12 | ||||||
| Mo | Tu | We | Th | Fr | Sa | Su |
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | 31 | |||||