Pragmatic Programming: Random Thoughts on Software Engineering.
-
Fundamental Functional Types
Functional programming tries to use return types to convey information. This is particularly important when it comes to errors and failures. Procedural approaches have used exceptions, sentinel values, mutable parameters and return codes to convey ‘extra’ information about the result of a call. However, not all of these are appropriate in a pure functional world.…
-
Anatomy of Lagom Part 1: The Technical Stack
Lagom is a framework for building microservices. It’s based on Lightbend’s reactive technology stack. I’ve been playing around with the Scala version of it and I’m noting down some of my understanding here to supplement the Lagom (+ Play + Akka) documentation. Starting with the high level overview of the technical stack, Lagom has both…
-
Devops Tooling
I’ve been putting together this WordPress site as a DevOps exercise. Now that it’s starting to take shape a little bit it’s probably worth taking note of some of the tools which I’ve used to help me.We’ll start with the software that actually runs the site WordPress running as a docker container on ECS-EC2 MySQL…
-
Refined Types in Domain Driven Design
In a world of domain driven design we like to use lots of types. In particular, we use a lot of value types, and we will even choose to create a type which is little more than a wrapper for a single value of an underlying type. Often the set of valid values of the…
-
Akka-Typed: Part 1 – Actors and ActorSystems
Akka-Typed has been described as production ready with the release of Akka 2.5.22 so it’s worth exploring what the move to Typed will mean for the interaction patterns we’re used to. There are many new ways of working with Actors in Typed. Here we’ll focus on the major differences around how ActorSystem and an Actor…
-
Jenkins, Docker and AWS ECR
There’s a difficulty using Jenkins to access ECR in a security conscious environment, such as an environment requiring HIPAA or PCI compliance. Even if Jenkins is on an EC2 instance, using the standard docker login command documented by AWS utilising IAM roles and the STS to get short-lived AWS credentials, the docker login command generated…
-
Monitoring and Alerting
As a developer I hate the thought of being interrupted to deal with some messy problem on a production system. That goes even doubly so out-of-hours. However, as a member of a team which supports the services which it runs I find that I have to be in a position to support the service I…
-
JUnit5 Migration
some learnings related to migrating to JUnit5. JUnit5 has different dependencies, in terms of maven / gradle coordinates. We’re not just talking about bumping a version number. Importantly, the project name ‘Juniper’ is one which you’ll come across regularly with JUnit5. JUnit5 requires the maven surefire plugin (and similar for gradle) to use a different…
-
API Versioning
One of the most common pieces of over-the-counter advice with assumed universal applicability of Restful APIs is that you should version your APIs. There are differences of opinion over the best approach to versioning but it seems that there’s universal acceptance that it’s a GoodThing(™). I’d like to suggest a slightly more nuanced attitude towards…
-
Equality in Java
We talked a bit about some of the quirks associated with object identity. Today I’d like to investigate some of the potential pitfalls associated with another form of equality. In Java, Object.equals() is the mechanism used to compare two objects for equality. The default implementation, defined on Object, implements object identity but the method is…
Got any book recommendations?