libDwmCredence integrated into mcrover

I’ve completed my first pass at libDwmCredence (a replacement for libDwmAuth). As previously mentioned, I did this work in order to drop my use of Crypto++ in some of my infrastructure. Namely mcrover, my personal host and network monitoring software.

I’ve integrated it into mcrover, and deployed the new mcrover on 6 of my internal hosts. So far, so good.

Replacing libDwmAuth due to Crypto++ problems

This has been a while in the making, but…

I am in the process of replacing libDwmAuth with a new library I’m calling libDwmCredence. Why?

Mainly due to poor maintenance of Crypto++, which I used in libDwmAuth. Quite some time ago I tried to explain two problems with Crypto++ to the maintainers that led to memory leaks and corruption on some platforms. I gave up due to the current maintainers not resolving the problem, and growing tired of maintaining my own fork in a private repository. The root of the issue was an incorrect optimization and attempt at forced alignment. In essence, an attempt at optimization that critically destroyed the integrity of the library on some platforms (notably an important IoT platform I use, Raspbian). The last place you want code to stomp on the stack or heap is in your crypto library!

Way back when, I used Crypto++ because it was FIPS validated. That hasn’t been true for a while, and it doesn’t appear that it will be true in the future. Then when elliptic curve solutions came along, Crypto++ was very slow to adopt due to design constraints. This was troublesome for me since some IoT platforms don’t have hardware acceleration for AES, and hence I wanted to be able to use XChaCha20poly1305 and the like to improve performance, as well as Ed25519 and X25519 keys. There was a period where I couldn’t do this at all with Crypto++.

Finally, for my own work, I don’t really need much of what Crypto++ provides. And parts of the interface use C++ in atypical ways, making code hard to read.

So, I’ve switched to libsodium and wrapped it with C++. While there are many things I don’t like about libsodium, it provides what I need and I am able to make it safer by wrapping it. Furthermore, I am using boost::asio and a semi-elegant wrapper that allows me to send and receive just about anything on the wire easily. It does what I need it to do, and no more. Of course the boost::asio interfaces are considerably different than socket()/bind()/select()/accept()/connect()/etc. but I mostly only have to think about that on the server side.

2021 end of year ramblings

Another year of COVID-19 pandemic. Tragic, yes. Much of it preventable, yes (get vaccinated, please). But as the year closes, now is as good a time as any to reflect…

I was recently reminded of the “Why am I here?” question. It’s not as if it isn’t always staring us in the face. It is in fact central to being an adult human being. Mortality is real. But some have seen a lot of mortality this year.

Before I go to my main topic, I just want to say that my heart goes out to those who’ve endured day after day of preventable tragedies in 2021. Health care workers in particular. To those who’ve been pushed to questioning their hippocratic oath and other ethics: thank you, and stand strong. You are not alone; far from it. I’ll give you my hand if you’ll take it.

“Why am I here?”

For me, the simple answer: to build things. The complete answer is much more complex, but…

One day the remnants of humanity on this planet will just be a layer of remains. It’ll likely be a thin layer; we haven’t been here very long and I suspect our presence here will be shorter than the dinosaurs. However, we’ll leave behind an interesting layer.

Some of it utterly confounding in the grand scheme of things. Ungodly amounts of empty plastic containers. Megatons of polymer cases with silicon, glass, rare earth metals, etc. inside. Paper and more paper. An odd carbon transfer.

Some of it fascinating. Music in some form. Mathematics. Literature. Law. Medicine. Computing. Science in general. AI.

Some of it sad. Greed. Avarice. War. Poverty. Starvation. Exploitation. We’ve a long list of evils.

What do you want to leave behind? There’s a saying among software craftspeople, “Leave the code better than you found it.”. It’s attributed to Bob Martin. I’ve read a lot of Bob’s work, and listened to most of his publicly available talks. I’d be stunned if he claimed to have invented this idea. This idea predates software by… I don’t know, several millennia? It’s as old as the craftsperson, and is not specific to software. But it’s definitely a really good thing to do in software. Just as it is in plumbing, carpentry, medicine, law, etc.

I want to leave behind good, useful things that wouldn’t have existed without me. It’s weird. It feels humble and prideful at the same time.

Making my own office furniture: Part 5

The under-desk rack cabinet is done except for the porcelain top insert. I haven’t yet decided which marble-look porcelain I want to use here. For the foreseeable future, this top won’t even be visible, which argues for low cost. On the other side is my penchant for “do things once, do them right” and “cry once now, or cry a lot later”. Thus far I’ve kept to “if you can make a decision late, do so”.

