Property-Based Testing with Clojure and Datomic – Part 2

This is the second part of a series that explores clojure.spec, property-based testing, and how those tools can be used to test Datomic. Check out part 1 for an introduction to clojure.spec and property-based testing. All of the code from this post is in the example repo

As we discussed in the first post, property-based testing works well for pure functions but that excludes a good chunk of code we would like to thoroughly test such as code that makes updates to a database. I also hinted that Datomic is uniquely suited to be tested by property-based tests.
Continue reading “Property-Based Testing with Clojure and Datomic – Part 2”

Property-Based Testing with Clojure and Datomic – Part 1

This is the first part of a multi-part series that explores clojure.spec, property-based testing, and how those tools can be used to test Datomic. This post serves mainly as an introduction to property-based testing and clojure.spec. Check out part 2 for the introduction of Datomic property-based testing.

Clojure.spec was recently released and the Clojure community is diving into it to see how specs can improve their programs. One of the more interesting design decisions made for clojure.spec is the connection between specs and property-based testing via another Clojure contrib library:
test.check.
Continue reading “Property-Based Testing with Clojure and Datomic – Part 1”

Stop Using JSON For Configuration Files

Here at Altometrics, we often use Amazon Web Services for deploying web applications. Out of the AWS suite of tools, we are very fond of Amazon CloudFormation. CloudFormation provides a way to specify your application’s entire infrastructure in a single, declarative template. The associated tools handle creating and connecting all of the necessary resources (auto scaling groups, load balancers, etc.) at once, as well as updating your stack when the template changes.

But we have one grievance with CloudFormation. The configuration file needs to be formatted as JSON.
Continue reading “Stop Using JSON For Configuration Files”