Aligning the Local development with the CI environment. Introduction In my development career, I’ve spent countless hours troubleshooting a failing CI pipeline. Through this experience, I’ve learned that even if you don’t use shell scripts to write your CI pipeline, you still need to install various build tools and their environments.
For instance, when working with Scala, you need to install a JDK. Since the JDK has multiple incompatible versions, it’s crucial to ensure you’re using the correct one.
Intro Mixing up the values passed to functions and structs are a common mistake in many programming languages. This happens even more often with languages that have dynamic type system.
Here is a trivial example which illustrates this problem:
type User struct { UserName string Email string Password string } func NewUser( UserName string, Email string, Password string, ) User { return User { UserName, // The Password is passed as an Email Password, Email, } } In this post we leverage the system to handle these kind of bugs and see which other advantages this approach offers.