A simple GraphQL service example that implements a ToDo list

Image for post
Image for post

In this article, we will build a simple ToDo list using Apollo Server as the GraphQL server, TypeScript as the programming language, and Node.js as runtime. A simple example to show the potential of GraphQL.

For those who are not so familiar with GraphQL or are just giving their first steps into this technology, let’s understand what does it stand for.

GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools. …


Writing comprehensive logging using text styling and emojis

Image for post
Image for post

In this article, we will create a simple and comprehensive way of logging our application behavior and data by using text styling and emojis in TypeScript and Node.js.

This article came from the need I had when building a script that would fetch the status of users from a database and create a simple report with the returned status in the console.

Software development is a way to build experiences for end-users and sometimes we as software engineers are our own end users. …


Simple message producer and consumer in Kotlin to interact with the Apache Kafka streaming platform

Image for post
Image for post

In this article we will create a simple consumer and producer to interact with the Kafka platform, but before we start to write code and dive into exchanging messages let’s have a brief introduction to Kafka.

For this introduction, I will use as the main source of reference the Kafka official documentation to pick some of the concepts we will be using in this article if you want to get more details regarding Kafka you can go through the website intro and technical documentation. Let’s start!

Kafka is an open-source distributed streaming platform. But what does that mean concretely?

Technically speaking, event streaming is the practice of capturing data in real-time from event sources like databases, sensors, mobile devices, cloud services, and software applications in the form of streams of events; storing these event streams durably for later retrieval; manipulating, processing, and reacting to the event streams in real-time as well as retrospectively; and routing the event streams to different destination technologies as needed. Event streaming thus ensures a continuous flow and interpretation of data so that the right information is at the right place, at the right time. …


Let’s interact with RabbitMQ by creating a simple message producer and consumer in Kotlin

Image for post
Image for post

Asynchronous messaging is a mechanism that allows systems to communicate using messages and without having an immediate response. The messages are published by one system into a queue and then consumed, from the same queue, by another system later in time. The message broker is responsible for the queue and by implementing the messaging protocol.

Message brokers allow distributed applications to become more resilient so that when a request is made to our application backend, and for some reason, it fails to be attended, we can guarantee that it’s not lost forever and that we can re-process it when possible. They also promote decoupling between different parts of our distributed system (e.g. …


8 similarities between TypeScript and Kotlin with code examples

Image for post
Image for post

This article came up when I started to explore Kotlin after already had worked with TypeScript. The idea is to assemble in the same place some similarities between TypeScript and Kotlin at the basic syntax level and help those who know one of the languages to be introduced to the other.

Both TypeScript and Kotlin are open-source general-purpose programming languages and can briefly be described in the following manner,

TypeScript is a typed superset of JavaScript.

Kotlin is a statically typed, general-purpose programming language.

📝 Much more could be said to define both languages but for the scope of this article that is focused on the basic syntax of both languages, the above definition should be enough.


7 tips to improve your home office experience

Image for post
Image for post

Working from home has become a topic that companies need to understand and something that appears to be the future way of working for a lot of businesses.

For some people working from home can be quite a pain for multiple reasons. Below are some that I ear more frequently:

  • difficulty of focus
  • isolation
  • monotony
  • family and work-life happening in the same space

I believe discipline and a clear workday agenda are the key factors for being effective while working from home. …


Using React Testing Library as an alternative to Enzyme when testing React components

Image for post
Image for post

The motivation for this article came from the necessity of testing my website that I had just built using React and TypeScript.

During the last years I have been using React to build user interfaces and Enzyme as test library, but since React introduced functional components I started to feel that Enzyme was not close enough to the functional components approach and that I needed to shorten the distance between the code and the testing library, so I decided to give React Testing Library a try.

The goals of this article are to test:

  1. A single component in isolation
  2. The link navigation inside the…

About

Nuno Brites

Software engineer driven by curiosity 🚀 writing about software development and tech ✏️

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store