I’ve assembled the base of the first desk. My friend Randy Forbes noted that the feet of the legs are overkill. He then said, “I miss you.”. Having friends that appreciate who you are (and knowing that you’re gonna be that person even if it’s quirky/annoying/spooky) is SUCH a wonderful thing!

Now that I have the base of the first desk assembled and what I know is a solid desk design (with overkill thrown in), I thought I’d reflect a moment. This is after all a design/engineering/craftsmanship/whatever web site.

I’m not a fine woodworker. It’s not that I don’t have the patience (I do); I don’t have the time. Maybe someday.

My woodworking creations lean heavily toward utilitarian. I tend to choose function over form. My desk design reflects it. It’s sort of mission/craftsman style, but I have a LOT of fasteners that are NOT in those styles and none that typically are. I’ve got dowels, pocket hole screws, threaded inserts, long bolts going into dowel nuts, guide pins and leaded bronze guide bushings. No mortises or tenons, no biscuits, no dominos. The only time I’ve used my chisels thus far is to scrape off half-dried glue. Nevermind the 1″ thick Delrin feet or the single piece of porcelain for most of the top. I’m gonna call it “my style”. Which is again, utilitarian. It’s VERY strong; the base will likely easily hold 1,000 pounds. It has gaps for cabling. It’s designed to be able to be disassembled into 4 parts, since it’ll be heavy in total. The thick Derlin feet will allow me to slide it easily on the porcelain floor, and they can be replaced since they’re bolted to threaded inserts in the legs. Maybe someone will be using these desks long after I’m gone.

In terms of artistry, it’s not that far from a some-assembly-required MDF desk. Just with much nicer materials and beefier fastening. On the other hand, it has some qualities of a commissioned work: it’s designed specifically for the space it will inhabit and the people who will be using it. It’s actually designed by its primary user. In software and other technology fields, we call this dogfooding. I’ll be using what I’ve created.

Making my own office furniture: Part 4

I’ve been very busy at work, but I long ago finished the first drawer cabinet. I also finished a second bookshelf, but am thinking I won’t be using it in the den.

I have a final design for the under-desk rack in SketchUp. Obviously I didn’t bother drawing the router profiles. But this fits under the desks and will house my UPS, power conditioner and ethernet switches.

I have most of the parts to build this cabinet, except the casters and the porcelain. The ventilated door has a tinted scratch-resistant polycarbonate window. The hinges on the ventilated door are dual-pin (usually used for sewing machine tables). Mostly because I wanted something smallish and flush (and solid brass). I suspect this means I’ll want guide pins and sleeves, so I ordered some from McMaster-Carr. I haven’t made up my mind on latch(es); one side of me says I should just use rare earth magnets. The other side of me says I should use draw latches. A cosmetic versus robust tradeoff.

The desk design is not quite done yet, but I’m close. The top is 36″ deep and 70″ wide.

The only work I’ve done on the desk is creating the feet (for two desks). They are 1″ thick black Delrin with countersunk holes. Each leg will have 1″ long 5/16″-18 threaded inserts. 4 countersunk hex bolts through each foot thread into the inserts. I used Delrin because it’s very dense, machines like butter, and is very slippery. The downside is that it’s nearly impossible to polish, but I’ll find a solution to that later. Realistically, as long as I sand off the tooling marks, they’ll probably be fine. The goal here was to make it relatively easy to slide the desk on the porcelain tile floor.

The top of the desks have a single piece of polished porcelain. The base is oak with dowel and pocket hole screw construction, plus dowel nuts and bolts so the base can be broken down into three pieces. The top is secured to the base with threaded inserts and bolts.

Making my own office furniture: Part 3

On Sunday, I cut the base piece of plywood for the drawer cabinet that will also serve as a printer stand. I also installed half of the pocket hole plugs, trimmed them and sanded them flat. I have 8 more to do for the top of the cabinet.

On Monday, the 2″ casters arrived for the drawer cabinet that will also serve as a printer star. They’ll be installed in the base I cut on Sunday. I’m still waiting for the nut inserts and bolts to arrive for that. Assuming this all goes well, it’s likely that I’ll make a second one. Kind of a symmetry thing, one on each side of the french doors. I think I have more than enough Middle Atlantic TD drawers to fill two of them, and more storage is a good thing. I’d say I could always buy more Middle Atlantic TD drawers, but the price has become obscene (like 5X more than what I paid years ago). Kind sad that if someone were starting this project today, and wanted to use three 4U and three 3U drawers, they’d spend $1200 on the drawers alone. That’s more expensive than solid 5/8″ maple dovetail drawers with 100 lb. slides from and much more expensive than baltic birch drawers with slides. Of course the advantage of the Middle Atlantic TD drawers is more usable space (wood takes up a lot more space).

