Monday, July 5, 2010

Presentation: 5 Best Practices for F# Development - Slides and Examples

Thanks to all who come out to the New England F# User Group meeting tonight!

Based on an excellent recommendation from Elijah Manor, I have embedded the slide deck in this post:
The slides and examples can also be found at http://github.com/dmohl/FSharpPresentationExamples.

6 comments:

  1. Awesome presentation! I enjoyed the parts that I got to watch online.

    You should post your slides on SlideShare or upload them to Google Presentation so you can embed it on your blog ;)

    ReplyDelete
  2. Thanks Elijah. That's a great idea!

    ReplyDelete
  3. Hi Daniel

    Is there someplace I can watch the presentation online? I have gone through the slideshow.

    I was also wondering if you could explain a bit more about practice 2 - I understand what function composition is, but could you possibly give a simple example code of where function composition benefits over argument passing?

    Thanks so much!

    ReplyDelete
  4. Hi Mark,

    Great questions!

    The presentation should be available on http://www.fsug.org/PreviousSpeakers/tabid/66/Default.aspx within the next few weeks.

    One of the big advantages to best practice number 2 is enhanced code readability. Here's a simple example that can be run in the F# interactive window:

    let sqr n = n * n;;
    sqr (sqr 9);;

    To understand the second line of this code you have to start in the middle and work your way out.

    This code would generally be considered easier to read if the flow were changed to match that of the western written language (i.e. top to bottom, left to right). For example:

    let sqr n = n * n;;
    sqr 9 |> sqr;;

    or

    let sqr n = n * n;;
    sqr 9
    |> sqr;;

    ReplyDelete
  5. Hi Mark,

    Great questions!

    The presentation should be available on http://www.fsug.org/PreviousSpeakers/tabid/66/Default.aspx within the next few weeks.

    One of the big advantages to best practice number 2 is enhanced code readability. Here's a simple example that can be run in the F# interactive window:

    let sqr n = n * n;;
    sqr (sqr 9);;

    To understand the second line of this code you have to start in the middle and work your way out.

    This code would generally be considered easier to read if the flow were changed to match that of the western written language (i.e. top to bottom, left to right). For example:

    let sqr n = n * n;;
    sqr 9 |> sqr;;

    or

    let sqr n = n * n;;
    sqr 9
    |> sqr;;

    ReplyDelete
  6. Thanks Elijah. That's a great idea!

    ReplyDelete