Posts
Image editing with Comonads
Continuing from image editing with Monads, we will now understand comonads by editing images with it.
Image editing with Monads
Continuing from image editing with Applicative, we will now understand Monad by editing images with it.
Book notes: Fundamentals of Architecture
The following are my personal notes on the book “Fundamentals of Architecture: An Engineering Approach” which presents from a high-level view what software architecture is, what a software architect does and the software architecture patterns. It is written by two well know architects: Mark Richards and Neal Ford
Image editing with Applicative
Continuing from image editing with Functors, we will now understand Applicative by editing images with it.
Image editing with Functors
This was originally written as a self attempt to better understand FP concepts like functors, applicatives, monads, etc. visually, by implementing them on images.
Making invalid pizza recipes unrepresentable
Strong typing
I’m a believer in strong & static typing. A good type is like a math equation - just as an equation describes the equalities and how they change, the possibilities of interactions, a type describes the invariants and the properties of what the type represents. Good types allow us to make invalid states unrepresentable in code, transforming runtime bugs into compiler errors.
Equality in Scala
In Scala 2 the == operator is used for checking by value equality, in contrast with Java where .equals() is best practice. Also in contrast to Java, == is safe to be used on null values.
The assignment operator is broken!
Most programming languages have this operator =
which is called the assignment operator.
Have you ever wondered why this is called assignment and not simply equals ?