Posts

  • Anna Havron: a Fountain of Wisdom

    @857@fedia.social shared a link to an answer to a reader question about open and closed lists on Analog Office. I found it intriguing and went on a wandering binge of a few dozen posts throughout Analog Office and her personal site at annahavron.com. Here are some highlights.

  • Friendship Ended With Gas Stoves, Induction Stoves Are My New Best Friend

    Soon after my parents replaced their temperamental electric cooktop with a gas cooktop, I decided that gas stoves were the best and made it one of my goals to own a gas stove one day.

  • Getting LXC To Work

    In my last post, I tried and failed to set up LXC for deploying software. I revisited the setup later on and got things to work, and this is what I did. Unfortunately, I didn’t start from scratch, so this will be of limited use to anyone trying to set up LXC themselves.

  • How Not To Deploy Using LXC

    I seem to have a pathological need to do things the hard way. This is a braindump of things I’ve learned and things I’m still confused about for working with LXC.

  • Instant Pot Polenta

    Developed based on “Polenta with Mushroom Sauce” and “Shrimp and Grits” by Janet A. Zimmerman in The Ultimate Instant Pot Cookbook for Two.

  • Misadventures in Java

    Warning: high sodium content

  • Advent of Code 2020 Day 10 Part 2 Generalization

    I fell down a bit of a rabbit hole after I finished part 2 of day 10 of Advent of Code. My solution broke the problem into several instances of a slightly different sub-problem. These were simple enough to reason about by hand, which let me come up with a formula for the smallest few (\(n < 4\)). I knew the formula didn’t generalize to bigger examples, but the puzzle didn’t require any that weren’t covered by my formula. It bugged me that my solution wasn’t general, so after solving the puzzle, I set out to determine a solution to the sub-problem for all \(n\).

  • How Many Degrees in a Sphere?

    I was listening to something that talked about, “looking in every direction—360 degrees around”. This bothered me, because 360 degrees isn’t every direction. Up and down are missed, for example. This got me wondering: if there are 360 degrees in a circle, how many are in a sphere? Of course, for a sphere, they will have to be square degrees instead. \( \def\dd{\mathrm{d}} \)

  • Things I Learned In the Last Week

    An assortment of things I encountered in the last week that may be useful in the future.

  • Code 128 Barcode Optimization, Part 2

    My last post described the code128 barcode format and how to optimize the encoding of a barcode payload for minimum barcode length. This post describes how I implemented the described algorithm in rust. Please read the previous post to understand the problem and context of this solution.

  • Code 128 Barcode Optimization

    The code 128 barcode allows text to be encoded in a way that can be easily read and decoded by a barcode scanner. The code consists of 107 symbols, each of which consists of 3 lines and 3 spaces and has an overall length of 11 ‘bits’ if the sequence is interpreted as a binary pattern where the smallest bar or space width corresponds to one bit.

  • A Super-simple AUR update script

    Keeping packages up-to-date is an important part of system maintenance. The package manager handles all the official packages, but I use lots of packages from the AUR which doesn’t come with a package manager. Since anyone can publish a package on the AUR, it is important to make sure there is no malicious code in the package or installation scripts. This must be done manually every time a package is updated, so it gets tedious.

  • YouTube Delay Line

    I’ve been reading Deep Work by Cal Newport and one of the tenets of his method is embracing boredom. Rather than filling idle minutes with scrolling through a social feed or reading vapid articles, taking a break from stimulus allows your brain to relax and subconsciously process the events of the day. Another benefit of avoiding distraction during these times is exercising your self-discipline, which will make it easier to focus on a necessary task when it counts.

  • scipy.interpolate.UnivariateSpline does not do what I expected

    Wasted about an hour because I thought a UnivariateSpline would follow whatever you gave it nicely, but it just fits a cubic by default to the entire range no matter how many points you give it. The way you get it to pass through every point is to add s=0 which uses many splines spliced together until the result passes through every point.

  • Maybe I Should Blog More

    I thought it might be nice to blog more for some accountability. If I know someone might see what I do in a given day, I might make better choices.

  • Bottlenecking for Fun & Profit

    I have recently noticed that wildly different-seeming problems in the areas of data analysis, optics, and writing all have similar-looking solutions. They each involve squishing something through a tiny passage (bottleneck) to clean and purify it by removing all of the unnecessary parts.

  • Comments!

    This blog now has comments courtesy of Disqus. You must enable javascript to see or post comments, so please do so and let me know what you think of future or past posts!

  • Mols of water

    According to USGS, there is 332,500,000 cubic miles of water on, in and above the earth. This is equivalent to \(1.386\times10^{24} \,\mathrm{g}\). Dividing by the atomic mass of water (\(18.015 \,\mathrm{g}/\mathrm{mol}\)) gives \(7.693\times 10^{22} \,\mathrm{mol}\). This is suspiciously close to avogadros number, \(6.022141\times 10^{23} \,/\mathrm{mol}\). In fact, dividing by it results in \(0.127 \,\mathrm{mol}\) of mols. That’s about an eighth of a mol . . . of mols. There is almost a mol squared of water on the earth.

  • Give Yourself A Choice

    Louis Rossmann has a video about procrastination in which he says a bunch of things, but the thing that stuck with me the most was the idea of personal freedom and giving oneself the choice of many different actions.

  • When to use FFTshift in MATLAB

    After much research and experimentation, I have determined the proper way to take forward and inverse Fourier transforms in matlab. The forward transform is:

  • Constant-Velocity, Constant-Density Spirals

    In confocal microscopy, a tightly focused illumination beam is scanned rapidly across the sample. For each illuminated point, the amount of scattered, transmitted, or fluorescent light is detected, and the image is reconstructed by mapping each light measurement to the corresponding pixel.

  • Vimperator + Reader View

    Firefox 38.0.5 introduced Reader View which strips out everything except the main content of a page for easier reading. I use vimperator and wanted to add a key mapping to quickly go into reader view. To save others the trouble of figuring it out, here’s how:

  • Nineteen-Minute Nitpick

    I recently finished Nineteen Minutes by Jodi Picoult. I really enjoyed it, especially for the way it examined conformity, fitting in, and life in general from many different angles and perspectives. The human aspect is great, but there are some distracting technical errors that I’m surprised made it through the proofreading and editing process. For example, the following (apparently) C++ program on page 314 (of my edition):

subscribe via RSS