Category: Development

Testing Isn't a Sunk Cost: How It Accelerates Your Team

2025-04-05
Testing Isn't a Sunk Cost: How It Accelerates Your Team

This article explores why software engineers commonly resist writing tests and emphasizes the importance of testing for improving code quality and team efficiency. The author uses personal experiences to illustrate that abandoning testing, even in high-pressure startup environments, is a mistake. The article highlights that testing isn't just about the distinctions between unit tests, integration tests, etc., but rather about verifying chunks of code that validate the core functionality. Tests should be on-demand, rapidly repeatable, replicable elsewhere, and automatable. The author also points out that writing tests forces developers to write more test-friendly code, leading to better code quality, increased modularity, and ultimately, improved team efficiency. The author concludes by urging engineers to prioritize testing, viewing it as key to increasing productivity and reducing bugs, and leveraging AI to assist with testing, but not relying on it entirely.

Development

Automating QEMU Output and Control with Shell Scripts

2025-04-05
Automating QEMU Output and Control with Shell Scripts

This article demonstrates how to configure QEMU virtual machine console output and automate control using shell scripts. It covers various methods, including redirecting serial port output to the host terminal, using named pipes for input/output, and employing the expect and ssh tools for automation. Each method is explained in detail with steps, precautions, code examples, and download links for practical application. This guide is beneficial for both beginners and experienced users seeking efficient QEMU virtual machine management and control.

Development VM Automation

Landrun: A Lightweight, Kernel-Level Secure Sandbox for Linux

2025-04-05
Landrun: A Lightweight, Kernel-Level Secure Sandbox for Linux

Landrun is a lightweight and secure sandbox for running Linux processes, leveraging the kernel-native Landlock security module. It offers fine-grained control over filesystem and network access without requiring root privileges, containers, or complex SELinux/AppArmor configurations. Landrun provides read, write, and execute permissions for files and directories, along with TCP network access control. It's highly configurable and supports Linux kernels 5.13+ (network restrictions require 6.7+). With clear examples and systemd integration, Landrun makes it easy to securely run commands and services with enhanced security.

Development

Improving Database Protocols: A Developer Experience Perspective

2025-04-05

This article discusses shortcomings in SQL database client protocols, specifically MySQL and PostgreSQL. The author points out issues with connection management, error recovery, and prepared statements, leading to increased development complexity. For example, mutable connection state makes error recovery difficult, while the session-scoped nature of prepared statements limits their use in connection pools. The author proposes improvements borrowing from the Redis protocol, such as an explicit configuration phase, idempotency keys, and globally scoped prepared statement identifiers. These changes would simplify development workflows and improve the reliability of database clients, resulting in a better developer experience and more user-friendly databases.

Development protocol

Rich Text, Poor Text: The Hidden Pain of Character Encoding

2025-04-05

This article delves into the issue of how font styles (bold, italics, etc.) are stored in rich text editing. The author argues that these styles aren't mere 'decorations' but integral parts of language expression, similar to punctuation. However, early character encoding standards (like ASCII) didn't include this styling information, leading to the use of embedded markup. This 'pollutes' text data, impacting efficiency and consistency in text processing. The author proposes a wider character encoding scheme to directly encode style information into characters, solving this problem.

Faster Go Interpreters: Closing the Gap with C++

2025-04-05
Faster Go Interpreters: Closing the Gap with C++

Vitess, the open-source database powering PlanetScale, initially used an AST-based interpreter for its SQL engine. Over the past year, this has been replaced with a Go-based virtual machine that performs comparably to MySQL's native C++ code, while being significantly easier to maintain. The VM achieves remarkable speed improvements—up to 20x faster in some cases—through static type checking and clever instruction dispatch. This article details the design and implementation, including leveraging Go's closures to simplify the VM and handling SQL's dynamic typing challenges.

Development

Haskell Functors: Elegantly Handling Values in Context

2025-04-05

In Haskell, Functors provide a powerful abstraction for working with values wrapped in contexts like Maybe or lists. The `fmap` function elegantly applies functions to these values, avoiding type errors that would arise from direct function application. The article details the Functor definition, the role of `fmap`, and the identity and composition laws Functors must obey, illustrating with examples using Maybe and lists. It concludes by highlighting the benefits of Functors in creating cleaner, more readable code.

Development

PyCon US 2025: Tickets, Sponsorships, and More!

2025-04-05

PyCon US 2025 is coming to Pittsburgh! Tickets, sponsorships, and hotel bookings are open, with the schedule now live, featuring over 100 talks and events. The PyLadies auction, tutorials, summits, and sprint projects are also open for registration. Plus, the PyPI Organizations feature rollout is progressing, and PEP 770 (on Software Bills of Materials) is in provisional status. PSF board elections are upcoming, and the 2024 PSF fellows have been announced. Don't miss the retro game-themed fun at the PSF booth at PyCon US 2025!

Development

AI Engineer: Build the Next-Gen Customer Research AI Assistant

2025-04-05
AI Engineer: Build the Next-Gen Customer Research AI Assistant

Great Question, a customer research platform company, is hiring an AI Engineer to design and implement an agent-based UI, building an AI research assistant to help users conduct research. The role requires expertise in prompt engineering, agent frameworks (LangGraph, etc.), and LLM application development (JavaScript preferred), encompassing AI system architecture, prompt optimization, framework selection and implementation, and performance evaluation. This is a fully remote role, with a preference for candidates in the US or Canada.

Loader's Number: A Programming Challenge on a Theoretical Infinite-Memory Machine

2025-04-05
Loader's Number: A Programming Challenge on a Theoretical Infinite-Memory Machine

Loader's Number is the output of loader.c, a C program by Ralph Loader that won the Bignum Bakeoff contest. The goal was to write a C program (under 512 characters) generating the largest possible output on a theoretical machine with infinite memory. The calculation relies on the Huet-Coquand Calculus of Constructions, resulting in an unimaginably large number far exceeding other known large numbers like the output of Marxen.c. While lacking formal proof, estimates place it beyond certain values in fast-growing hierarchies. Calculating Loader's Number is computationally intensive and its sheer scale represents a fascinating exploration of computational limits in computer science.

Development large numbers

SpacetimeDB: Multiplayer at the Speed of Light

2025-04-05
SpacetimeDB: Multiplayer at the Speed of Light

SpacetimeDB revolutionizes game development by merging database and server functionality. Developers upload application logic directly into the database as modules, eliminating the overhead of traditional client-server architectures. Clients connect directly to the database, executing logic within it for unparalleled speed and low latency. BitCraft Online's backend is built entirely on SpacetimeDB, processing and synchronizing all game data in real-time. SpacetimeDB uses in-memory storage and a write-ahead log for persistence, optimized for real-time applications. Installation is straightforward, and modules can be written in various programming languages.

Development

Incremental Compiler Course: From Tiger to x86-64 Assembly in OCaml

2025-04-05

This is a highly practical compiler course aiming to build a compiler that translates the high-level Tiger language into x86-64 machine code. The course uses OCaml and emphasizes test-driven development, version control, and code reuse. It employs an iterative, incremental development approach, gradually extending language and compiler features, leveraging the tagless-final style for enhanced extensibility. The course covers standard compiler topics like parsing, type checking, optimization, and assembly generation, but in a non-traditional way.

Kubernetes Deployment Strategies for Small Businesses on Hetzner Cloud: k3s Takes the Lead

2025-04-05
Kubernetes Deployment Strategies for Small Businesses on Hetzner Cloud: k3s Takes the Lead

This article compares four Kubernetes deployment options on Hetzner Cloud: k3s, MicroK8s, Minikube, and Docker Swarm. For resource-constrained small businesses, k3s stands out due to its lightweight nature (40MB binary, 512MB RAM baseline), high availability support (embedded etcd), and easy deployment (single command installation). Performance benchmarks show k3s clusters achieve production-grade performance and stability on Hetzner, outperforming other options in cost and scalability. While Docker Swarm offers simplicity, it lacks the features and scalability of k3s. For deployments exceeding 100 nodes, a hybrid approach combining k3s worker pools with Hetzner's managed Kubernetes service is recommended.

Development Hetzner Cloud

Swift's WebAssembly Journey: Performance, Security, and the Future

2025-04-05
Swift's WebAssembly Journey: Performance, Security, and the Future

The Swift community has steadily improved WebAssembly support over the years, and this article outlines a vision and roadmap for its future. WebAssembly, with its portability, security, and high performance, is ideal for cross-platform applications. Swift's integration with WebAssembly expands its reach and enhances security, particularly in developer tools. Virtualizing Swift macros and SwiftPM plugins using WebAssembly offers stronger security and faster build times. Future goals include increased API coverage in core libraries, improved cross-compilation support, enhanced component model support, and a better debugging experience. The article also delves into platform-specific considerations like debugging, multi-threading, 64-bit address space, and shared libraries, showcasing the potential for Swift's flourishing within the WebAssembly ecosystem.

Emulating iOS on QEMU: A Challenging Journey

2025-04-05
Emulating iOS on QEMU: A Challenging Journey

