Building Readable Tests with Fluent Testing APIs

Motivation One of the biggest challenges in software testing is defining the input for code under test in a way that is expressive and powerful enough to test complex situations but doesn’t distract from the intent of the test or clutter the test code to a degree that makes it difficult to read. Many dynamic languages have testing APIs which take advantage of their looser and later type checking to provide easy mocking and stubbing, but strict, statically typed languages can make it difficult to build up suitable instances of the types needed in the test.…

Keep reading

Cancer Risk Prediction in Rust

I have had the great pleasure of rewriting and updating some of our risk models in Rust. We moved these risk calculations from our Rails applications to a standalone JSON API. What is Rust? As the Rust team describes the language, “Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety.”1 Rust is a compiled, statically typed, non-garbage-collected language. It is expressive, providing facilities familiar to users of higher-level and functional languages.…

Keep reading