Clarus the Dogcow

January 25th, 2022

For long-time Apple fans, hardly anything is more iconic than Clarus the Dogcow. Not quite a dog, not quite a cow, Clarus made her debut as part of the Cairo font set drawn by Susan Kare in 1983. Later on in the dogcow’s life, she found herself depicting the orientation of printer paper in the page setup dialog window for Mac OS. I don’t recall exactly in which version she made her debut, but sometime before System 7. And if you are the right age, you may even remember the brown incarnation of the dogcow appearing as a stamp in KidPix!

The dogcow even had official technical notes on Apple’s webpage back in the day! (though those documents were sadly removed in the mid 2000’s)

Naturally, I thought that the best way to commemorate Clarus’ impact on my childhood would be to replicate her likeness in wood. I made a template to follow and cut out strips of light and dark wood that were as uniform as I could make them. These strips of wood served as pixels to my arbor canvas. My dad and I took the little wooden pixels and layed them up against the paper template slowly building up Clarus’ familiar frame. The dark wood is ebony gaboon, and the light wood is maple.

After all the pieces were placed and we corrected any visible mistakes, glue was poured on top. The sides were clamped just enough to keep the pieces from moving. Bursts of air from an air compressor pushed the glue down between the wooden pixels, then finally the clamps were tightened.

Once it was dry, multiple slices were able to be taken from the resulting block of wood which would make the inlays for some miniature cutting board. Four in all were made. Using a CNC router, a rectangular inset was milled away from the maple cutting board, the corners squared up with a chisel, and the inlay glued into place.

All that was left was some sanding and finishing with a food-grade wax to complete these little cutting boards. Kind of a random thing to make, and I honestly can’t remember what made me want to do this in the first place. But I like my little dogcow cutting board and think to myself “moof!” every time that I use it.

Project Euler 43

October 10th, 2021

I like to go back and re-solve Project Euler problems in different languages. Lately, I’ve been solving them in Javascript for fun. When I do this, I don’t look at previous solutions and try to do it from scratch. When I was finished, I was surprised by the performance of my solution to 43 compared to my previous attempts in other languages.

Problem 43 is as follows:

The number, 1406357289, is a 0 to 9 pandigital number because it is made up of each of the digits 0 to 9 in some order, but it also has a rather interesting sub-string divisibility property.

Let d1 be the 1st digit, d2 be the 2nd digit, and so on. In this way, we note the following:

  • d2d3d4=406 is divisible by 2
  • d3d4d5=063 is divisible by 3
  • d4d5d6=635 is divisible by 5
  • d5d6d7=357 is divisible by 7
  • d6d7d8=572 is divisible by 11
  • d7d8d9=728 is divisible by 13
  • d8d9d10=289 is divisible by 17

Find the sum of all 0 to 9 pandigital numbers with this property.

When I first solved this problem, I solved it in C. This was in 2014, and I was still fairly green. My solution at the time was to iterate through every 10-digit number and see if it was pandigital and then if it was, check if it met the sub-divisibility requirement.

This solution is what you would call “brute-force”. It’s inelegant, and slow. However, it does work. It took 33.948 seconds to compute.

A few years later I was doing more with Rust and Python. Both of these solutions I created used the same method. This probably happened because I wrote both solutions close together. At any case, this time I thought myself more clever and took a pandigital number, 1234567890, and discovered every permutation, and then checked for the sub-divisibility requirement of each.

This is better than brute force, but still time consuming. Python can accomplish this in 18.724 seconds and Rust in 4.621. Better, but still not great.

The general rule of thumb with Project Euler is that if a solution takes more than a second, you haven’t found the intended method of solving it.

Looking at it this time around, it seemed like a very straightforward problem with an obvious path for a solution. Instead of finding pandigital numbers and checking if they meet the sub-string divisibility requirement, this time I would build up the pandigital numbers using the sub-strings.

First I created arrays for the multiples of the first 7 primes with 2 and 3 digits. I then used a recursive function to build up a number using valid combinations of these sub-strings (since each one overlaps the next with 2 digits). This creates a much smaller group of numbers to check.

Once I have all my potential pandigital numbers, I check to make sure they are in fact pandigital. (Note that at this stage, they should be missing the first digit). When checking for pandigitality, I’m actually looking for 9 different digits, and if so, I prepend the missing 10th digit and voila, it’s a valid pandigital number!

This solution is much, much faster at .237 seconds.

I’m very pleased with that result, but a little shocked I didn’t see this method when I have solved it previously. It’s nice to know that since I first started solving these problems years ago, I can see measurable improvement in my ability to find and create solutions to these fun little puzzles.

Source on GitHub

Brisco County Jr. Orb Rod

September 10th, 2021

In 1993, The Adventures of Brisco County Jr. premiered on Fox. It was about a Bounty Hunter in the old west, and his mission to round up the gang of outlaws who killed his father, a famous Marshal. Brisco County is a Harvard educated lawyer who is eagerly looking to the future for the “coming thing”.

As he works to capture all the outlaws responsible for his father’s death, he has multiple encounters with a mysterious object only known as ‘the orb’. In the first episode we learn that the orb can grant power to people who possess it. As we continue through the season, we learn more about the orb’s power and origins, but its mystery isn’t completely unraveled until nearly the end of the season.

The orb is hard to describe. It’s a golden, spherical object with protrusions regularly distributed across it’s surface. These protrusions are the end-caps or glowing rods that can be removed from the orb. As a kid, I always thought that the orb’s mystery and power was very fantastic, and I always wanted to see it in person, or to own it.

Reference photo found on a prop auction site

I finally decided that it was time to replicate it. Not the whole thing, just one of the orb rods. I’ve done a bit of research here and there over the years and have never gotten a straight answer on the exact size of the prop. I managed to find a small image of a prop replica that was built from the same mold as the original prop. Luckily, this prop happened to be photographed next to a ruler. I inferred the measurements to the best of my ability and concluded that the prop orb rod is about 1.5 inches in diameter, and about 13.25 inches long.

Brisco County Orb Rod Plans

I was able to find blue acrylic rod in 1.5 inch diameter from a supplier on eBay for a good price. I then bought some Brass stock on Amazon, also 1.5 inches in diameter.

I don’t have any tooling for doing a rounded end of this diameter, so I used the lathe to create steps at 1/8 inch intervals in the brass that match the contour of a .75 inch radius sphere. I then used a file to smooth it down to a nice rounded end. A little bit of sanding, and then a clear coat of lacquer to prevent tarnishing, and the cap is finished. The reverse side was drilled out to 1 inch to accommodate the acrylic rod.

There wasn’t much to do on the acrylic rod, except to machine down one end in order to insert it into the cap. Additionally, the other end was fairly rough from being cut off with a band-saw by the seller. I used progressively finer sand paper on the end, finishing with a 2000 grit wet sanding to get it to be a clear and smooth as possible.

The last step was to epoxy the cap onto the acrylic rod.

Finally, after many decades, I have the prop replica I’ve always dreamed about.

Sadly, Brisco County Jr. was cancelled in its first season. Despite being cancelled, I find it to be an enduring show full of the witty one-liners you’d expect from Bruce Campbell, the charm of old spaghetti westerns, and a touch of sci-fi. Luckily, the show was able to satisfyingly conclude it’s storyline, so even while it was cancelled, it feels complete, and is one show that I frequently rewatch.