I stopped at Rockler on my way home and bought a can of Georgian Cherry gel stain. I don’t really imagine using this alone, since it’s redder than I’d use in the office. But I may experiment with layering it in combination with another stain, or multiple coats and then a dark glaze. The latter yields pretty results on oak in the articles I’ve read.

It looks like the relatively inexpensive hand-held 4″ wetsaw at Lowe’s gets good reviews. If I buy one, I can buy 24″ x 24″ marble-look polished porcelain tile for the top and cut it to the size I need.

Making my own office furniture: Part 2

This weekend I realized that the 3″ casters I bought for the printer stand / drawer cabinet are not ideal. Concealing them behind a skirt forces me to place them too far away from the edges, which has the potential to make the cabinet tippy. With an HP 4050TN on top, this is obviously undesirable. So I ordered the same brand of casters but in 2″ wheel diameter. I also ordered another set of the 3″ casters, and I’ll use both sets of 3″ casters on the base cabinets for the bookcases. The base cabinets are much deeper and also shorter, so tippiness shouldn’t be an issue. They also need the additional strength of the 3″ casters.

I bought and cut the pieces for the second bookcase, and also cut the slot for the back panel using the dado cutter in my table saw. I did the same for the rolling printer stand / drawer cabinet. I glued up the latter, using Loctite PL. The main reason for Loctite PL here: strength and resiliency. I also wanted a little expansion in the slots for the back panel. It’s a PITA to clean up versus yellow or white wood glue, but this cabinet’s insides won’t be visible.

I also ordered nut inserts and bolts for the casters. The nut inserts may or may not work out; they’re intended for softwood, but I’ll be using them in plywood. It’s been a long time since I’ve used this type of nut insert, so I don’t remember if they work in plywood. It all comes down to how well they handle the glue in the plywood. The plywood itself is a softwood. The idea here is that I need a doubled-up base for strength, and plywood is cheaper and more dimensionally stable than solid wood. In the last 10 years or so, when I’ve installed plate casters in wood, I’ve just used bolts and nuts with a recess cut with a Forstner bit for the bolt head and a washer. But here I want a completely concealed fastener.

I’m still debating what I want for the top of the printer stand / drawer cabinet. I know I want a marble-look porcelain tile in the center (looks nice, very durable). But I want one piece, and I haven’t found one I like that’s big enough while not also being too big for my tile saw. I’m pretty sure I can find one though. However, I haven’t yet decided how I want to trim it (species of wood), nor how thick I want it to be overall. I really love padauk, so I might go that route despite it being considerably different than oak.

Making my own office furniture

For a very long time, I’ve been using Middle Atlantic recording studio furniture in my home office. A large Edit Center Desk (ELUR) with 8U of rack space built in and a large overbridge with adjustable speaker platforms. I’ve had the desk for so long that I can’t remember what I paid for it. Today it’s about $3,800 street price (yikes!). The rack space has been used for audio gear and a pair of power distribution units with pull-out lights since day 1. I also have three MDV-R12 rack units, which are about $480 street price today. I’ve been using those for a rack mount UPS, ethernet switches, power protection and a lot of Middle Atlantic TD drawers (which are very expensive these days). I would estimate I’ve got over $8,000 worth of functional furniture for my home office. I didn’t pay that, but that’s what it would cost today.

However… I’ve never liked the look of it for my home. It is highly functional, but it’s intended for professional work space. It’s laminated MDF, black. It’s not something I want in the den of my current home. And my sweetie doesn’t want it in there either. But the den will be my office space soonish. I need new office furniture, preferably all real hardwood (and maybe metal and marble or marble-look porcelain). As much as I appreciate the recycled nature of MDF, I don’t like it for furniture. Even with a quality real wood veneer, it’s just not the same as solid hardwood.

The thing is… I still need it to be functional. I need rack space, it’s not optional. And outside of Etsy, I haven’t seen furniture with rack rails that I’d consider in the den. And no one makes exactly the cabinets and shelves I need.

Fortunately, I’m reasonably handy. And I’ve built racks before. And I have more than 30U of Middle Atlantic TD drawers (which I really like). So…

