Martin Heinz Avatar

Martin Heinz

Martin Heinz martinheinz.dev

Make your CLI demos a breeze with zero stress and zero mistakes

Running live demos can be stressful. You know what you want to say and show. You prepare the CLI commands you want to run to best showcase what you’ve built, but then you waste time typing long commands; you make typos; the commands fail or take way too long to complete. Maybe they depend on external system (network, APIs, cloud, …) and of course it’s not cooperating while you’re running your live demo.

Here’s how you can avoid all of the above by scripting, automating and recording your demos, so that you never have to stress about showcasing ever again…

Martin Heinz martinheinz.dev

Why I will never use Alpine Linux ever again

Nowadays, Alpine Linux is one of the most popular options for container base images. Many people (maybe including you) use it for anything and everything. Some people use it because of its small size, some because of habit and some, just because they copy-pasted a Dockerfile from some tutorial. Yet, there are plenty of reasons why you should not use Alpine for your container images, some of which can cause you great amount of grief…

Martin Heinz martinheinz.dev

A deep dive into resource management in Kubernetes

There’s a lot of “magic” that happens behind the scenes to make whole Kubernetes work. One of those is resource management and resource allocation done by Linux cgroups.

In this article we will take a deep dive into what cgroups are, how Kubernetes uses them to manage Node resources, and how we can take advantage of them beyond setting resource requests and limits on Pods.

Martin Heinz martinheinz.dev

Python magic methods you haven’t heard about

Python’s magic methods - also known as dunder (double underscore) methods - can be used to implement a lot of cool things. Most of the time we use them for simple stuff, such as constructors (__init__), string representation (__str__, __repr__) or arithmetic operators (__add__/__mul__). There are however many more magic methods which you probably haven’t heard about and in this article we will explore all of them (even the hidden and undocumented).

Martin Heinz martinheinz.dev

Kubernetes' brand new Checkpointing API lets you backup-and-restore containers without every stopping them

Kubernetes v1.25 introduced Container Checkpointing API as an alpha feature. This provides a way to backup-and-restore containers running in Pods, without ever stopping them.

This feature is primarily aimed at forensic analysis, but general backup-and-restore is something any Kubernetes user can take advantage of.

So, let’s take a look at this brand-new feature and see how we can enable it in our clusters and leverage it for backup-and-restore or forensic analysis.

Martin Heinz martinheinz.dev

Python CLI tricks that don't require any code whatsoever

Out-of-the-box, the Python standard library ships with many great libraries, some of which provide CLIs, allowing us to do many cool things directly from terminal without needing to even open a .py file.

This includes things like starting a webserver, opening a browser, parsing JSON files, benchmarking programs and many more, all of which we will explore in this article.

Martin Heinz martinheinz.dev

Here's why you should be using Python's walrus operator

The assignment operator - or walrus operator as we all know it - is a feature that’s been in Python for a while now (since 3.8), yet it’s still somewhat controversial and many people have unfounded hate for it.

In this article I will try to convince you that the walrus operator really is a good addition to the language and that if you use it properly, then it can help you make your code more concise and readable.

Martin Heinz martinheinz.dev

Data and system visualization tools to boost your productivity

As files, datasets and configurations grow, it gets increasingly difficult to navigate them. There are however many tools out there, that can help you to be more productive when dealing with large JSON and YAML files, complicated regular expressions, confusing SQL database relationships, complex development environments and many others.

Martin Heinz martinheinz.dev

Why and how you should leave Google Analytics

With the recent events relating to Google Analytics platform, it’s becoming very clear that the time has come for many of us to migrate from Google Analytics to different platforms.

In this article we will go over both the “Why?”, so that you can make an informed decision whether you need to migrate of not, as well as the “How?” of migrating from Google Analytics - that is, quickly and easily taking your data and moving to different analytics platform without too much hassle.

Martin Heinz martinheinz.dev

Upcoming Python features brought to you by PEPs

Before any new feature, change or improvement makes it into Python, there needs to be a Python Enhancement Proposal, also knows as PEP, outlining the proposed change. These PEPs are a great way of getting the freshest info about what might be included in the upcoming Python releases. So, in this article we will go over all the proposals that are going to bring some exciting new Python features in a near future!

Martin Heinz martinheinz.dev

Building GitHub Apps with Go

If you’re using GitHub as your version control system of choice then GitHub Apps can be incredibly useful for many tasks including building CI/CD, managing repositories, querying statistical data and much more. In this article we will walk through the process of building such an app in Go including setting up the GitHub integration, authenticating with GitHub, listening to webhooks, querying GitHub API and more.

Martin Heinz martinheinz.dev

Profiling and analyzing performance of Python programs

Martin Heinz on the tools/techniques for finding bottlenecks in your Python code. And fixing them, fast.

The first rule of optimization is to not do it. If you really have to though, then optimize where appropriate. Use the above profiling tools to find bottlenecks, so you don’t waste time optimizing some inconsequential piece of code. It’s also useful to create a reproducible benchmark for the piece of code you’re trying to optimize, so that you can measure the actual improvement.

Martin Heinz martinheinz.dev

A solution to software supply chain security

In the recent months there’s been a lot of noise in the area of supply chain security because of increase in attacks, with notable ones like Microsoft Exchange Server or SolarWinds breach. These attacks could have been prevented with proper tools in place, yet finding the right tool for the job might be difficult as this area is hard to navigate and most of us - developers - aren’t security experts. There’s however a project that can solve this. Its name is sigstore and in this article we will look at what it does, why we need it and how it fits into landscape of existing tools in this area.

Martin Heinz martinheinz.dev

The unknown features of Python's `operator` module

At the first glance Python’s operator module might not seem very interesting. It includes many operator functions for arithmetic and binary operations and a couple of convenience and helper functions. They might not seem so useful, but with help of just a few of these functions you can make your code faster, more concise, more readable and more functional. So, in this article we will explore this great Python module and make the most out of the every function included in it.

Martin Heinz martinheinz.dev

Could Kubernetes pods ever become deprecated?

In any software project, over time new features and APIs are added and from time-to-time some of them also become deprecated and eventually get removed. Even huge project such as Kubernetes is no exception to this, yet core parts of its API don’t really come to mind when thinking about deprecating and eventual removal. So, the question is - could a core object or API in Kubernetes, such as Pod, Deployment or Service be removed and if so, how would that go?

Martin Heinz martinheinz.dev

The easiest way to debug Kubernetes workloads

Debugging containerized workloads is a daily task for everyone who works with Kubernetes, which can be made much simpler with kubectl debug - a beta feature of Kubernetes. In the article you will learn how to make it available in your cluster, how it works, as well as some examples how you can use it to easily debug both Kubernetes Pods and worker Nodes.

Martin Heinz martinheinz.dev

Let's dive deep into Docker's union file system

Working with Docker CLI is very straightforward - you just build, run, inspect, pull and push containers and images, but have you ever wondered how do the internals behind this Docker interface actually work?

Behind this simple interface hides a lot of cool technologies and in this article you can learn about one of them - the union filesystem - the underlying filesystem behind all the container and image layers.

Player art
  0:00 / 0:00