This article details a team's journey in emulating iOS on QEMU. Starting with existing open-source projects, they leveraged checkra1n and PongoOS to bypass iOS security mechanisms. They overcame numerous challenges including software rendering, IOMFB display issues, address randomization, and Pointer Authentication (PAC). The team developed tools to generate and apply Mach-O patches and injected shellcode to simulate USB pairing. Ultimately, they successfully displayed the iOS boot screen and unlock interface on QEMU, showcasing a remarkable achievement.

Development iOS emulator

Cache-Aware Programming in Python: A Surprisingly Significant Performance Difference

2025-04-05

This post investigates the impact of cache-aware programming on Python performance through experiments. Results show that random access to list elements in Python is consistently slower than sequential access, especially when data size exceeds CPU cache. This suggests that even in interpreted environments, cache-aware programming can improve Python program performance. Experiments also compare the performance difference between native Python lists and NumPy arrays, showing NumPy arrays have a significant performance advantage due to their more compact memory layout.

Neovim pytest Integration: pytest.nvim Simplifies Testing

2025-04-05
Neovim pytest Integration: pytest.nvim Simplifies Testing

pytest.nvim is a Neovim plugin integrating the pytest testing framework. It boasts Docker support, letting you run tests within containers. The plugin offers streamlined commands and keybindings for running, attaching, and detaching tests, along with customizable settings including Docker configuration and keymaps. Installation and setup are easy regardless of your plugin manager (Lazyvim, Packer, or Vim-Plug).

Development

Interactive Explanation of the DDA Algorithm: Unraveling the Geometry Behind Raytracing

2025-04-05

This interactive tutorial provides a clear and concise explanation of the Digital Differential Analyzer (DDA) algorithm, widely used in voxel raytracing. The author, drawing from personal experience, progressively derives the algorithm, demonstrating the entire process with editable code. From calculating the intersection points of a ray with a grid in 2D to extending it to 3D, the tutorial clearly explains the algorithm's principles and implementation details. Even beginners in geometric algorithms can easily grasp the elegance of the DDA algorithm.

Ferron: A Blazing Fast, Memory-Safe Web Server in Rust

2025-04-05
Ferron: A Blazing Fast, Memory-Safe Web Server in Rust

Ferron is a high-performance, memory-safe web server written in Rust. Leveraging Rust's async capabilities, it boasts impressive speed while ensuring memory safety. Its modular architecture allows for easy customization and extension. Security and safe concurrency are key design principles. While still under development, you can already clone the repository, build, and run it using Cargo. Ferron Forge simplifies building, and comprehensive documentation and contribution guidelines are available.

Development

MacPaint Source Code: A Deep Dive into a 128KB Painting Revolution

2025-04-05

This article delves into the source code of MacPaint, a groundbreaking painting program released in 1984 alongside the original Macintosh. It revolutionized personal computing by introducing intuitive mouse-driven controls and innovative features. The analysis covers MacPaint's algorithms, code architecture, and performance optimizations, highlighting clever techniques leveraging the 68k platform, such as efficient buffer management and a seed-fill algorithm. The article also explores MacPaint's impact on digital graphics and the competitive landscape it faced.

Development Graphics Programming

Running a Minecraft Server Inside a FreeBSD Jail

2025-04-05
Running a Minecraft Server Inside a FreeBSD Jail

This tutorial walks you through setting up a secure Minecraft server within a FreeBSD Jail container, a more secure alternative to Docker or Podman on Linux. The author details the process of creating the jail, installing the FreeBSD base system, configuring network settings, building the Minecraft server from ports, and configuring crucial settings like memory allocation, EULA acceptance, and server properties. Finally, the guide demonstrates starting the server and connecting via a Minecraft client. This is a comprehensive guide for users comfortable with FreeBSD.

Development

Master Electricity and Electronics Without Formal Courses

2025-04-05

Learn the fundamentals of electricity and electronics and their modern applications without enrolling in a formal course. This fully updated guide, "Teach Yourself Electricity and Electronics, Seventh Edition," provides clear explanations and step-by-step instructions. It covers DC and AC circuits, resistors, cells, magnetism, inductors, capacitors, semiconductors, integrated circuits (ICs), amplifiers, oscillators, wireless tech, digital circuits, microcontrollers (including Arduino), transducers, sensors, acoustics, audio, and RF antennas. Includes online quizzes to test your knowledge.

A Programmer's Ode to UNIX: A Love Story in Code

2025-04-05

This retro UNIX magic poster pays homage to a classic piece originally created by Gary Overacre in the mid-1980s. The author shares their formative experience with UNIX during college, working on an HP-UX mainframe and being captivated by its simplicity and power. This project is a personal tribute to UNIX and its lasting impact on their career.

