Composing Software
$129.00
Minimum price
$179.00
Suggested price

Course Info

This course includes 5 attempts.

All software design is composition: the act of breaking complex problems down into smaller problems and composing those solutions. Most developers have a limited understanding of compositional techniques. It's time for that to change.

In "Composing Software", Eric Elliott shares the fundamentals of composition, including both function composition and object composition, and explores them in the context of JavaScript. The course covers the foundations of both functional programming and object oriented programming to help the reader better understand how to build and structure complex applications using simple building blocks.

You'll learn:

  • Functional programming
  • Object composition
  • How to work with composite data structures
  • Closures
  • Higher order functions
  • Functors (e.g., array.map)
  • Monads (e.g., promises)
  • Transducers
  • Lenses

All of this in the context of JavaScript, the most used programming language in the world. But the learning doesn't stop at JavaScript. You'll be able to apply these lessons to any language. This course is about the timeless principles of software composition and its lessons will outlast the hot languages and frameworks of today. Unlike most programming books, this one may still be relevant 20 years from now.

This book this course is based on began life as a popular blog post series that attracted hundreds of thousands of readers and influenced the way software is built at many high growth tech startups and fortune 500 companies.

Share

Course Material

  • Introduction
  • Thank You
  • Composing Software: An Introduction
  • You Compose Software Every Day
  • Composing Functions
  • Working Memory
  • Signal to Noise Ratio
  • Surface Area for Bugs
  • Composing Objects
  • Conclusion
  • Artboard 3 Created with Sketch.
    Exercise 1
  • The Dao of Immutability (The Way of the Functional Programmer)
  • Forward
  • Artboard 3 Created with Sketch.
    Exercise 2
  • icon/quiz Created with Sketch.
    Quiz 13 attempts allowed
  • The Rise and Fall and Rise of Functional Programming (Composable Software)
  • The Rise of Functional Programming
  • Artboard 3 Created with Sketch.
    Exercise 3
  • The Fall of Functional Programming
  • The Rise of Functional Programming
  • Functional Programming Has Always Been Alive and Well
  • icon/quiz Created with Sketch.
    Quiz 23 attempts allowed
  • Why Learn Functional Programming in JavaScript?
  • What JavaScript is Missing
  • What JavaScript Has that Pure Functional Languages Lack
  • icon/quiz Created with Sketch.
    Quiz 33 attempts allowed
  • Pure Functions
  • What is a Function?
  • Artboard 3 Created with Sketch.
    Exercise 4
  • Mapping
  • Artboard 3 Created with Sketch.
    Exercise 5
  • Pure Functions
  • Artboard 3 Created with Sketch.
    Exercise 6
  • The Trouble with Shared State
  • Artboard 3 Created with Sketch.
    Exercise 7
  • Same Input, Same Output
  • Artboard 3 Created with Sketch.
    Exercise 8
  • No Side Effects
  • Immutability
  • Artboard 3 Created with Sketch.
    Exercise 9
  • Conclusion
  • Artboard 3 Created with Sketch.
    Exercise 10
  • icon/quiz Created with Sketch.
    Quiz 43 attempts allowed
  • What is Functional Programming?
  • Pure Functions
  • Artboard 3 Created with Sketch.
    Exercise 11
  • Function Composition
  • Shared State
  • Artboard 3 Created with Sketch.
    Exercise 12
  • Immutability
  • Artboard 3 Created with Sketch.
    Exercise 13
  • Side Effects
  • Artboard 3 Created with Sketch.
    Exercise 14
  • Reusability Through Higher Order Functions
  • Artboard 3 Created with Sketch.
    Exercise 15
  • Containers, Functors, Lists, and Streams
  • Artboard 3 Created with Sketch.
    Exercise 16
  • Declarative vs Imperative
  • Conclusion
  • Artboard 3 Created with Sketch.
    Exercise 17
  • icon/quiz Created with Sketch.
    Quiz 53 attempts allowed
  • A Functional Programmer’s Introduction to JavaScript
  • Expressions and Values
  • var, let, and const
  • Types
  • Artboard 3 Created with Sketch.
    Exercise 18
  • Destructuring
  • Comparisons and Ternaries
  • Artboard 3 Created with Sketch.
    Exercise 19
  • Functions
  • Signatures
  • Default Parameter Values
  • Named Arguments
  • Rest and Spread
  • Artboard 3 Created with Sketch.
    Exercise 20
  • Currying
  • Artboard 3 Created with Sketch.
    Exercise 21
  • Function Composition
  • Artboard 3 Created with Sketch.
    Exercise 22
  • Arrays
  • Artboard 3 Created with Sketch.
    Exercise 23
  • Method Chaining
  • Artboard 3 Created with Sketch.
    Exercise 24
  • Conclusion
  • icon/quiz Created with Sketch.
    Quiz 63 attempts allowed
  • Higher Order Functions
  • Artboard 3 Created with Sketch.
    Exercise 25
  • icon/quiz Created with Sketch.
    Quiz 73 attempts allowed
  • Curry and Function Composition
  • What is a curried function?
  • Artboard 3 Created with Sketch.
    Exercise 26
  • What is a partial application?
  • What’s the Difference?
  • Artboard 3 Created with Sketch.
    Exercise 27
  • What is point-free style?
  • Artboard 3 Created with Sketch.
    Exercise 28
  • Why do we curry?
  • Artboard 3 Created with Sketch.
    Exercise 29
  • Trace
  • Artboard 3 Created with Sketch.
    Exercise 30
  • Curry and Function Composition, Together
  • Artboard 3 Created with Sketch.
    Exercise 31
  • Conclusion
  • Artboard 3 Created with Sketch.
    Exercise 32
  • icon/quiz Created with Sketch.
    Quiz 83 attempts allowed
  • Abstraction & Composition
  • Artboard 3 Created with Sketch.
    Exercise 33
  • Abstraction is simplification.
  • Artboard 3 Created with Sketch.
    Exercise 34
  • Abstraction in Software
  • Artboard 3 Created with Sketch.
    Exercise 35
  • Abstraction through composition
  • Artboard 3 Created with Sketch.
    Exercise 36
  • How to Do More with Less Code
  • Artboard 3 Created with Sketch.
    Exercise 37
  • Conclusion
  • Artboard 3 Created with Sketch.
    Exercise 38
  • Reduce
  • Artboard 3 Created with Sketch.
    Exercise 39
  • Reduce is Versatile
  • A Word on Redux
  • Artboard 3 Created with Sketch.
    Exercise 40
  • Conclusion
  • icon/quiz Created with Sketch.
    Quiz 93 attempts allowed
  • Abstract Data Types and the Software Crisis
  • Common ADT Examples
  • Artboard 3 Created with Sketch.
    Exercise 41
  • Why ADTs?
  • History of ADTs
  • Artboard 3 Created with Sketch.
    Exercise 42
  • Specifications for ADTs
  • Artboard 3 Created with Sketch.
    Exercise 43
  • Stack ADT Example
  • Definitions
  • Abstract Signatures
  • Construction
  • Stack Operations (operations which return a stack)
  • Axioms
  • Identity
  • Sequence
  • Empty
  • Artboard 3 Created with Sketch.
    Exercise 44
  • Concrete Implementations
  • Artboard 3 Created with Sketch.
    Exercise 45
  • Conclusion
  • Artboard 3 Created with Sketch.
    Exercise 46
  • Glossary
  • icon/quiz Created with Sketch.
    Quiz 103 attempts allowed
  • Functors & Categories
  • Artboard 3 Created with Sketch.
    Exercise 47
  • Why Functors?
  • Artboard 3 Created with Sketch.
    Exercise 48
  • Functor Laws
  • Identity
  • Composition
  • Artboard 3 Created with Sketch.
    Exercise 49
  • Category Theory
  • Artboard 3 Created with Sketch.
    Exercise 50
  • Build Your Own Functor
  • Artboard 3 Created with Sketch.
    Exercise 51
  • Curried Map
  • Artboard 3 Created with Sketch.
    Exercise 52
  • Conclusion
  • Artboard 3 Created with Sketch.
    Exercise 53
  • icon/quiz Created with Sketch.
    Quiz 113 attempts allowed
  • Monads
  • Artboard 3 Created with Sketch.
    Exercise 54
  • You’re probably already using monads.
  • Artboard 3 Created with Sketch.
    Exercise 55
  • What Monads are Made of
  • Artboard 3 Created with Sketch.
    Exercise 56
  • Building a Kleisli Composition Function
  • Artboard 3 Created with Sketch.
    Exercise 57
  • The Monad Laws
  • Left and right identity laws
  • Associativity law
  • Identity Laws
  • Associativity
  • Proving the Monad Laws
  • Artboard 3 Created with Sketch.
    Exercise 58
  • Conclusion
  • Artboard 3 Created with Sketch.
    Exercise 59
  • icon/quiz Created with Sketch.
    Quiz 123 attempts allowed
  • The Forgotten History of OOP
  • Artboard 3 Created with Sketch.
    Exercise 60
  • The Big Idea
  • Artboard 3 Created with Sketch.
    Exercise 61
  • The Essence of OOP
  • Artboard 3 Created with Sketch.
    Exercise 62
  • What OOP Doesn’t Mean
  • Artboard 3 Created with Sketch.
    Exercise 63
  • What is an object?
  • Artboard 3 Created with Sketch.
    Exercise 64
  • We’ve lost the plot.
  • Characteristics of Message Passing
  • Artboard 3 Created with Sketch.
    Exercise 65
  • icon/quiz Created with Sketch.
    Quiz 133 attempts allowed
  • Object Composition
  • Artboard 3 Created with Sketch.
    Exercise 66
  • What is Object Composition?
  • Artboard 3 Created with Sketch.
    Exercise 67
  • Three Different Forms of Object Composition
  • Artboard 3 Created with Sketch.
    Exercise 68
  • Notes on Code Examples
  • Artboard 3 Created with Sketch.
    Exercise 69
  • Aggregation
  • Examples
  • When to use
  • Considerations
  • In Code
  • Artboard 3 Created with Sketch.
    Exercise 70
  • Concatenation
  • Examples
  • When to Use
  • Considerations
  • In Code
  • Artboard 3 Created with Sketch.
    Exercise 71
  • Delegation
  • Examples
  • When to Use
  • Considerations
  • In Code
  • Artboard 3 Created with Sketch.
    Exercise 72
  • Conclusion
  • Artboard 3 Created with Sketch.
    Exercise 73
  • icon/quiz Created with Sketch.
    Quiz 143 attempts allowed
  • Factory Functions
  • Artboard 3 Created with Sketch.
    Exercise 74
  • Literals for One, Factories for Many
  • Artboard 3 Created with Sketch.
    Exercise 75
  • Returning Objects
  • Artboard 3 Created with Sketch.
    Exercise 76
  • Destructuring
  • Artboard 3 Created with Sketch.
    Exercise 77
  • Computed Property Keys
  • Default Parameters
  • Artboard 3 Created with Sketch.
    Exercise 78
  • Type Inference
  • Artboard 3 Created with Sketch.
    Exercise 79
  • Factory Functions for Mixin Composition
  • Artboard 3 Created with Sketch.
    Exercise 80
  • Conclusion
  • icon/quiz Created with Sketch.
    Quiz 153 attempts allowed
  • Functional Mixins
  • Artboard 3 Created with Sketch.
    Exercise 81
  • Motivation
  • Artboard 3 Created with Sketch.
    Exercise 82
  • What are mixins?
  • Artboard 3 Created with Sketch.
    Exercise 83
  • What is functional inheritance?
  • Artboard 3 Created with Sketch.
    Exercise 84
  • What is a functional mixin?
  • Artboard 3 Created with Sketch.
    Exercise 85
  • Composing Functional Mixins
  • Artboard 3 Created with Sketch.
    Exercise 86
  • When to Use Functional Mixins
  • Artboard 3 Created with Sketch.
    Exercise 87
  • Caveats
  • Classes
  • Class Performance
  • Implicit Dependencies
  • Functional Mixins & Functional Programming
  • Artboard 3 Created with Sketch.
    Exercise 88
  • Conclusion
  • Artboard 3 Created with Sketch.
    Exercise 89
  • icon/quiz Created with Sketch.
    Quiz 163 attempts allowed
  • Why Composition is Harder with Classes
  • Artboard 3 Created with Sketch.
    Exercise 90
  • The Delegate Prototype
  • Artboard 3 Created with Sketch.
    Exercise 91
  • The .constructor Property
  • Artboard 3 Created with Sketch.
    Exercise 92
  • Class to Factory is a Breaking Change
  • Code that Requires new Violates the Open/Closed Principle
  • The class Keyword and extends
  • Friendly Syntax
  • Performance and Memory
  • Type Checking
  • Class Inheritance with extends
  • Classes are OK if You’re Careful
  • Artboard 3 Created with Sketch.
    Exercise 93
  • icon/quiz Created with Sketch.
    Quiz 173 attempts allowed
  • Composable Custom Data Types
  • Artboard 3 Created with Sketch.
    Exercise 94
  • You can do this with any data type
  • Composable Currency
  • Artboard 3 Created with Sketch.
    Exercise 95
  • icon/quiz Created with Sketch.
    Quiz 183 attempts allowed
  • Lenses
  • Artboard 3 Created with Sketch.
    Exercise 96
  • Why Lenses?
  • Artboard 3 Created with Sketch.
    Exercise 97
  • Background
  • Lens Laws
  • Artboard 3 Created with Sketch.
    Exercise 98
  • Composing Lenses
  • Over
  • Artboard 3 Created with Sketch.
    Exercise 99
  • icon/quiz Created with Sketch.
    Quiz 193 attempts allowed
  • Transducers
  • Artboard 3 Created with Sketch.
    Exercise 100
  • Why Transducers?
  • Artboard 3 Created with Sketch.
    Exercise 101
  • Background and Etymology
  • A Musical Analogy for Transducers
  • Artboard 3 Created with Sketch.
    Exercise 102
  • Transducers compose top-to-bottom.
  • Artboard 3 Created with Sketch.
    Exercise 103
  • Transducer Rules
  • Initialization
  • Early Termination
  • Completion
  • Artboard 3 Created with Sketch.
    Exercise 104
  • Transducing
  • Artboard 3 Created with Sketch.
    Exercise 105
  • The Transducer Protocol
  • Artboard 3 Created with Sketch.
    Exercise 106
  • Conclusion
  • Artboard 3 Created with Sketch.
    Exercise 107
  • icon/quiz Created with Sketch.
    Quiz 203 attempts allowed
  • Elements of JavaScript Style
  • Artboard 3 Created with Sketch.
    Exercise 108
  • 1. Make the function the unit of composition. One job for each function.
  • Artboard 3 Created with Sketch.
    Exercise 109
  • 2. Omit needless code.
  • Omit needless variables.
  • Artboard 3 Created with Sketch.
    Exercise 110
  • 3. Use active voice.
  • Event Handlers
  • Lifecycle Methods
  • Artboard 3 Created with Sketch.
    Exercise 111
  • 4. Avoid a succession of loose statements.
  • Artboard 3 Created with Sketch.
    Exercise 112
  • 5. Keep related code together.
  • 6. Put statements and expressions in positive form.
  • If Statements
  • Ternaries
  • Prefer strong negative statements.
  • Avoid null and undefined arguments in function calls.
  • Artboard 3 Created with Sketch.
    Exercise 113
  • 7. Use parallel code for parallel concepts.
  • Artboard 3 Created with Sketch.
    Exercise 114
  • Conclusion: Code should be simple, not simplistic.
  • Artboard 3 Created with Sketch.
    Exercise 115
  • icon/quiz Created with Sketch.
    Quiz 213 attempts allowed
  • Mocking is a Code Smell
  • Artboard 3 Created with Sketch.
    Exercise 116
  • TDD should lead to better design.
  • Artboard 3 Created with Sketch.
    Exercise 117
  • What is a code smell?
  • Artboard 3 Created with Sketch.
    Exercise 118
  • What is a mock?
  • Artboard 3 Created with Sketch.
    Exercise 119
  • What is a unit test?
  • Artboard 3 Created with Sketch.
    Exercise 120
  • What is test coverage?
  • Artboard 3 Created with Sketch.
    Exercise 121
  • What is tight coupling?
  • Artboard 3 Created with Sketch.
    Exercise 122
  • What causes tight coupling?
  • Artboard 3 Created with Sketch.
    Exercise 123
  • What does composition have to do with mocking?
  • Artboard 3 Created with Sketch.
    Exercise 124
  • How do we remove coupling?
  • Use pure functions
  • Isolate side-effects from the rest of your program logic
  • Use pub/sub
  • Isolate logic from I/O
  • Use objects that represent future computations
  • Artboard 3 Created with Sketch.
    Exercise 125
  • “Code smells” are warning signs, not laws. Mocks are not evil.
  • Mocking is great for integration tests
  • Artboard 3 Created with Sketch.
    Exercise 126
  • icon/quiz Created with Sketch.
    Quiz 223 attempts allowed

Instructors

    • Eric Elliott is a Webby-nominated software engineering expert, author, and creator of SudoLang, an AI programming language. With over 10 years of experience deploying AI models at scale to millions of users, he built and trained production AI models, and was an early pioneer of prompt engineering and AI Driven Development (AIDD). He has served as an engineering manager working on Generative AI for Adobe Firefly, tech lead on a social video AI app spun out of Stanford Research Institute, and a JavaScript expert and consultant on software development productivity and AIDD.

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub