Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Beta: F# in the Workplace
Rating: 4.5 out of 5(20 ratings)
189 students

Beta: F# in the Workplace

Domain Modelling & TDD
Created byMark Gray
Last updated 6/2016
English

What you'll learn

  • Drive out functionality with unit tests
  • Implement algorithms to solve some of the requirements of the project.
  • Deploy functional techniques in you code to enhance usability and readability
  • Create usable, easy-to-read domains from specification using the F# type system

Course content

1 section12 lectures1h 11m total length
  • Introduction1:45

    In this lecture we introduce the course and describe the topics you are going to encounter.

  • Creating an deck of cards6:53

    In this lecture we start creating the concept of a card using F# code.

  • Adding cards to the deck4:11

    Now we have the concept of a card underpinned we can start constructing a full deck of cards.

  • Implementing deal6:35

    In this video we examine what is required to deal a card from the deck, learning about the restrictions we should enforce on how we call the deal function.

  • Testing dealCard10:26

    We have a deal function and now we can begin to test the function to ensure it is behaving as we desire.

  • Refactoring dealCard6:50

    After highlighting some shortcomings in the method we have chosen to deal cards, we go over the code and refactor it and come out with a complete function that can deal a card properly.

  • Shuffling the deck12:21

    To ensure we are going to be able to create a game of cards that can be played fairly we need to know how to shuffle the deck of cards to add an element of unpredictability. In this lecture we create a shuffler.

  • Dealing fairly7:50

    In this video we learn how we can utilise the type system to create a deal function that is fully functioning and prevents predictability.

  • Fixing our tests6:31

    In this video we will fix the failures we caused in our test by introducing a new type; 'ShuffledDeck'

  • Comparing shuffle algorithms1:26

    This lecture demonstrates how to benchmark your algorithms to help you have a better intuition for implementing algorithms of your own.

  • Cleaning up the code4:43

    Final steps to clean up the domain file Cards.fs, in this video we compact the file and demonstrate how the entire domain can be represented on a single page.

  • Review1:44

    Well done for completing the course, you have learned how to successfully and effectively turn poorly written specifications into beautiful, concise and readable F# code.

Requirements

  • For this course we advise that you already have F# installed and ready to go.
  • Before taking this course ensure you understand F# syntax.

Description

This course aimed at students with beginner to intermediate skill in F#, basic understanding of the F# syntax and a light functional understanding would be beneficial. You'll also need a computer with Linux, OSX or Windows with F# installed and an internet connection.

Have you wanted to understand how to 'do' F# in your day job? Well, this course demonstrates how you can use Test Driven Development and the F# type system in tandem to write a domain for any problem you are attempting to solve.

What will we do?
We will complete an F# library project together,

  1. We will start by defining the concepts of the domain, using some tips from Domain Driven Design, but predominantly working in the area of Test-Driven Development whilst harnessing the power of the F# type system. We will explore every line of code together and point out all the important programming concept as we progress.

What is f#?
F# is a mature, functional-first, general purpose language especially well suited to computer science, machine learning, distributed computing and web applications, Domain Driven Design and Test-Driven Development too. There really is no limit to what F# can do for you!

We’ve structured the course to make learning all the material as easy and accessible as possible. We’ll challenge you to complete an F# programming task in every video to make sure you’ve got a great grip on all the concepts. But don’t worry, because after every challenge, we’ll also walk you through a solution line by line.

We have structured the course to introduce you to some computer science and functional concepts, but to also encourage you to spend your own time to gain further insights into the Domain Driven, Test-Driven concepts we introduce you to.

If you want to program with a language that has computer science at its heart and want to future proof your learning then this course is for you.

Who this course is for:

  • This course is for developers that see the benefits of F# and want to learn how to use the techniques in real projects.
  • Take this course to learn how harness the F# type system by turning specifications into easy-to-read F# code.
  • Utilise Test Driven Development (TDD) so that you can assist the type system while creating F# code to represent a problem domain.
  • This course is not aimed at advanced users that are already using F# in their day jobs, it is designed to cover general aspects of F# type system and TDD.