Testing Tips: Avoid sleep in tests

Hi 👋, In this article I wanna show a testing tip that I’ve recently learned myself by reading Software Engineering at Google: Lessons Learned from Programming Over Time. The technique improved the way I write unit tests. When I’m writing bigger unit tests, I have execute something in the background, like for example publishing a message to a message broker, wait for the message to be published and then consume it to test that what I published is correct....

July 12, 2022 · 4 min · Denis Nuțiu

The Linked List

Introduction A linked list is a fundamental data structure which consists of Nodes that are connected to each other. Other variations are: Double linked list Circular linked list (circular buffer) The Singly Linked List To visualize the data structure, if you want to store two integers 10 and 20 you will have a 2 node linked list that will have: [Node 1, Value 10] -> [Node 2, Value: 20] -> [null]...

April 17, 2024 · 5 min · Denis Nutiu

Cancellation Token Pattern in Python

Hello! 👋 The Cancellation Token Pattern article is a pattern inspired by C#’s CancellationToken struct and Golang’s context package. The main idea of the pattern is to allow the user of an API to cancel its operations, but in order for this pattern to work, the API must be written with the cancellation token pattern in mind. To use the pattern, you need a class that represents a cancellation token. Here’s my simple version:...

March 9, 2024 · 3 min · Denis Nutiu

How to install HP LaserJet 107a Drivers on Linux

Hello everyone! 👋 I’ve recently installed Fedora on my main PC and I wanted to write this post to serve me as a memo on how to install the HP LaserJet 107 printer driver. The driver should also be compatible with the following products and generally HP’s LaserJet 100 printer series. HP LaserJet 107a HP LaserJet 105a HP LaserJet 103a Installing the Drivers Installing the drivers requires Python3 available on your system if I remember correctly, it should be already available on Fedora and Ubuntu....

February 21, 2024 · 2 min · Denis Nutiu

My experience with BambuLab A1 and 3D printing

Introduction Hello everyone, 👋 This is my first post of 2024, and ever since I’ve started the blog in ~2018, I’ve had engineering Programming, Cloud and Engineering! 👨‍🔬; in the blog’s description. 😄 I made a few posts related to “engineering” other than Software Engineering. In 2018, I was still studying computer science and engineering at UPT, and I was fascinated by the Electrical Engineering courses. I figured that I’d write blog posts about circuit analysis techniques such as Ohm’s Law, Thévenin’s Theorem, Mesh Analysis, and so on....

February 4, 2024 · 4 min · Denis Nutiu

Implementing cat with Kotlin Native

Introduction Hello! 👋 In this article we’ll implement the cat command utility which is used in many Unix like systems like Linux and macOS. To implement it, we’ll use kotlin and to drop the Java Virtual Machine (JVM). We’ll build a binary directly with Kotlin Native. In the end, we’ll get an executable that we can simply run on our Linux or macOS box. What is cat? The catutility which has purpose of concatenating files....

December 24, 2023 · 5 min · Denis Nutiu

Learning Kotlin

Introduction Hello everyone! 👋 The year of 2023 has come closely to an end, and I want to write a short article about my experience with Kotlin and what other programming languages I’ve tried this year. Outside work, I like experimenting with new programming languages and technologies. I don’t usually build side projects in the languages and frameworks that I use full time at work because I don’t find it fun....

December 11, 2023 · 4 min · Denis Nutiu

ncdu: NCurses Disk Usage

Hello everyone! 👋 This is a short article about a handy tool called ncdu. The tool helps you delete files and directories from your filesystem. I use it daily to clear junk files from my workstation and the servers that I’m working on. 🧹 The way it works is quite simple: Navigate to the directory you want to clean and type ncdu. Select and delete files and directories. Be cautious ⚠️ with what you’re deleting....

December 11, 2023 · 1 min · Denis Nutiu

Idempotency in Your API

Introduction Idempotency is a crucial property in the world of APIs, ensuring that operations can be applied multiple times without changing the result. In this post, we’ll explore six effective strategies to achieve idempotency in your API, drawing inspiration from real-world examples and distributed systems principles. Idempotency Explained The light switch analogy is often used to explain idempotence. Consider a light switch in a room. The operation of turning the light switch on or off is idempotent....

November 11, 2023 · 4 min · Denis Nutiu

Windows Task Scheduler - Quick Start

Introduction Hello everyone 👋, This is a quick post about the windows task scheduler, if you’re a Software Developer using Windows the task scheduler is a great tool to automate tasks. I see it as a combination of cron and systemd (if you’re a Linux user you know what I’m talking about). For my personal use case, I use the task scheduler to download more images from the internet to improve a machine learning model used to classify images....

November 11, 2023 · 3 min · Denis Nutiu