Cats Law Checking with Discipline

As I was working through Underscore's book Advanced Scala With Cats, I got a bit confused with the Monad typeclass method tailRecM. This method is a topic for a different post, but as I tried to figure this out, I decided this was a good opportunity to dig in to how Cats defines and checks laws using Discipline. If Cats' laws for the Monad typeclass include any laws for tailRecM, this would help me learn to implement that method correctly.

Read More

Winter Tech Forum

I recently attended the Winter Tech Forum in Crested Butte, CO. Rebranded in 2015 from its previous name, the Java Posse Roundup, this is my 7th consecutive time attending this OpenSpace conference.

Read More

Learning 7 More Languages - Part 1

This winter I worked through Seven More Languages in Seven Weeks by Bruce Tate, Fred Daoud, Jack Moffitt, and Ian Dees. As the name implies, this book introduced 7 recent programming languages and gave a quick introduction to each.

Read More

Refactoring ListenableFutures to For-Comprehensions

I recently worked through a refactoring from Guava ListenableFuture to Scala futures and for-comprehensions. This was an interesting example of how syntactic support in a language can drastically simplify code. Scala sometimes has a reputation of aiming for terseness over clarity, but there is a middle ground where boilerplate can be eliminated and essential logic can shine through.

Read More

A Scala Functional Conway's Game of Life

A couple weekends ago, I participated in a Global Day of Coderetreat event in Boulder, CO. Coderetreat is an all-day event where developers can practice techniques like pair programming, Test Driven Development, and simple design, while working with peers on a common problem. The canonical problem for Coderetreat events is Conway’s Game of Life, which has a nice size – not too simple and not too complex.

Read More