First up is some bookshelf cabinets that happen to be 19.125″ wide on the inside and hence can accept Middle Atlantic rack rails. They’re 52″ tall, 16″ deep. Drilled for 5mm shelf pins, about 15.675″ deep inside, solid red oak sides, bottom, top and shelves. The back is 1/4″ oak plywood fitted into slots in the sides, top and bottom. I want two more of these, but I’m thinking those might be shallower (around 12″). The advantage of the 15.675″ inside depth on this first bookshelf cabinet: it’s just enough to allow Middle Atlantic TD drawers on rack rails, if desired. The intent of these is that they’ll sit on a base cabinet (more on that later), starting at about desk height (30″). So the top will be at about 82″.

Here’s a picture of a test assembly.

Testing the shelves in the new bookshelf/rack cabinet.

Here’s another picture from when I was applying sanding sealer. The gap in the rear panel is to allow AC power or other cables to enter the area where I intend to put the rack rails for a Furman PL-8C, Behringer Composer PRO-XL, Behringer Ultragraph 2-channel 15-band equalizer, UMC404HD (for me) and UMC204HD for my sweetie. I’m still debating if I need more than 6U of rack space. It would not be terrible to have a 4U drawer in here to stash headphones, though given how much I’ve been working from home during the pandemic, my headphones get heavy use. Hence the current plan is to have enough space at the bottom of this cabinet to hang two pairs of headphones (with microphones).

Applying sanding sealer to the new bookshelf/rack cabinet.

Second up is similar size-wise (19.125″ wide inside and 16″ deep), but will be a rolling cabinet just for Middle Atlantic TD drawers and my main laser printer. There will be 21U of rack space. Probably three 4U and three 3U drawers, but we’ll see. It might not be a terrible idea to have a PDU in the front (with pull-out lights) and room for an ethernet switch (and my Raspberry Pi rack?) in the back. But I want a clean look here. Sort of industrial (the drawers), but in a solid hardwood cabinet. I bought 3″ casters, all swivel but two with no lock and two with total locking. A hardwood skirt will conceal the casters, floating the cabinet about 1/2″ off the floor. Why casters? Well, the older I get, the more I wish all my furniture could be easily moved (when cleaning, when needing to get to a hidden AC outlet, or data port, etc.).

The base cabinet I mentioned… I’m still in the ideas phase. Equipment-wise, I need to house UPS, PDU, ethernet switches and cooling. Today I’m doing that in a Middle Atlantic MDV-R12 to which I added rear rails for patch panels and fans. I don’t want this stuff facing the french doors to the foyer. The racks need to face north and south. I’m picturing a double-ended cabinet, and it needs to be about 66″ long (to support three of the bookshelf units). I’m imagining it being about 24″ wide, 20.5″ of that dictated by rack width. I’ll need 6 or 8 casters for this one; it will potentially be holding up a lot of weight.

This could also be two cabinets, that could be latched together or just have a bridged top. The advantage here is simply the building process; it’s much easier for me to move smaller pieces. I suppose modularity is also an advantage, but I don’t anticipate reconfiguring this stuff once it’s in place.

Desk space is also still in the idea stage. I’d really like space for the two of us to work comfortably. The hard part is not consuming the whole room with desk. Right now, I have a big ugly desktop computer. I’ve been wanting to ditch it for years, but I’m waiting on Apple for a beefier Mac Mini with Apple silicon. I can’t ditch my monitor (I need the 38″ screen), nor my keyboard, trackpad and wrist rest. My monitor is currently on an arm on the ELUR overbridge, and it’d probably be a good idea to have overbridge(s) on new desk(s); space to hide keyboard and cables (and Mac Mini?), etc. It’s also often the ideal height for speakers.

High art?

I ran across this on a list of top desks for 2021.

My first thought was “Dancing banana animated GIF meme.”. I haven’t looked up the designer nor their inspiration. But to be honest, it doesn’t matter. He/she could tell me it came from their muse. What matters… happenstance or deliberate, it’s an inanimate object that mimics an Internet meme that mimics a piece of fruit that mimics a dancing human being. Is it high art just by the number of shoulders it’s standing on? Or just a good example of “All creative work is derivative”? Can I call it anthropomorphic? Why not?

We stand on the shoulders of giants. Or on the shoulders of dancing bananas.

Not my style of desk, but bravo! Whimsical yet functional.

Time for a new desktop keyboard: the switches

I just ordered a set of Kailh Box Pink key switches from And I’m going to order a barebones hot swap keyboard. Why?

First, I spilled some coffee in my desktop keyboard. Maybe 1/4 cup. Which is a lot, though nowhere near what I’ve spilled on some of my buckling spring keyboards. I tore it down, doused it with 99% isopropyl alcohol, cleaned all the switches, the PCB (both sides), the case (inside and out), the keycaps. It’s working again, but it’s a reminder….

