February 2009 Entries

Word html to real html

Posted Friday, February 27, 2009 12:10 AM | Feedback (0), Filed Under developement Web

Got a mail from a customer where he wanted me to use the html in from the mail in the mails that our system is going to generate. Fine I thought when I saw it. It only took me 3 seconds after viewing the source code of the email when it hit me. This is f#¤!ing word generated html. After the short setback I remembered having listened to one of Stack Overflow’s podcasts where Jeff talked about their problems with their WYSIWYG editor and the similarities that it had with decoding Word html. So a quick google search gave me the http://www.textism.com/wordcleaner . Perfect it did the work. One caveat is that it stripped all class declarations and styling, so that part I have to do by my self, and that it’s only free for files below 20kb.

BTW Jeff wrote his own parser, thou it only works with 2003 versions of Word.

SOLID Development Principles blog war

Posted Thursday, February 26, 2009 10:14 PM | Feedback (0),

There have been much activity after the statement that Joel Spolsky made in the Stack Overflow podcast #38. The statement that made the roof lift was this:

”Last week I was listening to a podcast on Hanselminutes, with Robert Martin talking about the SOLID principles. (That's a real easy-to-Google term!) It's object-oriented design, and they're calling it agile design, which it really, really isn't. It's principles for how to design your classes, and how they should work. And, when I was listening to them, they all sounded to me like extremely bureaucratic programming that came from the mind of somebody that has not written a lot of code, frankly.”

When I listened to this I thought, wow, he didn’t he just said that! Ok that the consulting job isn’t the most friendly environment for learning and writing good and well tested code, and that you sometimes just have to get the code out. But it don’t mean that you cant follow some simple rules that are going to make your life easier.

Jeff Atwood, the co-host of the Stack Overflow podcast wrote his thoughts on this in the The Ferengi Programmer and then later in Real Ultimate Programming Power. Both interesting post. But comparing the 285 Rules of Acquisition with the SOLID principles is just nonsense.

Uncle Bob posted an open letter to both Jeff and Joel before talking to them in their podcast #40 where they resolved their issues.

Then yesterday on my home I listened to Scott Hanselman’s podcast where Uncle Bob got some air time to speak his mind. At the end of the show he pointed to one of the sites where this issue has been discussed. There was one post where the author has made some motivational pictures for the SOLID principles, these are just great! Hope hi makes hi-res versions of these. Here are some:

SOLID


Single Responsibility Principle

Resharper Extended Trial Period and discount coupons

Posted Monday, February 23, 2009 6:53 PM | Feedback (4), Filed Under .NET

There are a many tools that makes your life as a programmer even better. For the peeps who like nice graphics and colors then DevExpress has their Refactor! Pro and CodeRush Xpress tools. Although they are nice they don’t fit in my programming style. This tools make justice for their names, Refactor! – do it now! and CodeRush. I don’t like to code in a rush. I like to put some thought to it and take the time it takes to think about the problem domain, do some coding, refactor it, tweak it and then code some more.

The tool that really got my attention is JetBrains Resharper. This tool has been around since the early days of .NET. A feature that Rehsarper has that I haven’t been able to find in other refactoring tools like Refactor! is the implementation of the testing concepts. The guys at JetBrains have done a nice work in incorporating their own test runner into the Visual Studio IDE. 
One of the things that I personally like is the possibility to extend R#. The team at Gallio have done an excellent job in integrating their testing platform with rehsarper. It enables you to run any XUnit framework from the same platform. Just check this out from the Gallio homepage

“At present Gallio can run tests from MbUnit versions 2 and 3, MSTest,NBehave, NUnit, xUnit.Net, and csUnit.  Gallio provides tool support and integration with CCNet, MSBuild, NAnt, NCover, Pex, Powershell, Resharper,TestDriven.Net, TypeMock, and Visual Studio Team System.”

Well enough of the flattering, the reason of this post was that I found out that David Ridgway has some means to provide you with an extended trial period of Resharper and also giving you a nice 10% off discount. So if you are a testing developer and like Resharper, go to David’s blog and be happy.