Using Xcode Pre- and Post-actions to Observe Changes to Defaults

This article shows how to use Xcode scheme pre-/post-actions (Build and Run) to observe how your app creates and mutates defaults, by logging changes outside the app process. What are Defaults? In Swift and macOS development, defaults (via UserDefaults and the defaults CLI) are the lightweight persistence layer for user preferences, feature toggles, and other small pieces of state that need to survive app relaunches. They sit between in-memory settings and heavier storage options, letting you read and write simple values keyed by domain so the same code works in app code, Xcode schemes, and shell scripts. Because defaults are global to a domain, careful naming and clean-up are essential to avoid collisions and stale settings during development. ...

November 24, 2025 · 8 min · Konrad Zdeb

Automatically Refreshing NVim plugins

One of the key benefits of modern editors like NVim, Vim, or Emacs is the rich plugin ecosystem. After years with Vim, I switched to NVim and was immediately impressed by its plugin landscape. The Lazy plugin manager—available for NVim > 0.8—quickly became my favourite. Lazy simplifies plugin discovery and management. It offers an intuitive interface and powerful commands that make it easy to add, remove, or update plugins. ...

March 28, 2025 · 2 min · Konrad Zdeb

On Structuring Python Projects

Types of Projects The term Python project can be somewhat misleading. While languages like Swift are designed for specific purposes such as generating macOS/iOS apps, components, and frameworks, Python is used in a much more versatile manner. A Python project might range from an analytical solution developed across multiple Jupyter notebooks to a standalone script querying a database API and extracting results to an application or package facilitating the deployment of models. Each of these projects has its own key usability requirements. For instance, if end-users will utilize our project through a command-line interface, we will focus on argument parsing and other elements facilitating user-friendly execution. ...

March 16, 2022 · 4 min · Konrad Zdeb

Poor Man's Robust Shiny App Deployment (Part II)

Introduction This article draws on the past post concerned with utilisation of golem for robust deployment of analytical and reporting solutions. For this article, we will assume that we are working with defined working requirements that utilise some of the Labour Market Statistics disseminated through the nomis portal. Change Plan What we have Reporting requirements Past scriptts we used to create reports with accompanying instructions What we want Stronger business continuity - we want to be able to give some access to this project and don’t be concerned with missing files, outdated unavailable documentation and questions on how to produce updated reports. We want self-encompassing entity that takes of care of its technical requirements and user-interaction^[Good parallel can be drawn between this approach and manuals available with life-saving equipment. Equipment delivers technical capacity and manual ensures operational capacity. In case of an inexperienced user one is not useful without the other. We want to ensure that user with minimum required capacity can use the tools correctly.] Better reproducibility - Easier way to re-run reports on custom parameters Improved efficiency - We want to have a possibility of quickly creating updated and re-running past reports using the app. Better development: We want to ensure that any change requests to our reporting/analytical stack won’t break crucial functionalities. We want to modularise development so new corporate branding or visualisation requirements can be applied with no (or minimal) integration in analytical function Framework Package Future robust development owes a lot to solid foundations. As the aim is to capitalise on the robust R package architecture, we will look to leverage available supporting packages. As a first step, we will construct a new Shiny/R package infrastructure using golem. ...

February 12, 2021 · 3 min · Konrad

Three-Way Operator in R

Is there a merit for a three-way operator in R? Background In C++20 revision added “spaceship operator”, which is defined as follows: 1 2 3 (a <=> b) < 0 # if lhs < rhs (a <=> b) > 0 # if lhs > rhs (a <=> b) == 0 # if lhs and rhs are equal/equivalent. R implementation The behaviour can be achieved in R in multiple ways. A one straightforward approach would involve making use of the ifelse statement ifelse implementation Basic approach would involve comparing the two figures and respectively returning -1 or 1 consistently with the definition above. ...

May 8, 2020 · 6 min · Konrad