Ruslans Tarasovs

@rtar
60 Followers
59 Following
34 Posts
Husband of flamenco dancer and cajon player
GitHubhttps://github.com/rtar
CountryLatvia

Some meetings are more demanding psychologically than hours of the coding work.

You might not be able to do a complicated work for hours after such meeting. If you feel ashamed of being non-productive, consider sitting with a coffee and thinking about architecture.

#programming

This is your reminder that Scala Native experience is really good now. You enable a plugin in sbt and your Cats Effect app magically compiles to a native code. It is perfect for command line tools and lightweight side container apps. Binding C libraries is trivial too! #scala

One of the strengths of Tagless Final approach in #scala is that you can write most of your code without any dependencies on actual effect system, such as Cats Effect.

It pushes you to think what is your actual business logic and makes a code structure simpler and more readable.

In some of the areas I am involved in, in CPU intensive tasks, Scala Native application seems to be working 30% - 40% faster than preheated JVM counterpart. I wonder what kind of optimization it does there... I, actually, expected it to be slower. 🤔

#scala

Good morning, I am happy to remind you, that your #sbt build files is not an instruction how to set the values for your settings, but a set of functions on how to transform the existing settings. Remember this and your day will become brighter and happier.

#scala

In #scala, simplicity is the key. Do not use generics, do not use implicts, do not EVER use inheritance. Only add this stuff a little bit when you are desperate. You are only allowed macros, if your name is deusaquilus, may the heaven bless him and all his descendants.

I once wanted to write a book about Akka Streams. I mastered materializers, bifunctors, NotUsed, backpressure etc. Wrote my own stages, used Graph DSL. Really cool!

The problem is that you can, often, do the same job with couple of lines of Cats Effect, even without FS2.

#scala

In #scala it is a common practice to migrate to MUnit from ScalaTest to make sure there is as little DSL as possible. And then, for others, to port DSL stuff from ScalaTest just for sake of it, and feverously protect their DSL assets from anyone with a delete key on their keyboard. 💪
A junior programmer often overworks. Whenever inspiration comes, they work 16 hours a day and burn themselves out. An experienced developer knows where their maximum sustainable output stops and do not try to maximize today's output at expense of the upcoming weeks.

A #scala developer complained to me the build is too slow as it takes a minute on his laptop, and that we should consider splitting a repository.

I talked to another developer. He said we should not split, because the build is fast now, i.e. it only takes a minute on his laptop.