SlideShare uma empresa Scribd logo
1 de 18
F# in the Classroom and the Lab Richard Minerich   Senior Researcher at Bayard Rock   and F# MVP
F# is Open Source You don’t need to buy  Visual Studio to use F# You don’t need to  have Windows to use F#
“Today’s students, from freshmen to seniors, desire relevant assignments that are engaging, challenging, and creative, that also prepare them for their careers.” - Game2Learn: Building CS1 Learning Games for Retention Tiffany Barnes et al.
Play in the Classroom Teach Play Discuss
Interactive Teaching Hot swap code to try different approaches and encourage coding as play/exploration
Simple Engaging APIs -> No complex background needed to start -> Powerful for building easy to use DSLs
Teaching with Games in F# The Students are Given: ,[object Object]
 A Simple API - A Simple Template Example - Time to play - Motivation via Competition
Ants Everywhere!
Ant Visible Cells Visible Cells Nest Cells Has Food? Properties? Properties? Are Full? Yes No Out of Ideas? No Nest  Cells? Food? Phero? Food but  no Phero? Nest  Cell? Take Food Move Toward Max Phero Drop Pheromones Move Toward Nest Yes No Move to a Random Cell Move to a  Random Nest Cell Drop Food
match ant with | HasFood-> matchvisibleCellswith       | HasUnownedFood cells when not here.HasPheromone->DropPheromone (here)       | AreNestnestCells-> matchnestCellswith             | CanDropdropCell->DropFooddropCell             | CantDrop-> Move (randomEmptyCellnestCells)       | AreNotNest cells -> Move (closestToHomevisibleCells) | HasNoFood-> matchvisibleCellswith       | HasUnownedFood cells ->TakeFood (maximizeFood cells)       | HasPheromones cells -> Move (maximizePhero cells)       | _ -> Move (randomEmptyCellvisibleCells)
A Framework for F# Assignments Obfuscated Library CI Server Student Assignment Template
Engaging Classwork Automated Grading Everyone  Wins
F# in the Lab Like Matlab but better in many ways.
Ranking a PEP List
Pain % Matlab function [varargout] = CalcPepIndex (A, E)         A=spconvert(A);     E=full(spconvert (E));     c=0;     d=0;     R=E;     while c < 1000         R1=.975*(A*R)+.025*E;         d=norm(R1-R,1);         c=c+1;         R=R1;     end varargout (0) = R; end function; Pleasure //F# let calcPepIndex (A: matrix)                                (E: Vector<_>) =     let rec calc R =         let R' = 0.975*(A*R) + 0.025*E         let d = Vector.norm(R' - R)         if d = 0.0 then R          else calc R'     calc E
F# vsMatlab Fast Specific General Purpose Tools Easy Deployment Integrates R&D Slow Imprecise Domain Specific Tools Painful Deployment Segregates R&D

Mais conteúdo relacionado

Semelhante a F# in the Classroom and the Lab

Semelhante a F# in the Classroom and the Lab (20)

Fp for the oo programmer
Fp for the oo programmerFp for the oo programmer
Fp for the oo programmer
 
JS Fest 2018. Douglas Crockford. The Better Parts
JS Fest 2018. Douglas Crockford. The Better PartsJS Fest 2018. Douglas Crockford. The Better Parts
JS Fest 2018. Douglas Crockford. The Better Parts
 
Basics of Python Programming in one PDF File.pdf
Basics of Python Programming in one PDF File.pdfBasics of Python Programming in one PDF File.pdf
Basics of Python Programming in one PDF File.pdf
 
F# and the DLR
F# and the DLRF# and the DLR
F# and the DLR
 
Real World F# - SDD 2015
Real World F# -  SDD 2015Real World F# -  SDD 2015
Real World F# - SDD 2015
 
F# and functional programming
F# and functional programmingF# and functional programming
F# and functional programming
 
From Dream socialbot to Multiskill AI Assistant Platform
From Dream socialbot to Multiskill AI Assistant PlatformFrom Dream socialbot to Multiskill AI Assistant Platform
From Dream socialbot to Multiskill AI Assistant Platform
 
The top 5 JavaScript issues in all our codebases
The top 5 JavaScript issues in all our codebasesThe top 5 JavaScript issues in all our codebases
The top 5 JavaScript issues in all our codebases
 
Types are eating the world
Types are eating the worldTypes are eating the world
Types are eating the world
 
Theperlreview
TheperlreviewTheperlreview
Theperlreview
 
24 Hours Later - NCrafts Paris 2015
24 Hours Later - NCrafts Paris 201524 Hours Later - NCrafts Paris 2015
24 Hours Later - NCrafts Paris 2015
 
Trying to learn C# (NDC Oslo 2019)
Trying to learn C# (NDC Oslo 2019)Trying to learn C# (NDC Oslo 2019)
Trying to learn C# (NDC Oslo 2019)
 
Language supports it
Language supports itLanguage supports it
Language supports it
 
