“Sorry, you are not allowed to add a term to one of the given taxonomies” error from WordPress

If you get this error message from WordPress:

Sorry, you are not allowed to add a term to one of the given taxonomies

It’s seemingly because you can’t publish new tags from the XMLRPC interface, used by client-side blogging tools (I was using MarsEdit.). I removed the tags from the post I wrote, and it seemed to work fine.

My experience at community college

It feels a lot of developers online either went to a prestigious computer science program in university or are self-taught. However, not many talk about community college in those communities. It’s very much a different experience, and I was in it. I’ll try to cover what it’s like at a high level, and how I thought of it. The actual location isn’t important, but it might not be hard to guess. (And if you were there, you can probably tell who I was.)

Continue reading

Win32 is the stable Linux userland ABI (and the consequences)

This post was inspired by some controversy with Valve and their support for Linux, but the bulk of it comes from long-term observation. One of the biggest impacts with the viability of Linux on the desktop was Valve’s Proton, a Wine fork integrated in Steam allowing almost any Windows game to work out of the box. To Linux users, life was good. However, with the recent announcement of the Steam Deck, a handheld device powered by Linux, Valve’s marketing towards developers explicitly mention no porting required. Valve’s been aggressive with this message enough that they’ve allegedly told developers simply not to bother with Linux ports anymore; enough that it makes commercial porters like Ethan Lee concerned.

However, I suspect this is the long-term result of other factors, and games are only one aspect of it. After all, we all know the Year of the Linux Desktop is around the corner, along with nice applications. Linux won’t rule the world just from games, even if some people really want it to be true. How did it come to this, and why?

Continue reading

Brief thoughts on right to repair issues people don’t think about

While making devices more repairable is pretty much seen as universally a good thing, right? Unfortunately, engineering involves tradeoffs, but some of those tradeoffs that are seen as bad for repair (or are actually desirable in spite of it), or actually improves reliability. These are some things I suspect right to repair advocates forget.

This article is intended to unify some disparate thoughts on the subject I’ve had on Lobsters comment, this blog (i.e. the ThinkPad one), etc. as one post. I intend to do this more often for other things…

Continue reading

What systems and applications do I (cb) use?

This is a stream of consciousness (so don’t expect my usual polish) based off of some friends’ musings on the tools they use. I’m doing this to explain some of the tools I use, in the hopes of conveying my feelings on them. I doubt (and sometimes probably hope I won’t) I’ll convince you on the merits or if you should use any of these tools, but you’ll at least know why I care. As I write this, I consider the tools I use to be fairly pedestrian, but perhaps this document might have sentimental or historic interest later. Consider it like usesthis.com – and I also use a Mac!

Continue reading

Scaling images with alpha blending properly with PHP gd

I had some code trying to scale an image in gd using the imagescale function, that looked something like this:

/* makes a copy of the image, instead of modifying in place */
$target = imagescale($image, $width, $height);

However, the images it created were heavily distorted when using bilinear filtering, and didn’t quite look right with neared neighbour either. For example, with bilinear filtering…

Continue reading

Portable software is more complex than you think

I’m someone who cares about making software portable. In fact, I actually have a job basically doing so. For most Unix-shaped things (better known as things, since Unix destroyed all competition), the POSIX standard exists to codify common attributes and provide a common ground. Unfortunately, this is made far more complicated by systems both doing many things outside of POSIX’s lowest common denominator, and systems just not implementing POSIX correctly. People tend to think “portability” is whatever operating systems they use, and assuming the lowest common denominator is that. While many guides recommend writing software in a disciplined (or tortured, if you disagree) manner with separate compilation units for platform differences when possible, the reality is your codebase will have #ifdefs and a configure script if it does anything useful. Not to mention the increasing irrelevance of the standard itself.

Continue reading

Quick and dirty subclassing in Win32

Context: So I wanted to implement drag and drop with files the quick and dirty way; specifically, WM_DROPFILES. (You can also do this with COM, but it’s a bit more involved, especially from raw C. I haven’t written about drag and drop yet, so the comparison is covered elsewhere for now.) My use case is simple, so I didn’t need the benefits or complexity of COM drag and drop. Turns out it’s just marking it as having the extended style in the resource editor or calling DragAcceptFiles, or so I thought. While I could get my dialog to accept the files, I couldn’t get the list view to do so. It turns out that the list view doesn’t handle these messages, nor does it send a notification back to the parent.

One strategy to deal with this is subclassing, although we aren’t going through the formal channels to do. That’s trickier, because it involves using things like CreateWindowEx, and might be a pain with dialog resources that already have a list view. Instead, we’ll actually replace the window procedure out from under the already materialized dialog control – basically monkey patching. In fact, Microsoft’s own documentation mentions this (and a better way with caveats). However, it doesn’t provide a concrete example. This article will quickly show you how, and provides an interesting, if brief example of Windows API principles.

Continue reading

Notes on the system image list

If you need the icons for files in a Windows program, the easiest way to do so is with the system image list. This is an image list (a resource containing icons, mapped by index) that caches those system icons. The advantage of being an image list is you can easily associate it with a control (like a ListView) and pick out the images by their index, or draw out of it.

Continue reading