SlideShare a Scribd company logo
Mixing functional and object oriented approaches to programming in C# Mark Needham
A bit of context
ThoughtWorks delivery projects
Web applications with somewhat complicated domains
5-15 developers on a team
Projects running for 6-12 months
All this means that we want to write code which is…
Easy to understand
Easy to change
Which leads us to what this talk is all about…
Organisation of code ‘ The Lush Landscape of Languages’ - The ThoughtWorks Anthology Rebecca Parsons
How might functional programming help us with that?
First class functions
“ A programming language is said to support first class functions  if functions can be created during the execution of a program, stored in data structures, passed as arguments to other functions, and returned as the values of other functions” Wikipedia
Immutability
Lazy evaluation
Recursion
Pattern matching
This is all very cool but…
Object Oriented design still has its place
Encapsulation
Abstraction
So how do these two paradigms work together?
Programming in the small/medium/large http://weblogs.asp.net/podwysocki/archive/2009/12/14/going-hybrid-implementing-a-shopping-cart-in-f.aspx
In the large…  “a high level that affects as well as crosscuts multiple classes and functions”
In the medium…  “a single API or group of related APIs in such things as classes, interfaces, modules”
In the small…  “individual function/method bodies”
Large Medium Small
Large Medium Small
LINQ
a.k.a. Functional collection parameters http://billsix.blogspot.com/2008/03/functional-collection-patterns-in-ruby.html
“powerful abstractions over collections”
“ the use of high-order functions is  extremely useful for separating the collection's concerns from the user of the collection”
for loop becomes less useful
Don’t just use ForEach!
Code becomes more declarative
Declarative? “a statement specifies some aspect of the desired answer with no notion of how that answer is to be determined” ‘ The Lush Landscape of Languages’ - The ThoughtWorks Anthology Rebecca Parsons
Requires a mental shift from imperative thinking
Transformational mindset Patrick Logan in the comments section http://www.markhneedham.com/blog/2010/01/20/functional-collectional-parameters-some-thoughts/
Current Input ??? ??? ??? Desired Output
Going from one collection to another
var  words =  new  List<string>  { “hello”, “world” }; var  upperCaseWords =  new  List<string>(); foreach  (var word  in  words) { upperCaseWords.Add(word.ToUpper()); }
a.k.a. map
“ hello”, “world” ???? “HELLO”, “WORLD”
“hello”, “world” Select “HELLO”, “WORLD”
var  words =  new  List<string>  { “hello”, “world” }; var  upperCaseWords =  words.Select(w => w.ToUpper());
Remove values we don’t want
var  words =  new  List<string>   {“hello”, “world”}; var  wordsWithH =  new  List<string>(); foreach  (var word  in  words) { if(word.Contains(“h”) wordsWithH.Add(word); }
a.k.a. filter
“ hello”, “world” ???? “hello”
“ hello”, “world” Where “hello”
var  words =  new  List<string>   {“hello”, “world”} ; var  wordsWithH =  words.Where(w => w.Contains(“h”));
Summing some values
var  values =  new  List<int> { 1,2,3 }; var  total =  0; foreach  (var value  in  values) { total += value; }
a.k.a. reduce
1, 2, 3 ??? 6
1, 2, 3 Sum 6
var  values =  new  List<int> { 1,2,3 }; var  total = val ues.Sum(v => v);
Some examples from projects
Getting the first value that matches a criteria
Foo(“mark”, true), Foo(“dave”, false), Foo(“mike”, true) ???? Foo(“mark”, true)
Foo(“mark”, true), Foo(“dave”, false), Foo(“mike”, true) Where Foo(“mark”, true), Foo(“mike”, true) ??? Foo(“mark”, true)
Foo(“mark”, true), Foo(“dave”, false), Foo(“mike”, true) Where Foo(“mark”, true), Foo(“mike”, true) First Foo(“mark”, true)
var  foos =  new  List<Foo>  {   new Foo(“mark”, true),    new Foo(“dave”, false),   new Foo(“mike”, true)  }; var  firstSpecialFoo =  foos.   Where(f => f.HasSpecialFlag()).   First());
var  foos =  new  List<Foo>  {   new Foo(“mark”, true),    new Foo(“dave”, false),   new Foo(“mike”, true)  }; var  firstSpecialFoo =  foos.First(f => f.HasSpecialFlag());
Removing some columns from a dataset
a,b,c,d,e,f ????   “a,d,e,f”
a,b,c,d,e,f Where IEnumerable of a, d, e, f ???   “a,d,e,f”
a,b,c,d,e,f Where IEnumerable of a, d, e, f ??? String.Join  on [a, d, e, f] “a,d,e,f”
a,b,c,d,e,f Where IEnumerable of a, d, e, f ToArray() String.Join  on [a, d, e, f]  “a,d,e,f”
var  aRow =  “a, b, c, d, e, f”; var  newRow =  String.Join(“,”,   aRow   .Split(‘,’)   .Where((_, idx) => !(idx == 1 || idx == 2))   .ToArray());
var  aRow =  “a, b, c, d, e, f”; var  rowWithColumnsRemoved =  aRow   .Split(‘,’)   .Where((_, idx) => !(idx == 1 || idx == 2))   .ToArray());  var  newRow = String.Join(“,”, rowWithColumnsRemoved);
Checking if any parameters are null
public class  SomeObject {   public  SomeObject(string p1, string p2,    string p3)   {   if  (p1 ==  null )    throw new Exception(...);   if  (p2 ==  null )    throw new Exception(...);   if  (p3 ==  null )    throw new Exception(...);   // rest of constructor logic   } }
public class  SomeObject {   public  SomeObject(string p1, string p2,    string p3)   {   var  params = new List<string> {p1, p2, p3};   if  (params.Any(p => p == null)    throw new Exception(...);    // rest of constructor logic   } }
Some lessons from the wild
Dealing with the null collection
public   int  SumNumbers(List< int > list) { if(list ==  null ) return 0; return list.Sum(v => v); }
public  IEnumerable<T> EmptyIfNull( this  IEnumerable<T> collection) { if(collection ==  null ) return  new  List<T>(); return collection; } Chris Ammerman in the comments section http://www.markhneedham.com/blog/2009/06/16/functional-collection-parameters-handling-the-null-collection/
public   int  SumNumbers(List< int > list) { return list. EmptyIfNull(). Sum(v => v); }
LINQ and the forgotten abstraction
Avoid passing lists around
public class  Quote { public  List<Coverage> Coverages  {  get; set;  } }
Later on in the view…
<% var coverages = Model.Quote.Coverages; %> <% if(coverages.Where( c => c.Name == “coverageType1”) %> ... <% if(coverages.Where( c => c.Name == “coverageType2”) %> ... <% if(coverages.Where( c => c.Name == “coverageType3”) %>
Objects as the mechanism for encapsulation
public class  Coverages { private   readonly  List<Coverage> coverages; public  Coverages(List<Coverage> coverages) { this.coverages = new List<Coverage>(coverages); } public  Coverage CoverageType1 {   get    {    return  coverages.Where( c => c.Name == “coverageType1”;    } } }
LINQ is duplication too!
public class  Coverages { public  Coverage CoverageType1 {   get    {    return  coverages.Where( c => c.Name == “coverageType1”;    } } public  Coverage CoverageType2 {   get    {    return  coverages.Where( c => c.Name == “coverageType2”;    } } }
public class  Coverages { public  Coverage CoverageType1 { get {  return     CoverageByName(“coverageType1”); } } public  Coverage CoverageType2 { get {  return     CoverageByName(“coverageType2”); } } public  Coverage CoverageBy(string name) { return  coverages.Where(c => c.Name == name); } }
Don’t forget “extract method”
var  someFoos =  new  List<Foo>() // put some foos in the list someFoos.Select(f =>  new  NewFoo    { Property1 = f.Property1 ...   });
var  someFoos =  new  List<Foo>() // put some foos in the list someFoos.Select(f => CreateNewFooFrom(f));
Naming lambda variables
Putting functions in maps
public void  SomeMethodParsing( string  input) { if  (input == “input1”)  { someMethod(input); } else if  (input == “input2”) { someOtherMethod(input); } // and so on }
Dictionary< string , Action< string >> inputs =    new Dictionary< string , Action< string >>    { { “input1” , someMethod },    { “input2” , someOtherMethod } }; public void  SomeMethodParsing( string  input) { var  method = inputs[input]; method(input); }
Large Medium Small
Using functions to simplify some GOF patterns
Action
Func
public class  SomeObject { private readonly IStrategy strategy; public Foo(IStrategy strategy) { this.strategy = strategy; } public void DoSomething(string value) { strategy.DoSomething(value); } }
public class  Strategy : IStrategy { public void DoSomething(string value) { // do something with string } }
public class  SomeObject { private readonly Action<string> strategy; public Foo(Action<string> strategy) { this. strategy = strategy; } public void DoSomething(string value) {   strategy(value); } }
Need to ensure we don’t lose readability/understandability
The hole in the middle pattern Brian Hurt http://enfranchisedmind.com/blog/posts/the-hole-in-the-middle-pattern/
Common beginning and end. Only the middle differs
public class  ServiceCache<Service> { protected  Res FromCacheOrService <Req, Res>(Func<Res> serviceCall, Req request) { var cachedRes = cache.RetrieveIfExists( typeof(Service), typeof(Res), request);   if(cachedRes == null)   { cachedRes = serviceCall(); cache.Add(typeof(Service), request, cachedRes);   } return (Res) cachedRes; } }
public class  CachedService : ServiceCache<IService> { public  MyResult GetMyResult(MyRequest request) { return FromCacheOrService( () => service.GetMyResult(request), request); } }
Other ideas I’m intrigued about
The option type
The nested closure
File.open(“someFile.txt”, ‘w’)  do  |out| out  <<  “add something to file” end
public class MyFile  {   public static void Open(string filePath,  Action<StreamWriter> block)   {   using(var writer = new StreamWriter())    {   block(writer );   }   } }
MyFile.Open(“c:\\mark.txt”, f =>  f.WriteLine(“some random text”));
Writing extension methods to create functional abstractions
Learning more
 
3 things to take away
The transformational mindset
Objects are still the mechanism for encapsulation
Simplify GOF design patterns by using functions
Thanks to… Dave Cameron (not that one!) who I worked with on the structure and general content of the talk. Mike Wagg, Brian Blignaut, Chris Owen for reviewing the talk and giving their input.
Questions? Mark Needham http://www.markhneedham.com/blog/ [email_address] Twitter: markhneedham
Ad

More Related Content

What's hot (20)

Clean code
Clean codeClean code
Clean code
Henrique Smoco
 
clean code book summary - uncle bob - English version
clean code book summary - uncle bob - English versionclean code book summary - uncle bob - English version
clean code book summary - uncle bob - English version
saber tabatabaee
 
Design Patterns - Compiler Case Study - Hands-on Examples
Design Patterns - Compiler Case Study - Hands-on ExamplesDesign Patterns - Compiler Case Study - Hands-on Examples
Design Patterns - Compiler Case Study - Hands-on Examples
Ganesh Samarthyam
 
Logic programming a ruby perspective
Logic programming a ruby perspectiveLogic programming a ruby perspective
Logic programming a ruby perspective
Norman Richards
 
Clean code
Clean codeClean code
Clean code
ifnu bima
 
Linq Sanjay Vyas
Linq   Sanjay VyasLinq   Sanjay Vyas
Linq Sanjay Vyas
rsnarayanan
 
Java script introducation & basics
Java script introducation & basicsJava script introducation & basics
Java script introducation & basics
H K
 
Functional programming in java
Functional programming in javaFunctional programming in java
Functional programming in java
John Ferguson Smart Limited
 
Declare Your Language: Transformation by Strategic Term Rewriting
Declare Your Language: Transformation by Strategic Term RewritingDeclare Your Language: Transformation by Strategic Term Rewriting
Declare Your Language: Transformation by Strategic Term Rewriting
Eelco Visser
 
Functional Programming In Java
Functional Programming In JavaFunctional Programming In Java
Functional Programming In Java
Andrei Solntsev
 
Declare Your Language: Name Resolution
Declare Your Language: Name ResolutionDeclare Your Language: Name Resolution
Declare Your Language: Name Resolution
Eelco Visser
 
Javascript basics
Javascript basicsJavascript basics
Javascript basics
Solv AS
 
Scala presentation by Aleksandar Prokopec
Scala presentation by Aleksandar ProkopecScala presentation by Aleksandar Prokopec
Scala presentation by Aleksandar Prokopec
Loïc Descotte
 
Category theory, Monads, and Duality in the world of (BIG) Data
Category theory, Monads, and Duality in the world of (BIG) DataCategory theory, Monads, and Duality in the world of (BIG) Data
Category theory, Monads, and Duality in the world of (BIG) Data
greenwop
 
Java Generics - by Example
Java Generics - by ExampleJava Generics - by Example
Java Generics - by Example
Ganesh Samarthyam
 
Clean Code: Chapter 3 Function
Clean Code: Chapter 3 FunctionClean Code: Chapter 3 Function
Clean Code: Chapter 3 Function
Kent Huang
 
The Ring programming language version 1.7 book - Part 35 of 196
The Ring programming language version 1.7 book - Part 35 of 196The Ring programming language version 1.7 book - Part 35 of 196
The Ring programming language version 1.7 book - Part 35 of 196
Mahmoud Samir Fayed
 
Kpi driven-java-development-fn conf
Kpi driven-java-development-fn confKpi driven-java-development-fn conf
Kpi driven-java-development-fn conf
Anirban Bhattacharjee
 
Clean Code Development
Clean Code DevelopmentClean Code Development
Clean Code Development
Peter Gfader
 
Javascript built in String Functions
Javascript built in String FunctionsJavascript built in String Functions
Javascript built in String Functions
Avanitrambadiya
 
clean code book summary - uncle bob - English version
clean code book summary - uncle bob - English versionclean code book summary - uncle bob - English version
clean code book summary - uncle bob - English version
saber tabatabaee
 
Design Patterns - Compiler Case Study - Hands-on Examples
Design Patterns - Compiler Case Study - Hands-on ExamplesDesign Patterns - Compiler Case Study - Hands-on Examples
Design Patterns - Compiler Case Study - Hands-on Examples
Ganesh Samarthyam
 
Logic programming a ruby perspective
Logic programming a ruby perspectiveLogic programming a ruby perspective
Logic programming a ruby perspective
Norman Richards
 
Linq Sanjay Vyas
Linq   Sanjay VyasLinq   Sanjay Vyas
Linq Sanjay Vyas
rsnarayanan
 
Java script introducation & basics
Java script introducation & basicsJava script introducation & basics
Java script introducation & basics
H K
 
Declare Your Language: Transformation by Strategic Term Rewriting
Declare Your Language: Transformation by Strategic Term RewritingDeclare Your Language: Transformation by Strategic Term Rewriting
Declare Your Language: Transformation by Strategic Term Rewriting
Eelco Visser
 
Functional Programming In Java
Functional Programming In JavaFunctional Programming In Java
Functional Programming In Java
Andrei Solntsev
 
Declare Your Language: Name Resolution
Declare Your Language: Name ResolutionDeclare Your Language: Name Resolution
Declare Your Language: Name Resolution
Eelco Visser
 
Javascript basics
Javascript basicsJavascript basics
Javascript basics
Solv AS
 
Scala presentation by Aleksandar Prokopec
Scala presentation by Aleksandar ProkopecScala presentation by Aleksandar Prokopec
Scala presentation by Aleksandar Prokopec
Loïc Descotte
 
Category theory, Monads, and Duality in the world of (BIG) Data
Category theory, Monads, and Duality in the world of (BIG) DataCategory theory, Monads, and Duality in the world of (BIG) Data
Category theory, Monads, and Duality in the world of (BIG) Data
greenwop
 
Clean Code: Chapter 3 Function
Clean Code: Chapter 3 FunctionClean Code: Chapter 3 Function
Clean Code: Chapter 3 Function
Kent Huang
 
The Ring programming language version 1.7 book - Part 35 of 196
The Ring programming language version 1.7 book - Part 35 of 196The Ring programming language version 1.7 book - Part 35 of 196
The Ring programming language version 1.7 book - Part 35 of 196
Mahmoud Samir Fayed
 
Clean Code Development
Clean Code DevelopmentClean Code Development
Clean Code Development
Peter Gfader
 
Javascript built in String Functions
Javascript built in String FunctionsJavascript built in String Functions
Javascript built in String Functions
Avanitrambadiya
 

Similar to Mixing functional and object oriented approaches to programming in C# (20)

What's New In C# 7
What's New In C# 7What's New In C# 7
What's New In C# 7
Paulo Morgado
 
Ast transformations
Ast transformationsAst transformations
Ast transformations
HamletDRC
 
JBUG 11 - Scala For Java Programmers
JBUG 11 - Scala For Java ProgrammersJBUG 11 - Scala For Java Programmers
JBUG 11 - Scala For Java Programmers
Tikal Knowledge
 
Scala introduction
Scala introductionScala introduction
Scala introduction
Alf Kristian Støyle
 
Java 8 Workshop
Java 8 WorkshopJava 8 Workshop
Java 8 Workshop
Mario Fusco
 
Java Class Design
Java Class DesignJava Class Design
Java Class Design
Ganesh Samarthyam
 
Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5
Stephan Schmidt
 
Functional Programming You Already Know
Functional Programming You Already KnowFunctional Programming You Already Know
Functional Programming You Already Know
Kevlin Henney
 
Tuga IT 2017 - What's new in C# 7
Tuga IT 2017 - What's new in C# 7Tuga IT 2017 - What's new in C# 7
Tuga IT 2017 - What's new in C# 7
Paulo Morgado
 
Mirror, mirror on the wall: Building a new PHP reflection library (DPC 2016)
Mirror, mirror on the wall: Building a new PHP reflection library (DPC 2016)Mirror, mirror on the wall: Building a new PHP reflection library (DPC 2016)
Mirror, mirror on the wall: Building a new PHP reflection library (DPC 2016)
James Titcumb
 
Groovy
GroovyGroovy
Groovy
Zen Urban
 
Java gets a closure
Java gets a closureJava gets a closure
Java gets a closure
Tomasz Kowalczewski
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
Dmitry Sheiko
 
Scala 2 + 2 > 4
Scala 2 + 2 > 4Scala 2 + 2 > 4
Scala 2 + 2 > 4
Emil Vladev
 
Clean Code
Clean CodeClean Code
Clean Code
Nascenia IT
 
FP in Java - Project Lambda and beyond
FP in Java - Project Lambda and beyondFP in Java - Project Lambda and beyond
FP in Java - Project Lambda and beyond
Mario Fusco
 
TechTalk - Dotnet
TechTalk - DotnetTechTalk - Dotnet
TechTalk - Dotnet
heinrich.wendel
 
Introduction to Scalding and Monoids
Introduction to Scalding and MonoidsIntroduction to Scalding and Monoids
Introduction to Scalding and Monoids
Hugo Gävert
 
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Codemotion
 
Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...
Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...
Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...
James Titcumb
 
Ast transformations
Ast transformationsAst transformations
Ast transformations
HamletDRC
 
JBUG 11 - Scala For Java Programmers
JBUG 11 - Scala For Java ProgrammersJBUG 11 - Scala For Java Programmers
JBUG 11 - Scala For Java Programmers
Tikal Knowledge
 
Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5
Stephan Schmidt
 
Functional Programming You Already Know
Functional Programming You Already KnowFunctional Programming You Already Know
Functional Programming You Already Know
Kevlin Henney
 
Tuga IT 2017 - What's new in C# 7
Tuga IT 2017 - What's new in C# 7Tuga IT 2017 - What's new in C# 7
Tuga IT 2017 - What's new in C# 7
Paulo Morgado
 
Mirror, mirror on the wall: Building a new PHP reflection library (DPC 2016)
Mirror, mirror on the wall: Building a new PHP reflection library (DPC 2016)Mirror, mirror on the wall: Building a new PHP reflection library (DPC 2016)
Mirror, mirror on the wall: Building a new PHP reflection library (DPC 2016)
James Titcumb
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
Dmitry Sheiko
 
FP in Java - Project Lambda and beyond
FP in Java - Project Lambda and beyondFP in Java - Project Lambda and beyond
FP in Java - Project Lambda and beyond
Mario Fusco
 
Introduction to Scalding and Monoids
Introduction to Scalding and MonoidsIntroduction to Scalding and Monoids
Introduction to Scalding and Monoids
Hugo Gävert
 
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Codemotion
 
Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...
Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...
Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...
James Titcumb
 
Ad

More from Mark Needham (14)

Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and OperationsNeo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
Mark Needham
 
This week in Neo4j - 3rd February 2018
This week in Neo4j - 3rd February 2018This week in Neo4j - 3rd February 2018
This week in Neo4j - 3rd February 2018
Mark Needham
 
Building a recommendation engine with python and neo4j
Building a recommendation engine with python and neo4jBuilding a recommendation engine with python and neo4j
Building a recommendation engine with python and neo4j
Mark Needham
 
Graph Connect: Tuning Cypher
Graph Connect: Tuning CypherGraph Connect: Tuning Cypher
Graph Connect: Tuning Cypher
Mark Needham
 
Graph Connect: Importing data quickly and easily
Graph Connect: Importing data quickly and easilyGraph Connect: Importing data quickly and easily
Graph Connect: Importing data quickly and easily
Mark Needham
 
Graph Connect Europe: From Zero To Import
Graph Connect Europe: From Zero To ImportGraph Connect Europe: From Zero To Import
Graph Connect Europe: From Zero To Import
Mark Needham
 
Optimizing cypher queries in neo4j
Optimizing cypher queries in neo4jOptimizing cypher queries in neo4j
Optimizing cypher queries in neo4j
Mark Needham
 
Football graph - Neo4j and the Premier League
Football graph - Neo4j and the Premier LeagueFootball graph - Neo4j and the Premier League
Football graph - Neo4j and the Premier League
Mark Needham
 
The Football Graph - Neo4j and the Premier League
The Football Graph - Neo4j and the Premier LeagueThe Football Graph - Neo4j and the Premier League
The Football Graph - Neo4j and the Premier League
Mark Needham
 
Scala: An experience report
Scala: An experience reportScala: An experience report
Scala: An experience report
Mark Needham
 
Visualisations
VisualisationsVisualisations
Visualisations
Mark Needham
 
Mixing functional programming approaches in an object oriented language
Mixing functional programming approaches in an object oriented languageMixing functional programming approaches in an object oriented language
Mixing functional programming approaches in an object oriented language
Mark Needham
 
Mixing functional and object oriented approaches to programming in C#
Mixing functional and object oriented approaches to programming in C#Mixing functional and object oriented approaches to programming in C#
Mixing functional and object oriented approaches to programming in C#
Mark Needham
 
F#: What I've learnt so far
F#: What I've learnt so farF#: What I've learnt so far
F#: What I've learnt so far
Mark Needham
 
Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and OperationsNeo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
Mark Needham
 
This week in Neo4j - 3rd February 2018
This week in Neo4j - 3rd February 2018This week in Neo4j - 3rd February 2018
This week in Neo4j - 3rd February 2018
Mark Needham
 
Building a recommendation engine with python and neo4j
Building a recommendation engine with python and neo4jBuilding a recommendation engine with python and neo4j
Building a recommendation engine with python and neo4j
Mark Needham
 
Graph Connect: Tuning Cypher
Graph Connect: Tuning CypherGraph Connect: Tuning Cypher
Graph Connect: Tuning Cypher
Mark Needham
 
Graph Connect: Importing data quickly and easily
Graph Connect: Importing data quickly and easilyGraph Connect: Importing data quickly and easily
Graph Connect: Importing data quickly and easily
Mark Needham
 
Graph Connect Europe: From Zero To Import
Graph Connect Europe: From Zero To ImportGraph Connect Europe: From Zero To Import
Graph Connect Europe: From Zero To Import
Mark Needham
 
Optimizing cypher queries in neo4j
Optimizing cypher queries in neo4jOptimizing cypher queries in neo4j
Optimizing cypher queries in neo4j
Mark Needham
 
Football graph - Neo4j and the Premier League
Football graph - Neo4j and the Premier LeagueFootball graph - Neo4j and the Premier League
Football graph - Neo4j and the Premier League
Mark Needham
 
The Football Graph - Neo4j and the Premier League
The Football Graph - Neo4j and the Premier LeagueThe Football Graph - Neo4j and the Premier League
The Football Graph - Neo4j and the Premier League
Mark Needham
 
Scala: An experience report
Scala: An experience reportScala: An experience report
Scala: An experience report
Mark Needham
 
Mixing functional programming approaches in an object oriented language
Mixing functional programming approaches in an object oriented languageMixing functional programming approaches in an object oriented language
Mixing functional programming approaches in an object oriented language
Mark Needham
 
Mixing functional and object oriented approaches to programming in C#
Mixing functional and object oriented approaches to programming in C#Mixing functional and object oriented approaches to programming in C#
Mixing functional and object oriented approaches to programming in C#
Mark Needham
 
F#: What I've learnt so far
F#: What I've learnt so farF#: What I've learnt so far
F#: What I've learnt so far
Mark Needham
 
Ad

Recently uploaded (20)

UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Mastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdfMastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdf
Spiral Mantra
 
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdfAre Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Telecoms Supermarket
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Unlocking the Power of IVR: A Comprehensive Guide
Unlocking the Power of IVR: A Comprehensive GuideUnlocking the Power of IVR: A Comprehensive Guide
Unlocking the Power of IVR: A Comprehensive Guide
vikasascentbpo
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Social Media App Development Company-EmizenTech
Social Media App Development Company-EmizenTechSocial Media App Development Company-EmizenTech
Social Media App Development Company-EmizenTech
Steve Jonas
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Mastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdfMastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdf
Spiral Mantra
 
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdfAre Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Telecoms Supermarket
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Unlocking the Power of IVR: A Comprehensive Guide
Unlocking the Power of IVR: A Comprehensive GuideUnlocking the Power of IVR: A Comprehensive Guide
Unlocking the Power of IVR: A Comprehensive Guide
vikasascentbpo
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Social Media App Development Company-EmizenTech
Social Media App Development Company-EmizenTechSocial Media App Development Company-EmizenTech
Social Media App Development Company-EmizenTech
Steve Jonas
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 

Mixing functional and object oriented approaches to programming in C#

Editor's Notes

  • #2: So this talk is titled ^ and it will be a summary of some of the ways we’ve made use of the functional style programming constructs introduced in C#3.0 on several projects I’ve worked on over the last year and a half.