Adoptionλ︎
Clojure is simple by design. What does that mean, and why should you care?
Simplicity is a powerful technique for writing better programs, programs that have:
- concision: write programs 5-10x smaller than before
- robustness: easily write programs that work correctly
- generality: use the same simple ideas over and over, instead of masses and masses of redundant classes
- agility: add new capabilities with ease
In this talk, we will introduce Clojure, and introduce Simplicity via concrete examples from
- Clojure syntax
- Clojure protocols
- Clojure values and references
These ideas (and others) lead to concision, robustness, generality, and agility.
Languages of the Systemλ︎
edn and Fressian are self-describing, schema-free, batteries-included, extensible data languages. In this talk, you will find out where you might benefit from these languages over e.g. JSON or XML.
Systems use many languages, and not just programming languages such as Java, C#, Ruby, or Python. Systems also relay on data languages, both for data on the wire, and for data at rest. These data languages differ greatly in their design objectives and capabilities, and are often less understood than their programming language counterparts.
This talk will introduce two data notations: edn and Fressian, which share several common characteristics. Both are
- self-describing
- schema-free
- batteries-included
- extensible
These capabilities align well with the dynamic, flexible needs of real systems. And in their key difference (text vs. binary), edn and Fressian cover the bases of human readability and maximum performance.
Perception and Actionλ︎
Perception and action are radically different. Clojure's time model makes it easy to build systems that model the real-world differences between perception and action. In this talk, you will learn how to think using
- values: immutable data items, both atomic and composite
- identities: entities that take a series of causally-related values over time
- time: a before/after ordering of perceptions and actions
- references: point-in-time values of an identity
Getting time right is essential for modeling concurrency effectively, but its importance does not stop there. Without a good model of time, it is difficult to deal sensibly with currency and history, much less concurrency and parallelism.
The ideas in this talk will help you create better programs that more faithfully model the world, even if you write linear programs that hope to never see a second thread.
- Video from QCon SF, Nov 2010
ClojureScriptλ︎
ClojureScript brings the sophisticated semantics of a world-class production language (Clojure) to the world's dominant deployment platform (JavaScript, especially running in the browser).
ClojureScript enables browser development that is cheaper, leaner, and more performant than JavaScript (and "slightly enhanced JavaScript" alternatives), and makes it possible to share code between client and server side development.
In this talk, we will begin with the semantics of edn and Clojure, and why you might want to build programs with them. We will then move into areas specific to ClojureScript:
- How Clojure's semantics map to JavaScript's capabilities
- Targeting the Google Closure Compiler for whole-program optimization
- Bootstrapping Clojure in JavaScript
- Calling JavaScript libraries
- Connecting browsers and REPLs
- Ending callback hell with core.async
Finally, we will put the pieces together, showing substantial browser applications written in ClojureScript, and a brief tour of the Pedestal framework for web applications.
Clojure Big Ideasλ︎
The key to understanding Clojure is ideas, not language constructs. In this talk, we will approach Clojure via 10 Big Ideas:
- Extensible Data Notation
- Persistent Data Structures
- Sequences
- Transducers
- Specification
- Dynamic Development
- Async Programming
- Protocols
- ClojureScript
- Logic Programming
- Atomic Succession Model
Each of these ideas is valuable and useful a la carte, and not necessarily only in Clojure. Taken together, they begin to fill in the picture of why Clojure is changing the way many programmers think about software development.
- 2013 RuPy slides
- 2017 Chicago JUG slides
Clojure Web Services Big Ideasλ︎
The key to understanding Clojure web development is ideas, not language constructs.
- edn, not json
- core.async, not callbacks
- platform, not language
- data, not objects
- protocols, not interfaces
- libraries, not frameworks
- one ring to rule them all
Each of these ideas is valuable and useful a la carte, and not necessarily only in Clojure. Taken together, they begin to fill in the picture of why Clojure is changing the way many programmers think about web development.
Benefitsλ︎
benefits of Clojure that are immediately visible to beginners:
- concision: write programs 5-10x smaller than before
- robustness: easily write programs that work correctly
- generality: use the sample simple ideas over and over, instead of masses and masses of redundant classes
- agility: add new capabilities with ease
That is a powerful story in itself, but the advantages of Clojure increase with expertise. We will tour just a few of the power tools used Clojure experts:
- core.async for communicating sequential processes
- transducers for programmable algorithmic transformations
- PigPen for big data map/reduce
- Datomic for flexible, ACID data of record
Finally, we will look at what everybody else is saying, reporting on business and open source projects using Clojure.
- Slides from Nov 2014
Clojure Specificationsλ︎
Engineer projects with high agility and end up with a robust, maintainable code.
Use Clojure spec library to write programs that behave as expected, meet operational requirements, and have the flexibility to accommodate change.
Rapidly develop robust and reusable Clojure projects using
Clojure spec library augments these approaches. Developing with spec is declarative, predicative, layered, robust, and integrated with Clojure.
spec is declarative. As with type systems in static languages, spec lets you make declarative statements that communicate and document data, function arguments, and returns.
spec is predicative. You can declare predicates about data, about function arguments and returns, and even function semantics. This overlaps not only with type systems, but also with validations that are often done with costly bespoke tests and runtime checks.
spec is layered. Spec does not require any specific workflow or program shape, and in particular is compatible with iterative and incremental development.
spec supports robust programs via automatic generative testing. Given specifications, spec can write generative tests for you, generating a volume of tests limited only by your CPU time, not by what you are able to write and maintain by hand.
spec is fully integrated with Clojure. As you develop your program, you have interactive access to spec-driven documentation, validation, destructuring, conformance checking, sample data, testing, and program instrumentation.
- 2016 StrangeLoop video
- 2016 JavaOne slides
- Spec overview and rationale
- Spec guide
- Clojure Made Simple at JavaOne in 2015
- Clojure Spec: Leverage
- Clojure Spec: Testing
- Clojure Spec: Customizing Generators
Datomicλ︎
Codeq imports your Git repositories into a Datomic database, then performs language-aware analysis on them, extending the Git model both down and up:
- down, from the textual world of files and lines to the code quantum (codeq) level
- up, across multiple repositories
This allows you to track change in terms of program units, e.g. function and method definitions, and query your code declaratively. A codeq database can serve as infrastructure for editors, IDEs, code browsing, analysis, and documentation tools.
In this talk, you will learn
- how to install codeq locally
- how to import and analyze git repositories
- how to query your repositories
- how to extend codeq's builtin analysis with your own custom analyzers
Codeq is open source (EPL), and on github. It works with Datomic Free.
- Blog post introducing codeq
- Codeq on the Relevance Podcast
- Day of Datomic 2016
- Day of Datomic Cloud 2018 YouTube playlist Sept. 2018
- Datomic Ions in 7 minutes
On the Webλ︎
- Blog post introducing codeq
- Codeq on the Relevance Podcast
Writing correct programsλ︎
- Slides from May 2018
We have tons of tools and practices to help us write correct programs, including:
- red squiggly underlines
- type systems
- automated tests
- proofs
- generative testing
- stacktraces
- frameworks
- agile methods
- test-driven development
- logging
- humane error messages
- step debuggers
- simulation
Net result so far: We invest a lot of time and money, and our programs are still full of bugs.
I don't have a silver bullet to offer, nor do I plan to denigrate any of the ideas listed above. But I will say this: I regularly watch programmers aim too large and miss by miles.
To aim small is to:
- plan ahead and catch misconceptions early before they ramify
- make small things, at every level
and then plan to miss anyway:
- expect failures and make them more evident
- divide and conquer when things go wrong
Architectural Briefingsλ︎
Developers make decisions all the time, and can never have enough information and support. At Cognitect, we run a weekly Architectural Briefing as a resource for the team. Everybody participates, both attending and speaking. In this talk, we will cover
- a template for Architectural Briefings
- how to develop and present an Architectural Briefing
- how to run an Architectural Briefing program in your organization
We will finish with an example briefing, showing how these ideas come together.
- 2014 NFJS slides
Writing Effective Bug Reportsλ︎
https://docs.datomic.com/cloud/tech-notes/writing-a-problem-report.html
Conference Talksλ︎
Keynotesλ︎
- [[Aim Small, Miss Small: Writing Correct Programs]]
- [[Adopting Clojure]]
- [[Datomic, and How We Built It]]
- [[Debugging with the Scientific Method]]
- [[Design after Agile: How to Succeed By Trying Less]]
- [[Evident Code at Scale]]
- [[Ousterhout's Dichotomy Isn't]]
- [[Sherlock Holmes, Consulting Developer]]
- [[Stewardship Made Practical]]
- [[Simplicity Ain't Easy]]
- [[The Impedance Mismatch is Our Fault]]
- [[Too Lazy To Fail]]
- [[Pure Fun]]
Technical Talksλ︎
- [[Better Bug Reports]]
- [[Running with Scissors]]: Live Coding with Data
- [[Datomic Ions]]
- [[REPL Driven Development]]
- [[The Ten Rules of Schema Growth]]
- Simplifying ETL with Clojure & Datomic
- Agility & Robustness: [[Clojure spec]]
- [[Datalog 2015]]
- [[Clojure: Simple By Design]]
- [[Narcissistic Design]]: 10 easy steps to complex code and job security
- [[Clojure in 10 Big Ideas]]
- [[ClojureWeb in 7 Big Ideas]]
- [[ClojureScript]]
- [[Core Async]]
- [[Datomic For The 96 Percent]]
- [[Architectural Briefings]]
- [[Simulation Testing]]
- [[edn and Fressian]]
- [[Codeq: Making Git Repositories Smarter]]
- [[Introduction to Clojure]]
- [[Clojure in the Field]]
- [[Concurrent Programming with Clojure]]
- [[Generative Testing]]
- [[Get Logical with Datalog]]
- [[Perception and Action]]
- [[Transit]]