news
Programming Leftovers
-
Justin Duke ☛ Tech debt is weird
Technical debt is materialized as drag against the ability to deliver customer value.
This sounds like a pedantic recharacterization of Jesse's words, but I want to be very deliberate about this because I think the distinction is meaningful. In particular, it is important to remember that there are times where the technical debt brings pain even though we're not trying to make a code change or deliver value through a code change. If there's an incident that takes 2x as long as it should because nobody knows how the relevant subsystem operates, that is still technical debt.
-
Lalit Maganti ☛ Changing Devtools Is Cheap. Owning Them Isn’t. - Lalit Maganti
The argument is seductive, especially to a reader who thinks of themselves as a maker or tinkerer: after all, the idea that you can hyper-tune everything you use sounds like a utopia; it means things can work exactly how you want them to.
But I’d argue that Crawshaw underappreciates the ongoing cost when he writes [...]
-
Ned Batchelder ☛ Caller-specific coverage
But the old code had an advantage: because each error condition had its own raise line, coverage measurement could tell me whether I had tested every func_name for the wrong number of arguments. With the error handling happening in a helper function, that information is lost. I’ll know that somefunc_name had a test for the wrong number of arguments, but not that all of them did.
-
MJ Fransen ☛ Git branches and Emacs built-in VC
Emacs VC is the built-in Emacs version control interface.
It is very capable, and its use is intuitive.
Emacs VC can be used with practically all version control systems. I have used it frequently with RCS and CVS.
-
Python
-
Elana Hashman: Managing virtualenvs with a little bash
When you need to install something directly from PyPI, Python virtualenvs have been my go-to for over a decade.
-
Juha-Matti Santala ☛ H is for htmx - Python A to Z
For the past couple of years, all my new Django projects have been built with htmx and I’ve worked on couple of other, non-Django projects that uses it as well. It’s a blast!
It took me a while to get used to but especially this demo by Michael Kennedy at PyBay 2021 convinced me of its utility and looking back now, I love how simple it makes building most interactive websites and web apps.
-
Juha-Matti Santala ☛ G is for get_or_create - Python A to Z
Let’s take our first journey into the wonders of Django, my favourite web backend. One of the reasons I love it is its ORM which we’ll talk a bit more when we reach the midway of the month and letter O.
Today, I want to show my appreciation for one of the methods in QuerySet: get_or_create which allows you to create new items in the database but if one already exists, it returns it instead.
-
-
Java/Golang
-
Nicolas Fränkel ☛ Security Baked Into the JVM: two Subjects, one call
Identity in this platform is not a filter at the door. The WorkerSubject is in every ProtectionDomain before the first request arrives, the UserSubject is bound per call, and the remote process context travels with the call and is shed at every privilege boundary. No session state, no thread-local leakage between calls, no boilerplate in service code.
A single call can carry up to 16 user Subjects. I’ll cover in the series' next part how they travel on the JERI wire, and what service code does with them on arrival.
-
Anton Zhiyanov ☛ Relying on Go
Solod is not "Go-like" in the usual sense, nor is it an attempt to "fix Go's mistakes". At the language level, Solod is literally a subset of Go. Solod reuses much of Go's existing tooling, including syntax highlighting, LSP, linters, and the package management system.
Take this quick-start guide, for example: [...]
-
Daniel Lemire ☛ Profile-guided optimization in Go
When a compiler optimizes your program, it has to guess. Which functions are worth inlining? Which side of a branch is the common one? Which method does this interface call actually reach? At compile time it cannot know, so it uses heuristics. Profile-guided optimization (PGO) replaces the guessing with measurement: you run your program, record where it spends its time, and hand that recording back to the compiler for a second build.
-