What is Toluu?
Toluu is a free service for sharing the feeds you read and discovering new ones.
Get Invite

CodeBetter.Com

Stuff you need to code better!


F# + TestDriven.NET + xUnit.net = WINToday

As you may notice on my blog lately, I've been focusing on design and functional programming lately.  There is a lot to explore in terms of those two topics in the next series of blog posts especially around xUnit frameworks, QuickCheck and other ideas.  But, first I want to turn my attention a combination that is working great for me as I develop solutions using F# which includes TestDriven.NET and xUnit.net.

 

TestDriven.NET

Very recently, I was talking with a few people about testing options in F#, when TestDriven.NET was mentioned once again.  A month or so ago, Jamie Cansdale had a series of blog posts on using F# with TestDriven.NET which intrigued me quite a bit here.  I then decided to give it a spin, only to have issues with the differences between the x86 version and x64 version in terms of proper registration, and there were some workarounds I had to do in order to get it to work.

Flash forward to a couple of days ago when Jamie announced the release of TD.NET 2.18 which fix

Question of the Day -- What's Worse?Yesterday

From Twitter yesterday, I was griping about how once you use a Generics Constraint once and suddenly that same constraint has to immediately ripple through the call stack.  Scott Allen posed me a stumper of a question:

What's worse: generic constraints, or checked exceptions [in java]?

Oh wow, that's a nasty choice.  Can I have neither?  I'd call both things Noise Code.  Smelly, useless, noise code.

  • Generics Constraints:  90% of the time it's just to make the compiler shut up and let my code work.  Dear C# team, could you deemphasize all the COM interop work in C# and making C# do kloogey dynamic typing, and GIVE ME FAR BETTER TYPE INFERENCE ON GENERICS SO I CAN GET SOMETHING DONE (contra/covariance makes your little academic hearts go pitter patter, but that won't really help me much)!!!!!    Anyway, ReSharper can mostly figure out how to propogate the generic constraints, but it gets confused easily and sometimes the constraints will conflict and...  Human intervention is usually necessary.  Andy Sherwood calls this  "the where tentacles."  Nice.
  • Checked Exceptions.  Much more pervasive, but IntelliJ can handle adding the "throws blah" stuff without any trouble.  The problem is that checked exceptions are so much more common and pervasive.  Needless to say, I don't find checked exceptions to be the slightest bit usef


The Fat ControllerYesterday

My latest project is built using the Castle Project stack (Monorail, Windsor, and Active Record). We're using ActiveRecordMediator so that we can use a Repository pattern with Active Record. We are also using JQuery as our client side Javascript library. At the time we started, some months ago now, we felt ASP.NET MVC was too early in its cycle to use (though we would hope migration would not be too hard if desired). We opted for NHibernate over LINQ To SQL because we wanted to support a fine-grained object model (we are using Domain Driven Design) and because we liked the options around performance and caching that were available with NHibernate. We rejected Entity Framework as unsuitable for our needs (lack of support for test-first development, lack of persistence ignorance, over-complex mapping, poor support for lazy loading etc.)

All that is really just back

[ANN] The Real World Haskell Book ClubYesterday

UPDATE: Now all three authors will be joining

real_world_haskell As I was heading out the door last week for my Thanksgiving holiday, I noticed a package from Amazon on my front porch, which was the long awaited Real World Haskell book.  If you have been following this book and its progress through their Real World Haskell blog, you should know the massive involvement of the community around it.  Look no further than the thanks section to note all the reviewers for the book.

This book has lived up to its promise in helping better understand Haskell as a language, and furthermore, a deeper understanding of a pure functional language.  Reading this book and hacking along with some samples has been a real joy as some of my Thanksgiving weekend was sitting at my laptop and hacking away.  I have plenty of posts on the subject matter that I'm going to be co

Roundtables vs. Lunch CountersDecember 2

I have a strange pet peeve. I hate rectangular tables.  It’s a strange pet peeve but its mine and I stick by it. I hate rectangular because they don’t scale. They don’t scale conversations for groups of people greater than say 6 people.  I became aware of just how much I hate rectangular tables last week. I was at QCON in San Francisco and went to dinner with some friends at a great seafood restaurant. There were 4 of us and because there were no tables available but we had to sit at the bar. The bar had 4 empty seats side by side so we took them. Dinner was great and some good conversations took place. The problem is that there were basically two conversations of two people. It would have been my preference to have one conversation with all four people involved.  I cemented my hatred further two days later at another dinner with another rectangular table.  We had a larger group (12+ people) this time.  The communication situation was marginally better for the “middle” people. A larger conversation “cluster” formed in the center with smaller satellites of communication for the “edge” people. 

Flash back two weeks earlier to Kaizen Conf. Kaizen Conf is a conference centered on concepts of continuous improvement, agile and lean software development practices. Most of the sessions I attended were large groups (some 50+) sitting in large circles having healthy and invo