Articles and Scala Experiments
More articles are available in my blog, https://yadukrishnan.live
Coursier is a very useful tool for any Scala Developers. From installing JVMs and REPLs to identifying the transitive dependencies of libraries, I use it very often. You can find the cheatsheet for coursier commands.
Opaque Type Alias
A sample usage of the newly introduced Opaque Type Alias in Scala 3.
Different ways to package Scala Apps
There are many ways in which we can package our simple scala applications. A few of the common and useful packaging tools are described here.
How to use Alpakka?
Alpakka is a very powerful akka stream based integration library. It is competing against Apache Camel. Here is a sample implmentation of Alpakka with MongoDB connector.
Inline Modifier in Scala-3
Scala-3 has completely redesigned macros. It has introduced a new modifier inline to cover a lot of macro cases without actually writing macro. It optimises the code at compile time. More detailed usecases of inline modifier is available here.
Enumeratum: Better enum library for Scala 2
Enumerations are one of the most common features in any programming language. However, the in-built enum in Scala standard library has a lot of problems and many programmers avoid using it. We can use another library to overcome the issues in the standard library, and it is called Enumeratum. More details and sample usages on how we can use Enumeratum can be read here
Configuration Management using PureConfig
PureConfig is a typesafe configuration library in Scala. It can read JSON, HOCON and properties files. It helps to avoid configuration mistakes and also reduces the boilerplate code required to handle the configuration files. More details along with code samples can be read here.
Introduction to Clear-Config
Clear-Config is a typesafe and pure-FP scala library for reading configuration files. It provides an excellant clarity on which configurations are applied to the application. Introduction to Clear-Config with some basic examples can be read here.
Creating a Custom Giter8(g8) Template
Giter8(g8) is a command line tool to easily create scala projects from templates. We can create custom g8 templates to satisfy our needs. A brief introduction on creating custom giter8 template is available here.
Rock the JVM Contributions
- Complete Slick Tutorial
Baeldung Profile: https://www.baeldung.com/scala/author/yadukrishnan
- Introduction to Slick
- Cats Effect Fibers
- Clear Config
- inline Modifier in Scala-3
- Simpler File Operations using Ammonite-ops
- Python-like Http Client Using Requests-Scala
- Implicit Redesign in Scala3
- Scala-3:Extension Methods
- Read Configurations using PureConfig
- Akka Scheduler
- Packaging Scala Apps
- Mockito with ScalaTest
- ScalaTest: Comparing collections in test
- Different Ways to Stop Actors
- Reactive Mongo
- Opaque Type Alias
- Range in Scala
- % and %% in SBT