The document discusses the key concepts of functional programming including:
- Functional programming uses functions as building blocks and avoids mutable state and side effects.
- Pure functions, immutability, recursion, and function composition are important characteristics.
- Functional programming is well-suited for concurrency since immutable data prevents data races.
- Some benefits of functional programming include simpler code for complex problems, increased correctness from avoiding side effects, and ease of parallelization for concurrency.
[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...PROIDEA
Object-oriented programming languages have been here for decades, helping millions of developers to deliver (sort of) working software. Still, after many years, we still struggle with things like nulls and exceptions, which make our applications crash in most unexpected ways. So I have taken a challenge - can you use object-oriented language (C#) and write code in a way that those issues are almost gone? I will show how to leverage lessons learned from functional programming to make our applications more bulletproof - and fun to write as well!
FregeDay: Design and Implementation of the language (Ingo Wechsung)Dierk König
Talk by Ingo Wechsung at the FregeDay 2015, Sept 11th, Basel, Switzerland, covering general characteristics of the language, history, and important design decisions.
This slide notes are more than 10 years old of my teacher Mr Karim Zebari. He uses a brilliant simple language to explain programming principles step by step.
[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...PROIDEA
Object-oriented programming languages have been here for decades, helping millions of developers to deliver (sort of) working software. Still, after many years, we still struggle with things like nulls and exceptions, which make our applications crash in most unexpected ways. So I have taken a challenge - can you use object-oriented language (C#) and write code in a way that those issues are almost gone? I will show how to leverage lessons learned from functional programming to make our applications more bulletproof - and fun to write as well!
FregeDay: Design and Implementation of the language (Ingo Wechsung)Dierk König
Talk by Ingo Wechsung at the FregeDay 2015, Sept 11th, Basel, Switzerland, covering general characteristics of the language, history, and important design decisions.
This slide notes are more than 10 years old of my teacher Mr Karim Zebari. He uses a brilliant simple language to explain programming principles step by step.
FregeDay: Roadmap for resolving differences between Haskell and Frege (Ingo W...Dierk König
Diskusssion of what kind of differences there are between Haskell 2010 and Frege, how difficult they are to resolve, what their impact is, and what to do about them. Also: how to allow essential differences that will never work outside the JVM and demarcate them from supposed-to-be vanilla Haskell.
More information about the meetup this presentation was created for can be found at https://www.meetup.com/life-michael/events/255429951/ More information about our Python course (in Hebrew) can be found at http://python.course.lifemichael.com More information about our other courses and services can be found at http://www.lifemichael.com.
Talbott Crowell introduces F# 3.0 including function programming basics, units of measure, and the new F# 3.0 feature called Type Providers for analyzing Big Data
How can we implement concepts of Lambda Calculus and Category Theory in C# and F#:
- Lambda Calculus: The importance of expressions to build a robust and reasonable program flow
- Category Theory: How to apply functional concepts like functors, applicatives or monads to deal wit
FregeDay: Roadmap for resolving differences between Haskell and Frege (Ingo W...Dierk König
Diskusssion of what kind of differences there are between Haskell 2010 and Frege, how difficult they are to resolve, what their impact is, and what to do about them. Also: how to allow essential differences that will never work outside the JVM and demarcate them from supposed-to-be vanilla Haskell.
More information about the meetup this presentation was created for can be found at https://www.meetup.com/life-michael/events/255429951/ More information about our Python course (in Hebrew) can be found at http://python.course.lifemichael.com More information about our other courses and services can be found at http://www.lifemichael.com.
Talbott Crowell introduces F# 3.0 including function programming basics, units of measure, and the new F# 3.0 feature called Type Providers for analyzing Big Data
How can we implement concepts of Lambda Calculus and Category Theory in C# and F#:
- Lambda Calculus: The importance of expressions to build a robust and reasonable program flow
- Category Theory: How to apply functional concepts like functors, applicatives or monads to deal wit
The New European PV Legislation: Issues and ChallengesSara Dunlap
A presentation by Dr. John Clark, President and Chief Medical Officer at PCSglobal, on European pharmacovigilance issues presented at the 2013 Regulatory Affairs Professional Society Annual Meeting. Major issues and challenges posed by EU (European Union) Regulations are covered in this presentation.
عروض المنتجات من موقع سوق مصر مركز التسوق على الانترنت الذى يقدم العديد من المنتجات ومنها الأجهزة الكهربائية و الموبايلات والكمبيوتر وأجهزة الاب توب والادوات المنزلية
http://www.souqeg.com
ConnectME: connecting content for future TV & videoconnectme_project
Today, media material is increasingly digital and shifting to delivery via IP and the Web,
including cultural artifacts or broadcast television. This opens up the possibility of new
services deriving added value from such material by combining it with other material
elsewhere on the Web which is related to it or enhances it in a meaningful way, to the
benefit of the owner of the original content, the providers of the content enhancing it and
the end consumer who can access and interact with these new services. Since the
services are built around providing new experiences through connecting different related
media together, we consider such services to be Connected Media Experiences
(ConnectME).
In particular, much rich depth of information and service functionality associated to
content in video is not derived today due to a lack of suitably granular description of
video, including linking of video objects to the concepts they represent. For example,
news reports about local tourism and events are not linked to tourist information and
event–related services which a viewer may (spontaneously) wish to access and make
use of.
The technological result of the ConnectME project will be an end-to-end service platform
to host those added-value services over different networks, providing the common
required functionality of each service: multimedia annotation and subsequent enrichment
with related content from the Web, combined with the packaging and delivery of
synchronized multimedia presentations to the end device. At the device, intuitive user
interfaces must be developed so that the selection of on-screen objects and the
browsing of the associated content can be done in a non-disruptive and intuitive fashion.
As a result, ConnectME facilitates a new interactive media experience built on top of the
convergence of TV/video and the Web.
O hinduísmo, o budismo, o confucionismo, o taoísmo, o xintoísmo, as religiões africanas, o judaísmo, o islamismo, o cristianismo, o catolicismo, o luteranismo, o metodismo, os batistas, o pentecostalismo, os quacres, o ateísmo, os agnósticos, os materialistas, os racionalistas, os marxistas e os humanistas. Esses são alguns dos temas investigados por três especialistas - entre eles Jostein Gaarder, autor de 'O mundo de Sofia' -, nesta enciclopédia sobre as religiões, as diferentes formas de religiosidade e, de maneira geral, as filosofias de vida.
Empirical Experiment on Navigation with Social TagsStefan Schweiger
An empirical experiment that investigates whether people search for information that is in line with their prior knowledge on the one hand and social information in the tag cloud on the other hand. The task was to find information on the treatment of depression. Results showed that people are biased towards psychotherapy compared to pharmacotherapy in information search. However, prior information before the search task and social information by means of tag clouds were sufficient to diminish the bias.
Designing function families and bundles with java's behaviors parameterisatio...Alain Lompo
User requirements are sinking sands: should we care or should we leave it to the business managers? Java’8 behaviours parameterization and lambdas help shift paradigms from business to design: here the audience will learn how to efficiently deal with the issue and make their customers smile.
Functional Programming for OO Programmers (part 1)Calvin Cheng
The Why and Benefits of Functional Programming paradigm. Part 2 with source code can be found here: http://www.slideshare.net/calvinchengx/functional-programming-for-oo-programmers-part-2
Related source code https://github.com/calvinchengx/learnhaskell
In this session you will learn about
- Introduction of Languages
- Difference between POP and OOP
- What is OOP?
- Object-Oriented Programming
- Advantages of OOP
- Object-Oriented Programming Paradigm
- Features of OOP
- Applications of Object Oriented Programming
- Benefits of Object Oriented Programming
“Lambdas in JAVA 8 is not for what they can do, It is about how we write Program”
It enables Functional Programming, It Adds a New nucleotides in the DNA of Java.
There is a Change in “The Climate” to change our Ways.
Functional Browser Automation Testing for NewbsBryan Arendt
Functional programming is reemerging in popularity but can be difficult for you to use at your day job. At the same time automated browser testing is very practical and has become something that every developer can at least dip their toe in. Canopy, a simple framework in F# on top of Selenium for writing UI automation and tests, can be a great way to start learning a functional language. This talk will explore some of the basic functional concepts targeting those are new to functional programming and show how they can be practically used to automate your browser testing.
LESSON 4: INTRODUCING FUNCTIONS AND MODULAR DESIGN
Learn about Functions in Python. Advantages and disadvantages of functions. Introduction to Modular design. Local and Global Variables and their use. Passing parameters. What are arguments? Big questions: Evolution vs Intelligent design in light of functions (and modular design). A closer look at Robotics and advances in this field. Challenges and tasks including with solutions. Suggested research/HW and YouTube video recommendations. A note on Python’s built in functions.
KernelF is a functional language built on top of MPS. It is designed to be highly extensible and embeddable in order to support its use at the core of domain-specific languages, realising an approach we sometimes call Funclerative Programming. 'Funclerative' is of course a mash-up of 'functional' and 'declarative' and refers to the idea of using functional programming in the small, and declarative language constructs for the larger-scale, often domain-specific, structures in a program. We have used KernelF in a wide range of languages including health and medicine, insurance contract definition, security analysis, salary calculations, smart contracts and language-definition. In this keynote, I illustrate the evolution of KernelF over the last two years. I discuss requirements on the language, and how those drove design decisions. I showcase a couple of the DSLs we built on top of KernelF to explain how MPS was used to enable the necessary language modularity. I demonstrate how we have integrated the Z3 solver to verify some aspects of programs. I present the architecture we have used to use KernelF-based DSLs in safety-critical environments. I close the keynote with an outlook on how KernelF might evolve in the future, and point out a few challenges for which we don't yet have good solutions.
Welocme to ViralQR, your best QR code generator.ViralQR
Welcome to ViralQR, your best QR code generator available on the market!
At ViralQR, we design static and dynamic QR codes. Our mission is to make business operations easier and customer engagement more powerful through the use of QR technology. Be it a small-scale business or a huge enterprise, our easy-to-use platform provides multiple choices that can be tailored according to your company's branding and marketing strategies.
Our Vision
We are here to make the process of creating QR codes easy and smooth, thus enhancing customer interaction and making business more fluid. We very strongly believe in the ability of QR codes to change the world for businesses in their interaction with customers and are set on making that technology accessible and usable far and wide.
Our Achievements
Ever since its inception, we have successfully served many clients by offering QR codes in their marketing, service delivery, and collection of feedback across various industries. Our platform has been recognized for its ease of use and amazing features, which helped a business to make QR codes.
Our Services
At ViralQR, here is a comprehensive suite of services that caters to your very needs:
Static QR Codes: Create free static QR codes. These QR codes are able to store significant information such as URLs, vCards, plain text, emails and SMS, Wi-Fi credentials, and Bitcoin addresses.
Dynamic QR codes: These also have all the advanced features but are subscription-based. They can directly link to PDF files, images, micro-landing pages, social accounts, review forms, business pages, and applications. In addition, they can be branded with CTAs, frames, patterns, colors, and logos to enhance your branding.
Pricing and Packages
Additionally, there is a 14-day free offer to ViralQR, which is an exceptional opportunity for new users to take a feel of this platform. One can easily subscribe from there and experience the full dynamic of using QR codes. The subscription plans are not only meant for business; they are priced very flexibly so that literally every business could afford to benefit from our service.
Why choose us?
ViralQR will provide services for marketing, advertising, catering, retail, and the like. The QR codes can be posted on fliers, packaging, merchandise, and banners, as well as to substitute for cash and cards in a restaurant or coffee shop. With QR codes integrated into your business, improve customer engagement and streamline operations.
Comprehensive Analytics
Subscribers of ViralQR receive detailed analytics and tracking tools in light of having a view of the core values of QR code performance. Our analytics dashboard shows aggregate views and unique views, as well as detailed information about each impression, including time, device, browser, and estimated location by city and country.
So, thank you for choosing ViralQR; we have an offer of nothing but the best in terms of QR code services to meet business diversity!
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
1. OOP makes code understandable by encapsulating
moving parts. FP makes code understandable by
eliminating moving parts.
Riccardo Terrell – Silicon Valley Code Camp
2014
— Michael Feathers
(author of Working with Legacy
Code)
2. Agenda
History and influence of Functional Programming
Functional vs Imperative Programming
What is Functional Programming
Functional Programming characteristics
Why Functional Programming
3. History
LISP
ISWIM
APL
ML
1973
FP
1958 1966
1962
1977
2005F# Clojure
1988Haskell
Scala 2003
2007
Ocam
1996
l
1930
-ish
1986Erlang
λ
4. Functional Programming
Influence
Continue Evolution of GC – Lisp ~1958
Generics – ML ~ 1973
In early 1994, support for lambda, filter, map, and reduce was added to
Python
List comprehension - Linq in C# 3.0 and Java 8
First-class functions were also introduce Visual Basic 9, C# and C++ 11
Java 8 supports lambda expressions as a replacement for anonymous
classes
Is Lazy Evaluation is part of the main stream languages such as C#
Type Inference, example is the “var” keyword in C#
Programming in a functional style can also be accomplished in languages that aren't
5. Objectives
Use functions as building block and composition to solve
complex problem with simple code
Immutability and Isolation are your best friends to write
concurrent application
Concurrency and reliability are becoming more and more required,
FP will help you!
Functional and imperative styles should NOT stand in opposition
…
… they should COEXIST
Poly-paradigm programming is more powerful and effective
than polyglot programming
6. FP vs OOP the Paradigm-
Switch
Functional Programming may look
scary for an object-oriented
developer because of all the strange
buzzwords like Functor, Referential
Transparency, Monads, etc., but they
are really just unfamiliar terms.
Object-oriented programming can be
a scary one with all its concepts, e.g.
polymorphism, encapsulation,
inheritance, covariance, etc.
?@#?%!
7. FP OOP Key Concepts
Functional Programming is different in many ways from a
standard imperative language, but there are a few major
differences that are particularly important to understand:
Function-oriented
not
object-oriented
Expressions
rather than
Statements
Immutable
rather than
mutable
8. What is "Functional
Programming?"
Functional programming is just a style, is a programming paradigm
that treats computation as the evaluation of functions and avoids
state and mutable data…
“Functions as primary building blocks” (first-class functions)
programming with “immutable” variables and assignments, no state
Programs work by returning values instead of modifying data
9. What is "Functional
Programming?"
Functional programming is so called because a program consists entirely of
functions.
First class
Higher-Order
Functions
Immutability
Declarative
λ
… is all about functions! Identifying an abstraction and building a function,
use existing functions to build more complex abstractions, pass existing
functions to other functions to build even more complex abstractions
11. Higher-Order functions
A higher-order function is a function that takes another function as a
parameter, or a function that returns another function as a value, or a
function which does both.
12. Pure Functions - Properties and
Benefits
A function always gives the same output value for a given
input value
I can then cache the result
A Pure Function has no side effects
Pure functions can be executed in parallel
The function does not rely on any external state
Increased readability and maintainability
Pure functions can more easily isolated
easier testing and debugging
17. Unwanted Side Effects are Evil!
Side effects aren’t bad…
unwanted side effects are EVIL
and the root of many bugs!
One of the biggest advantages with functional
programming is that the order of execution of “side
effect free functions” is not important.
… “side effect free functions” are
easy to parallelize
18. Currying
Curry is a technique in which a function is applied to its
arguments one at a time, with each
application returning a new function
that accepts the next argument
Higher-order function enable
Partial Application and Currying
19. Partial Application
Partial Application refers to the process of fixing a
number of arguments to a function, producing
another function of smaller arity
With both currying and partial application, you supply argument values and return a
function that’s invokable with the missing arguments. But currying a function returns
the next function in the chain, whereas partial application binds argument values to
values that you supply during the operation, producing a function with a smaller arity
20. Immutability
Immutability is very important characteristic of FP but mostly is about transformation of
state… … Immutable data forces you to use a “transformational” approach
When you’re writing programs using
immutable types, the only “thing a method
can do is return a result, it can’t modify the
state of any objects
Immutable data makes the code predictable
is easier to work
Prevent Bugs
Concurrency is much simpler, as you don’t
have to worry about using locks to avoid
update conflicts
Automatic thread-safe, controlling mutable state in
22. Function Composition
Function Composition - Building with composition. Composition is the
'glue' that allows us build larger systems from smaller ones. This is the very
heart of the functional style. Almost every line of code is a composable
expression. Composition is used to build basic functions, and then functions
that use those functions, and so on.
Composition — in the form of passed parameters plus first-class functions
23. Using functions as building
blocks
A well-known principle of good design is to create a set of basic
operations and then combine these building blocks in various
ways to build up more complex behaviors
24. Compose Mario
Mario game sample, based on functional reactive Elm script (http://elm-lang.
org/edit/examples/Intermediate/Mario.elm)
The functions that depend on keyboard take the current keyboard state as the first argument. This is
represented as a tuple int*int (dir) consisting of x and y directions.
The step function of the game takes previous Mario value and returns a new one. It is composed from 4
functions that represent different aspects of the game.
27. Lazy Evaluation - Strict & Non-Strict
Evaluation
Lazy evaluation deferral of expression evaluation for as long
as possible until absolutely needed
Languages can be categorized as strict (eagerly evaluating
all expressions) or lazy (deferring evaluation)
Strict evaluation always fully evaluates
function arguments before invoking the
function
Lazy evaluation does not evaluate function
arguments unless their values are required to
evaluate the function call itself
28. Recursion is the new iteration
In functional programming “iteration” is ~usually~ accomplished via
recursion
Recursive function invoke themselves, Tail recursion is optimized by
compiler avoiding to maintain a stack ~stack over flow!
29. Recursion is the new iteration
In functional programming “iteration” is ~usually~ accomplished via
recursion
34. Why Functional Programming?
Changes the way you think about programming and problem
solving
Functional Programming promotes Composition and Modularity
Simple Code for Complex Problems
Declarative programming style
Concurrency, FP is easy to parallelize
Locking vs. immutable memory
Conciseness, less code (no null checking)
Correctness & Reduced bugs (immutability)
Rapid Prototyping
35. Concurrency
Modern computers come with
multiple processors, each
equipped with multiple cores, but
the single processor is slower
than used to be! Moore’s law
(http://en.wikipedia.org/wiki/Moore's_law)
… to achieve great performances the
application must be leveraging a
Concurrent Model
36. Concurrency
There is a problem…
the free lunch is over
Programs are not doubling in speed every
couple of years for free anymore
We need to start writing code to take
advantage of many cores
37. Concurrency… jams to avoid!
Parallel, asynchronous,
concurrent, and reactive
programs bring many
challenges because these
programs are nearly always
nondeterministic
This makes debugging/testing
challenging
Deadlocking
Not easy to program
38. Concurrency
Imperative and traditional
programming styles gives
us bad headaches
It’s difficult to turn existing sequential
code into parallel code
Using shared state and locks is
difficult
different threads can change the same
39. Concurrency
Functional programming feels
good:
Thanks to the immutability (and isolation),
we avoid introducing race conditions and we
can write lock-free code.
Using a declarative programming style
we can introduce parallelism into
existing code easily. We can replace a
few primitives that specify how to
combine commands with version that
executes commands in parallel
40. Concurrent Model Programming
An Agent is an independent computational
entity which contains a queue, and receives
IMMUTABILITY +
ISOLATION +
and processes messages
DECLARATIVE PROGRAMMING =
------------------------------------------------
It provides immutability and isolation
BEST CONCURRENT MODEL
PROGRAMMING
(it enforces coarse-grained isolation through message-passing)
43. Pipeline Processing
Pipeline according to Wikipedia:
A pipeline is a set of data processing elements
connected in series, so that the output of one element
is the input of the next one. The elements of a pipeline
are often executed in parallel or in time-sliced fashion;
in that case, some amount of buffer storage is often
inserted between elements
46. Pipeline Processing
Values processed in multiple steps
Worker takes value, processes
it, and sends it
Worker is blocked when source
is empty
Worker is blocked when target
is full
Steps of the pipeline run in
parallel
49. Functional Job Trend
Functional languages are
sprouting not just on the
JVM where the two most
interesting new languages
are Scala and Clojure, but
also on the .NET platform,
where F# is a first-class
citizen
http://www.itjobswatch.co.uk
50. Wrap-Up
Use functions as building block and composition to solve complex
problem with simple code
Immutability and Isolation are your best friends to write concurrent
application
Concurrency and reliability are becoming more and more required, FP will help you!
Functional and imperative styles should NOT stand in opposition
but…
…they should COEXIST
Poly-paradigm programming is more powerful
and effective than polyglot programming
51. Q & A ?
The tools we use have a profound (and devious!) influence on our
thinking habits, and, therefore, on our thinking abilities.
-- Edsger Dijkstra
53. How to reach me
github.com/DCFsharp
meetup.com/DC-fsharp/
@DCFsharp
rterrell@microsoft.com
Editor's Notes
Recursion to do not modify the list
Many people find functional programming elegant or even beautiful, but that’s hardly a good reason to use it in a commercial environment.
Elegance doesn’t pay the bills, sad to say.
One of the big reason for coding in a functional style is that it makes you and your team more productive.