It’s my oldest CODE keyboard, Cherry MX blue switches. I like the CODE keyboard. I don’t love the price though, and I also don’t love how difficult it is to disassemble. I’ve had it apart a couple of times. And this time, one of the case tabs broke. It’s not a huge issue, but it’s annoying. If I press on the lower right corner of the keyboard case… “SQUEAK”. It’s likely more the matter that I know it’s broken than it is any sort of real annoyance, but…

I’ve never loved Cherry MX switches. My computing life began when we had some truly delightful keyboards to type on. Before the IBM Model M (very good). Even before the IBM Model F (better). Anyone truly interested in how we got where we are today would do well to do some history homework online before making your next mechanical keyboard purchase. But I can sum it up in two words: cost reductions.

I’m not going to judge that. It is what it is, and the good far outweighs the bad; cost reductions are what have allowed many of us to own desktop and laptop computers for many decades.

But… there are those of us that spend our lives at our keyboards because it’s our livelihood. And there are a LOT of us. And some of us care deeply about our human-machine interface that we spend 8+ hours at each day. And guess what? We’re not all the same. Unfortunately, we’ve mostly been saddled with only two predominant key switches for keyboards for a very long time now: various rubber dome keyboards (pretty much universally considered crummy but inexpensive), and those with Cherry MX (or something similar to Cherry MX). We do still have Unicomp making buckling spring keyboards with tooling from Lexmark (who manufactured the Model M keyboards for the North American market). And we have some new switch types (optical, hall effect, etc.). But at the moment, the keyboard world is predominantly Cherry colored.

Perhaps worse, those of us that like a switch to be both tactile and clicky have few good choices. Unicomp buckling spring is at the top for readily available and reasonably priced. But the compromises for a modern desktop are significant for a large crowd of us. Number one would be that it’s huge (including the SSK version). For some, number two would be no backlighting. And yet others want more keycap options. But it’s a long drop from the buckling spring to any MX-style switch if your goal is clicky and tactile.

I don’t hate Cherry MX blues. Nor Gateron blues. Nor many others. But… most of them feel like just what they’re designed to be. They’re not smooth (including the linears), most of them are not truly tactile, and they’re fragile (not protected from dust or liquid ingress). Most have considerable key wobble. They’re usable, I’ve just been wanting something better for a while. In a TKL (tenkeyless) keyboard with minimal footprint.

Some personal history… one of the reasons I stopped using buckling spring was just the sheer size of any of my true Model M keyboards or any of the Unicomps. The other was the activation force. I wanted something a little lighter to the touch, but still noisy. The Cherry MX blue and similar have filled the niche for me for a while. But… the scratchiness/crunchiness has always been less than ideal to me, and the sound in any board I’ve tried has been less satisfying than I’d like. I’ve not had any of the switches die on me, which is a testament to durability. But I’ve had to clean them on more than one occasion due to a small spill, to get them working again. And over time, despite the fact that they still function, their characteristics change. Some keys lose some of their clickiness. Some get louder. And out of the box, they’re not terribly consistent sound-wise. And while I’ve disassembled keyboards to clean and lube the switches… it’s very time consuming. And despite the fact that I have a pretty good hot-air rework setup, it’s very hard for me to justify spending time replacing soldered switches. I can barely justify time swapping hot-swap keys!

So… I want a more durable switch. And something smoother (less scratch/crunch) than a Cherry MX, but with a nice distinct click. And unfortunately, something that works in a PCB designed for Cherry MX since there are far and away the most options there. The Kailh White or Pink seem to fit the bill. The white are readily available, so I bought the pink just to make sure I don’t miss out on available inventory. I’ll put them in a hot-swap board with PBT keycaps and give them a test drive for a few weeks.

I know the downsides ahead of time. I had an adjustment to make when I went from buckling spring to Cherry MX blue. Buckling spring feedback and activation occur at the same time; it’s ideal. Cherry MX and related designs… most of them activate after the click. The Kailh pink and white appear to activate before the click, and they don’t have the hysteresis of the Cherry MX switches. But based on my own personal preferences which are aligned pretty closely to those who’ve reviewed the Kailh Box White and Kailh Box Pink (like Chyrosran on YouTube), I think one of these switches will make me happier than my MX blues.

Of course I could be wrong. But that’s why I’m going with an inexpensive hot-swap board for this test drive. PCB, mounting and chassis all play a significant role in how a keyboard feels and sounds. But I know many of those differences, and the goal at the moment is to pick the switches I want in my next long-term keyboard.