news
Programming Leftovers
-
Rob Bowley ☛ Coding has never been the bottleneck | Rob Bowley
Coding has never been the governing bottleneck in software delivery. Not recently. Not in the last decade. And not across the entire history of the discipline.
I wrote this post in response to the current wave of people claiming “AI means coding is no longer the bottleneck” and to have somewhere to point them too – a long trail of experienced practitioners highlighting the main constraints in software delivery have always sat elsewhere.
That doesn’t mean coding speed never matters. In small teams, narrow problem spaces, or early exploration, it can be a local constraint, for a time. The point is that once software becomes non-trivial, progress is governed far more by other factors – such as understanding, decision-making, coordination and feedback – than by the rate at which code can be produced.
-
Sebastian Wick ☛ Sebastian Wick: Best Practices for Ownership in GLib
For all the rightful criticisms that C gets, GLib does manage to alleviate at least some of it. If we can’t use a better language, we should at least make use of all the tools we have in C with GLib.
This post looks at the topic of ownership, and also how it applies to libdex fibers.
-
Sandor Dargo ☛ Time in C++: C++20 Brought Us Time Zones | Sandor Dargo's Blog
Until C++20, the standard library simply couldn’t answer that question as it provided no support for timezones.
C++20 changed that - and in doing so, it finally made <chorno> suitable for serious, user-facing time handling.
-
Mitchell Hashimoto ☛ Don't Trip[wire] Yourself: Testing Error Recovery in Zig
I've written a library called Tripwire1 for injecting failures into Zig programs for the express purpose of testing error handling paths. Outside of unit tests, it is completely optimized away and has zero runtime cost (space or time).
-
J Kenneth King ☛ Least Recently Used Cache
Today we’re going to implement a Least Recently Used Cache in C++23.
This structure is basically a fixed-size mapping of keys to values where the least recently used, or oldest, keys are evicted from the cache when adding new keys.
Fetching a value from the cache marks the key as most recently used as do successful insert operations.
-
David Bushell ☛ Hmmarkdown 2
Everyone has an opinion on markdown but why stop there? Write your own parser, make those opinions reality! That’s what I did with Hmmarkdown — my HTML-aware markdown library. It has built my website content for the past year.
Turns out parsing markdown (with HTML) isn’t easy. My original approach evolved into a game of whac-a-mole to quash edge case bugs. Last week I began a new parsing experiment I’d been mulling over. The idea proved workable and I finished the job.
-
Daniel Stenberg ☛ libcurl memory use some years later
One of the trickier things in software is gradual degradation. Development that happens in the wrong direction slowly over time which never triggers any alarms or upset users. Then one day you suddenly take a closer look at it and you realize that this area that used to be so fine several years ago no longer is.
Memory use is one of those things. It is easy to gradually add more and larger allocations over time as we add features and make new cool architectural designs.
-
Anthony Templeton ☛ I Made Zig Compute 33 Million Satellite Positions in 3 Seconds. No GPU Required.
I've spent the past month optimizing SGP4 propagation and ended up with something interesting: astroz is now the fastest general purpose SGP4 implementation I'm aware of, hitting 11-13M propagations per second in native Zig and ~7M/s through Python with just pip install astroz. This post breaks down how I got there.
A note on "general purpose": heyoka.py can be faster for batch-processing many satellites simultaneously (16M/s vs 7.5M/s). But it's a general ODE integrator with SGP4 as a module, requiring LLVM for JIT compilation and a C++ dependency stack that conda-forge recommends over pip. For time batched propagation, many time points for one satellite, astroz is 2x faster (8.5M/s vs 3.8M/s). Full comparison below. I'm also skipping GPU accelerated SGP4 implementations. They can be faster for massive batch workloads, but require CUDA/OpenCL setup and aren't what I'd consider "general purpose."
-
Aba Search and Replace ☛ On coding with LLMs
An old book (Code Complete by Steve McConnell) says that writing and reviewing code takes around 30% of an average developer's time. The rest is spent in discussions, replying to emails, reading documentation, troubleshooting, learning, or even personal stuff. The data come from a 1964 research and the proportion certainly depends on the person and the company, but any developer can confirm that they are not working with source code 100% of their time. If we assume the 30% estimate is correct and you can speed up coding by 20%, you can only expect a 5% reduction in the project duration (see Amdahl's law).
So the promises of creating a complete product in a weekend are unrealistic. Programming is hard. I spend hours debugging UI issues or checking the assembler output and this is my own project coded by hand, so I understand it quite well. If I were vibecoding, it would take more time to find the root cause.
-
Shell/Bash/Zsh/Ksh
-
[Old] InfoWorld ☛ ProxyJump is safer than SSH agent forwarding | InfoWorld
To navigate through jump servers, we actually don’t need agent forwarding. A modern approach is to use ProxyJump or its command line equivalent -J. (Read more: “SSH configuration: ssh_config.”)
-
[Old] Vincent Bernat ☛ Safer SSH agent forwarding
As mentioned, a better alternative is to use the jump host feature: the SSH connection to the target host is tunneled through the SSH connection to the jump host. See the manual page and this blog post for more details.
-
-
Rust
-
Rust Blog ☛ The Rust Programming Language Blog: crates.io: development update
Time flies! Six months have passed since our last crates.io development update, so it's time for another one. Here's a summary of the most notable changes and improvements made to crates.io over the past six months.
-