What I read during the lockdown

As the lockdown measures slowly ease, and we are getting back to some short of normality (at least temporarily), I was kinda reflecting on what I did the last months. I became a dad recently, and I was already 1 month at home on parental leave to help my partner and just the moment that I was supposed to return to the office the German government announced the lockdown and thankfully the company I worked for decided to ask us to work from home, so I am...

Read

Thoughts on rewards as a way to boost productivity

Just some thoughts related to monetary rewards as a way to boost employee performance. Have you ever done an activity that you truly enjoyed until someone else wanted to pay you for the work, where you suddendly stopped enjoying the activity? Have you ever got a bonus about something you did, just to see with great dissapointment that the same activity didn't lead to a bonus the next time you performed it? Have your performance dropped after it?

Read

How to create a CI/CD pipeline for a React app (2nd part)

In the 1st part of the tutorial for creating a CI/CD pipeline for a React app, we saw how to create docker containers for dev, testing and production enviroments. In this 2nd part we will see how to integrate a CI service like Travis CI and deploy our app to AWS.

Read

How to create a CI/CD pipeline for a React app (1st part)

I wanted to write a tutorial on how to dockerize an application, make it production ready, setup CI/CD workflow and eventually deploy it to AWS. So here in that first part we will see how to dockerize a react app for development, testing and...

Read

Code Smell: Too much indirection

Indirection is the ability to reference something using a name, reference, or container instead of the value itself. When it is overused though, it can make the really difficult to follow the flow of the code. Imagine the following...

Read

Code Smell: Divergent Change

Continuing the series of blog posts about code smells, let's talk about `Divergent Change`. Divergent change occurs when you have to do too many changes in a class/module to...

Read

Code Smell: Feature Envy (or Data Envy)

Feature Envy and Data Envy are two similar and typical code smells. One class/component is more...

Read

Materialized Views to Improve Aggregations Performance

Materialized View is a pre-computed query that is stored for later use with the goal to not re-peat the query again, the drawback of-course is that the data that you are getting may not be fresh enough...

Read

Working on vacations (as a Lead)

These are some random thoughs/tips, related leadership and working on vacations. If you are team-lead/manager/supervisor/whatever-you-call-it: ...

Read

Frontend Architecture in the hooks era

Hooks have released a few months ago and the community is still playing around with them and tries to find the best patterns. At this point it doesn't seem to be one single best solution on how to completely replace state management libs, both in terms of code but also in terms of folder/file structure in the project, so here I am mostly document my journey into that process, and what works best for me.

Read

Performance is a requirement

Most of the times as software engineers we are getting requirements that describe the functional scope of a feature. The tickets that we are working on usually look something like: _As user I want to be able to create an account by entering a name and an optional address so that I can start playing the game_. The ticket do not describe the non-functional requirements of the feature. For example, it is a completely different experience if the user is able to type her name quickly versus facing some short of lag:

Read

Faster sampling in PostgreSQL

Many times we want to display some random data to the user, for example if you have an e-commerce website apart from the top products or some list of products that a fancy recommendation system generates, we want to display to the user a list of...

Read

It's all Greek to me: Thoughts on code readability and aesthetics

Do you remember the first time you wrote something in a new programming language and you run it, and it worked? Didn't you had this 'OwO, I am a Perl developer now, let's put it on the CV' feeling? Until, someone else come to you and say, 'No, no, no, you can squeeze these 10 lines, into this one-liner'...

Read

Lazy and infinite data structures

Many times we encounter situations where our code depends on a complicated data structure or a data structure that has implicit semantics. For example...

Read

Compensation does not guarantee motivation

Let's start with a story. A few years ago I was working in a start-up, the company had just started, and we were working on the first ever product. There were hundreds of bugs and performance issues, the server was crashing every few minutes...

Read

Giving praise

Just some thoughts on giving praise. One of the biggest mistakes that you can make as a manager/team-lead/head-of-whatever is to give praise only to a few of the people who worked on a project...

Read

Ruby: Provide ways to iterate over collections

Sometimes we have classes that represent collections, for example a class `Group` can...

Read

Implementing feature toggles for a React App using Webpack

Feature switches/toggles are an important technique that can help us deploy code in various environments under different conditions without blocking other developers in the team (or other teams) from releasing their features...

Read

Pseudomandatory parameters in es6 functions

In many programming languages, the parameters of a function are by default mandatory and the developer has to explicitly define that a parameter is optional. In Javascript, every parameter is...

Read

Backpressure for smoother user experience in low-end devices

If you are building applications that consume real-time data you may have faced a situation where the component or service that consumes the data cannot keep up with the volume or speed of the produced data. The **producer** module of the system is emitting data faster than...

Read

Hide depedency to a data structure

Many times we encounter situations where our code depends on a complicated data structure or a data structure that has implicit semantics. For example...

Read

Remove argument-order dependency and provide defaults

Argument order in function signature is a common source of bugs and frustration. Imagine you have the following Vehicle class, its constructor accepts values to instantiate an object...

Read

Null object pattern

Many times functions accept object references that can be null, and we tend to add if statements to treat the special case where null is passed to a function, and either provide a default response or...

Read