Posts by Category

python

Building a hash table in python

5 minute read

Recently, while I was reading about the implementation of Hash in ruby (similar to a dict in python) and wrote a simple implementation of a hash table in pyt...

Cleanup functions using the atexit module

4 minute read

Recently, I was going through the documentation and codebase of a python package (specifically kafka-python) and was curious about how cleaning up resources ...

Mocking in python with autospec

4 minute read

Mocking and mocks are really useful when writing tests, as they allow isolating the test target from its dependencies, leading to less fragile tests.

Property testing with hypothesis

5 minute read

Testing is a huge field and takes a significant amount of time to master. There are several types of tests, like unit, functional, integration, end-to-end (e...

Dependency injection in python

6 minute read

Dependency injection is a technique that “injects”/passes dependencies between objects in a way that leads to code that is easier to test and maintain.

Queues in python

3 minute read

Queues are a really useful data structure that are being frequently used both in application code and are also utilized by libraries. In this post, we’ll see...

Memoization in python

3 minute read

Memoization is loosely defined as an optimization technique that is usually applied on functions that are quite expensive to run.

Quick tip: Generating unique IDs in python

3 minute read

There are several cases where we need to generate a unique identifier in our applications. One way to do it is to roll your own implementation, usually rando...

Back to Top ↑

go

Implementing a circuit breaker in go

8 minute read

Recently I read about the circuit breaker pattern and I believe it is an interesting pattern with many use cases in today’s microservices-centric universe :)

Logging in go

5 minute read

It is common knowledge that logging is super important. It is necessary for debugging purposes on your local environment or for tracing some weird behavior i...

Load test your API with vegeta

6 minute read

During the last few years, when I want to load test my APIs, my go to tool is vegeta. It is an awesome load testing command line tool. It is easy to use and ...

Implementing a bit array in go

5 minute read

