Interview with maker Jens Dittmar

This article is an interview with Jens Dittmar long-term friend and colleague. He also got me into 3d printing Hi Jens! Thanks for taking the time for this interview. Can you tell us a bit about yourself? My name is Jens and I am a software engineer, gamer, tinkerer and nerd. And I know, I…

The gridfinity system is a game changer

The System The gridfinity system is a storage solution based on a 4cm x 4cm grid. It was developed by Zack Freedman because he was as frustrated with standard sorting boxes. Baseplates Standard Weighted Baseplates   Container The charm of this container is the inner slope which makes taking out parts easier. Pen Holder Holders…

New Blog Post

What are Python properties?

In “What’s the difference between classmethod and staticmethod in Python?” we looked at static and class methods. The third big decorator is the @property decorator import pytest class Person: def __init__(self, name): self._name = name @property def name(self): print(‘Getting name’) return self._name @name.setter def name(self, value): print(f’Setting name to {value}’) self._name = value @name.deleter def…

New Blog Post

How to let test cases run in a predefined order

Motivation pytest executes tests in a randomly order. Sometimes it can be useful to have a predefined order in which test cases can run. pytest has a neat plugin for this specific use case. Installation pip install pytest-order Usage import pytest @pytest.mark.order(1) def test_foo(): assert True @pytest.mark.order(2) def test_bar(): assert True @pytest.mark.order(3) def test_foobar(): assert…

RAII in C++ and Python for custom types

Resource Acquisition Is Initialization (RAII) is a programming idiom that describes how resource acquisition and deallocation should be tied to object lifetime. Wikipedia demonstrates how the C++ standard library implements this idiom using the types std::lock_guard<> and std::ofstream as examples. But is it really necessary to implement this idiom in every type you create? Can’t…

How to manipulate nested dictionaries with dotty

Motivation Sometimes a task which should be easy can be hard to accomplish in practice. Manipulating nested dictionaries in Python seems to be such a task. Without dotty Accessing nested dictionaries looks like this: data = { ‘a’: { ‘b’: { ‘c’: ‘d’ } } } assert data[‘a’][‘b’][‘c’] == ‘d’ You have to chain the…

Introduction to VBA

A horrifying amount of business is still driven by Microsoft Excel. Need some stats? Excel. Need some number crunching? Excel Most of the time you can work with formulas in your sheet and you will be fine. But sometimes you need more power: Time to level up your VBA skills History VBA stands for “Visual…