Tux Machines

Programming Leftovers

Posted by Roy Schestowitz on Feb 26, 2023

=> Self hosting in 2023, all-in on the fediverse, and Free/livre software | today's howtos

James Just James: Deadline context test cancellation in golang

=> ↺ James Just James: Deadline context test cancellation in golang

I decided to write a fancy test harness in golang today. The test wraps a big internal engine for mgmt and at the top-level it takes a context for cancellation. If you don’t know about the context package, then you should go understand that and then come back here… Don’t feel bad, I had no idea what it was about at first either! The Problem: I assumed there would be some way to follow a notification from the test runner down into my test to tell it when it was time to cleanup and exit early… I expected that making my own ^C signal handler wouldn’t be correct, and I (incorrectly) assumed that the interface I’d be looking for would offer a golang context that I could pass into my code.

Patrick Cloke: Python str Collection�Gotchas

=> ↺ Patrick Cloke: Python str Collection�Gotchas

We have been slowly adding Python type hints [1] to Synapse and have made great progress (see some of our motivation). Through this process we have learned a lot about Python and type hints. One bit that was unexpected is that many of the abstract base classes representing groups of str instances also match an individual str instance.

=> ↺ [1] | ↺ Synapse | ↺ some of our motivation | ↺ abstract base classes

=> ↺ [1] | ↺ Synapse | ↺ some of our motivation | ↺ abstract base classes

Introducing Ambient 0.1

=> ↺ Introducing Ambient 0.1

Ambient is a runtime for building high-performance multiplayer games and 3D applications, powered by WebAssembly, Rust and WebGPU.

I love building a startup in Rust. I wouldn't pick it again.

=> ↺ I love building a startup in Rust. I wouldn't pick it again.

For almost two years now, the vast majority of our backend code was written in Rust (aside from a little bit of Python). I love Rust, it’s by far my favorite language. I find myself missing match in pretty much every other language I go to.
However, if I was doing it over, I wouldn’t choose Rust.

C-rusted: The Advantages of Rust, in C, without the Disadvantages

=> ↺ C-rusted: The Advantages of Rust, in C, without the Disadvantages

C-rusted is an innovative technology whereby C programs can be (partly) annotated so as to express: ownership, exclusivity and shareability of language, system and user-defined resources; dynamic properties of objects and the way they evolve during program execution; nominal typing and subtyping. The (partially) annotated C programs can be translated with unmodified versions of any compilation toolchain capable of processing ISO C code. The annotated C program parts can be validated by static analysis: if the static analyzer flags no error, then the annotations are provably coherent among themselves and with respect to annotated C code, in which case said annotated parts are provably exempt from a large class of logic, security, and run-time errors.

The age of cargo cult Agile must end.

=> ↺ The age of cargo cult Agile must end.

I found the article to be filled with misconceptions but given enough people have somehow found it insightful, I thought it might be worth writing a response.
At first, I thought “The age of Agile must end” was an example of the cargo cult reinvention cycle but looking more closely, it seems like it’s both a cargo cult understanding of Agile AND arguing for something that is not aligned with Agile. I don’t necessarily think this was an intentional straw man argument though.

Stop Obsessing Over Development Velocity, Focus on This Instead - Itamar Gilad

=> ↺ Stop Obsessing Over Development Velocity, Focus on This Instead - Itamar Gilad

An awful lot of effort is going these days into boosting product teams’ productivity: getting them to burn those story points faster, deliver the planned scope in every sprint and cycle, and generally ship more stuff, faster. The term “development velocity” is often thrown around by executives, but what they’re actually aiming for is upping launch throughput—apparently a matter of vital importance for the success of the company.
I’m here to argue that development velocity (whatever that means) and launch throughput are entirely the wrong optimizations. Obsessing over these things will distract you from what’s really important and is likely to do more harm than good.

Scaling Extreme Programming: Dependencies - by Kent Beck

=> ↺ Scaling Extreme Programming: Dependencies - by Kent Beck

(This will be the first in a series of posts about XP. I’m publishing them here because the overlap with Tidy First? readers seems substantial & the subscriber list is long. Please lmk if you’d rather I had channel/topic.)
[...]
Reversibility unclogs complexity for Whole Teams of 15 or so. It’s hard work, but okay. However, I never developed a story about scaling XP to organizations of hundreds or thousands of people. (Much more about this in followup posts.)
Reversibility can go a long way even in large organizations. However, reversibility isn’t the whole story. Inter-connection, which is addressable in a world of direct human relationships among 15 people, becomes a more disruptive factor & difficult to address among a thousand.

advice you might as well take

=> ↺ advice you might as well take

I've read some nice articles recently which I can sum up as “advice you might as well take.” This is stuff that's good to consider at the beginning of a project, or when you're about to add a feature to some existing software.
These articles run counter to YAGNI (You Ain't Gonna Need It), the software design principle that says you should only ever add things you'll be using right away. Many even call this out in their titles! One even addresses this by coining an alternative term, PAGNI (Probably Are Gonna Need It), so let's start with that one:

DevLife #5: Microservice Hell - by Daniel Dersch

=> ↺ DevLife #5: Microservice Hell - by Daniel Dersch

Every single one of these micros likely has to interact with the user and tenant management service. Every request will need to be authenticated and authorized. The caller context has to be verified as it flows through every service. Each service will have to figure out how to ship their data to the Search micro. The various business logic services likely have dependencies on each other to avoid duplicated effort.
In general, these pains are worth it. More micros means a smaller blast radius if a single micro is breached, more fault tolerance in case one of the micros becomes unavailable (unless it’s auth or user management), better resource utilization for heavily used services (like auth) and rarely used micros.

Insignificant

=> ↺ Insignificant

Ever struggle with publishing that blog post or open source idea you have sitting around? But it feels too small? Too insignificant?
It was almost 7 years ago, when the internet broke because a developer deleted their entire open source catalog from npm. The developer was upset because npm, a repository of open source projects, had sided with a lawyer in a trademark dispute. But some foundational projects, like Babel depended on that developer’s work. So when those dependencies vanished, foundational projects couldn't be built anymore, and new versions of your web site or app all came crashing down.
Many of us kept focusing on the question: should I depend on so many open source modules for the thing I'm building?
But what I think is more interesting is what this story teaches us about creativity.

Faux Progress

=> ↺ Faux Progress

For non-technical folks, the worst part is you don’t even know the spinner is fake! You likely interpret it as a legitimate representation of live feedback.
I remember when I first started as a designer, I naively created a progress bar for some UI thinking, “We’ll indicate progress as this thing happens!”
I was quickly informed that an accurate representation of progress was incredibly complex and not in the cards for our feature (’twas then I was introduced to the idea of polling).
Since then, posts like Eric’s constantly remind me of the faux authenticity of so many of our digital experiences. I have no doubt progress bars and loading indicators are vastly misinterpreted by non-technical folks as feedback mechanisms which communicate the live, accurate progress of known-quantity computing tasks.

Testing packages with Lit in Gentoo

=> ↺ Testing packages with Lit in Gentoo

The file lit.site.cfg has to be inspected for any incorrect calls to executables. For example see src_prepare function form dev-lang/boogie.

=> ↺ dev-lang/boogie

=> ↺ dev-lang/boogie

React Is Holding Me Hostage

=> ↺ React Is Holding Me Hostage

It feels like this article would have been sacrilege only a few years ago. Under protection of this new found trendiness in React displeasure, I’d like to finally say my piece.

Project Valhalla: A look inside Java’s epic refactor | InfoWorld

=> ↺ Project Valhalla: A look inside Java’s epic refactor | InfoWorld

Valhalla is nothing short of a Java language overhaul, promising to correct longstanding performance issues. Here's a first look at what's coming, starting with the new value classes and primitive classes.

Dirk Eddelbuettel: ttdo 0.0.9 on CRAN: Small Update

=> ↺ Dirk Eddelbuettel: ttdo 0.0.9 on CRAN: Small Update

A new minor release of our ttdo package arrived on CRAN a few days ago. The ttdo package extends the excellent (and very minimal / zero depends) unit testing package tinytest by Mark van der Loo with the very clever and well-done diffobj package by Brodie Gaslam to give us test results with visual diffs (as shown in the screenshot below) which seemingly is so compelling an idea that it eventually got copied by another package which shall remain unnamed…

=> ↺ ttdo | ↺ ttdo | ↺ tinytest | ↺ Mark van der Loo | ↺ diffobj | ↺ Brodie Gaslam

=> ↺ ttdo | ↺ ttdo | ↺ tinytest | ↺ Mark van der Loo | ↺ diffobj | ↺ Brodie Gaslam

Null safety: Kotlin vs. Java | by Nicolas Fränkel | Feb, 2023 | ITNEXT

=> ↺ Null safety: Kotlin vs. Java | by Nicolas Fränkel | Feb, 2023 | ITNEXT

The basic idea behind null is that one can define an uninitialized variable. If one calls a member of such a variable, the runtime locates the memory address of the variable... and fails to dereference it because there's nothing behind it.

what is the randomart image for?

=> ↺ what is the randomart image for?

When you generate an SSH key (like I did when looking at signing commits with SSH keys), you get a “randomart image” from ssh-keygen.

=> gemini.tuxmachines.org

Proxy Information
Original URL
gemini://gemini.tuxmachines.org/n/2023/02/26/Programming_Leftovers.gmi
Status Code
Success (20)
Meta
text/gemini;lang=en-GB
Capsule Response Time
141.041552 milliseconds
Gemini-to-HTML Time
5.90951 milliseconds

This content has been proxied by September (3851b).