Posts

Density Cubes

Density Cubes

Bruce Ediger

It turns out you can buy little cubes of various elements from sketchy Amazon marketplace vendors.

Naturally, I wanted some Tungsten, because of it’s incredible density.

Mergesort Investigation 10 - garbage collection

Mergesort Investigation 10 - garbage collection

Bruce Ediger

Previously, in July 2021, I had tried to remove garbage collection from the possible variables affecting my iterative mergesort. I transliterated the Go code to a plain C version that could not have any garbage collection. The C code benchmarked very similarly to the Go code.

The Hobbit

The Hobbit

Bruce Ediger

I read JRR Tolkien’s The Hobbit for the first time since at least Junior High, or maybe even before.

Daily Coding Problem: Problem #1780 [Medium]

Bruce Ediger

Problem statement

This problem was asked by Cisco.

Given an unsigned 8-bit integer, swap its even and odd bits. The 1st and 2nd bit should be swapped, the 3rd and 4th bit should be swapped, and so on.

For example, 10101010 should be 01010101. 11100010 should be 11010001.

Bonus: Can you do this in one line?

I Saw It on I-25

Bruce Ediger

I’ve been commuting somewhat less than 3 days a week, from Fort Collins to Denver and back. I’ve seen some mighty strange stuff.