This document discusses functional domain-driven design and the use of monads. It begins by stating that functional domain-driven design is still a work in progress. It then provides definitions of monads and functions as they relate to category theory. The document discusses how monads can be used with a functional approach to domain-driven design. It also includes brief biographical information about the software developer who posted this content.
Esoft Metro Campus - Diploma in Web Engineering - (Module II) Multimedia Technologies
(Template - Virtusa Corporate)
Contents:
What is a Database?
The Relational Data Model
Relationships
Normalization
Functional Dependency
Normal Forms
DBMS
What is MySQL?
PHP Connect to MySQL
Create a MySQL Database
Connect to Database
Close Database
Create a MySQL Table
Insert Data Into MySQL
Get Last ID
Insert Multiple Records
Prepared Statements
Select Data From MySQL
Update Data in MySQL
Delete Data From MySQL
Evolutionary Problems In Aspect Oriented Software Developmentkim.mens
Presented at ERCIM Evolution workshop @ ICSM 2007, inspired by and based on:
K. MENS & T. TOURWE.
Evolution Issues in Aspect-Oriented Programming.
Chapter in book on "Software Evolution", edited by T. Mens & S. Demeyer, pp. 197–224. Springer, 2008.
This presentation identifies evolution-related issues and challenges in aspect-oriented programming. It can serve as a guideline for adopters of aspect technology to get a better idea of the evolution issues they may confront sooner or later, of the risks involved, and of the state-of-the-art in the techniques currently available to help them in addressing these issues. We focus in particular on the programming level, although some of the issues and challenges addressed may apply to earlier software development life-cycle phases as well. The discussed issues range from the exploration of crosscutting concerns in legacy code, via the migration of this code to an aspect-oriented solution, to the maintenance and evolution of the final aspect-oriented program over time. We discuss state-of-the-art techniques which address the issues of aspect exploration, extraction and evolution, and point out several issues for which no adequate solutions exist yet. We conclude that, even though some promising techniques are currently being investigated, due to the relative immaturity of the research domain many of the techniques are not out of the lab as yet.
(video of these slides available here http://fsharpforfunandprofit.com/fppatterns/)
In object-oriented development, we are all familiar with design patterns such as the Strategy pattern and Decorator pattern, and design principles such as SOLID.
The functional programming community has design patterns and principles as well.
This talk will provide an overview of some of these, and present some demonstrations of FP design in practice.
Improving Correctness With Type - Goto Con BerlinIain Hull
A talk I gave at Goto Con Berlin in December 2015
http://workday.github.io/scala/2015/12/03
This talk is aimed at Scala developers with a background in object oriented programming who want to learn new ways to use types to improve the correctness of their code. It introduces the topic in a practical fashion, concentrating on the “easy wins” developers can apply to their code today.
Esoft Metro Campus - Diploma in Web Engineering - (Module II) Multimedia Technologies
(Template - Virtusa Corporate)
Contents:
What is a Database?
The Relational Data Model
Relationships
Normalization
Functional Dependency
Normal Forms
DBMS
What is MySQL?
PHP Connect to MySQL
Create a MySQL Database
Connect to Database
Close Database
Create a MySQL Table
Insert Data Into MySQL
Get Last ID
Insert Multiple Records
Prepared Statements
Select Data From MySQL
Update Data in MySQL
Delete Data From MySQL
Evolutionary Problems In Aspect Oriented Software Developmentkim.mens
Presented at ERCIM Evolution workshop @ ICSM 2007, inspired by and based on:
K. MENS & T. TOURWE.
Evolution Issues in Aspect-Oriented Programming.
Chapter in book on "Software Evolution", edited by T. Mens & S. Demeyer, pp. 197–224. Springer, 2008.
This presentation identifies evolution-related issues and challenges in aspect-oriented programming. It can serve as a guideline for adopters of aspect technology to get a better idea of the evolution issues they may confront sooner or later, of the risks involved, and of the state-of-the-art in the techniques currently available to help them in addressing these issues. We focus in particular on the programming level, although some of the issues and challenges addressed may apply to earlier software development life-cycle phases as well. The discussed issues range from the exploration of crosscutting concerns in legacy code, via the migration of this code to an aspect-oriented solution, to the maintenance and evolution of the final aspect-oriented program over time. We discuss state-of-the-art techniques which address the issues of aspect exploration, extraction and evolution, and point out several issues for which no adequate solutions exist yet. We conclude that, even though some promising techniques are currently being investigated, due to the relative immaturity of the research domain many of the techniques are not out of the lab as yet.
(video of these slides available here http://fsharpforfunandprofit.com/fppatterns/)
In object-oriented development, we are all familiar with design patterns such as the Strategy pattern and Decorator pattern, and design principles such as SOLID.
The functional programming community has design patterns and principles as well.
This talk will provide an overview of some of these, and present some demonstrations of FP design in practice.
Improving Correctness With Type - Goto Con BerlinIain Hull
A talk I gave at Goto Con Berlin in December 2015
http://workday.github.io/scala/2015/12/03
This talk is aimed at Scala developers with a background in object oriented programming who want to learn new ways to use types to improve the correctness of their code. It introduces the topic in a practical fashion, concentrating on the “easy wins” developers can apply to their code today.
Watch video (in Hebrew): http://parleys.com/play/53f7a9cce4b06208c7b7ca1e
Type classes are a fundamental feature of Scala, which allows you to layer new functionality on top of existing types externally, i.e. without modifying or recompiling existing code. When combined with implicits, this is a truly remarkable tool that enables many of the advanced features offered by the Scala library ecosystem. In this talk we'll go back to basics: how type classes are defined and encoded, and cover several prominent use cases.
A talk given at the Underscore meetup on 19 August, 2014.
Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages, enabling Java and other programmers to be more productive." This session is an introduction of Scala for Java developers.
Presentation & Fetured Video Included.
The talk starts from very basic concepts, but evolves to an advanced topic: a codebase free of runtime exception. It gives the programmer a good perspective of all the resources available to fill the language gaps to create a bullet-proof code.
This talk will explore inference from the perspective of protocols and generics and is based off a series of blog posts I've written(foxinswift.com) on the topic. In the first part of my talk casting number types through inference. I'll then show you struct serialization example demonstrating inferring a type through a mapping function. My last example will take you through inferring an associatedtype on a barebones promise implementation and we'll use it to in the context of making a network request. To finish things off I'll briefly speak on what's new in swift generics and some limitations of those features.
A talk I gave at Scala Days San Francisco March 2015
http://workday.github.io/scala/2015/03/17/scala-days-improving-correctness-with-types/
This talk is aimed at Scala developers with a background in object oriented programming who want to learn new ways to use types to improve the correctness of their code. It introduces the topic in a practical fashion, concentrating on the “easy wins” developers can apply to their code today.
http://event.scaladays.org/scaladays-sanfran-2015#!#schedulePopupExtras-6553
In this presentation, You will get to know about Function Literal,Higher Order Function,Partial Function,Partial Applied Function,Nested Function,Closures.
Você provavelmente já ouviu falar de Elm e suas promessas incríveis, mas você não quer reescrever tudo do zero, nem deixar a comunidade React. E se você pudesse ter todos os benefícios de Elm, enquanto ainda usa seus componentes React, misturando JavaScript e uma linguagem mais simples e poderosa, com um excelente sistema de tipos? Venha conhecer então PureScript e a biblioteca Pux!
How to scale pods and nodes under heavy load? On k8s / AKS we have few options, like horizontal-pod-autoscaler or cluster autoscaler.
In this talk I show these options through some examples.
Azure Search is a search-as-a-service cloud solution
that gives developers APIs and tools for adding a rich search experience
over private, heterogenous content in web, mobile, and enterprise applications.
How to build a monitoring system for docker from scratch and how to use Azure Operations Management Suite (aka OMS) to collect info about docker cluster deployment
Introduzione al protocollo websocket e come implementarlo "manualmente" in un'applicazione asp.net
SignalR: architettura di base, come utilizzare la libreria nei nostri progetti e come configurare i "backplane" per scenari di scale-out.
Quick-overview sulla nuova versione di SignalR per dot.net core
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfJay Das
With the advent of artificial intelligence or AI tools, project management processes are undergoing a transformative shift. By using tools like ChatGPT, and Bard organizations can empower their leaders and managers to plan, execute, and monitor projects more effectively.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
top nidhi software solution freedownloadvrstrong314
This presentation emphasizes the importance of data security and legal compliance for Nidhi companies in India. It highlights how online Nidhi software solutions, like Vector Nidhi Software, offer advanced features tailored to these needs. Key aspects include encryption, access controls, and audit trails to ensure data security. The software complies with regulatory guidelines from the MCA and RBI and adheres to Nidhi Rules, 2014. With customizable, user-friendly interfaces and real-time features, these Nidhi software solutions enhance efficiency, support growth, and provide exceptional member services. The presentation concludes with contact information for further inquiries.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Anthony Dahanne
Les Buildpacks existent depuis plus de 10 ans ! D’abord, ils étaient utilisés pour détecter et construire une application avant de la déployer sur certains PaaS. Ensuite, nous avons pu créer des images Docker (OCI) avec leur dernière génération, les Cloud Native Buildpacks (CNCF en incubation). Sont-ils une bonne alternative au Dockerfile ? Que sont les buildpacks Paketo ? Quelles communautés les soutiennent et comment ?
Venez le découvrir lors de cette session ignite
Navigating the Metaverse: A Journey into Virtual Evolution"Donna Lenk
Join us for an exploration of the Metaverse's evolution, where innovation meets imagination. Discover new dimensions of virtual events, engage with thought-provoking discussions, and witness the transformative power of digital realms."
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Mind IT Systems
Healthcare providers often struggle with the complexities of chronic conditions and remote patient monitoring, as each patient requires personalized care and ongoing monitoring. Off-the-shelf solutions may not meet these diverse needs, leading to inefficiencies and gaps in care. It’s here, custom healthcare software offers a tailored solution, ensuring improved care and effectiveness.
Into the Box Keynote Day 2: Unveiling amazing updates and announcements for modern CFML developers! Get ready for exciting releases and updates on Ortus tools and products. Stay tuned for cutting-edge innovations designed to boost your productivity.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
Even though at surface level ‘java.lang.OutOfMemoryError’ appears as one single error; underlyingly there are 9 types of OutOfMemoryError. Each type of OutOfMemoryError has different causes, diagnosis approaches and solutions. This session equips you with the knowledge, tools, and techniques needed to troubleshoot and conquer OutOfMemoryError in all its forms, ensuring smoother, more efficient Java applications.
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
4. A monad is a triple (T, η, μ) where T is an
endofunctor T: X->X and η: I->T and μ: T x T-
>T are 2 natural transformations satisfying these
laws:
• Identity law: μ(η(T)) = T = μ(T(η))
• Associative law: μ(μ(T × T) × T)) = μ(T ×
μ(T × T))
A monad in X is just a monoid in the
category of endofunctors of X, with product
× replaced by composition of endofunctors
and unit set by the identity endofunctor
What is a monad?
5.
6. software developer @ codiceplastico
@amelchiori
alessandro@codiceplastico.com
About me
8. let myString = "original value"
let myString = "new value”
Immutability: values, not variables!
Duplicate definition of value ‘myString’
9. let add x y = x + y
add 2 2
x:int -> y:int -> int
Type inference
10. void ProcessItems(Item[] items, Action<Item> action)
{
for(int i = 0; i < items.Length; i++)
{
var item = items[i];
action(item);
}
}
Recursion
11. let rec processItems action = function
| [] -> ()
| head :: tail ->
action head;
processItems tail
Recursion
12. let add x y = x + y
x:int -> y:int -> int
Partial function application
let add5 x = add 5
x:int -> int
let value = add5 10
(value = 15)
13. let f x = x * x
x:int -> int
let g x = -x/2 + 5
x:int -> int
Functions composition
let (<<) f g x = f (g x)
('b -> 'c) -> ('a -> 'b) -> 'a -> ’c
let h x = f << g
x:int -> int
14. let square x = x * x
let add x y = x + y
let toString x = x.ToString()
let complexFunction x = toString (add 5 (square x))
Pipeline operator
let (|>) x f = f x
let complexFunction x = x |> square |> add 5 |> toString
15. let div x y = x / y
x:int -> y:int -> int
div 10 5 // 2
div 10 0 // System.DivideByZeroException
Option type
let safeDiv x y =
if y = 0 then None
else Some(x/y)
x:int -> y:int -> int option
16. let safeDiv x y =
match y with
| 0 -> None
| _ -> Some(x/y)
Pattern matching
let safeDiv x y =
match y with
| 0 -> None
| 1 -> Some(x/y)
Incomplete pattern matches on this expression.
For example, the value '2' may indicate a case not covered
by the pattern(s)
17. type State =
| On
| Off
let x = On
let y = Off
Discriminated unions
18. let div (x, y) = …
(int * int) - > int
Tuples
let div (x, y) =
match (x, y) with
| (_, 0) -> None
| (_, _) -> Some(x/ y)
19. type site = { Title : string; Url : string }
Records
let homepage =
{ Title = "Google"; Url = "http://www.google.com" }
let next = { homepage with Title = "NextPage" }
21. public class Company
{
public String BusinessName { get; set; }
public String TaxCode { get; set; }
public String VatNumber { get; set; }
public String AssignedBank { get; set; }
public Boolean IsBankAuthorized { get; set; }
}
22. Value object
An immutable object, like money or a date
range, whose equality isn't based on identity
(in general equality is based on all fields
equality)
Martin Fowler
23. Value object
An immutable object, like money or a date
range, whose equality isn't based on identity
(in general equality is based on all fields
equality)
Martin Fowler
24. public class CompanyProfile
{
public String BusinessName { get; private set; }
public String TaxCode { get; private set; }
public String VatNumber { get; private set; }
public CompanyProfile(String businessName, String taxCode,
String vatNumber=null)
{
// check if parameters are valid
BusinessName = businessName;
TaxCode = taxCode;
VatNumber = vatNumber;
}
}
Value object
25. public class CompanyProfile
{
// same as before…
public override Boolean Equals(Object other)
{
var target = other as CompanyProfile;
return target == null ? false :
target.BusinessName == this.BusinessName
&& target.TaxCode == this.TaxCode
&& target.VatCode == this.VatCode;
}
public override Int32 GetHashCode()
{
// ...
}
}
Value object’s equality
26. type CompanyProfile = {
BusinessName : string;
TaxCode : string;
VatNumber : string
}
Value object in F#
option;
let profile = {
BusinessName = “CodicePlastico”;
TaxNumber = “1234567890”;
}
27. Ubiquitous Language is the concept of
defining a language (spoken and written)
that is equally used across developers and
domain experts
Ubiquitous language
28. public class Company
{
...
public String AssignedBank { get; set; }
public Boolean IsBankAuthorized { get; set; }
}
Ubiquitous language
29. Rule 1:
A company must have a bank to work with
Rule 2:
A company can be authorized to work with its
assigned bank
Rule 3:
A company can be not authorized to work with
its assigned bank
Business logic
31. type Bank = Bank of string
type UnauthorizedBank = UnauthorizedBank of Bank
type AuthorizedBank = AuthorizedBank of Bank
type AssignedBank =
| Unauthorized of UnauthorizedBank
| Authorized of AuthorizedBank
Business logic in F#
32. type CompanyProfile = {
BusinessName: string,
TaxCode: string,
VatCode: string option
}
type Bank = Bank of string
type UnauthorizedBank =
UnauthorizedBank of Bank
type AuthorizedBank =
AuthorizedBank of Bank
type AssignedBank =
| Unauthorized of UnauthorizedBank
| Authorized of AuthorizedBank
type Company = {
Profile: CompanyProfile,
Bank: AssignedBank
}
Ubiquitous language to the rescue
33. The central idea of specification is to
separate the statement of how to match
a candidate, from the candidate object
that it is matched against
Specification
34. type SpecificationResult =
| Success
| Failure of string
type Spec<'a> = 'a -> SpecificationResult
Specification
35. type Category =
| Default
| Premium
| Gold
type Customer = {
Name: string;
Category: Category;
}
Specification: our (simple) domain
type Item = {
Code: string;
Quantity: int;
}
type Order = {
Number: string;
Customer: Customer;
Items: Item list;
}
36. let isOrderFullFilled : Spec<Order> =
let p order =
match Seq.isEmpty order.Items with
| true -> Failure("Items' list empty")
| false -> Success
in p
let isGoldCustomer : Spec<Customer> =
let p customer =
match customer.Category with
| Gold -> Success
| _ -> Failure("No-gold customer")
in p
Specification
37. let And (left: Spec<'a>) (right: Spec<'a>) : Spec<'a> =
let p entity =
match left entity with
| Success -> right entity
| _ -> Failure("And specification is not satisfied")
in p
Specification
38. let order = {
Number = "1234";
Customer = { Name = "Alessandro"; Category = Gold};
Items = [
{ Code = "Code1"; Quantity = 1};
{ Code = "Code2"; Quantity = 2};
];
}
let isOrderValid = And
isOrderFullFilled
(adapt isGoldCustomer (fun order -> order.Customer))
let isValid = isOrderValid order
Specification
49. Cart.Apply(
Cart.Apply(
Cart.Apply(
Cart.Apply(null, new CartCreated { CartId=1}),
new ItemAddedToCart { CartId = 1, ItemId = "A"
}
),
new ItemAddedToCart { CartId = 1, ItemId = "B" }
),
new ItemRemovedFromCart { CartId = 1, ItemId = "A" }
)
Commands, events and…fold (step 5)
50. Executing a command:
type Exec =
( CartState * Command ) -> DomainEvent
Applying an event:
type Apply =
( CartState * DomainEvent ) -> CartState
Commands, events and…fold (step 6)
51. type Command =
| Create of string
| AddItem of int
| RemoveItem of int
| RemoveAllItems
| Checkout
type Event =
| Created of string
| ItemAdded of int
| ItemRemoved of
int
| AllItemsRemoved
| Checkedout
Commands, events and…fold (step 7)
52. type CartState = {
Name: string;
Items: List<int>;
Active: bool;
}
let apply state = function
| Created x -> { Cart.empty with Name = x }
| ItemAdded x -> { state with Items = List.append state.Items [x] }
| ItemRemoved x ->
{ state with Items = List.filter (fun i -> i <> x ) state.Items }
| Removed _ -> { state with Items = List.empty }
| Checkedout _ -> { state with Active = false }
Commands, events and…fold (step 8)
53. let domainEvents = [
Created("cart1");
ItemAdded(1);
ItemAdded(2);
Removed;
ItemAdded(3);
Checkedout;
]
let state = List.fold apply Cart.empty domainEvents
Commands, events and…fold (step 9)