My goal, make you functional in 12 hours

work safe

I’m still thinking about teaching F# to my fellow coworkers later this year. In order to do that, I’ve had to start thinking about what to teach.

This class is a tough assignment for me. The people who want to take it have said, “No parsing!” evidently, parsing is for eggheads and dorks (Fuller is such a reactionary anti-academic). And I have to make it useful! Fine. My thesis is this; F# is best when used for libraries, when used for asynchronous programming and reactive manipulation of streams. Also, functional abstractions and immutability are great for data-centric programming.

Below is my rough syllabus. Please feel free to comment if you think something is missing. It almost surely is.

  • Week one – Making sure you have F#, Basic Syntax, type inference, recursion. There will be a reading assignment to accompany this. In addition, I’ll have a github project up that will have some tests that need to pass. I’m calling these “worksheet” problems.
  • Week two – Pattern matching, higher order functions, maps and folds. A few worksheet problems added to github. A game of life mini-project assignment?
  • Week three – Algebreaic types, records. In addition, we will start dealing with tail-calls and branching recursion. Worksheets.
  • Week four – Streams and Sequences. These are kind of what functional programming is about, to my mind at least. It will allow spring boarding to reactive (eventually). They will write a few streams in worksheets.
  • Week five – Modules, Objects, and Mutable refs. We’ll write a lib that will be used by a CLR program to do the “Flocking Birds”
  • Week six – Asynchronous Workflows. We’ll write a command line podcatcher that will be totally asynchronous, list of urls in a file spits out to RSS feeds, to saved mp3 files.
  • Week seven – Mailboxes. A simple Spreadsheet (parser provided) will allow gets to happen threadsafe from the updates. A worksheet with some massive parallel updates of a queue where everything must be handled thread safe.
  • Week eight & nine – Custom Workflows. You know… Monads. May take a couple weeks. Still no damn idea what I’m doing here, honestly. I need some workflow examples to implement.
  • Week ten – Reactive Programming. We’ll write a generative seqencer that uses a WPF control and a sound lib I’ll provide.
  • Week eleven – back to C#. A view of linq and lambdas.
  • Week twelve – Topics in F#. Lightning talks! And a fluid simulation project. IN 3D! Again, I’ll provide the control.

Oh, theres so much to be fleshed out, but here is where I’m thinking of starting.

And I need to do the projects to make sure they are sized right.



  1. Todd  •  Apr 28, 2011 @8:07 pm

    I like the sound of it. Though, I can only parse, maybe not compile some of those words because I don’t already know F#. Might be ambitious, I can’t tell.

    What I like:
    -The use of tests you’ve written to define the exercises. Maybe there’s a moster lurking in there, but it seems like something fun to try. Might mean that “making sure you have the testing framework” needs to be part of week 1.

    -The “I provide the controls” part. One of the things our classes have suffered from in the past is the need to learn three new things to do anything cool with the new thing we’re learning. I always refer back to the database class I took years ago. I learned a lot about databases, but wound up dropping the class because I couldn’t really finish the project without also learning WinForms or something to use as a front end to the db stuff that I was actually supposed to be doing.

    I say go for it. I’d most likely sign up.

  2. Ball  •  Apr 28, 2011 @9:23 pm

    I’m a bit shy of how much is in there, on the other hand I don’t want to have people bored.

    I’m not worried about the testing. NuGet puts it inside of the solution so it’s all built in.

    And the controls part is a big deal to me. I want you to “see” what you’re doing. Some of this can be abstract. And it makes it a bit more real.

  3. Jon  •  May 11, 2011 @7:55 am

    Cool… where do I sign up? :) You might convince me that I really do like F# yet!

Leave a Reply

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>