SlideShare a Scribd company logo
F# for BLOBA 
It isn’t just for Science and Financial 
Domains 
Boring Line Of Business Applications
Brandon D’Imperio 
imaginarydevelopment.blogspot.com 
@maslowjax
A Team of 3 Devs Beat a Team of 8 
A team that peaked at 3 developers (only one 
of which knew F#) finished in 1 year what a 
team that peaked at 8 developers couldn’t do in 
5.
But That’s Just One Company Rave 
● @TachyusCorp - From zero to shipping 
product in 12 weeks ( $28 million within 26 
months) 
● Princeton University - F# ... made it trivial ... 
( Graduate courses on Parallelism)
Define Win 
Implementation C# F# 
Braces 56,929 643 
Blanks 29,080 3,630 
Null Checks 3,011 15 
Comments 53,270 487 
Useful Code 163,276 16,667 
App Code 305,566 21,442 
Test Code 42,864 9,359 
Total Code 348,430 30,801
LoC is a Terrible Metric 
In most ways yes. 
C#, F# 
● Test Code Ratio 14%, 44% 
● Useful Code Ratio 53%, 78% 
o Almost half the c# code was noise 
● The C# was not finished and often failed to 
reach near-real-time
What Does This Mean to Me? 
● Could you find bugs more easily in 1/5th of 
the code? 1/10th? 
● OOP SOLID and Design patterns become a 
thing of the past 
o Design patterns are language bug reports - 
(paraphrased) - Peter Norvig 
o DI is not even relevant
A Code Break - What’s Wrong? (with both) 
C# 
public class Contact { 
public string FirstName {get;set;} 
public string MiddleInitial {get;set;} 
public string LastName {get;set;} 
public string EmailAddress {get;set;} 
// true if ownership of email address 
is confirmed 
public bool IsEmailVerified {get;set;} 
} 
F# 
type Contact = { 
FirstName: string 
MiddleInitial: string 
LastName: string 
EmailAddress: string 
// true if ownership of email address 
is confirmed 
IsEmailVerified: bool 
}
What’s Wrong? 
Which are optional? 
What are the constraints? (are all strings allowed to be 
unlimited length?) 
Which fields have a relationship? 
What is the domain logic?
Desired Features of BLOBA Development 
● Express requirements clearly
Desired Features of BLOBA Development 
● Express requirements clearly - Is the flow of 
the code clearer with less noise?
Desired Features of BLOBA Development 
● Express requirements clearly 
● Rapid development cycle 
o Built-in REPL 
o Far less boilerplate code 
o Production-ready code capability for non-f# devs in 
2-4 weeks
Desired Features of BLOBA Development 
● Express requirements clearly 
● Rapid development cycle 
● High quality deliverables 
o Why don’t we sub-type ints? (Primitive Obsession) 
o Is that int the Id of a user or the Id of something 
else?
Desired Features of BLOBA Development 
● Express requirements clearly 
● Rapid development cycle 
● High quality deliverables 
● Fun (Ruby anyone?)
Features not to be missed 
● No null 
● Extended strong typing 
● Enums (DU), Records (no more mapping 
code), Units of Measure, Strongly typed 
strings! 
o Type Providers 
o Design-time checking of string formats
Units of Measure 
[<Measure>] 
type MemberId 
[<Measure>] 
type m // meters 
[<Measure>] 
type mile 
let mPerMile: float<m/mile> = 1609.34<m/mile> 
let milesToMeters (mi:float<mile>) = mi * mPerMile
Features We’d Like to Forget 
● Inheritance 
● Mutability 
● Accidental Recursion 
● Cyclic Dependencies 
o In C# 
 Very do-able via Web References 
 Very do-able within an assembly
Features Worth Mentioning 
● Pattern matching 
● Composition over inheritance 
● typedefof<> and typeof<>
Methods 
C# 
public void Main(string[] args){ /* … */ } 
F# 
● let Main (args: string[]) = ... 
● let Main (args: string array) = … 
● let Main args = ...
Method calling options 
let HelloWorld a b c = … 
let HelloWorld (a,b,c) = … 
let HelloWorld (a,b) c = … // different 
// more concrete 
let ProcessName first m last = …
More stats 
● Compiler comparison 
o LoC 
 Roslyn C# - almost 500k lines of code 
 F# - 150k lines of code 
 over half the C# lines are non-useful 
o Cycles 
 899 mutually dependent classes vs ZERO
Warts 
● (args:string[]) [] means array here every other context in F# [ ] would be a 
list. 
● required fun! fun e -> e instead of C#’s e => e 
● printfn with [<Measure>] (fixed in next version most likely) 
● this. everywhere inside a type 
● no protected members 
● Property syntaxes ( immutable, mutable) (auto option) 
o member this.MyProp = foo //immutable 
o member this.MyProp with get() = … // mutable 
o member val MyProp = “” // auto immutable 
o member val MyProp = “” with get,set // auto mutable
Links 
● My blog 
o http://imaginarydevelopment.blogspot.com/ 
o Why am I so enthusiastic about F#? - 
http://imaginarydevelopment.blogspot.com/2014/06/why-am-i-so-enthusiastic-about-f.html 
● F# cheat sheet - http://dungpa.github.io/fsharp-cheatsheet/ 
● Domain Driven Design using the F# type system - 
https://www.slideshare.net/slideshow/embed_code/28992749 - Scott Wlaschin 
● Does the language you use make a difference (revisited) - 
http://simontcousins.azurewebsites.net/does-the-language-you-use-make-a-difference-revisited/ 
● What about inheritance? - http://codewonderings.blogspot.com/2012/09/what-about-inheritance. 
html 
● SOLID: the next step is Functional http://blog.ploeh.dk/2014/03/10/solid-the-next-step-is-functional/ 
- Mark Seemann

More Related Content

What's hot

How F# Learned to Stop Worrying and Love the Data
How F# Learned to Stop Worrying and Love the DataHow F# Learned to Stop Worrying and Love the Data
How F# Learned to Stop Worrying and Love the Data
Tomas Petricek
 
Are You Ready For Clean Code?
Are You Ready For Clean Code?Are You Ready For Clean Code?
Are You Ready For Clean Code?
Whisnu Sucitanuary
 
difference between c c++ c#
difference between c c++ c#difference between c c++ c#
difference between c c++ c#
Sireesh K
 
BDD with F# at DDDScot
BDD with F# at DDDScotBDD with F# at DDDScot
BDD with F# at DDDScot
Phillip Trelford
 
Domain Specific Languages: The Functional Way
Domain Specific Languages: The Functional WayDomain Specific Languages: The Functional Way
Domain Specific Languages: The Functional Way
Tomas Petricek
 
Introduction to Go-Lang
Introduction to Go-LangIntroduction to Go-Lang
Introduction to Go-Lang
Folio3 Software
 
Spelunking through JPEG with Racket (Sixth RacketCon)
Spelunking through JPEG with Racket (Sixth RacketCon)Spelunking through JPEG with Racket (Sixth RacketCon)
Spelunking through JPEG with Racket (Sixth RacketCon)
Igalia
 
Programming Languages: Trends for 2021
Programming Languages: Trends for 2021Programming Languages: Trends for 2021
Programming Languages: Trends for 2021
Svetlin Nakov
 
C# 2 to 5 short Introduction
C# 2 to 5 short IntroductionC# 2 to 5 short Introduction
C# 2 to 5 short Introduction
Chen-Tien Tsai
 
cfFramework vs World - Overview of MVC and cfFramework v0.x
cfFramework vs World - Overview of MVC and cfFramework v0.xcfFramework vs World - Overview of MVC and cfFramework v0.x
cfFramework vs World - Overview of MVC and cfFramework v0.x
Jerome Lepage
 
Chapter 1: Introduction
Chapter 1: IntroductionChapter 1: Introduction
Chapter 1: Introduction
Eric Chou
 
Programming Languages
Programming LanguagesProgramming Languages
Programming Languages
Edward Blurock
 
The State of C#
The State of C#The State of C#
The State of C#
Filip Ekberg
 
Getting started with Go - Florin Patan - Codemotion Rome 2017
Getting started with Go - Florin Patan - Codemotion Rome 2017Getting started with Go - Florin Patan - Codemotion Rome 2017
Getting started with Go - Florin Patan - Codemotion Rome 2017
Codemotion
 
Programming language
Programming languageProgramming language
Programming language
Dhani Ahmad
 
R Programming: First Steps
R Programming: First StepsR Programming: First Steps
R Programming: First Steps
Rsquared Academy
 
Class 4 IPO and Intro to Ruby
Class 4 IPO and Intro to RubyClass 4 IPO and Intro to Ruby
Class 4 IPO and Intro to Ruby
Stephen Parsons
 
C# programming language
C# programming languageC# programming language
C# programming language
swarnapatil
 

What's hot (20)

How F# Learned to Stop Worrying and Love the Data
How F# Learned to Stop Worrying and Love the DataHow F# Learned to Stop Worrying and Love the Data
How F# Learned to Stop Worrying and Love the Data
 
Are You Ready For Clean Code?
Are You Ready For Clean Code?Are You Ready For Clean Code?
Are You Ready For Clean Code?
 
difference between c c++ c#
difference between c c++ c#difference between c c++ c#
difference between c c++ c#
 
BDD with F# at DDDScot
BDD with F# at DDDScotBDD with F# at DDDScot
BDD with F# at DDDScot
 
Domain Specific Languages: The Functional Way
Domain Specific Languages: The Functional WayDomain Specific Languages: The Functional Way
Domain Specific Languages: The Functional Way
 
Introduction to Go-Lang
Introduction to Go-LangIntroduction to Go-Lang
Introduction to Go-Lang
 
Spelunking through JPEG with Racket (Sixth RacketCon)
Spelunking through JPEG with Racket (Sixth RacketCon)Spelunking through JPEG with Racket (Sixth RacketCon)
Spelunking through JPEG with Racket (Sixth RacketCon)
 
Programming Languages: Trends for 2021
Programming Languages: Trends for 2021Programming Languages: Trends for 2021
Programming Languages: Trends for 2021
 
C# 2 to 5 short Introduction
C# 2 to 5 short IntroductionC# 2 to 5 short Introduction
C# 2 to 5 short Introduction
 
cfFramework vs World - Overview of MVC and cfFramework v0.x
cfFramework vs World - Overview of MVC and cfFramework v0.xcfFramework vs World - Overview of MVC and cfFramework v0.x
cfFramework vs World - Overview of MVC and cfFramework v0.x
 
Chapter 1: Introduction
Chapter 1: IntroductionChapter 1: Introduction
Chapter 1: Introduction
 
Programming Languages
Programming LanguagesProgramming Languages
Programming Languages
 
The State of C#
The State of C#The State of C#
The State of C#
 
Introduction to C# 3.0
Introduction to C# 3.0Introduction to C# 3.0
Introduction to C# 3.0
 
Scope of variables
Scope of variablesScope of variables
Scope of variables
 
Getting started with Go - Florin Patan - Codemotion Rome 2017
Getting started with Go - Florin Patan - Codemotion Rome 2017Getting started with Go - Florin Patan - Codemotion Rome 2017
Getting started with Go - Florin Patan - Codemotion Rome 2017
 
Programming language
Programming languageProgramming language
Programming language
 
R Programming: First Steps
R Programming: First StepsR Programming: First Steps
R Programming: First Steps
 
Class 4 IPO and Intro to Ruby
Class 4 IPO and Intro to RubyClass 4 IPO and Intro to Ruby
Class 4 IPO and Intro to Ruby
 
C# programming language
C# programming languageC# programming language
C# programming language
 

Similar to F# for BLOBA, by brandon d'imperio

Software Craftmanship - Cours Polytech
Software Craftmanship - Cours PolytechSoftware Craftmanship - Cours Polytech
Software Craftmanship - Cours Polytech
yannick grenzinger
 
Functional Programming - Worth the Effort
Functional Programming - Worth the EffortFunctional Programming - Worth the Effort
Functional Programming - Worth the Effort
BoldRadius Solutions
 
F# and the DLR
F# and the DLRF# and the DLR
F# and the DLR
Richard Minerich
 
CSharp.ppt
CSharp.pptCSharp.ppt
Functional Programming in JavaScript & ESNext
Functional Programming in JavaScript & ESNextFunctional Programming in JavaScript & ESNext
Functional Programming in JavaScript & ESNext
Unfold UI
 
Top 40 C Programming Interview Questions
Top 40 C Programming Interview QuestionsTop 40 C Programming Interview Questions
Top 40 C Programming Interview Questions
Simplilearn
 
Rootcon X - Reverse Engineering Swift Applications
Rootcon X - Reverse Engineering Swift ApplicationsRootcon X - Reverse Engineering Swift Applications
Rootcon X - Reverse Engineering Swift Applications
eightbit
 
C-sharping.docx
C-sharping.docxC-sharping.docx
C-sharping.docx
LenchoMamudeBaro
 
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applications
Hack in the Box GSEC 2016 - Reverse Engineering Swift ApplicationsHack in the Box GSEC 2016 - Reverse Engineering Swift Applications
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applications
eightbit
 
Anagha
AnaghaAnagha
[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...
[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...
[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...
PROIDEA
 
C programming.pdf
C programming.pdfC programming.pdf
C programming.pdf
JitendraYadav351971
 
User interface-ui-training-by-ruchiwebsolutions
User interface-ui-training-by-ruchiwebsolutionsUser interface-ui-training-by-ruchiwebsolutions
User interface-ui-training-by-ruchiwebsolutions
php2ranjan
 
User interface ui training hyderabad
User interface ui training hyderabadUser interface ui training hyderabad
User interface ui training hyderabad
Ruchiwebsolutions
 
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Skills Matter
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programmingAlpana Gupta
 
Fundamentals of Data Structures Unit 1.pptx
Fundamentals of Data Structures Unit 1.pptxFundamentals of Data Structures Unit 1.pptx
Fundamentals of Data Structures Unit 1.pptx
Vigneshkumar Ponnusamy
 
Euro python 2015 writing quality code
Euro python 2015   writing quality codeEuro python 2015   writing quality code
Euro python 2015 writing quality code
radek_j
 
Coding Dojo: Functional Calisthenics (2016)
Coding Dojo: Functional Calisthenics (2016)Coding Dojo: Functional Calisthenics (2016)
Coding Dojo: Functional Calisthenics (2016)
Peter Kofler
 

Similar to F# for BLOBA, by brandon d'imperio (20)

Software Craftmanship - Cours Polytech
Software Craftmanship - Cours PolytechSoftware Craftmanship - Cours Polytech
Software Craftmanship - Cours Polytech
 
Functional Programming - Worth the Effort
Functional Programming - Worth the EffortFunctional Programming - Worth the Effort
Functional Programming - Worth the Effort
 
F# and the DLR
F# and the DLRF# and the DLR
F# and the DLR
 
CSharp.ppt
CSharp.pptCSharp.ppt
CSharp.ppt
 
Functional Programming in JavaScript & ESNext
Functional Programming in JavaScript & ESNextFunctional Programming in JavaScript & ESNext
Functional Programming in JavaScript & ESNext
 
Top 40 C Programming Interview Questions
Top 40 C Programming Interview QuestionsTop 40 C Programming Interview Questions
Top 40 C Programming Interview Questions
 
Rootcon X - Reverse Engineering Swift Applications
Rootcon X - Reverse Engineering Swift ApplicationsRootcon X - Reverse Engineering Swift Applications
Rootcon X - Reverse Engineering Swift Applications
 
C-sharping.docx
C-sharping.docxC-sharping.docx
C-sharping.docx
 
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applications
Hack in the Box GSEC 2016 - Reverse Engineering Swift ApplicationsHack in the Box GSEC 2016 - Reverse Engineering Swift Applications
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applications
 
Anagha
AnaghaAnagha
Anagha
 
[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...
[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...
[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...
 
C programming.pdf
C programming.pdfC programming.pdf
C programming.pdf
 
User interface-ui-training-by-ruchiwebsolutions
User interface-ui-training-by-ruchiwebsolutionsUser interface-ui-training-by-ruchiwebsolutions
User interface-ui-training-by-ruchiwebsolutions
 
User interface ui training hyderabad
User interface ui training hyderabadUser interface ui training hyderabad
User interface ui training hyderabad
 
C_Programming_Notes_ICE
C_Programming_Notes_ICEC_Programming_Notes_ICE
C_Programming_Notes_ICE
 
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Fundamentals of Data Structures Unit 1.pptx
Fundamentals of Data Structures Unit 1.pptxFundamentals of Data Structures Unit 1.pptx
Fundamentals of Data Structures Unit 1.pptx
 
Euro python 2015 writing quality code
Euro python 2015   writing quality codeEuro python 2015   writing quality code
Euro python 2015 writing quality code
 
Coding Dojo: Functional Calisthenics (2016)
Coding Dojo: Functional Calisthenics (2016)Coding Dojo: Functional Calisthenics (2016)
Coding Dojo: Functional Calisthenics (2016)
 

More from MaslowB

Knockout vs. angular
Knockout vs. angularKnockout vs. angular
Knockout vs. angularMaslowB
 
Js testing
Js testingJs testing
Js testingMaslowB
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolatorMaslowB
 
What’s new mvc 4
What’s new mvc 4What’s new mvc 4
What’s new mvc 4MaslowB
 
A clean repository pattern in ef
A clean repository pattern in efA clean repository pattern in ef
A clean repository pattern in efMaslowB
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolatorMaslowB
 
Mvc presentation
Mvc presentationMvc presentation
Mvc presentationMaslowB
 
Metaprogramming by brandon
Metaprogramming by brandonMetaprogramming by brandon
Metaprogramming by brandonMaslowB
 

More from MaslowB (9)

Knockout vs. angular
Knockout vs. angularKnockout vs. angular
Knockout vs. angular
 
Js testing
Js testingJs testing
Js testing
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolator
 
What’s new mvc 4
What’s new mvc 4What’s new mvc 4
What’s new mvc 4
 
A clean repository pattern in ef
A clean repository pattern in efA clean repository pattern in ef
A clean repository pattern in ef
 
Metrics
MetricsMetrics
Metrics
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolator
 
Mvc presentation
Mvc presentationMvc presentation
Mvc presentation
 
Metaprogramming by brandon
Metaprogramming by brandonMetaprogramming by brandon
Metaprogramming by brandon
 

Recently uploaded

Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
abdulrafaychaudhry
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
Google
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 

Recently uploaded (20)

Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 

F# for BLOBA, by brandon d'imperio

  • 1. F# for BLOBA It isn’t just for Science and Financial Domains Boring Line Of Business Applications
  • 3. A Team of 3 Devs Beat a Team of 8 A team that peaked at 3 developers (only one of which knew F#) finished in 1 year what a team that peaked at 8 developers couldn’t do in 5.
  • 4. But That’s Just One Company Rave ● @TachyusCorp - From zero to shipping product in 12 weeks ( $28 million within 26 months) ● Princeton University - F# ... made it trivial ... ( Graduate courses on Parallelism)
  • 5. Define Win Implementation C# F# Braces 56,929 643 Blanks 29,080 3,630 Null Checks 3,011 15 Comments 53,270 487 Useful Code 163,276 16,667 App Code 305,566 21,442 Test Code 42,864 9,359 Total Code 348,430 30,801
  • 6. LoC is a Terrible Metric In most ways yes. C#, F# ● Test Code Ratio 14%, 44% ● Useful Code Ratio 53%, 78% o Almost half the c# code was noise ● The C# was not finished and often failed to reach near-real-time
  • 7. What Does This Mean to Me? ● Could you find bugs more easily in 1/5th of the code? 1/10th? ● OOP SOLID and Design patterns become a thing of the past o Design patterns are language bug reports - (paraphrased) - Peter Norvig o DI is not even relevant
  • 8. A Code Break - What’s Wrong? (with both) C# public class Contact { public string FirstName {get;set;} public string MiddleInitial {get;set;} public string LastName {get;set;} public string EmailAddress {get;set;} // true if ownership of email address is confirmed public bool IsEmailVerified {get;set;} } F# type Contact = { FirstName: string MiddleInitial: string LastName: string EmailAddress: string // true if ownership of email address is confirmed IsEmailVerified: bool }
  • 9. What’s Wrong? Which are optional? What are the constraints? (are all strings allowed to be unlimited length?) Which fields have a relationship? What is the domain logic?
  • 10. Desired Features of BLOBA Development ● Express requirements clearly
  • 11. Desired Features of BLOBA Development ● Express requirements clearly - Is the flow of the code clearer with less noise?
  • 12. Desired Features of BLOBA Development ● Express requirements clearly ● Rapid development cycle o Built-in REPL o Far less boilerplate code o Production-ready code capability for non-f# devs in 2-4 weeks
  • 13. Desired Features of BLOBA Development ● Express requirements clearly ● Rapid development cycle ● High quality deliverables o Why don’t we sub-type ints? (Primitive Obsession) o Is that int the Id of a user or the Id of something else?
  • 14. Desired Features of BLOBA Development ● Express requirements clearly ● Rapid development cycle ● High quality deliverables ● Fun (Ruby anyone?)
  • 15. Features not to be missed ● No null ● Extended strong typing ● Enums (DU), Records (no more mapping code), Units of Measure, Strongly typed strings! o Type Providers o Design-time checking of string formats
  • 16. Units of Measure [<Measure>] type MemberId [<Measure>] type m // meters [<Measure>] type mile let mPerMile: float<m/mile> = 1609.34<m/mile> let milesToMeters (mi:float<mile>) = mi * mPerMile
  • 17. Features We’d Like to Forget ● Inheritance ● Mutability ● Accidental Recursion ● Cyclic Dependencies o In C#  Very do-able via Web References  Very do-able within an assembly
  • 18. Features Worth Mentioning ● Pattern matching ● Composition over inheritance ● typedefof<> and typeof<>
  • 19. Methods C# public void Main(string[] args){ /* … */ } F# ● let Main (args: string[]) = ... ● let Main (args: string array) = … ● let Main args = ...
  • 20. Method calling options let HelloWorld a b c = … let HelloWorld (a,b,c) = … let HelloWorld (a,b) c = … // different // more concrete let ProcessName first m last = …
  • 21. More stats ● Compiler comparison o LoC  Roslyn C# - almost 500k lines of code  F# - 150k lines of code  over half the C# lines are non-useful o Cycles  899 mutually dependent classes vs ZERO
  • 22. Warts ● (args:string[]) [] means array here every other context in F# [ ] would be a list. ● required fun! fun e -> e instead of C#’s e => e ● printfn with [<Measure>] (fixed in next version most likely) ● this. everywhere inside a type ● no protected members ● Property syntaxes ( immutable, mutable) (auto option) o member this.MyProp = foo //immutable o member this.MyProp with get() = … // mutable o member val MyProp = “” // auto immutable o member val MyProp = “” with get,set // auto mutable
  • 23. Links ● My blog o http://imaginarydevelopment.blogspot.com/ o Why am I so enthusiastic about F#? - http://imaginarydevelopment.blogspot.com/2014/06/why-am-i-so-enthusiastic-about-f.html ● F# cheat sheet - http://dungpa.github.io/fsharp-cheatsheet/ ● Domain Driven Design using the F# type system - https://www.slideshare.net/slideshow/embed_code/28992749 - Scott Wlaschin ● Does the language you use make a difference (revisited) - http://simontcousins.azurewebsites.net/does-the-language-you-use-make-a-difference-revisited/ ● What about inheritance? - http://codewonderings.blogspot.com/2012/09/what-about-inheritance. html ● SOLID: the next step is Functional http://blog.ploeh.dk/2014/03/10/solid-the-next-step-is-functional/ - Mark Seemann

Editor's Notes

  1. http://simontcousins.azurewebsites.net/does-the-language-you-use-make-a-difference-revisited/
  2. http://fsharp.org/testimonials/ https://twitter.com/talbott/status/456471919983095808
  3. http://gorodinski.com/blog/2013/09/18/oop-patterns-from-a-functional-perspective/ http://blog.ploeh.dk/2014/03/10/solid-the-next-step-is-functional/ http://en.wikipedia.org/wiki/Peter_Norvig
  4. https://www.slideshare.net/slideshow/embed_code/28992749
  5. REPL allows you to reference your current solution code and run it interactively
  6. REPL allows you to reference your current solution code and run it interactively
  7. REPL allows you to reference your current solution code and run it interactively
  8. http://msdn.microsoft.com/en-us/library/dd233243.aspx
  9. http://fsharpforfunandprofit.com/posts/cyclic-dependencies/
  10. http://fsharpforfunandprofit.com/posts/roslyn-vs-fsharp-compiler/