Programming Leftovers
-
Neil Macy ☛ Be Careful Using SwiftUI's buttonStyle Modifier With List swipeActions
SwiftUI has a really useful swipeActions modifier on List rows - see the SwiftUI docs here. It lets you add a swipe gesture to show action buttons on that row. For example, a delete button. (You've seen this in apps like Mail, where you swipe to get actions like Move or Archive/Delete.)
When I was adding it to an app recently, I found a bit of a strange bug. I just couldn't get the swipeActions to work; the gesture did nothing.
-
Sean Goedecke ☛ Engineers who won’t commit force bad decisions
Some engineers think it’s a virtue to remain non-committal in technical discussions. Should our team build a new feature in an event-driven or synchronous way? Well, it depends: there are many strong technical reasons on each side, so it’s better to keep an open mind and not come down on either side. This strategy is fine when you’re a junior engineer, but at some point you’ll be the person in the room with the most context (or technical skill, or institutional power). At that point, you need to take a position, whether you feel particularly confident or not.
If you don’t, you’re forcing people with less technical context than you to figure it out themselves. Often that means somebody will take a random guess. In the worst case, the weakest-but-loudest engineer on the team will take the opportunity to push for a spectacularly bad idea. If you’re a strong engineer, it’s your responsibility to take a position in order to prevent that from happening, even if you’re only 55% or 60% confident1.
-
Herman Õunapuu ☛ Feature toggles: just roll your own!
When you’re dealing with a particularly large service with a slow deployment pipeline (15-30 minutes), and a rollback delay of up to 10 minutes, you’re going to need feature toggles (some also call them feature flags) to turn those half-an-hour nerve-wrecking major incidents into a small whoopsie-daisy that you can fix in a few seconds.
Make a change, gate it behind a feature toggle, release, enable the feature toggle and monitor the impact. If there is an issue, you can immediately roll it back with one HTTP request (or database query 1). If everything looks good, you can remove the usage of the feature toggle from your code and move on with other work.
Need to roll out the new feature gradually? Implement the feature toggle as a percentage and increase it as you go.
-
Medium ☛ How do I profile C++ code running on Linux?
Profiling C++ code running on Linux helps you identify bottlenecks and optimize performance. Below are some common tools and techniques for profiling C++ applications on Linux.
-
Events
-
Andy Wingo: whippet at fosdem
I ended the talk with some puzzling results around generational collection, which prompted yesterday’s I don’t have a firm answer yet. Or rather, perhaps for the splay benchmark, it is to be expected that a generational GC is not great; but there are other benchmarks that also show suboptimal throughput in generational configurations. Surely it is some tuning issue; I’ll be looking into it.
Happy hacking!
-
-
Perl / Raku
-
Rakulang ☛ Raku Weekly 2025.06 It’s A Bot!
A new bot has appeared on the #raku-dev IRC channel: “rakkable”, which allows for searches in all of the active modules in the Raku ecosystem (currently about 11000 files). Like other bots, it can be address by mentioning it at the start of a line, followed by a colon, e.g. “rakkable: eco-provides frobnicate“.
-
-
Python
-
Didier Stevens ☛ Update: Python Templates Version 0.0.12
This is an update for process-file-text.py: I added \t support for option withfilename and added option hasheader. Option –hasheader makes that the first line of the first file is processed, and for all other files, the first line is ignored.
-
CER ☛ Media Computation in Python running in Google Colab Notebooks
Here’s why I decided to work on yet-another implementation of a Python API that we first developed in 2001, how to get the implementation, and how it’s different.
-
The New Stack ☛ Prepare Your Mac for Python Development
I dabble in the world of Python development for fun, and recently, I decided to get a bit more serious with a dedicated environment. While I considered a new Raspberry Pi 5 (and may still get one!), I decided to keep things local with a dedicated Parallels virtual machine on my MacBook Pro. Mac VM images are available through Parallels, so the installation was a breeze.
The rest of this article covers my next steps and should help anyone curious about setting up a useful but straightforward Python3 dev environment on macOS. Keep in mind that some of the software choices are based on my own preferences. Feel free to make your own selections. My deep preference for Vim is probably the most controversial choice.
-