Posts

How I SBT - I

Contrary to the unpopular opinions that it is hard and clumsy, SBT, the de facto build tool for Scala, is one of the best. Ease comes with familiarity. Unfortunately, there aren’t many beginner-friendly guides for specific scenarios. A lot of troubleshooting information is hidden in the forests of issues and public forums. This is despite the fact that SBT has excellent support for inspecting your project definition. The official documentation is like the encyclopedia that is too much to digest.

Article hero image

Tagged Types & Implicit Resolution

Last time, I wrote about different ways of declaring implicits, which is a prelude to this post. Knowledge of different ways of declaring implicits is good for general understanding on the subject, and also for this post.

This post discusses an intriguing case - a gotcha, with implicit resolution of instances related to tagged types. Interestingly, newtypes are safer in that regard.

Cross-JDK Compilation in SBT

Recently, I had to cross-compile a bunch of Scala library repositories for JDK 11 and JDK 17. I was hoping SBT would natively support specifying the related configuration in build.sbt similar to crossScalaVersions. I came across some references to plugins that seemed to do the job. But I couldn’t find anything in their documentation that proved they supported compiling for different JDK versions. They only seemed1 to provide better management and configuration options for cross compiling different Scala versions. More ...

Article hero image

Declaring Implicits

While implicits are easy to use, declaring them properly requires careful consideration. Because there are a few different ways you can declare implicits viz. extension methods, parameter values, type converters and dynamic instances. Each one has a specific purpose. For instance, dynamic instances enable recursive implicit resolution. Understanding the different ways of declaring implicits is critical in choosing the right one for the given scenario. It is also invaluable in troubleshooting subtle bugs and unexpected behavior related to implicit resolution.

Article hero image

My Scala Story

I have been reading the My Scala Story series by Software Mill - a short interview of renowned experts about their Scala journey. I have not done anything substantial in the OSS space to be on Software Mill’s radar. But their series inspired me to share mine. So, here it goes …

Matter Feature Request - Series

Matter is a fantastic app for reading; articles, blog posts etc. There is one feature I love to have in Matter. Let us find out what that is.

Keep Killing It

There are times when even decent chaps have to pick up the sword and fight. I am talking about times when some process on your machine is always peeking over your shoulder. Worst part, consumes a lot of resources, especially CPU time, and obstructs your productivity. Or peace of mind. For such cases, I give you slay

Python Overloaded

Function overloading is every day business in statically typed languages. Not all languages. Go has make it everything hard. ๐Ÿ™„ But function overloading in dynamic languages are not really sought after.

Optional Parameters

The billion dollar mistake has been committed already. No going back. But it is not necessary to keep repeating it. Oh, I am talking about the infamous null. Would Java’s Optional come to the rescue? Or are there any ironic “Don’ts” when using Optional?

For a better Signal (Part 1)

Signal is undisputedly the gold standard of chat messengers, especially for the staunch privacy-conscious. Signal gets its gold star for its security/privacy aspects. Nothing to argue in that regard. However, I would rate Signal very low when it comes to user friendliness. Read the post find out why.