The "Forgetful" pattern: A method for Deep Copying with unique instances

Introduction

In this article I will showcase you a recent trick I've learned when glancing through boto3 source code. There was a particular class which name was even stranger than its usage: ForgetfulDict. We'll break down its surprisingly simple implementation, understand the specific problem it solves within Python's copy module, and see how this pattern can be useful in other contexts.

Prerequisites:

  • Basic Python understanding
Read more  ↩︎

Book summary and review #0: Mara Bos - Rust Atomics and Locks

My TL over at STX has given me a good self-improvement idea - for every book I've read, I should write something about it. It can be some kind of side project that uses the ideas from the book or a blog post summarising it. In this series, I am going to do a little bit of both. Going over the most interesting points to me that I've got to known thanks to said book, as well as try (more or less) use it practically.

The book we put on the spot as a first one is (one that I've read most recently since hearing mentioned advice) - Rust Atomics and Locks by Mara Bos. Mara is an excellent engineer, current Rust library team dev and a fantastic writer. You can get to know her more on one of following websites:

Since I am not a book reviewer, I don't exactly know how to conduct one, so I am going to approach it how I see it make most sense - going chapter by chapter. This article is for those who are not yet sure if this book is worth a read (spoiler - it is) and is mainly targeted for someone interested in a little bit lower level of concurrency, with a sprinkle of Rust, than what's usually used. We rarely, if ever, write these structures ourselves.

Read more  ↩︎

Tech interview process improvements

I've been a technical interviewer where I work for the last year for various positions in various countries. I've come to realise that our interview process is flawed and so in this article I will try to justify my position on it as well as propose improvements. Before you read further, if there is one thing that you should get out of this article, it's this: The candidate is entitled to receive proper feedback from the interview. You probably received one of those before (I did too): "we've found someone else", "we are looking for someone more qualified" or simply ghosting you AFTER you've done a take-home task, on-site interview and 2 HR calls. Laughably pathetic and speaks volumes on the place you were trying to get into. Either way, moving on...

Read more  ↩︎

My favourite interview question

I've been a technical interviewer where I work for the last year for various positions in various countries, and since then, I've worked out a flow for interviews that I want to conduct. The approach, of course, has to differ depending on the candidate's experience and for what position they are applying. After all, data engineering/machine learning departments have different requirements than backend teams. Nevertheless, the goal is always to get to know the applicant better and understand their thought process, so that I can accurately judge their experience.

Read more  ↩︎

Python `__init_subclass__` demystified

Introduction

In this article I will try to demystify less commonly known function __init_subclass__ introduced in PEP 487, explain how it works and show you real life example of how you can leverage it in Python 3.11 for your own benefit.

Prerequisites:

  • Basic python understanding
Read more  ↩︎