Thanks to everyone who made it down to Skills Matter on Tuesday for Scott Cowan's Lucene.Net talk and my F# Introduction talk. There was a great turnout, with more chairs needing to be brought in, plus some excellent questions, and also a good group for the pub after. My slides are attached to this post and a video/podcast should be available soon here:
I have also put the code samples from my F# Intro talk up on the F# Wiki:
sample WFP Twitter client script (<200 lines)
Below a screen shot of the fsweet script, showing a Twitter friends timeline, used to make a live Twitter update during the talk.
FSharpIntroduction.pptx (376.59 kb)
fsweet.fsx (8.58 kb)
This talk is intended to provide a quick introduction to the language for existing developers, along the way comparing features with other programming languages including C#, C++ and Python. Expect plenty of code samples culminating in a playable mini-game written with F# in less than 300 lines!
Register free here: http://skillsmatter.com/podcast/open-source-dot-net/phil-trelford-f-introduction
My previous F# talks
My public F# game samples
Thanks to Gojko Adzic for an excellent introductory talk on Fitnesse: In The Brain of Gojko Adzic: What is FitNesse and should I use it? The slides of the talk are available here: http://gojko.net/resources/whatisfitnesse.pdf.
The value of Fitnesse appears to be in providing a way to quickly and easily generate requirements documentation with examples that can be shared between customers and developers. Documentation is written as Wiki pages that describe requirements with tables of example inputs and outputs. The example tables are parsed to create automatic tests with the tests expecting some support classes called fixtures.
Fitnesse is not suitable for Unit Testing; equally Unit Tests are not typically suitable for reading by customers. In his talk Gojko humorously compared asking customers to read unit test code akin to asking them to read Klingon.
Opening quotes on Fitnesse:
- Fitnesse home: “Welcome to FitNesse! The fully integrated standalone wiki, and acceptance testing framework.”
- Fitnesse from Wikipedia: “FitNesse is a web server, a wiki, and a software testing tool. It is based on Ward Cunningham's Framework for Integrated Test. FitNesse is designed to support acceptance testing rather than unit testing in that it facilitates detailed readable description of system function.
FitNesse allows users of a developed system to enter specially formatted input (its format is accessible to non-programmers). This input is interpreted and tests are created automatically. These tests are then executed by the system and output is returned back to the user. The advantage of this approach is very fast feedback from users. The developer of the system to be tested needs to provide some support (classes named "fixtures", conforming to certain conventions).”
- Framework for Integrated Tests (FIT) from Wikipedia: “Framework for Integrated Test, or "Fit", is an open-source tool for automated customer tests. It integrates the work of customers, analysts, testers, and developers.
Customers provide examples of how their software should work. Those examples are then connected to the software with programmer-written test fixtures and automatically checked for correctness. The customers' examples are formatted in tables and saved as HTML using ordinary business tools such as Microsoft Excel. When Fit checks the document, it creates a copy and colors the tables green, red, and yellow according to whether the software behaved as expected.”
Example of a Fitnesse example:
|numerator ||denominator ||quotient? |
|10 ||2 ||5.0 |
|12.6 ||3 ||4.2 |
|22 ||7 ||~=3.14 |
|9 ||3 ||<5 |
|11 ||2 ||4<_<6 |
|100 ||4 ||33 |
Fitnesse examples should declare the What not the How:
- What: the inputs and outputs
- How: the control flow
Or to put it another way Fitnesse examples should be Declarative not Imperative.
Final quote: “FitNesse is written in Java (by Micah Martin, Robert C. Martin and Michael Feathers) but versions for several other languages had been added over time (C++, Python, Ruby, Delphi, C#, etc)”.