Functional Programming in JavaScript
Functional Programming in JavaScriptFunctional Programming in JavaScript
Functional Programming in JavaScript
 
Perl Moderno
Perl ModernoPerl Moderno
Perl Moderno
 
The Perl API for the Mortally Terrified (beta)
The Perl API for the Mortally Terrified (beta)The Perl API for the Mortally Terrified (beta)
The Perl API for the Mortally Terrified (beta)
 
Intro to Functional Programming
Intro to Functional ProgrammingIntro to Functional Programming
Intro to Functional Programming
 
Introducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGNIntroducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGN
 
Functional Programming for Busy Object Oriented Programmers
Functional Programming for Busy Object Oriented ProgrammersFunctional Programming for Busy Object Oriented Programmers
Functional Programming for Busy Object Oriented Programmers
 
In Vogue Dynamic
In Vogue DynamicIn Vogue Dynamic
In Vogue Dynamic
 

Mais de Richard Minerich (6)

How we use functional programming to find the bad guys @ Build Stuff LT and U...
How we use functional programming to find the bad guys @ Build Stuff LT and U...How we use functional programming to find the bad guys @ Build Stuff LT and U...
How we use functional programming to find the bad guys @ Build Stuff LT and U...
 
GHCi: More Awesome Than You Thought
GHCi: More Awesome Than You ThoughtGHCi: More Awesome Than You Thought
GHCi: More Awesome Than You Thought
 
Functional Ideas for a Cloudy Future
Functional Ideas for a Cloudy FutureFunctional Ideas for a Cloudy Future
Functional Ideas for a Cloudy Future
 
Fun and Games in F#
Fun and Games in F#Fun and Games in F#
Fun and Games in F#
 
Getting the MVVM Kicked Out of Your F#'n Monads
Getting the MVVM Kicked Out of Your F#'n MonadsGetting the MVVM Kicked Out of Your F#'n Monads
Getting the MVVM Kicked Out of Your F#'n Monads
 
How you can get started with F# today
How you can get started with F# todayHow you can get started with F# today
How you can get started with F# today
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

F# in the Classroom and the Lab

  • 1. F# in the Classroom and the Lab Richard Minerich Senior Researcher at Bayard Rock and F# MVP
  • 2. F# is Open Source You don’t need to buy Visual Studio to use F# You don’t need to have Windows to use F#
  • 3.
  • 4. “Today’s students, from freshmen to seniors, desire relevant assignments that are engaging, challenging, and creative, that also prepare them for their careers.” - Game2Learn: Building CS1 Learning Games for Retention Tiffany Barnes et al.
  • 5. Play in the Classroom Teach Play Discuss
  • 6. Interactive Teaching Hot swap code to try different approaches and encourage coding as play/exploration
  • 7. Simple Engaging APIs -> No complex background needed to start -> Powerful for building easy to use DSLs
  • 8.
  • 9. A Simple API - A Simple Template Example - Time to play - Motivation via Competition
  • 11. Ant Visible Cells Visible Cells Nest Cells Has Food? Properties? Properties? Are Full? Yes No Out of Ideas? No Nest Cells? Food? Phero? Food but no Phero? Nest Cell? Take Food Move Toward Max Phero Drop Pheromones Move Toward Nest Yes No Move to a Random Cell Move to a Random Nest Cell Drop Food
  • 12. match ant with | HasFood-> matchvisibleCellswith | HasUnownedFood cells when not here.HasPheromone->DropPheromone (here) | AreNestnestCells-> matchnestCellswith | CanDropdropCell->DropFooddropCell | CantDrop-> Move (randomEmptyCellnestCells) | AreNotNest cells -> Move (closestToHomevisibleCells) | HasNoFood-> matchvisibleCellswith | HasUnownedFood cells ->TakeFood (maximizeFood cells) | HasPheromones cells -> Move (maximizePhero cells) | _ -> Move (randomEmptyCellvisibleCells)
  • 13. A Framework for F# Assignments Obfuscated Library CI Server Student Assignment Template
  • 14. Engaging Classwork Automated Grading Everyone Wins
  • 15. F# in the Lab Like Matlab but better in many ways.
  • 17. Pain % Matlab function [varargout] = CalcPepIndex (A, E) A=spconvert(A); E=full(spconvert (E)); c=0; d=0; R=E; while c < 1000 R1=.975*(A*R)+.025*E; d=norm(R1-R,1); c=c+1; R=R1; end varargout (0) = R; end function; Pleasure //F# let calcPepIndex (A: matrix) (E: Vector<_>) = let rec calc R = let R' = 0.975*(A*R) + 0.025*E let d = Vector.norm(R' - R) if d = 0.0 then R else calc R' calc E
  • 18. F# vsMatlab Fast Specific General Purpose Tools Easy Deployment Integrates R&D Slow Imprecise Domain Specific Tools Painful Deployment Segregates R&D
  • 19. Learning in F# Researching with F# Finding Opportunities with .NET