A bit array (or bit set) is an array data structure that stores bits (0 or 1 value) in a space efficient, compact way (read more about bit arrays on wikipedi...

Validating an email in go

2 minute read

Recently, I wanted to validate emails for a small project I work on. I didn’t want to search for libraries that might do the job, so I decided to build the v...

How to time out requests in your go API

5 minute read

When building an API (or other kinds of applications, to be frank), sometimes it is useful to set some constraints to the task being carried out (e.g. handli...

Embedded and promoted fields in go structs

3 minute read

Structs are one of the most widely used data structures in go. Combined with interfaces and methods, structs allow us model our data in a way that is somehow...

How to use nil channels in Go ?

5 minute read

Channels is an integral part of Go applications. They are typed conduits that allow communication between different parts of an application. Recently, I came...

Back to Top ↑

ruby

Encryption the easy way with lockbox gem

6 minute read

There are several occasions where we need to encrypt some data, whether they are fields in a database or files. In some cases, encryption is needed in order ...

Searching with an inverted index in Ruby

5 minute read

Recently, I read blog post about elasticsearch, called Elasticsearch from the Bottom Up. A data structure that is very important to performing full-text sear...

How to work with decorators in ruby

4 minute read

Sometimes, we find ourselves wanting to add functionality to objects of a class without affecting all objects of the class (unlike inheritance or composition...

Back to Top ↑

theory

SOLID principles: Single responsibility

5 minute read

SOLID is a set of principles that lead to cleaner, more maintenable and extensible code. The first principle is the Single Responsibility Principle or SRP.

Functional programming with Javascript

10 minute read

In the past few years, functional programming’s popularity has increased and new languages (like elixir or scala) that embrace it have been created. But what...

Data structures: Bloom filter

6 minute read

As we all know, there is a vast number of data structures out there. One of the data structure categories is probabilistic data structures. Probabilistic dat...

Back to Top ↑

data

Queues in python

3 minute read

Queues are a really useful data structure that are being frequently used both in application code and are also utilized by libraries. In this post, we’ll see...

Data structures: Bloom filter

6 minute read

As we all know, there is a vast number of data structures out there. One of the data structure categories is probabilistic data structures. Probabilistic dat...

Back to Top ↑

channels

How to use nil channels in Go ?

5 minute read

Channels is an integral part of Go applications. They are typed conduits that allow communication between different parts of an application. Recently, I came...

Back to Top ↑

structs

Embedded and promoted fields in go structs

3 minute read

Structs are one of the most widely used data structures in go. Combined with interfaces and methods, structs allow us model our data in a way that is somehow...

Back to Top ↑

decorators

How to work with decorators in ruby

4 minute read

Sometimes, we find ourselves wanting to add functionality to objects of a class without affecting all objects of the class (unlike inheritance or composition...

Back to Top ↑

http

How to time out requests in your go API

5 minute read

When building an API (or other kinds of applications, to be frank), sometimes it is useful to set some constraints to the task being carried out (e.g. handli...

Back to Top ↑

timeout

How to time out requests in your go API

5 minute read

When building an API (or other kinds of applications, to be frank), sometimes it is useful to set some constraints to the task being carried out (e.g. handli...

Back to Top ↑

structures

Data structures: Bloom filter

6 minute read

As we all know, there is a vast number of data structures out there. One of the data structure categories is probabilistic data structures. Probabilistic dat...

Back to Top ↑

tools

Awesome cli tools: jq json processor

5 minute read

There are some command line tools that I use almost on a daily basis and make my life a lot easier. One of those tools is jq. Jq is a lightweight and flexibl...

Back to Top ↑

jq

Awesome cli tools: jq json processor

5 minute read

There are some command line tools that I use almost on a daily basis and make my life a lot easier. One of those tools is jq. Jq is a lightweight and flexibl...

Back to Top ↑

json

Awesome cli tools: jq json processor

5 minute read

There are some command line tools that I use almost on a daily basis and make my life a lot easier. One of those tools is jq. Jq is a lightweight and flexibl...

Back to Top ↑

email

Validating an email in go

2 minute read

Recently, I wanted to validate emails for a small project I work on. I didn’t want to search for libraries that might do the job, so I decided to build the v...

Back to Top ↑

validation

Validating an email in go

2 minute read

Recently, I wanted to validate emails for a small project I work on. I didn’t want to search for libraries that might do the job, so I decided to build the v...

Back to Top ↑

tracing

Distributed tracing with Zipkin

7 minute read

Nowadays, more and more projects are built using the service-oriented architecture (SOA) and more specifically using microservices: several services that hav...

Back to Top ↑

microservices

Distributed tracing with Zipkin

7 minute read

Nowadays, more and more projects are built using the service-oriented architecture (SOA) and more specifically using microservices: several services that hav...

Back to Top ↑

distributed

Distributed tracing with Zipkin

7 minute read

Nowadays, more and more projects are built using the service-oriented architecture (SOA) and more specifically using microservices: several services that hav...

Back to Top ↑

Kafka

Using Kafka log compaction

9 minute read

If you are working in a service oriented architecture (e.g. building or maintaining microservices), there is a good chance you have used, are currently using...

Back to Top ↑

compaction

Using Kafka log compaction

9 minute read

If you are working in a service oriented architecture (e.g. building or maintaining microservices), there is a good chance you have used, are currently using...

Back to Top ↑

java

Back to Top ↑

exceptions

Back to Top ↑

tips

Back to Top ↑

bitset

Implementing a bit array in go

5 minute read

A bit array (or bit set) is an array data structure that stores bits (0 or 1 value) in a space efficient, compact way (read more about bit arrays on wikipedi...

Back to Top ↑

bit-array

Implementing a bit array in go

5 minute read

A bit array (or bit set) is an array data structure that stores bits (0 or 1 value) in a space efficient, compact way (read more about bit arrays on wikipedi...

Back to Top ↑

vegeta

Load test your API with vegeta

6 minute read

During the last few years, when I want to load test my APIs, my go to tool is vegeta. It is an awesome load testing command line tool. It is easy to use and ...

Back to Top ↑

benchmarking

Load test your API with vegeta

6 minute read

During the last few years, when I want to load test my APIs, my go to tool is vegeta. It is an awesome load testing command line tool. It is easy to use and ...

Back to Top ↑

index

Searching with an inverted index in Ruby

5 minute read

Recently, I read blog post about elasticsearch, called Elasticsearch from the Bottom Up. A data structure that is very important to performing full-text sear...

Back to Top ↑

memory

Back to Top ↑

string

Back to Top ↑

logging

Logging in go

5 minute read

It is common knowledge that logging is super important. It is necessary for debugging purposes on your local environment or for tracing some weird behavior i...

Back to Top ↑

patterns

Implementing a circuit breaker in go

8 minute read

Recently I read about the circuit breaker pattern and I believe it is an interesting pattern with many use cases in today’s microservices-centric universe :)

Back to Top ↑

encryption

Encryption the easy way with lockbox gem

6 minute read

There are several occasions where we need to encrypt some data, whether they are fields in a database or files. In some cases, encryption is needed in order ...

Back to Top ↑

javascript

Functional programming with Javascript

10 minute read

In the past few years, functional programming’s popularity has increased and new languages (like elixir or scala) that embrace it have been created. But what...

Back to Top ↑

functional

Functional programming with Javascript

10 minute read

In the past few years, functional programming’s popularity has increased and new languages (like elixir or scala) that embrace it have been created. But what...

Back to Top ↑

parsing

Back to Top ↑

pyparsing

Back to Top ↑

uuid

Quick tip: Generating unique IDs in python

3 minute read

There are several cases where we need to generate a unique identifier in our applications. One way to do it is to roll your own implementation, usually rando...

Back to Top ↑

solid

SOLID principles: Single responsibility

5 minute read

SOLID is a set of principles that lead to cleaner, more maintenable and extensible code. The first principle is the Single Responsibility Principle or SRP.

Back to Top ↑

principles

SOLID principles: Single responsibility

5 minute read

SOLID is a set of principles that lead to cleaner, more maintenable and extensible code. The first principle is the Single Responsibility Principle or SRP.

Back to Top ↑

memoization

Memoization in python

3 minute read

Memoization is loosely defined as an optimization technique that is usually applied on functions that are quite expensive to run.

Back to Top ↑

queues

Queues in python

3 minute read

Queues are a really useful data structure that are being frequently used both in application code and are also utilized by libraries. In this post, we’ll see...

Back to Top ↑

dependency-injection

Dependency injection in python

6 minute read

Dependency injection is a technique that “injects”/passes dependencies between objects in a way that leads to code that is easier to test and maintain.

Back to Top ↑

testing

Property testing with hypothesis

5 minute read

Testing is a huge field and takes a significant amount of time to master. There are several types of tests, like unit, functional, integration, end-to-end (e...

Back to Top ↑

flask

Back to Top ↑

logzio

Back to Top ↑

logs

Back to Top ↑

cli

Awesome cli tools: HTTPie http client

4 minute read

We frequently find ourselves making http calls from the terminal: for testing out an external API we’re integrating into our projects, or for testing APIs we...

Back to Top ↑

httpie

Awesome cli tools: HTTPie http client

4 minute read

We frequently find ourselves making http calls from the terminal: for testing out an external API we’re integrating into our projects, or for testing APIs we...

Back to Top ↑

unittest

Mocking in python with autospec

4 minute read

Mocking and mocks are really useful when writing tests, as they allow isolating the test target from its dependencies, leading to less fragile tests.

Back to Top ↑

mock

Mocking in python with autospec

4 minute read

Mocking and mocks are really useful when writing tests, as they allow isolating the test target from its dependencies, leading to less fragile tests.

Back to Top ↑

autospec

Mocking in python with autospec

4 minute read

Mocking and mocks are really useful when writing tests, as they allow isolating the test target from its dependencies, leading to less fragile tests.

Back to Top ↑

pytest

Back to Top ↑

parametrize

Back to Top ↑

migrations

Database migrations with Dbmate

6 minute read

There are some tools that are quite essentials for web applications. When working on the back end side of your application, you’ll most probably need to use ...

Back to Top ↑

database

Database migrations with Dbmate

6 minute read

There are some tools that are quite essentials for web applications. When working on the back end side of your application, you’ll most probably need to use ...

Back to Top ↑

sql

Database migrations with Dbmate

6 minute read

There are some tools that are quite essentials for web applications. When working on the back end side of your application, you’ll most probably need to use ...

Back to Top ↑

sqlalchemy

Back to Top ↑

orm

Back to Top ↑

atexit

Cleanup functions using the atexit module

4 minute read

Recently, I was going through the documentation and codebase of a python package (specifically kafka-python) and was curious about how cleaning up resources ...

Back to Top ↑

rails

Back to Top ↑

activerecord

Back to Top ↑

llm

Back to Top ↑

pdf

Back to Top ↑

hashing

Building a hash table in python

5 minute read

Recently, while I was reading about the implementation of Hash in ruby (similar to a dict in python) and wrote a simple implementation of a hash table in pyt...

Back to Top ↑