Arts and Culture
More from Google
Get the Android app
Get the iOS app
Thoughts on Functional Programming Podcast by Eric Normand
An off-the-cuff stream of Functional Programming ideas, skills, patterns, and news from Functional Programming expert Eric Normand of LispCast.
Aug 2, 2020
What makes some API's become DSL's?
What causes an API to cross the line into becoming a DSL? Is it really a 'I'll know it when I see it' situation? I've been searching for an answer for years. And I think I found it in a paper I read recently for this podcast: Lisp: A language for stratified design. In this episode, we go over the main factor that makes an API a DSL: the closure property.
Jul 26, 2020
What is software design?
I've never been satisfied with the standard definition of 'software design'. Is the term useful? What could it mean that is useful? In this episode, I talk about some definitions that I don't agree with and explain my definition.
Jul 12, 2020
Why Functional Programming Matters
In this episode, I read excerpts from Why Functional Programming Matters by John Hughes. Does it answer the question of what is functional programming and why is it powerful?
1 hr 1 min
Jun 28, 2020
My response to Out of the Tar Pit
Out of the Tar Pit came out 14 years ago and it was a big influence on my thinking. I've thought a lot about it and I want to share some extensions and refinements of the ideas in the paper. Specifically, I hope to present a more objective definition of complexity and refine the idea of Essential vs. Accidental complexity.
Jun 22, 2020
Out of the Tar Pit
In this episode, I read excerpts from Out of the Tar Pit, a classic paper in the functional programming community.
1 hr 24 min
Mar 16, 2020
What is software architecture?
I try to define software architecture, both in the large and in the small.
Feb 3, 2020
The Early History of Smalltalk
We read one of the great articles by Alan Kay, inventor of Smalltalk.
1 hr 59 min
Jan 20, 2020
Lisp: A language for stratified design
In this first episode of season 3, we analyze a great paper called Lisp: A language for stratified design.
Dec 12, 2019
Year-end update 2019
I'm taking a break to retool for Season 3, which will start in the new year. I also give an update on Grokking Simplicity. I am working on Chapter 7.
Dec 5, 2019
Are monads practical?
Bruno Ribeiro asked a great question about the practical uses of monads. Are they useful? Why are they used so much in Haskell? In this episode, we briefly go over the history of monads in Haskell and how they allow you to do imperative programming in a pure functional language.
Nov 25, 2019
Where does structural similarity come from?
In a recent episode, I said structural similarity comes from the algebraic properties of the relationships between things. But that's not the case. Rotislav mentioned in the comments that it actually comes from the structure in the relationships. I explore that idea in this episode.
Nov 21, 2019
Do you need immutability for functional programming?
Of course immutable data structures are great, but are they necessary for FP? Short answer is: no. There's a lot of functional ideas and perspectives that can be applied even if you don't have them. And you can always make things immutable through discipline. In this episode, we explore those two ideas.
Nov 18, 2019
Algebra is about composition
When we look at the definitions of algebraic properties, we often see that we are defining how things compose. This is one of the main advantages of using algebraic properties to constrain our operations. If we define how they should compose before we implement them (as a unit test, for instance) we can guarantee that things will compose.
Nov 14, 2019
What do product and sum types have to do with data modeling?
Product and sum types allow us to exactly model any number of states with a lot of flexibility.
Nov 11, 2019
Can you have a clean domain model?
I was asked a great question by a listener about whether it's always possible to find a good domain model. Sometimes, the business rules are so messy, how can we find something clean and stable? In this episode, I explore how we can find a stable and clean domain model within the chaos.
Nov 7, 2019
What is abstraction?
We use the term 'abstraction' all the time. But what does it mean? If it's such an important concept, we should have a clear idea of its meaning. In this episode, I go over two related definitions from two important sources.
Nov 4, 2019
Why does stratified design work?
Stratified design is one where you build more specific things on top of more general things, typically with many layers. But why is this powerful? In this episode, we explore why it's sometimes easier to solve a more general problem than a specific one.
Oct 31, 2019
Why are algebraic properties important?
We often write software to automate an existing physical process. But what makes this possible? When translating from physical to digital, something must be preserved. In this episode, we look into what is preserved across that translation and why algebraic properties might help us find it.
Oct 28, 2019
Functional programming is a set of skills
Definitions of functional programming disagree with each other and often don't encompass the broad range of languages and practices we find in industry. The definitions also make it seem incompatible with other paradigms, such as object-oriented and procedural. However, if you look at FP as a set of skills, both problems are solved. We can find skills that functional programmers tend to use and not be incompatible. In this episode, I explore some important, high-level skills that functional programmers employ.
Oct 24, 2019
The commercialization of computers
Computer commercialization set research back decades and we still haven't recovered. I explore why that is and end on some hopeful notes.
Oct 21, 2019
Two kinds of data modeling
Through conversations, I've realized that there's two kinds of data modeling that are distinct. They have their own constraints and needs and, consequently, their own techniques. In this episode, I explore what makes them different.
Oct 17, 2019
What are product and sum types?
Product and sum types are collectively known as 'algebraic data types'. These are two ways of putting types together to make bigger types. Product types multiply their states, while sum types add them. With these two 'operations', we can precisely target a desired number of states. In this episode, we explore how we can eliminate corner cases with algebraic data types.
Oct 14, 2019
Why do I prefer Clojure to Haskell?
I prefer Clojure to Haskell. It's probably mostly due to accidents of history: getting in Lisp at an earlier age, spending more time with Lisp, and only having one Haskell job. But I do have some philosophical differences with the Haskell philosophy as it relates to Haskell as an engineering tool. In this episode, I go over four of them, and try to relate them with anecdotes.
Oct 10, 2019
Why do I like Denotational Design?
Denotational Design is a abstraction design process created by Conal Elliott. I like it because it really asks you to step back and design the meaning of the abstractions before you implement them. In this episode, I talk about why I like it, what it is (step-by-step), and why it's not about static types.
Oct 7, 2019
What is the difference between a domain model and business rules?
Business rules are different from your domain model. What goes where? I hope to tease apart this important yet subtle distinction in this episode.
Sep 30, 2019
Where does the power of Nil Punning come from?
Nil punning does give power to Lispers. But where does the power come from? Is it that nil really is a great value? Or is it more about the design choices made? In this episode, we explore this question.
Sep 26, 2019
What is Nil Punning?
Nil punning is a feature of Lisp. It began when nil was both the empty list and the false value. Two meanings for the same thing led to the idea of punning. Lispers liked it. And now, Clojure carries the tradition forward. In Clojure, nil has different meanings in different contexts. Is it good? Is it bad? We explore it in this episode.
Sep 23, 2019
What is the Curse of Lisp?
What happens when your language is so powerful that small, independent teams can solve their problems without libraries? Does everyone flock to it? Or do you just get a lack of libraries?
Sep 19, 2019
What is an abstraction barrier?
Structure and Interpretation of Computer Programs talked about abstraction barriers as a way to hide the intricacies of data structures made out of cons cells. Is this concept still useful in a world of literal hashmaps with string keys? I say, yes, but in a much more limited way than before. In this episode, we go into what abstraction barriers are, why (and why not) to use them, and the limits of their usefulness.
Sep 16, 2019
In the onion architecture, how do you make business decisions that rely on information from actions?
I've gotten several questions about how to do X or Y in the Onion Architecture. It seems like giving the architecture a name has miscommunicated how simple it is. It's just function calls that at some point are all calculations. In this episode, I try to deconstruct what makes the onion architecture work. Spoiler: it's just function calls.
Sep 12, 2019
Can you use types with Data Orientation?
Are types compatible with data orientation? The short answer is ‘yes’. Types trade freedom of movement for clarity.
Sep 9, 2019
What is the benefit of data orientation?
Data orientation allows freedom of movement between layers of meaning. Each interpretation adds a layer of meaning. If the data were hidden, we would not be able to freely interpret it how we want. In this episode, we explore an example of what it means to move up and down the layers of meaning.
Sep 5, 2019
What is Data Orientation?
We often talk about data orientation in functional programming circles. It basically means programming with data, without hiding your data. Our software is information systems, so why not treat the data in the raw? In this episode, we dive into what is data, what data orientation is all about, and how you program with it.
Sep 2, 2019
What is a total function?
Total functions are functions that give you a valid return value for every combination of valid arguments. They never throw errors and they don’t require checks of the return value. Total functions help you write more robust code and simpler code, free from defensive checks and errors.
Aug 29, 2019
What is a continuation?
Continuations are a cool feature you often find in functional languages. In this episode, we look at what they are, why you’re probably already using them, and the cool things you can do with them.
Aug 26, 2019
What kind of software is functional programming not suited for?
Functional programming cannot be suited for everything, right? Well, let’s not be so sure. Functional programming, like imperative programming and object-oriented programming, is a paradigm. It is a fundamental way to approach software. There are many languages that fall within the umbrella of FP. It is quite possible that everything we know how to do in software, we know how to do well with FP, the same way we know how to do it with imperative and with OOP.
Aug 21, 2019
Grokking Simplicity Launch
My new book, Grokking Simplicity, all about functional programming, is now available in early access. The first three chapters are ready to read. Go to https://lispcast.com/gs, add the book to the cart, and use discount code MLNORMAND for 50% off.
Aug 21, 2019
Monads in the real world
Monads are real, y’all. They are all around us. In this metaphor-free episode, I’ll share two real-world monads you interact with all the time. No burritos or space suits, I promise! Plus, we’ll see why monads are useful in Haskell.
Aug 18, 2019
What is the difference between parallelism and concurrency?
My favorite definitions of parallelism and concurrency come from Brian Goetz. They are not the traditional ones, which focus mostly on # of cores. In modern computing, we are sharing so many resources, parallelism and concurrency need to account for that. In this episode, we go over those definitions.
Aug 15, 2019
How do you develop algebraic thinking?
A few people have asked me how to develop Level 3 thinking. I’m not sure. But I’ve got some directions to try. In this episode, I go over 3 and a half ways to develop algebraic thinking.
Aug 12, 2019
What is an algebra?
Level 3 of functional thinking is all about algebraic thinking. But what do I mean by algebra? In this episode, I try to distill down the characteristics of an algebra and explore why algebras are worth developing.
Aug 5, 2019
What is a calculation?
Level 1 of functional thinking is to distinguish between actions, calculations, and data. But what is a calculation? In this episode, we go over what it is, how to recognize them, and how to implement them. By the end, you should understand why they are so important to functional programming.
Aug 1, 2019
What is so great about object oriented programming?
Because I promote functional programming, people often take what I say to mean that I don’t like OO. However, I think there’s a lot of cool stuff in OO. In this episode, I go over three or four things I think OO does really well.
Jul 31, 2019
Why should you throw away all of your code?
You should throw away your code and try again, because it will make you a better programmer to try the same problem multiple times. Each time you can try a new style or approach to solving it. That’s how you get better.
Jul 29, 2019
What is Data Modeling?
Data Modeling is a common technique in functional prgramming. It means capturing the essence of the concepts of your domain, their attributes, and their relationships in data.
Jul 25, 2019
What is an action? (better edit)
Functional programmers divide up their code into three categories: actions, calculations, and data. Actions are everything that can have an effect on the world, or anything that can be affected. In this episode, we go deep into what it means to be an action.
Jul 21, 2019
What is tail recursion?
Tail recursion is a kind of recursion that won’t blow the stack, so it’s just about as efficient as a while loop. Unfortunately, not all platforms support tail call removal, which is necessary for making tail recursion efficient. We talk about what it is and how to do it, even if your language doesn’t support it.
Jul 18, 2019
What is memoization?
Memoization is a higher order function that caches another function. It can turn some slow functions into fast ones. It saves the result of a function call after the first time to the cache, so if you call the function again with the same arguments, it will find it in the cache.
Jul 15, 2019
How does making something first class give you power?
Often, functionality starts off as code. It’s if statements and imperative ideas. But, over time, you notice patterns. Those patterns can be reified as data. And that gives us tremendous power. How so? We explore it in this episode.
Jul 10, 2019
Is there a silver bullet for software? (part 2)
We continue this exploration with the notion that maybe practices such as Agile, Design Thinking, etc., give us a means for eliminating essential complexity that we thought was necessary. Do we really need to implement everything? Maybe not.
Jul 7, 2019
Is there a silver bullet for software development? (part 1)
In The Mythical Man-Month, Fred Brooks argues that there is no improvement that can give us an order of magnitude increase in productivity. His main point is that most of what’s left to improve is essential complexity. But is that true? Can we throw in the towel and declare there is nothing left to improve?
Jul 3, 2019
Why getters and setters are terrible
Getters and setters kick the domain modeling can down the road. They leave the real design work to some other part of the code. They don’t do enough to protect the semantic integrity of the object. They’re terrible.
Jun 30, 2019
Why taming complex software?
My book is called Taming Complex Software. What’s that all about? In this episode, I go into why complexity is a major problem and how functional programming can help.
Jun 27, 2019
3 Examples of algebraic thinking
In a recent episode, I said algebraic thinking was the third level of functional thinking. In this episode, I give some concrete examples.
Jun 23, 2019
What is a higher-order function?
Higher-order functions are used a lot in functional programming. They are functions that take other functions as arguments or return functions as return values, or both. You’ll probably be familiar with map, filter, and reduce, which are higher-order functions. In this episode, we go kind of deep on them.
Jun 19, 2019
The 3 levels of functional thinking
I’ve noticed that people go through a certain journey when learning functional programming. I’ve classified it into three levels: 1) Distinction between Actions, Calculations, and Data; and learning to use them effectively 2) Higher-order thinking; and building abstractions from higher-order functions 3) Algebraic thiking; building coherent models with a focus on composition. This is a work in progress and I’d love your input.
Jun 16, 2019
What is functional thinking?
My book is coming out soon in early access. It’s called ‘Taming Complex Software: A Friendly Guide to Functional Thinking’. But what is ‘functional thinking’? In this episode, I explain the term and why I’m no longer redefining ‘functional programming’.
Jun 12, 2019
We make information systems
I often have to remind myself that we make information systems when we are programming for a business. My natural tendency, due to years of education, is to begin by creating a simulation. But this is not what we need to do. Instead of simulating a shopper going through a store, we need to model the information transfers that were captured in the pre-digital information system of pen-and-paper inventory and order management.
Jun 9, 2019
How to distinguish between commutativity and associativity
You confuse them a lot, and it’s not your fault. They are similar in that they are both about order. Associativity is about the order of operations, and commutativity is about the order of arguments. We go through some examples to help clear up the distinction.
Jun 5, 2019
Why side-effecting is not all bad
We run our software for its effects, so effects are necessary. We can’t write 100% pure code. But I contend that some effecting code is better than others. In other words, there is a spectrum from bad effecting code to good effecting code. Even if you can’t turn an action completely into a calculation, you should still strive to minimize implicit inputs and outputs.
Jun 3, 2019
What is an inverse, and why is it useful?
Inverses are everywhere. They let us undo an action. For instance, I can open a door and close it. Why do we want to do this? Because there are things I can do with the door open, and other things I can do with it closed. We need this same flexibility in our computer programs.
May 29, 2019
What makes a repl?
There’s a lot of discussion on Twitter about whether Node has a repl or Python has a repl. Do they have repls? How can we tell? Well, my opinion is that what’s important is how it’s used, not a set of features.
May 26, 2019
How is Haskell faster than C?
Haskell is very competitive with C, and on some benchmarks, it is faster. How is that possible? With all that Haskell does on top of the raw C code, how can it possibly be faster? In this episode, I talk about two advantages of Haskell that can make it faster than C.
May 22, 2019
What is a functor?
Functors are an operation that has a structure preserving property. But what is that? Are these things practical? Does it have anything to do with the real world? Of course! To be useful, it must derive from real-world things we see all around us. This one is an assembly line. How? That’s what this episode is all about.
May 20, 2019
Why am I podcasting about functional programming?
I received a negative YouTube comment. Normally, I ignore those, but this one insulted you, my audience. So I address it. Why am I podcasting about functional programming? What teaching techniques do I employ to help people learn?
May 15, 2019
Is your layer of indirection actually useful?
There’s a cliche: any problem can be solved with another layer of indirection. That’s true, but does your brilliant idea for a new layer of indirection actually solve a problem? In this episode, we explore this question and develop a rule of thumb for evaluating layers of indirection.
May 12, 2019
What a monoid is and why monoids kick monads’ butt
Everyone talks about monads but monoids are where it’s at. Monoids are simple and make distributed computation a breeze. In this episode, we learn the two properties that make an operation a monoid, and how to use it do distributed computation.
May 8, 2019
How do you implement lazy evaluation?
Lazy evaluation is easily implemented in any language that can create first-class computations. That means functions or objects. In this episode, I explain how to implement a Delay, which is a reusable lazy component that is common in functional programming languages.
May 5, 2019
What is lazy evaluation?
Lazy evaluation is a common technique in functional programming for separating two concerns: how you generate a value from whether/when you actually generate it. We look at the two different kinds of laziness and the benefits it gives you.
May 1, 2019
How is recursion like a for loop?
People think recursion is hard but it’s no harder than a for loop. In fact, it’s got the same parts, they’re just not laid out in the same way. In this episode, we look at how you can spot those three parts in any recursive function.
Apr 28, 2019
Why do programmers put up with so much pain?
If you’re using a less popular language, it may seem like there is a ton of pain there. But there’s pain everywhere. Every stack has its own problems. The key is you need to pick the pain you want to live with.
Apr 24, 2019
Can you always find a layer of meaning in which your problem is easier?
I’ve always found switching languages to be educational. I learn a lot. It always makes me wonder what I might learn from a non-existing language that I would bring back to my favorite languages.
Apr 21, 2019
What is point-free style?
Point-free style is a way of defining functions with a very simple constraint: you cannot name arguments or intermediate values. How can you possibly do that? Well, with higher-order functions, of course. For instance, with function composition, you can define a new function without naming the arguments. Some languages, like the APL family, or Haskell, let you do this very easily.
Apr 17, 2019
What is referential transparency?
Referential transparency is a term you’ll hear a lot in functional programming. It means that an expression can be replaced by its result. That is, 5+4 can be replaced by 9, without changing the behavior of the program. You can extend the definition also to functions. So you can say + is referentially transparent, because if you call it with the same values, it will give you the same answer.
Apr 14, 2019
Why you shouldn’t hide your data
In OOP, we wrap our data in an interface, which is called implementation-hiding or data-hiding. In functional programming, we don’t do that. We use our data in the nude. We pass the data around and allow the context to interpret the data as it seens fit. In this episode, we look at this significant difference between OOP and FP and how to do it.
Apr 10, 2019
What are higher-order functions?
Higher-order functions are functions that take a function as an argument and/or return a function. We use them a lot in functional programming. They are a way to define reusable functionality, as we do with map, filter, and reduce.
Apr 7, 2019
What is function composition?
Function composition is taking the return value of one function and passing it as an argument to another function. It’s common enough that functional programmers have turned it into its own operation. In this episode, we go deep into why it’s important and how you can use it and write it yourself.
Apr 3, 2019
What does it mean for a function to have a zero?
Some functions have a special value that will stop computation. For instance, multiplication will stop if you multiply zero by anything. We can use this property to our advantage.
Mar 31, 2019
What is a function’s identity?
Some functions have identities, which are values that tell you where to start calculating. In this episode, we look at what identities are, some examples of them, and how you can use them in your own code. Transcript Eric Normand: Is a function’s identity? By the end of this episode, you’ll know what an identity is and how to use them in your code. My name is Eric Normand. I help people thrive with functional programming. This is an important topic because many common operations, operations we use every day, have identities. You might not know that term, but you’ve definitely used them. It’s a fundamental idea from algebra, and it tells us where to start an operation. Basically, it’s the value you start with. When you’re counting, you’re going to start at zero. You don’t start at one. Before you start counting, you’re at zero, then the first thing you count down when it gets to one. Counting is just adding one each time. Zero is the identity value of addition. Multip…
Mar 28, 2019
Promises are more popular than ever. They make our code better than callbacks. But why? In this episode, I dive deep into why promises are better than callbacks, and it’s not just about indentation.
Mar 24, 2019
What are first-class functions?
First-class functions are functions that can be treated like any other value. You can pass them to functions as arguments, return them from functions, and save them in variables. In this episode, we talk about why they are important for functional programming and what features we require of them
Mar 20, 2019
Where to find time to learn functional programming?
It can be really hard to find time to learn a new language or new paradigm. How can you find the time you need? In this episode, I share 5 tips for setting yourself for success when you’re learning functional programming.
Mar 17, 2019
Do locks slow down your code?
Yes. Locks slow down your code. But they enable your code to be correct! It’s a tradeoff, but who would ever trade correctness for a little speed? In this episode, we look at the tradeoff, how to make locks less of a speed tradeoff, and some alternatives.
Mar 14, 2019
What is idempotence?
Idempotence means duplicates don’t matter. It means you can safely retry an operation with no issues. The classic example is the elevator button: you press it twice and it does not call two elevators. We explore why we would want that property in an email server.
Mar 10, 2019
What is commutativity and why is it so useful in distributed systems?
Commutativity is an algebraic property that means that order doesn’t matter. Because network messages arrive out of order, it’s the perfect property for distributed systems. In this episode, you’ll learn what it is (with some real world examples), why it’s useful, and 3 ways you can make an existing operation commutative.
Mar 6, 2019
What is associativity and why is it useful in parallel programming?
Associativity is an algebraic property that enables us to easily break up a job into smaller jobs, do the jobs, then recombine the results. Associativity is the essence of composition. In this video, we go over what associativity is, why we want to use it, when to use it, and 3 keys for making an operation associative.
Mar 3, 2019
What are timelines and what do they have to do with functional programming?
Timelines are a system I developed for modeling time in a distributed system. You will find timelines whenever you have multiple machines, multiple processes, multiple threads, or multiple async callback chains. Since virtually all software is distributed these days, modeling time is more important than ever. Functional programming may not have all the answers, but it is asking the right questions. In this episode, we go over what timelines are and how you can start to use them to model time in your software.
Feb 27, 2019
Cheap or free functional programming for your team
Hiring an on-site trainer can be expensive. But training itself doesn’t have to be expensive. In this episode, we go over 7 ways you can start training right away without breaking your budget.
Feb 24, 2019
What is recursion and when should I use it?
Recursion is associated strongly with functional programming. We do use recursion more than imperative programmers do. But we also use iteration. In this episode, we talk about what recursion is, how to use it, when to use it, and when not to use it.
Feb 20, 2019
What are side-effects?
In functional programming, people often use the term side-effect. But what does it mean? Side-effect is any external effect a function has besides its return value.
Feb 17, 2019
What are concurrency and parallelism?
What are concurrency and parallelism? What’s the difference? Concurrency is functional programming’s killer app. As we write more and more distributed systems on the web and on mobile, the sharing of resources becomes a major source of complexity in our software. We must learn to share these resources safely and efficiently. That’s what concurrency is all about.
Feb 13, 2019
What are race conditions?
What is a race condition? We look at what causes race conditions and some ways you can avoid them.
Feb 10, 2019
What are pure functions?
What are pure functions? I explore the definition, the term itself, and why functional programmers like pure functions.
Feb 6, 2019
How to apply the Onion Architecture
I got a lot of questions about how to apply the Onion Architecture to particular situations. In this episode, I try to answer it with a specific example.
Dec 6, 2018
How do you create a semantic base layer?
In stratified design, we are looking for layers of meaning, each one implemented on top of the last. But how do you go about building those in an existing codebase? While it remains more of an exploration than a step-by-step method, we can still describe some techniques that help find them. In this episode, I talk about four of them.
Dec 3, 2018
Tension between data and entity
There is always a tension in our programs between raw data and meaningful information. On the one hand, data is meaningless alone. On the other, we want to treat it as a thing with real semantics that constrain its usage. How do we live with both of these at the same time?
Nov 29, 2018
Is React functional programming?
Even though React modifies the DOM, it is considered functional programming. It’s not strictly functional, but it is easy to reason about because the DOM is its only output. FP concepts can help us understand React.
Nov 26, 2018
What is Event Sourcing?
Event Sourcing is an architectural pattern that shows up in many mature information systems. This is the fourth in my three-part architecture series.
Nov 22, 2018
Is there always a way to implement an algorithm without mutable state?
It’s tempting to use mutable state in your algorithm. It’s so convenient! And we’re so used to it, if we come from an imperative paradigm. But we must remember that there is always a way, even if it’s not immediately obvious. I go over two ways to implement an algorithm without mutable state.
Nov 19, 2018
What is the universal process pattern?
Part 3 of the functional architecture series. The universal process pattern is a schematic representation of software. For a software process to be useful, it needs input, it needs to calculate something from that input, and it needs to have some output or effect on the world.
Nov 15, 2018
What is the onion architecture?
Part 2 of the functional architecture series. When we’re structuring our functional software, we want to isolate the actions from the calculations. We can do that using the Onion Architecture, which has layers like an onion. The center of the onion is your domain model, then around that are your business rules. Finally, around that is your interaction layer, which talks with the outside world, including the database, web requests, api endpoints, and the UI.
Nov 12, 2018
More about Stratified Design
Part 1 in the Functional architecture series. The Stratified Design, which I called “layered design” before, is a way of architecting your code as a series of layers of meaning. It’s a common way of organizing your code and structuring your application.
Nov 8, 2018
Why is functional programming gaining traction? Why now?
The biggest companies in the world are investing heavily in functional programming. From Facebook building React and Reason, to Apple pivoting to Swift, to Google developing MapReduce, functional programming is gaining traction. But why? I go over four hypotheses and evaluate them.
Nov 5, 2018
Some thoughts on map, filter, and reduce
Are map, filter, and reduce popular for a reason? Do these things capture some essence of iteration? Are they just better for loops?
Nov 1, 2018
What do functional programmers think of the class inheritance hierarchy?
When a functional programmers looks at the typical OOP examples that show the inheritance hierarchy, they see something weird: why is one possible field plucked out to become the class? And why make it static?
Oct 29, 2018
Why do functional programmers focus on time?
It turns out that in distributed and parallel systems, time plays a huge role. I think that’s why fp is booming these days: all web sites are distributed systems. And web developers are facing all the irreducible problems of distributed systems, and they’re turning to fp for answers.
Oct 25, 2018
What is “to reify” in software?
To reify” means “to make real”. It’s an old concept from philosophy. When you name a concept, you can start talking about it. We do something similar in programming. When you take a concept and make it first class, you can begin to manipulate it with the normal programming constructs.
Oct 22, 2018
Why do functional programmers model things as data?
Functional programmers tend to prefer pure, immutable data to represent their domain. We talk about many of the benefits of such an approach. But we focus on one in particular: that good data representations can reduce complexity by reducing the number of if statements you need.
Oct 18, 2018
Sources of complexity in software
There are two sources of complexity in software: the complexity inherent in the domain (essential complexity) and the complexity we add as programmers due to the platform or due to bad programming practices (accidental complexity).
Oct 15, 2018
How do we represent relationships in functional programming?
Functional programmers tend to model important relationships using data, while OO programmers tend to represent them with references.
Oct 11, 2018
Single Responsibility Principle for Functional Programming
How do functional programmers use the Single Responsibility Principle?
Oct 8, 2018
How is a book a monad?
This ain’t no “a monad is a burrito” talk. This is a real-world monad, found in the wild. We look at how reading a book is monadic. It’s what lets you see a list of lines of words as a single stream of words.
Oct 4, 2018
Layered design in functional programming
Functional programmers often talk about creating layered designs, where each layer represents a coherent level of abstraction. It’s a way to organize your code.
Oct 1, 2018
Keeping functional code organized
People ask me how to keep functional code organized. It’s a good question but my answer is so simple, it feels kind of silly saying it: I keep everything in one file, and split it up as it grows.
Sep 27, 2018
What is software design?
Does the term “design” make sense in the context of code? I discuss Sandi Metz’s definition from her book Practical Object Oriented Design in Ruby.
Sep 24, 2018
How to create a habit of reuse
In OO languages like Java, people tend to make new classes more than they reuse existing ones. In Clojure and other FP languages, we tend more on the side of reuse. How do we develop that habit?
Sep 20, 2018
The easiest way to make your existing code more functional
What is the easiest way to make an existing functions more functional? It’s quite a simple technique and you can apply it today.
Sep 17, 2018
How does FP achieve reuse?
Functional programming gets its reuse by creating small components that are very well-defined. Small means they’re probably generally useful (like lists). Well-defined means they are easy to build on top of.
Sep 13, 2018
Why are actions hard to test by definition?
Functional programming divides the world into actions, calculations, and data. Actions are hard to test by definition, and we explore why.
Sep 10, 2018
How do things compose across domains?
A few episodes ago I talked about how things compose. But I didn’t get into how things compose across domains. For instance, how do actions compose with calculations? Let’s get into that, and what it reveals about our work as functional programmers.
Sep 6, 2018
Is functional programming declarative?
People often say that functional programming is a “declarative paradigm”. I push back against that categorization. I simply think the word is mostly meaningless.
Sep 3, 2018
How can you work with a JSON value if you know nothing about it?
I have talked about the difficulty of typing certain JSON values coming from some APIs. The JSON is just very complicated. When I do that, I often get this question “how can you work with a JSON value if you know nothing about it?” The question is rhetorical. Of course you can’t do anything if you know nothing about it. But we do know a ton! We just can’t (or it’s very difficult to) encode what we know as a type.
Aug 30, 2018
Is The Little Typer the static typing book I’ve been waiting for?
Dan Friedman’s The Little Typer is coming out in September. I’m very excited about this book. It’s about dependent types, and it claims to “demonstrate the most beautiful aspects”. I can’t wait!
Aug 27, 2018
Something I missed in Rich Hickey’s last keynote (Clojure/conj 2017)
I wrote my interpretation of Rich Hickey’s keynote. I called it “Clojure vs the Static Typing World”. However, I missed something very big. I missed that he talked about how common it was to have lots of sub-solutions and partial data. I expand on that idea here.
Aug 23, 2018
Are categories Design Patterns?
People often ask ‘what are the design patterns of functional programming?’ A common answer is that categories from category theory, like monads and functors, are the design patterns. But is that true? I explore the consequences of that answer.
Aug 20, 2018
Why is making something first-class the key to expressivity?
People often say that functional programming is more expressive. But how does FP achieve that? The key is by making things first-class.
Aug 16, 2018
How can pure functions represent state change?
Pure functions have no effect besides returning an immutable value. If that’s true, then how can we use them to represent changing state?
Aug 13, 2018
What is callback hell?
Aug 9, 2018
How is a cook like functional programming?
We look at a metaphor to explain the three domains in functional programming: actions, calculations, and data. I hope the metaphor makes some things clearer and can help people explain fp better to others.
Aug 6, 2018
What is the primary superpower of functional programmers?
Is there something that functional programmers do that, without that, you couldn’t really call them a functional programmer? Is there a power that all other powers are dependent on?
Aug 2, 2018
Does functional programming have an answer for everything?
Some might say that functional programming has the answers to solve the problems of concurrent, parallel, and distributed systems. But is that true? We explore what FP has to offer.
Jul 30, 2018
What does it mean to compose in functional programming?
We talk a lot about composition, but what does it mean? Each domain (action, calculation, data) has its own way to compose. In this quick episode, I explain each one.
Jul 26, 2018
Reduce complexity at every step
Postel’s Law states that a program should be liberal in what it accepts and strict in what it sends. What does this have to do with functional programming? How can this help us reduce complexity?
Jul 23, 2018
Why is Functional Programming more expressive?
I explore the idea that Functional Programming is more expressive than Procedural Programming (and why it is) using a metaphor of a pizza master.
Jul 19, 2018
What is Immutability?
Functional Programmers will talk about immutable values. What do they mean? How can you write software where none of the values change?
Jul 16, 2018
What does it mean for programs to be built using “whole values”?
John Hughes, FP researcher extraordinaire, says Whole Values is one of the principles of Functional Programming. But what does he mean? We explore this important concept.
Jul 12, 2018
How is Functional Programming like grocery shopping?
Our understanding of the real world has to be applicable to the software world. Our programming paradigms need to correspond to our intuitions of the real world.
Jul 9, 2018
Divide and conquer algorithms
The divide and conquer pattern is a widely used functional programming pattern. It lets you turn potentially hard problems into trivial problems and then recombine the answers.
Jul 5, 2018
The #3 most important idea in Computer Science
Well, this one is probably the most controversial. But I think the #3 most important idea has something to do with the problem of exponential growth of the number of possible states we can represent as we add bits to our system.
Jul 2, 2018
The #2 most important idea in Computer Science
In my opinion, the #2 most important idea is something that came directly out of computing. But I’m not so sure. Do you know? Let me know, too!
Jun 28, 2018
What is the business value of Clojure?
Is there some reason a business would choose Clojure over other languages? Let’s find out!
Jun 25, 2018
The #1 Most Important idea in Computer Science
The idea of the Universal Turing Machine is incredibly important. But does your language support both properties?
Jun 21, 2018
Is Smalltalk a Functional language? Is Lisp Object-Oriented?
Alan Kay says there are only 2 Object Oriented languages that he knows of: Smalltalk and Lisp. The deeper I go into the history of Smalltalk, the more functional Smalltalk looks.
Jun 18, 2018
Why do we need a Theory of Functional Programming?
Though I have gotten good reception for the theory in general, a few people have asked me why we need a theory. More people have told me I’m complicating Functional Programming, which should be a simple idea.
Jun 14, 2018
My big beef with refactoring
I love refactoring. It’s therapeutic. It helps productivity. But refactoring is not enough to write good software. We can’t just write it so it works then clean it up. In this episode, I explain why.
Jun 11, 2018
Build your Core Abstraction
With limited development time, where should you focus your efforts? You should build something timeless at the center of you application to create a strong foundation to build on top of. I call that you Core Abstraction.
Jun 7, 2018
Focus on composition first
Where should we start when we are designing out data structures–especially the data that we expect to last a long time. The answer is in the composition operations.
Jun 4, 2018
Build an interface around data
Clojure programmers often complain about data structures getting unwieldy and hard to understand. How can we prevent this?
May 31, 2018
Focus on the data first
What should we design first to make sure our software will last without having to constantly rework our code? We should focus on the data first because it is the most timeless.
May 28, 2018
How variants can reduce complexity
If we don’t limit it, complexity will get out of hand. One way to limit complexity is by collapsing the number of possible states down to a few known states that we know how to handle.
May 24, 2018
Why are corner cases the devil? 😈
Corner cases make for complex code. They multiply with each other. And as they multiply, they reduce the effectiveness of each new line of code.
May 21, 2018
What will increase your programming productivity the most?
Lisps have traditionally been highly interactive. This allowed AI researchers and language developers to iterate quickly and learn about what works and what doesn’t. How can you tap into this in your workflow?
May 17, 2018
A cool Functional Programming pattern. Do you know what to call it?
I use this pattern all the time when I’m programming, and I don’t know if it has a name. It involves lifting a value into a new space, solving a problem with it, then lowering it back down.
May 14, 2018
Can you do Functional Programming in any language?
Can you do functional programming in any language? Is it possible to do functional programming in C, in Java, in assembly, in Ruby, or do you need a functional language? What is a functional language anyway?
May 10, 2018
What does it mean for Actions to be first-class?
In Functional Programming, everything needs to be first class? But what does that mean? And why is it important? I discuss the idea of composing Actions and Calculations dynamically.
May 7, 2018
Should we waste memory?
We have so much memory now, compared to the 1970s, that it often seems like we have memory to burn. I misspoke in a previous episode where I made it seem like I’m in favor of wasting memory. But what did I mean instead?
May 3, 2018
Is FP just programming with pure functions?
As I develop and expound this theory, it may seem to be too complicated. Isn’t functional programming just programming with pure functions? Why make this more complicated than that? We talk about my reasons and my goals for the theory.
Apr 30, 2018
The magical leverage of languages
If I write a straightforward solution to a problem in Clojure, it might take me a thousand lines of code to solve it. To handle all the corner cases and everything, I got a thousand lines of code. However, if I take this other approach where it’s much more indirect, or instead of solving the problem that I have in front of me, I write a language–a DSL. The DSL could take me 500 lines of code to write. That’s a fairly large DSL. Usually they’re much smaller, but it takes me 500 lines of code. Actually, writing the solution in it only takes 10 lines of code.
Apr 26, 2018
Algebraic Properties and Composition
In school, we learn about a few algebraic properties. These apply very well in functional programming because their expression is so simple, their definitions are so simple and they really focus on how things compose.
Apr 23, 2018
Bottom up vs Top Down Programming
I think the real trick to all of that is always think about the data as being forever. One thing that we often do when we’re programming is we want things to be a little bit more concrete.
Apr 19, 2018
What a Clojure Web Framework might look like
One of the questions that came up a couple times was what is a Web framework? What does that even mean? I don’t want to get into philosophical discussion about what a framework is. Is it a library or framework or any of those kinds of questions. I’ll tell you what I meant, what I still mean by this assertion that we need one.
Apr 16, 2018
A Theory of Functional Programming 0006
What I want to talk about is this issue of what is an action and what is a calculation in terms of timeliness, because we know that deep down in the computer, everything is an action. Every operation depends on what is that particular locations in memory at the time that the operation is run.
Apr 12, 2018
What Clojure needs to grow — a boring web framework and boring data science
I think a lot about what Clojure needs. Is there something that is sort of the bottleneck for growth? People talk about different things as their hypotheses for what would make it grow. I think that what Clojure needs — I’ll talk about my hypotheses — I think what we really need is to solve all of the boring problems that other languages have already solved.
Apr 9, 2018
Programming is a pop culture and what we should do about it
I want to talk about how programming is a pop culture. It’s true, programming is a pop culture. There are big trends, fads, new frameworks coming out all the time. It’s all about attention and getting mind share and people watching your media about what framework or what language to use, or how to program.
Apr 5, 2018
A Theory of Functional Programming 0005
There are different patterns that we use as functional programmers to reduce the possible states so that it becomes easier to reason about. I think that this is something that we should talk about a little bit more, because it’s actually something that isn’t talked about much in imperative programming.
Apr 2, 2018
A Theory of Functional Programming 0004
Today, we’re going to be talking actions. Now, as counter-intuitive as it may be, functional programming has more to say about actions than it does about data and calculations. At least, more interesting stuff to say.
Mar 29, 2018
A Theory of Functional Programming 0003
All right, this is my attempt at writing a book. If you haven’t joined me before, my name is Eric Normand. I’m writing a book called “A Theory of Functional Programming.” The industry needs a good definition of functional programming. No one has provided that yet, and so I’m trying to provide it.
Mar 28, 2018
A Theory of Functional Programming 0002
All right. I am talking about, “A Theory of Functional Programming,” which is a book that I’m working on, and this is actually me working on it right now. I am going to talk about the topic, and hopefully, the transcript will turn into my book. I talked about a lot of things last time. That was last Friday, and I know that the last thing I talked about was composition, and I don’t think I got very far into that, so I’ll talk about it.
Mar 2, 2018
A Theory of Functional Programming 0001
OK. I’m trying this out. I’m writing a book. I’m going to move. I’m writing a book. I think I’m going to call it, A Theory of Functional Programming.” Let me explain. Here is the reasoning. That’s bad lighting hold on. I’ll explain what I’m doing and I’ll explain the reasoning behind the book.