Posts

Programming for Recruiters - On Software Architecture

published on
I have quite a few friends and acquaintances who are working in recruiting or areas where they require some knowledge around software engineering but not too much. I’ve decided to start a series where we are going to explore some basic programming concepts targeting you, recruiters and sourcers, so you don’t get super confused when you are talking to your respective engineering manager when they start talking about monads and other insane crap. Read More...

Asynchronous Caching with Python

published on
We’ve already talked a little bit about the new features in Pyhton 3, specifically with the type hinting system. Another feature that got shipped with version 3.6.0 is the native language support for asynchronous computation. Today we are going to evaluate how we can do caching in this new asynchronous environment without introducing any blocking into our code. Simple asynchronous code Let’s consider the following implementation of the Fibonacci numbers, wrapped with a tiny execution and measuring script: Read More...

Sniffing the Architecture - Sentinel

published on
In the first edition of this series, we’ve looked at the ominous singleton pattern. The singleton pattern can be useful in some languages, like C++ or Java, however, it doesn’t make too much sense in other ones, like Python. Today we are going to take a look at a design pattern that is more common in multiple languanges, the sentinel. The definition The sentinel design pattern is used for cases when we would like to indicate missing data. Read More...

Python Typeguard Benchmarks

published on
I’ve recently started looking into Python types and how to do them efficiently. The Python typing module turns out to be a very powerful tool introduced in 2015 first to version 3.5.0. The basic idea behind the module was to provide tooling engineers with simple ways of helping developers to know if they are using their methods and classes in a proper way by default or not. def add(a: int, b: int) -> int: return a + b add(1, 2) # Just fine add('cat', 'dog') # expected type 'int' got 'str' instead This is awesome! Read More...

Sniffing the Architecture - Singleton

published on
In this series, we are looking at various code architecture patterns. In this one, we are going to take a peek at one of the favorite interview warm-up questions there is: what is a singleton? The definition Imagine a board game that is played by cards. There are ones that look the same and you need to collect multiple of them in order to get points. In addition to this, there’s a card that makes everyone pass on their cards to the player to the right. Read More...

UUID as a Random String

published on
Okay, to be more precise, the issue is when we are using UUID4. Recently, I’ve been playing around with distributed tracing and the packages and methodologies lying behind it. This is just a shot I took in Amsterdam One of the base ideas of distributed tracing is using a random identifier that can identify a request bouncing between different systems and collecting information that can be identified at the end. Read More...