π , my name is Rafael Merino
Hi there π©βπ»
I am a functional programmer
Skills: JAVA / SCALA / CLOJURE / LISP / ERLANG / Functional Programming / Actors
π« How to reach me: imrafaelmerino@gmail.com- π Pronouns: he
β‘ Fun fact: I was a chess β player. I was the championπ of SpainπͺπΈ several times during my childhood.
List of my personal projects πͺ in chronological order and their making-of, sit back and grab πΏ:
This was my very first project as a functional developer
I started testing π§ͺ json-values with a Scala library called ScalaCheck, which is used for property-based testing (PBT).
This way, I killed two π¦ with a stone; I learned a new language, Scala, and an inspiring testing philosophy. I discovered
property-based testing thanks to John Hughes and QuickCheck from Haskell.
PBT led me to create a beautiful Json generator. I challenged the world,
claiming it was the best Json generator in the whole galaxy
Spec is an incredible Clojure library. I implemented json-spec based on the ideas I learned from it. At the risk of being presumptuous, I claim it's by far the best way of validating a Json in Java and Scala. It's easy to write, read, and maintain. Defining json generators and specs is a piece of π°.
I bought the book
Developing json-values, I started taming effects with FP. I experienced how great FP is describing, composing, and executing programs made up of effectful functions Ξ». I designed an interactive program that, given a spec, creates a Json asking the user for every value on the console πΊ. I also wrote a Json future.
I developed json-values in Scala and Dotty as well. Dotty is a prerelease of Scala3.
Scala is, in my option, a good alternative to do FP in the JVM. I've learned a lot from the Scala community. I have tremendous respect for the Scala creator, Martin Odersky, and the ZIO creator, John A De Goes. I never miss any of their talks and articles.
On the other hand, Clojure is a great choice as well. It's really challenging since it's a lispy programming language. As a Lisp fan, being able to use it in the JVM is incredible. You must see any talk from Rich Hickey. He made a significant impact π on me, and he changed my life entirely as a programmer. Being honest, it took me almost three years of my life to develop json-values and really understand functional programming. The Scala version took me only four months because I had already grasped the fundamentals.
Java doesn't have persistent data structures. Scala and Clojure does. This was a problem implementing the Java version of json-values. I tested a lot of alternatives and compare them in terms of performance and design. I ended up using the persistent data structures from the library vavr.
Suppose I had to describe vertx-effect in three words. In that case, they'd be without a doubt: expressions, composition, and persistent data structures or values. vertx-effect is the place where actors model meets functional programming in Java.
I couldn't resist naming the most essential function in this library as lambda π
I had been working with Vertx for a long time. I always had the feeling that I could do it better
On the other hand, I started learning Erlang and watching videos of Joe Armstrong.
I read his book
I learned from John A De Goes how to use FP to deal with effects. I took the course Principles of Reactive Programming in Scala. The result is vertx-effect. There are some expressions implemented that come from Lisp, like Cond, Case, and IfElse.
It was sad to find out that Joe Armstrong had passed away β in 2019, a few months before I met him. Rest in peace, Joe. I strongly recommend you study his work. He was very brilliant and, at the same time, very kind and humble.
You can model any effect in vertx-effect using lambdas Ξ». vertx-mondodb-effect gives you some Ξ» to interact with the MongoDB. Going from Json to BSON and vice versa was really cumbersome and tedious. That's why I developed mongo-values, a set of codecs that abstracts you from that.
json-values and mongo-values are ideal for working with MongoDB. mongo-values gives you a set of codecs that free the programmer from doing any kind of conversion to BSON.
JIO is the proof you can do Functional Programming in Java πΊ. Values, expressions, and functions on top of the
CompletableFuture API. The IO monad is extremely powerful and allows you to tame any imaginable effect: console programs,
HTTP requests, database calls, etc. Everything is composable and referential transparent in the world of lambdas Ξ» and
values, which helps you cope with complexity
I implemented a reactive MongoDB client and a reactive HTTP client. I developed some interesting console programs that show the essence of JIO.
It's the first time I used JFR and JMC. I'm glad that since Java 11, we have these tools. Logging is a key aspect of any system.
I fiddled with the fork/join framework that came out in Java 7. I thought you couldn't use it for blocking operations, but that's surprisingly false.
The ManagedBlocker interface opens the door to submitting blocking tasks to the pool, and I took advantage
Since Mockito and all that stuff are not my cup of tea, I developed a native Java HTTP server to test my HTTP client. Of course! The server is configurable just with functions.