# Saturday, February 10, 2007
It's been several years since I've used Doxygen, but Ayende reminded me of its existance today.  I spent 2 minutes downloading it, setting it up, and then finally running it.  I forgot how fast Doxygen is, and the quality of the output is now very good on C#.  I will definately start using Doxygen again, its just so darned fast and simple.



Saturday, February 10, 2007 5:50:14 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
# Sunday, February 04, 2007

I couldn't resist any longer, I needed to update my home PC's peripherals to the 21st century.  It’s so hard for me to stop being cheap at times, but I convinced myself this was an investment in the future; a way to entice myself to work on some personal programming projects to enhance my skill set.

The biggest change was the new 22" Acer LCD wide screen which replaced both my 20" Dell CRT and 21" Sony CRT.  I was a little worried about going back to a single monitor, but the shear size of the new display makes up for it.  This new screen is very bright, clear, and inviting - best money I've ever spent on a display device.  My ATI Radeon X850 just needed a driver update, and I was off and running in 1680x1050.

My second favorite upgrade is the new keyboard and mouse.  I replaced my old Logitech keyboard and mouse with a wireless Microsoft Natural keyboard/mouse combo.  I really like the wireless freedom for the mouse, and the new natural keyboard feels absolutely great.  I can finally type without making way too many typos - I can only really type on natural keyboards anymore (my last one broke so I was stuck with the regular old school Logitech one for a while).

I also replaced my old Logitech 4.1 speaker system that had a broken front left channel with a new Logitech 2.1 system.  I found that the two rear speakers were hard to position, so I opted to just drop them on my new speaker system.

And to further reinforce the newness/change in my home PC system, I turned my desk 90degrees and doubled the amount of RAM in my PC.  My desk now has lots of room on it mainly from removing the two hulking 20th century CRTs.  Maybe next summer I'll get a new dual or quad core system with Windows Vista, which since I actually have decent peripherals will be that much better.  Man, I love this keyboard.

Sunday, February 04, 2007 7:18:00 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
# Saturday, January 20, 2007
Argh!  I just spent the last hour trying to figure out why I can't configure a Mule UMO (mule-descriptor) using Spring.  I ran into a couple of issues, firstly if you specify a container-context for your bean the life cycle interfaces (like Startable) are ignored.  Next I tried using a mixed Mule-Spring config file, putting the property injection declarations directly in the mule XML file, but I kept getting the following SAX error:

The content of element type "mule-descriptor" must match "(inbound-router?,outbound-router?,response-router?,interceptor*,threading-profile?, pooling-profile?,queue-profile?,exception-strategy?,properties?,bean*)".

Not being that familair with DTDs, what I didn't realize is that the comma between element declarations (as in the error message) means that the sub elements must be declared in the XML file in that order.

Big, fat, DOH!


Saturday, January 20, 2007 6:49:50 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
# Friday, January 12, 2007
A conversation in a not so distant universe...

Golly, why would anyone follow the Law of Demeter and produce an orthogonal system design?  There's a reason I can call select * from table directly from my aspx page.  It's far less code and my wizard completely supports it.  TDD just slows you down, and is only for developers who write a lot of buggy code; so much code they need a computer to test their app.

What do you mean the 3rd party database has changed to a new schema that now uses a web service?  We'll luckily I can crank out an entirely new application using my wizards in a month or two, we'll just have to line of some resources to test it after I deploy it to production.

Friday, January 12, 2007 11:44:38 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
# Wednesday, January 10, 2007

WatiN

Inspired by Watir development of WatiN started in December 2005 to make a similar kind of Web Application Testing possible for the .Net languages. Since then WatiN has grown into an easy to use, feature rich and stable framework. WatiN is developed in C# and aims to bring you an easy way to automate tests with Internet Explorer. Following is the Hello world example of web testing automation; searching Google with WatiN.

Wednesday, January 10, 2007 10:46:37 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
I'm currently in the middle of refactoring all of my test code.  I've decided to split my test folder into two subfolders, unit and integration.

\src\test\java\integration
\src\test\java\unit

I have a lot of long running integration tests that need to be separated from my unit tests.  My were getting slow and difficult to manage, so hopefully JUnit will be able to fly through my newly organized unit tests.

Wednesday, January 10, 2007 10:43:59 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
# Sunday, December 31, 2006
I haven't had the "pleasure" of fixing a Windows install for a while, but tonight I was helping a friend fix their PC.  Apparently Winsock2 got corrupted on their system somehow, I suspect some web browsing spyware... Services that I've never seen fail were failing, things like DHCP and NETLOGON.  I installed the XP support tools from the XP SP2 CD and ran netdiag /test:winsock.  That of course produced a nice fat error, which prompted me to run netsh winsock reset.  After doing so the system started behaving much better and I was even able to get on the internet and login to the system without crashing.

MS KB Article that helped me 811259

Sunday, December 31, 2006 7:33:40 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
Apparently the latest log4j alpha release does not contain the new message pattern implementation that I talked about in my previous post.  Currently I'm working on a Logger wrapper that adds this functionality for the time being.

Sunday, December 31, 2006 4:29:59 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
# Friday, December 29, 2006
I've been using log4j and log4net as my logging facility for some time now, and haven't thought a lot about it.  I did today though...  I had a junit test with some mock objects that were getting used only if debug logging was enabled.  Do I know the developer running the test has debug logging enabled?  The answer is, the unit test shouldn't care, but how do I get around this in my unit test?

The real issue I was having was that in my class under test I was doing things like log.isDebugEnabled() to avoid a bunch of string concatentation in my logging.  Apparenlty there's a better way to avoid the string concatentation penality and also provides cleaner syntax IMO.

As of log4j version 1.3, there exists a significantly more convenient alternative based on message patterns. Assuming entry is an object, you can write:

l.debug("The new entry is {}.", entry);

After evaluting whether to log or not, and only if the decision is positive, will the logger instace format the message and replace the '{}' pair with the string value of entry. In other words, the paramerized form does not incur the cost of parameter construction in case the log statement is disabled.

Thus, the following two lines will yield the exact same output. However, the second form will perform at least 30 (thirty) times faster in case of a disabled logging statement.

l.debug("The new entry is "+entry+".");
l.debug("The new entry is {}.", entry);

A two argument variant is also availalble. For example, you can write:

l.debug("The new entry is {}. It replaces {}.", entry, oldEntry);


Friday, December 29, 2006 8:45:09 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
# Thursday, December 07, 2006
I finally found out there's a name to a design pattern I've used previously.  The open closed principle: a class should be open for extension, but closed for modification. 

A co-worker was working a fairly complex presenter class that was originally difficult to test, had way to many responsibilities, and would need to be modified each time a new area of the application was completed.  After extensive refactoring it now is testable and passes the open closed principle.  Basically the presenter class was broken down into 6 other classes which implemented a strategy pattern.  Much more maintainable and easier to understand!

Thursday, December 07, 2006 6:47:44 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |