Programming Leftovers
k
-
Moving the poudriere jail from slocum to r730-01
I recently moved the pkg01 jail from one host to another. I'm having trouble getting it to build packages.
-
Moving one jail from host to host
This is a quick post about the steps I’m using to move my jails from one host to another. This is bing done as I merge two hosts into one. I have not attempted to automate this, apart from the initial syncoid copying of data. This post is base roughly upon my Mastodon post from yesterday.
-
Pivoting in tidyr and data.table
We all need to pivot data at some point, so these are just some notes for my own benefit really, because gather and spread are no longer in favour within tidyr.
I tended to only ever need gather, and nearly always relied on the same key and value names, so it was an easy function for me to use.
pivot_longer and pivot_wider are much more flexible, they just take a little bit more thinking about.
-
What to expect from your framework
There’s been a bit of a brouhaha these last weeks as parts of the Internet suddenly woke up to the realization that most Single Page Apps are slow and overcomplicated, and — shock horror — it turns out that Facebook, the lovable scamps that brought us React and QAnon, have conducted themselves badly! Refreshingly, rather than launching a thousand caustic subtweets, this little stormwind has caused the blog posts to start flying again. Thank you, Elon “Vain gobshite” Musk. I’m totally here for it.
For a bit of backstory, the best place to start is probably Zach Leatherman’s History of React criticism followed by Alex Russell’s long and eloquent assault on SPA stacks. You can easily lose an entire afternoon reading the various pieces linked from those (a fun afternoon! so much tech drama!) but what got my delicious brainmeat reaching for the blog this time was the most recent shot, fired over at Laurie Voss’ site. It’s called “The case for frameworks” and you should go read that, too.
All caught up? Great.
-
What's in my software engineering tool belt?
One of my favorite things is reading about the tools other people use, and talking about the tools I use. When I read a post recently about a data journalist's data tool belt, well... I knew I'd have to share my own software engineering tool belt, too.
So, here's my software engineering tool belt.
There are a lot of tools that I use, and not all of them bear mentioning. I've left out some of the tools that are probably very common or not super interesting, unless I particularly love those tools.
The tools I've included are categorized roughly based on things that are directly for coding, vs. all the other supporting tasks that are part of software engineering.
-
NP-Complete isn't (always) Hard
A common assumption I see on the ‘net is that NP-complete problems are impossible to solve. I recently read that dependency management in Python is hard because package resolution is NP-complete. This is true in principle, but the reality is more complicated. When we say “NP-complete is hard” we’re talking about worst-case complexity, and the average-case complexity is often much more tractable. Many industry problems are “well-behaved” and modern SAT solvers can solve them quickly.
Okay I’ve probably lost 40% of my readers by this point so let’s back up and explain “NP-complete” and “SAT solver” and stuff.
-
End-to-end encrypted Kitten Chat
Sorry, your browser doesn't support embedded videos. But that doesn’t mean you can’t watch it! You can download Small Is Beautiful #27 directly, and watch it with your favourite video player.
-
My 2023 dev machine
My desktop computer is my trusted work machine that I do the majority of all my (curl) development on. When the 15th computer I've owned through the times was ten years old the time was ripe to bump things up a notch.
-
Code review vs code proofreading
Administrative Stuff
- Just one month until the March TLA+ Workshop! Thanks to everyone who already signed up, I'm in the process of revising everything and am real excited to share the new content. There's still nine slots left if you want to join!
- I have a new blog post up: NP-Complete isn't (always) Hard, about NP-complete problems and modern SAT solvers.
Code review vs code proofreading
So in my last newsletter I had an aside on code review:
This is also why a lot of people hate code review. It’s good when you’re acting as an editor, looking for foundational improvements to the code, but it’s awful when you’re acting as a proofreader. That probably deserves its own essay!
Let's dig into that a bit more.
-
A bit on unspecified unique objects in Python
Tratt notes that Python's language specification doesn't specify the behavior here, so both implementations are correct. Python does this to preserve the ability of implementations to make different choices, and goes on the use the example of __del__ destructors. This might leave a reader who is willing to accept the difference in destructor behavior to wonder why Python doesn't standardize object identity here.
-
Jonathan McDowell: Fixing mobile viewing
It was brought to my attention recently that the mobile viewing experience of this blog was not exactly what I’d hope for. In my poor defence I proof read on my desktop and the only time I see my posts on mobile is via FreshRSS. Also my UX ability sucks.
Anyway. I’ve updated the “theme” to a more recent version of minima and tried to make sure I haven’t broken it all in the process (I did break tagging, but then I fixed it again). I double checked the generated feed to confirm it was the same (other than some re-tagging I did), so hopefully I haven’t flooded anyone’s feed.
-
The voice control challenge
A lot of software these days is difficult to use with accessibility tools. A lot of this problem is not really exposed to the people that create the software. A lot of software seems to be made with the assumption that people have working hands, they can use a mouse, and that the text is legible. This is simply not the case for many people.
I would like to propose a challenge for people. Let's call it the voice control challenge. For this challenge, you need to use voice control on your mac, iPad, or iPhone and see how many of your day-to-day tasks you can do without having to reach for a keyboard or type on the phone manually.