Development

Why I Previously Overlooked Parallelisation: A Retrospective on Multithreaded Programming

2025-04-05

The author revisits a previous post, admitting to overlooking parallelisation as a crucial optimisation technique. Using his website rebuild as a case study, he demonstrates the significant performance gains achieved through parallelisation. The article delves into the challenges of parallel programming, including hardware and software limitations, and the complexities of synchronization in multithreaded environments. The author shares his experiences with multithreaded programming in Rust, highlighting how Rust's features make multithreading safer, more reliable, and more efficient. Ultimately, the author advocates for developers to embrace parallelisation as a powerful tool for improving software performance.

uWrap: A Blazing-Fast Text Wrapping Utility (<2KB)

2025-04-04
uWrap: A Blazing-Fast Text Wrapping Utility (<2KB)

uWrap is a 10x faster and more accurate text wrapping utility under 2KB (minified), MIT licensed. Designed for efficient row height prediction in list and grid virtualization, optimizing UI performance for large scrollable datasets. It cleverly overcomes Canvas2D's lack of text wrapping APIs and the performance limitations of measureText(). Benchmarks show it significantly outperforms canvas-hypertxt in both speed and accuracy. Currently supports Latin character sets, with more features planned.

Development text wrapping

xlwings Lite: Revolutionizing Excel Automation with Python

2025-04-04

xlwings Lite is a free and easy-to-install Excel add-in that brings the power of Python to Excel automation and custom function creation in a privacy-first, secure, and developer-friendly way. No Python installation is required; it runs on Windows, macOS, and Excel for the web, supporting Microsoft 365 and recent perpetual versions like Office 2024. Create custom functions, run automation scripts, access the Excel object model, install third-party libraries (like pandas, Polars), and access web APIs. All code runs locally, delivering lightning-fast performance and complete privacy; users can even self-host to eliminate Microsoft telemetry.

Development

The Zen of Side Projects: A Programmer's Journey Back to Creation

2025-04-04
The Zen of Side Projects: A Programmer's Journey Back to Creation

A programmer, burnt out from excessive gaming, rediscovers the joy of coding through a neglected side project. Choosing SvelteKit, the author emphasizes the process of exploration and experimentation, finding a sense of freedom and creative fulfillment long forgotten. The article argues that the act of creation, rather than the outcome, is paramount; even failure becomes part of a successful journey of discovery. It encourages readers to embrace their own creative outlets, to value the process over perfection, and to find joy in the act of making.

Development

The Definitive Guide to Tcl Programming, 2nd Edition Released

2025-04-04

The highly anticipated second edition of "The Tcl Programming Language" is finally here! Covering Tcl 9, this comprehensive guide explores the Tcl language from basic syntax to advanced features such as metaprogramming, object-oriented programming, asynchronous I/O, and concurrent programming. The 660-page book details Tcl's flexibility and power, with overwhelmingly positive reviews praising it as the best resource for learning and referencing Tcl.

Development programming guide

Dark Mode with Minimal CSS: A Surprisingly Easy Implementation

2025-04-04

Feep! website now boasts a sleek dark mode, achieved with surprisingly minimal CSS. The author details three approaches: leveraging the browser's built-in dark mode via a `` tag; employing the `color-scheme` property for CSS control; and using `prefers-color-scheme` media queries for separate light and dark mode styles. Tips include using the `light-dark()` and `color-mix()` functions for color optimization, and cleverly handling images and code blocks with CSS filters. The result? An elegant dark mode switch with only a handful of added CSS lines, streamlining the development process considerably.

Development browser native

Airbnb's Listing Lifetime Value Framework: A Deep Dive

2025-04-04
Airbnb's Listing Lifetime Value Framework: A Deep Dive

Airbnb developed a framework to estimate listing lifetime value (LTV) to enhance user experience. The framework calculates three types of LTV: baseline LTV, incremental LTV, and marketing-induced incremental LTV. Baseline LTV predicts the total bookings a listing will receive in the next 365 days using machine learning and listing data. Incremental LTV accounts for booking cannibalization between listings. Marketing-induced incremental LTV measures the additional value generated by internal marketing initiatives. The article discusses challenges like accurately measuring baseline LTV, handling incrementality, and dealing with uncertainties (e.g., the COVID-19 pandemic). Airbnb uses LTV to identify high-value listings, improve host recommendations, and evaluate marketing campaign effectiveness.

Development Lifetime Value
1 2 120 121 122 124 126 127 128 214 215