Skip to content

unit testing

These are the stories that have been posted to the unit testing category.

Discoveries This Week 01/30/2009


Published to Rick Minerich's Development Wonderland by Richard Minerich January 30, 2009 19:46

The beauty of clean syntax and deep abstraction is an often overlooked feature of functional programming.  As they say, people come to functional programming for the concurrency but stay for the beautiful code (actually, I just made that up).  Also included: POPL 2009, S#arp and functional unit testing.

 

Blog - Matthew Podwysocki’s Series on Functional Unit Testing

In this eight part series Matthew covers unit testing in Haskell from the basics setting up HUnit to the details of writing purely functional tests.

This series is the only place where I’ve seen functional programming unit testing talked about with any significant depth.  While in writing this series Matthew used Haskell, it and F# share much in common and it’s obvious that he worked hard to make his posts apply to both.  I consider it a must read for anyone thinking about taking functional software engineering seriously. 

Although he has finished the series, I hope that in the future he takes some time to focus on unit testing in F# specifically.  I’ve yet to see topics such as mocking or ensuring referential transparency by test covered.

 

Transcription - POPL 2009 Grand Challenges Panel Summary 

This panel was lead by such research giants as Simon Peyton Jones, Xaveir Leroy, Kathryn McKinley, Greg Morrisett and Arvind.  In it they discuss where programming language development is heading and the factors driving us there.  Well worth the read for anyone interested in programming language evolution.

 

Blog - Mark Needham’s F# vs C# vs Java: Collection Parameters

In this post Mark compares list operations in F#, C# and Java.  It’s striking to see how far we have come in terms of clean, concise syntax.  Actually, it seems kind of reminiscent of evolution of man posters.

 

Blog - Jafar Husain’s F#: Real Sharp

When working in F# over a long period it’s easy to forget that one of the best things about it is how it’s concise syntax and deep abstractions make your code so much easier to understand and beautiful to look at.  In his post Jafar reminds us of this by contrasting C# with F# samples.

 

Software – S#arp Architecture Beta 1.0 Available

S#arp Architecture promises to make building web applications much easier by making much of the glue we currently use in ASP.NET web applications obsolete. 

I am a big fan of inversion of control and it is something that comes very natural in functional programming languages.  I hope to see some examples with S#arp Architecture and F# internals at some point in the near future.

Discoveries This Week 01/30/2009


Published to Rick Minerich's Development Wonderland by Richard Minerich January 30, 2009 19:46

The beauty of clean syntax and deep abstraction is an often overlooked feature of functional programming.  As they say, people come to functional programming for the concurrency but stay for the beautiful code (actually, I just made that up).  Also included: POPL 2009, S#arp and functional unit testing.

 

Blog - Matthew Podwysocki’s Series on Functional Unit Testing

In this eight part series Matthew covers unit testing in Haskell from the basics setting up HUnit to the details of writing purely functional tests.

This series is the only place where I’ve seen functional programming unit testing talked about with any significant depth.  While in writing this series Matthew used Haskell, it and F# share much in common and it’s obvious that he worked hard to make his posts apply to both.  I consider it a must read for anyone thinking about taking functional software engineering seriously. 

Although he has finished the series, I hope that in the future he takes some time to focus on unit testing in F# specifically.  I’ve yet to see topics such as mocking or ensuring referential transparency by test covered.

 

Transcription - POPL 2009 Grand Challenges Panel Summary 

This panel was lead by such research giants as Simon Peyton Jones, Xaveir Leroy, Kathryn McKinley, Greg Morrisett and Arvind.  In it they discuss where programming language development is heading and the factors driving us there.  Well worth the read for anyone interested in programming language evolution.

 

Blog - Mark Needham’s F# vs C# vs Java: Collection Parameters

In this post Mark compares list operations in F#, C# and Java.  It’s striking to see how far we have come in terms of clean, concise syntax.  Actually, it seems kind of reminiscent of evolution of man posters.

 

Blog - Jafar Husain’s F#: Real Sharp

When working in F# over a long period it’s easy to forget that one of the best things about it is how it’s concise syntax and deep abstractions make your code so much easier to understand and beautiful to look at.  In his post Jafar reminds us of this by contrasting C# with F# samples.

 

Software – S#arp Architecture Beta 1.0 Available

S#arp Architecture promises to make building web applications much easier by making much of the glue we currently use in ASP.NET web applications obsolete. 

I am a big fan of inversion of control and it is something that comes very natural in functional programming languages.  I hope to see some examples with S#arp Architecture and F# internals at some point in the near future.

Discoveries This Week 07/19/2009


Published to Rick Minerich's Development Wonderland by Richard Minerich July 19, 2009 18:45

With the impending release of Visual Studio 2010, the F# Community continues to wind up.  This week we have finally gotten our F# User Group Videos up.  In addition, we also have a wide ranging selection of fresh F# content including Units of Measure, XML parsing, WPF Games and Pattern Matching.

 

New England F# User Group Talks

Note: As the server is currently moving to a new location, our site may be temporarily down.  If you encounter an error, please try again later.

This past week we’ve managed to get up video from a bunch of our past FSUG talks.  Original F# video content here from such famed speakers as Richard Hale Shaw and Amanda Laucher

 

Matthew Podwysocki’s Modeling DSLs with F# and Units of Measure

The conciseness of the language makes it an ideal candidate for scientific DSLs where such units of measure are important, but as we can see from this example, it could even apply to the general physics of game play.

In this post, Matthew elegantly displays the beauty of Units of Measure outside of it’s standard scientific computation context.  If you are in the Boston area, be sure to catch him speak at our next F# user group meeting on August 3rd. 

 

Mark Needham’s F#: Active patterns for parsing xml

Making use of the active pattern in the code has made it much easier to work with than passing around a sequence of tuples as I was doing previously. It has also made it easy to exit from the program early if there is a problem with the data inputted.

I find XML parsing to be one of the most consistently painful programming tasks.  No matter what constructs seem to be added to the .NET platform, differences between the declarative and imperative seem to become most obvious when the two paradigms collide. 

However in this case, I found Mark’s approach to XML parsing via reactive patterns refreshing.  I also like his test-first approach.  He is one of few bloggers I have seen practicing anything close to true TDD.

 

Phillip Trelford’s Mastermind F# WPF Game Sample

While playing around with the F# September CTP over the last week, I made a short, <300 lines, implementation of the Mastermind board game using some Windows Presentation Foundation (WPF) controls.

Seeing game or simulation implementations in F# never ceases to amaze me.  In this case, what would be a moderately large project in C# is not even 300 lines of F#.  Phillip’s Mastermind is also interesting in that it demonstrates how seamlessly WPF integrates with F#.

 

Gordon Hogenson’s Talk, Patterns and Match Expressions in F#

In this video, programming writer, Gordon Hogenson explains and gives examples of patterns in F# and explains the use of the match expression to control branching based on patterns in data.

I don’t believe I have seen Gordon speak in the past and enjoyed this talk very much.  He does a great job at presenting pattern matching in a way which is very accessible to the every day C# programmer.