• Crack the System

    Looking back at the interviews I went through in the past, hoping to get an idea of why I haven’t yet been rejected, as well as after running a few interviews myself, there are a couple of factors that stand out that surely helped to make it happen. The easy answer would be that I was overqualified for all the jobs I applied to but that couldn’t be further from the truth.

  • The New Kidiyo Menu

    The original design of the Kidiyo app, released in July 2018, received several negative reviews on the stores and from direct user contact. Get to know what was wrong and how I and Raissa Colonetti got the new Kidiyo app released.

  • A small step

    Breaking those long lines of code into smaller, grouped ones, with a clear consistency on where different types of elements are placed, is a small and efficient step towards improved readability.

  • Announcing Stork

    Delivering types from JSON like a Stork is the tagline of my most recent pet project, Stork. Stork is a lightweight library written in Swift 4.2 focused on making the flight from JSON to Types as smooth as possible. Stork believes in simplicity, explicitness, and control.

  • Promise me

    Refactoring is perhaps the most underappreciated task in software development. For me, it can be great fun and joyful to transform inedible code into an elegant & maintainable code. In this blog post, I quickly share a small part of a significant refactoring I just completed, and how moving from callbacks to promises helped design a declarative and composable download pipeline.

  • A Year on Tour

    Another great year right about to end. A year of significant transitions. 365 days of steady growth and good things to remember.

  • Heart-Shaped Box

    At University, a professor enthusiastically told us that translating problems into programming models would be one of the coolest tasks we would have as developers. Unfortunately, modelling is most often done poorly. Types to the rescue!

  • On Estimating

    Since I have become the Lead Developer at Kidiyo, estimating has become an exciting and critical challenge. It’s no longer about getting the right number but about getting the best out of everyone and get it done as efficiently and predictably as possible.

  • Forcing an orientation in iOS

    Now back to mobile development (next to a million other things) at Kidiyo, I was underwhelmed with the lack of support from the iOS SDK to force different landscapes across an app. In this blog I share a neat solution that works (at least) from iOS 9.0 onward.

  • The importance of setting a path

    Despite modern opinions, thinking that having no plan and merely living by the day is equivalent to freedom is a dangerous fallacy to hold on to. Freer is the man who chooses to walk from east to west than the man who happens to. Freer is the developer who takes the lead on their own journey than the one who is carried around like a bottle in the ocean.

  • From Bluehost to Cloudways

    In my spare time, I volunteer as the webmaster of A Rocha Portugal, an environmental organization based in Portugal and with branches all over the world. My first assignment, in 2012, was to build their new websites, using Wordpress. After almost 5 years of being promised a decent hosting at Bluehost, I finally got the time to find good alternatives. Here I share how I made their websites 20 times faster by moving to Cloudways.

  • Redesigning Haskell docs

    One of the first impressions most people mention having about Haskell is that it looks scary. Not just the concepts involved are overwhelming, but the documentation pages are not properly user-friendly and welcoming. Last December I decided to take action and propose a new design to the Hackage and the Haddock repositories.

  • A case for Dependent Types

    I used to think of Haskell ADTs (Algebraic Data Types) as a sort of a final, flat type inheritance definition. Sometimes they are more like a base-class design in OO without the good bits. Here I show how we can overcome that by using dependent types.

  • What a year!

    This year was truly the most challenging and changing year of my life so far. As a fan of thoughtful retrospectives, here goes my snapshot of this crazy year.

  • Naked code and naked data

    Naked code and naked data are a somewhat discrete code smell that spread quickly and that decrease the quality of a project. Let’s see why and how we can avoid them through wrapped code.

  • Living a deep life

    Early this year I read Deep Work and decided to leave Facebook. Much has happened during this year on the subject of focus, which I would like to share with you.

  • Understanding composition

    Function composition is the pointwise application of one function to the result of another to produce a third function., says Wikipedia. Here I show what I was getting wrong about it.

  • Happy Haskell developer

    In the beginning of June this year I joined Channable as a backend developer. After being tired of Java, I decided to dream big and look for jobs in Haskell in The Netherlands and I found this super cool successful startup. Today I will tell how’s been my experience with Haskell so far.

  • Why I care about Haskell

    Having worked in an environment where Java was predominant, bringing Functional Programming - in Haskell - into the table is not that simple. I went on giving a presentation explaining my motives and hopefully answering some sensible skepticism.

  • Painting with a broomstick

    I have worked on several Java projects, both small and quite large ones. In all of them, one thing was common: secretly but clearly, we are procedural programmers.

  • Be the colleague you would like to have

    We easily recall those remarkable colleagues we admire. The challenge, though, is to follow their example.

  • Small is Beautiful

    Does size matter? It does and the conclusion is pretty clear: smaller is better. Small is beautiful.

  • This Is Not Object Oriented

    Look deeply into the principles of Object-Oriented programming. Then look into the code we are developing tagged as being Object-Oriented. Is it really Object-Oriented?

  • Meaningful Null and Other Principles

    The discussion around using Null is a long one. I wrote before about “Why Optional is better than Null”, but there is more to discuss regarding using Null as a way of expressing meaning.

  • The Craft of Typography

    Almost as much as I love the craft of programming, I love the craft of typography. Pretty much since I remember of starting using computers I cared about the fonts and had an interest in tweaking the styling settings to make it read and look nicer.

  • Encapsulating Try-Catch Statements

    One of the things I enjoy the most in programming is to identify patterns, understand in a high-level what is being done or what is intended, and to abstract that into a contained solution.

  • The Creative Power of Constraints

    This idea that constraints are something heavy and unwanted, an enemy for the creative, is just not true. Constraints have an enormous creativity power.

  • The Joy of Pattern Matching

    Pattern Matching is a beautiful way to specify the different behaviours a function has depending on its arguments.

  • Invest in Yourself For Great Good

    The responsibility for your education is not of your employer. In a pragmatic perspective, you are a product that your employer is investing in, looking for a profit.

  • One Year Remotely

    In the blink of an eye, one year working remotely has passed.

  • The Monad Pattern

    Monads were not the easiest concept for me to fully understand. There are endless QAs and tutorials about Monads and each one adds something more. And then I released that Monad is actually a design pattern and it all made sense.

  • Love the Lambda

    One of the main words to retain about lambda expressions is anonymous. A lambda expression is, basically, an anonymous function. Lambdas Expressions are a normal feature in functional languages but just few time ago arrived into the Java world. Better late than never though!

  • A Taste of Curry - An Apologetic

    What if your functions would only, actually, take a single argument? Currying is a very nice feature that Haskell offers that allows cleaner code to be written and leverages composition.

  • What Referential Transparency means

    When I think of referential transparency, I think that one reference to something is transparent, this is, there are no hidden parts involved.

  • Why Optional is better than Null

    null returning and checking is everywhere and it developed deep roots in the imperative programming world. It’s more than time to stop using it and to look into better ways to deal with fallible computation.

  • Dijkstra's letter to the council

    A while ago, when I started to learn Haskell more seriously, I found this beautiful piece of history. 15 years ago Dijkstra saw the Budget Council of his University giving steps to replace the CS introductory language Haskell by Java.

  • Don't try too much

    “To try” is an often used expression in the most different contexts. In some, it might make sense and have a useful presence but in other, it might be a dangerous tool.

  • But it works!

    “But it works!” is a small big excuse to avoid excellence and to show our attitude towards code: either we just don’t think it deserves all that much care or we think of if as a mystery box - so lucky we are that it is working!

  • Mini polyglot grep

    I wanted to write a little grep program that prints the lines of a given file that contain a given term.
    I choose to write it in Haskell, Ruby, Java, Scala and Python and see how different the thinking process and the result would be.

  • Comments

    When programming we are using some programming language to describe a solution for a problem, to define behaviour or the flow of a computation. And we do it using a language that is not human, and it’s not our mother language, therefore we inevitably feel the need to leave comments and make it as readable as possible. By other words, most of the times we comment to balance the unreadability of our code.

  • Languages

    To some people programming languages are no more than mere tools. We can say the same about Mathematics but we would be missing a lot.

  • Decorator Pattern

    This pattern is really a good choice to extend behavior without the drawbacks of inheritance. The example given in the Heads First Design Patterns is of a Coffee Shop, on how to design a flexible beverage selling system.

  • BDD vs TDD

    The difference between BDD and TDD is that BDD begins with a B and TDD begins with a T. But seriously, the gotcha with TDD is that too many developers focused on the “How” when writing their unit tests, so they ended up with very brittle tests that did nothing more than confirm that the system does what it does.
    BDD provides a new vocabulary and thus focus for writing a unit test. Basically it is a feature driven approach to TDD.

  • The Command Pattern

    I’ve used this pattern in a iOS project where a web page was to be loaded and the native app should handle javascript events. I encapsulated the “web page” into an EmbeddedWebApp object where the javascript<>native bridge was set. I had a factory class (client) where were defined the handled events/commands and their action upon the native side of the app. One of the events (command) was to request a camera capture, that needed to delegate the request to another object (receiver). Note the Single Responsibility principle and how important it is.

  • Code at Wrong Level of Abstraction

    Let’s abstract this class, let’s play with generics, inherithance, abstract classes and interfaces and make this code reusable in some other context or problem. Oh but wait… this is not quite well placed. Ok, let’s make an exception here or instead add an attribute to configure the behaviour of this particular case. Tadam, it works!

  • The Zone and interruptions

    Sometimes we get to feel this desperate need of getting into the zone. We know how of a geniuses we are and we are fully conscious that if we are let in our own world and dive in to the zone, oh boy, it will be incredible! Well… most of times it’s not true. I’m not confusing the preference for (enough) silence, a quite office and relaxed enviromnet with this need of getting into the zone. The zone most of the times leads us to go off-scope, to write more and think less and to be more an individual than a teammate.

  • Behaviour vs Data

    David West wrote Object Thinking where the main stressed point is that objects must be designed in terms of behaviour and not data.

  • Microservices

    Martin Fowler published this useful and interesting guide on microservices: Microservices Guide

  • Object Thinking – Behaviour vs Procedures

    Consider that we need to work with a list of numbers and find the need to encapsulate some methods to help us out.

  • Object Thinking – A Ball and A Dog

    A Ball and A Dog In true object-oriented programming, objects are living creatures, like you and me. They are living organisms, with their own behavior, properties and a life cycle.

  • Special Case Pattern

    Can we make the code that simple? It turns out that we can. We can change the ExpenseReportDAO so that it always returns a MealExpense object. If there are no meal expenses, it returns a MealExpense object that returns the per diem as its total: