RSSAmplifier

Blog

vladkens.cc

Practical software engineering notes

vladkens.ccRSS feed ↗26 posts

Latest posts

Tracking Limits in Codex and Claude Code

Still tweaking coding agents to fit my workflow. Last time it was about the work process, now a small thing — tracking limits via statusline. I use two coding agents: Codex and Claude Code. Both work fine for me, and I switch between them freely — sometimes because one runs out of limits, sometimes just because I keep different tasks in different clients. Claude Code became my main one — that's…

Spec-Driven Development in Practice

Tried two tools for Spec-Driven Development on my pet project — delta-farmer (51 files, 12k lines of code). Compared spec-kit and cc-thingz : ran each through two cases — security analysis and regular coding. Tools spec-kit ( github ) — open source toolkit for Spec-Driven Development. Helps you focus on product scenarios and predictable results instead of vibe coding from scratch. Works on top of…

My 2025 Summary

Another year is coming to an end, and following my new tradition , I would like to sum up some results in writing. Overall, the year felt rather passive for me. I don’t remember planning any big things, but still, previous years were more active for me in terms of creativity and beyond (open source, learning new skills, and so on). Open Source This year, I didn’t release any new open-source…

Optimizing RIPEMD-160 with SIMD

I have a hobby project – ecloop – a Bitcoin key "calculator" designed to find Bitcoin puzzles, verify brain wallets, and so on. The mathematical chances of finding a private key from a used address tend toward zero. I'm interested in this program as a collection of tricks involving the elliptic curve (secp256k1) and as a way to practice low-level programming (fast 256-bit arithmetic), so I…

From iTerm To WezTerm

For many years, I used iTerm2 as my main terminal emulator and probably spent hundreds of hours in it. Overall, I was satisfied with it, despite some strange recent updates like adding AI features, KeyChain integration, and security vulnerabilities . In recent years, new terminal emulators have appeared. I tried using them mainly for testing macmon . A couple of years ago, I tried switching to…

2024 In Review

I have never written an annual report on my work before, but since I also spend time on open source projects, I decided to write one (maybe it will become a tradition). Programming Languages and Tools The most noticeable shift here was Rust, so it makes sense to start with it before the rest. Rust The main change in my work was the active use of Rust in the second half of the past year. I mainly…

Creating OG Images for Static Pages with Rust

OGP ( Open Graph Protocol ) is an HTML meta-tags specification for websites to make links look nice in third-party services such as Facebook, X, LinkedIn or chat apps. OGP also allows to specify a link to page thumbnail that will be shown as preview when link shared, which can increase clickability. Some blog engines have built-in functions for this. I use Zola (static page generator) to create…

Deploy FastAPI application with SQLite on Fly.io

Cloud solutions are good for medium and large projects, but too heavy for small personal projects. If you want to launch something small (a few api endpoins and a small repository), there are three options: Use the same approaches as for "big" projects (AWS ECS/EKS, RDS), but they are redundant, and infrastructure code can be larger than code of the actual project. Also it's expensive (~$100). Use…

Setting up WireGuard VPN at AWS with Terraform

All resources in AWS work inside private VPC. Sometimes you may need to access these resources from local computer (e.g. to interact with database). Some resources, like RDS, have the option to enable public access to them – but this is unsecure. Of course you can configure Security Group to allow access to public resource only from allowed IPs to make this setup a bit better, but still in this…

Fast multi-arch Docker build for Rust projects

Rust allows programs to run very fast and memory efficient, but it has a cost – compile time. In web development, it is standard practice to deliver programs as Docker images and then run them in Kubernetes / Amazon ECS / Docker Compose / etc. After the popularity of ARM processors in recent years, programmers have been faced with the additional step of preparing multi-arch Docker images (meaning…

apigen-ts – Simple TypeScript API Client Generator

OpenAPI / Swagger is a good way to describe API contracts between backend / frontend or different services. Nowadays frontend is almost always TypeScript + some framework (React, Vue, Angular, etc). Backend in turn can be in NodeJS (and then in principle you can share contracts with code reuse), or in another language (e.g. Python / Go / Scala / Rust) and then code reuse and API synchronization…

Table sorting and pagination with HTMX

I recently tried HTMX for my new project – ghstats – a dashboard of Github repository traffic in a single interface for longer than 14 days. This project was planned as a self-hosted service, so I was thinking about a really simple and memory-less tech stack. Last time I played with Rust, so I decided to use it instead of NodeJS / Python. Of course, if I'm generating static HTML on the server…

How to get macOS power metrics with Rust?

In this post, I’m going to talk about how macmon works, specifically where it gets system metrics. MacOS has a built-in powermetics utility that can show the current CPU core frequencies, utilisation, and power consumption. This program should take these values from the system somewhere. So the first thing to check is what shared libraries and function calls (symbols) are used. There are several…

macmon – Mac Usage Monitor in Terminal

When MacBook moved to ARM architecture (M1 processor), old system APIs stopped working and with them existing monitoring tools. However, macOS has a built-in console utility called powermetrics . It can show real-time resource consumption, but it does it in plain text. asitop is the first utility that allows users to view resource and energy consumption visually in a terminal. But it works on top…

REST API Deployment on AWS Lambda with Terraform (2023)

In this article I will show the way how to deploy AWS Lambda using Terraform, with support for code updates in a single workflow. The problem with AWS Lambda is that at the time of its creation we need to have prepared code in zip archive or Docker image uploaded to ECR, unlike ECS / Kubernetes service, where we just specify the path to the repository, which can be empty at the creation stage. So…

AWS ECS Cluster on EC2 with Terraform (2023)

This short guide will describe how to create an AWS ECS Cluster on EC2 in 2023. Basically there are already articles and code samples on the Internet, but some products in AWS are becoming obsolete (like Launch Configuration) and Terraform is undergoing API changes. So the purpose of this article is to show how to run ECS Cluster on EC2 with Terraform today. This article will look at how to create…

How to still scrape millions of tweets with twscrape

Twitter is a great place to gather data and assess various trends. Many analytics teams have used this source for their models. In February 2023, Twitter set unrealistic prices for its API, giving away crumbs of data for big bucks. Some started using libraries such as snscrape, which used web public APIs. But in April 2023, Twitter closed that option as well — making search only for authorized…

Better forms handling with react-use-form

React-use-form is a powerful library that simplifies form handling in React applications. Its intuitive API and robust feature set make it an excellent choice for developers. One of its standout features is the ability to work with custom components while minimizing re-renders of the main component, which is undeniably cool. This is achieved through the use of the Controller component, although…

Better date parsing for REST API with TypeScript

A little trick in TypeScript to make it easier to work with date strings in the API. Let’s say we have a model like this on the client: type User = { id : number ; username : string ; createdAt : Date ; } ; And we transfer this data in textual protocol in JSON format, e.g. via REST API or Websockets. And we get data in a format similar to this: GET /api/users/current { "id": "1234567890",…

Docker Compose templating using YAML merge feature

Useful trick when you have many of the same services in the docker-compose.yml file. Imagine that we have some data processing application which has a master service and several different workers. All applications are written in the same language and use a common base docker container. In general this is a fairly common configuration. The docker-compose.yml file will look something like this: v…

asdf — a good tool to manage python, node, etc runtime

When you develop or maintain many projects or use a microservice architecture, over time you have a zoo of different programming languages and their versions on your computer. Each service has its own dependencies. After a while it becomes hellishly difficult to work comfortably. Initially, I controlled runtimes versions through homebrew, switching them when needed. Later I switched to nvm for…

How to see env in Docker container?

TL;DR # get all cat /proc/1/environ | tr ' \0 ' ' \n ' # get by name cat /proc/1/environ | tr ' \0 ' ' \n ' | grep ABC Details When you develop services, sometimes you need to know what environment variables a process in a container is running with. For example if you use kubernetes and the environment variables come from several places or if you debug a production container and want to know what…

Keep Type Guards valid after refactoring in TypeScript

TypeScript is a great language for writing applications with type safety checks. Extending or refactoring code in TypeScript is much easier than in plain JavaScript. TypeScript has a nice built-in functionality for interface narrowing — Type Guards. But they don’t always protect against errors during code extension / refactoring, especially if you have a large project. Problem description For…

Sync all Git branches with remote

Sometimes there is no good internet connection, but you can still work at your laptop (merge PR, etc). It’s very handy to have a local full local copy of the Git repository of a project on your computer for this purpose. Unfortunately, Git itself doesn’t have out-of-the-box functionality to sync your local repository with a central server (like Github). I searched for a solution on stackoverflow,…

Docker Desktop alternative for MacOS

Starting in February 2022, Docker Desktop became a paid service for large teams. This may be a reason to look for alternatives to Docker Desktop. In my case one day Docker Desktop just stopped opening. The default solution of uninstalling and re-installing didn’t work. I didn’t have enough time to figure out the problem. So I looked for alternatives to running containers on macOS locally. One of…

How to reduce NodeJS Docker Image Size?

Hi. Today I want to talk about how to reduce the size of the Docker Image with NodeJS inside. In my company project we use NodeJS as a backend of one of the services. I noticed that there is a big delay between when the project is built in CI and when the new version of the service actually starts working. I started researching this topic and noticed that the NodeJS Docker Image size takes up…