# Revisiting Castigliano with SciPy

On Friday, a colleague asked me if I had a quick solution for determining the spring stiffness of a tapered leaf spring. Yup. This may be the first time I’ve been able to use an old blog post directly for work. But as I read through the solution, I realized I’d done the numerical integration…

# Python calculator

In his two most recent posts, Clark Goble talks about using Python/iPython interactively and gives some helpful and fun tips. In this one, he shows how to use the colorama library and Emoji fonts to spruce up your iPython prompt. It’s a clever follow-on to his earlier post on adding Emoji characters to your bash…

# Baseball as an excuse for programming

I find it really hard to watch baseball nowadays because the game moves so slowly, but I do still like to look at statistics and standings. The standings in Yahoo! Sports include a figure that was uncommon when I was a kid: the teams’ run differential, the difference their runs scored and runs given up.…

# Accelerometers

Gabe linked to this recent video by Bill Hammack in which he talks about the workings of the accelerometers in our smartphones. You may have also seen it on Boing Boing. This is one of his best videos. It’s an especially good introduction to how silicon etching is used to create tiny machines. But… But…

# As easy as falling off…

The other day I was thinking about how to present a set of data, and I started fiddling around with histograms. Histograms are easy to make, but if they’re going to be representative of the data, the size of the bins has to be reasonable. Bins that are to narrow make the data set look…

# The risk of sitting

Last week, everyone was blogging and tweeting about this New York Times article about the health effects of sitting for long periods every day. And I think everyone got it wrong. Let’s start with a disclaimer. Although I have both formal training and professional experience dealing with probability and statistics (it was part of my…

# Arrested for breaking the law of large numbers

So there’s this article in the New York Times today, by James B. Stewart, called “Apple Confronts the Law of Large Numbers,”1 and it’s been linked to a lot in the Apple-centric corner of the internet, including a Linked List mention at Daring Fireball. Let’s cut to the chase: The New York Times doesn’t know…

# Fixing Gnuplot on OS X 10.7.3

Last night I was analyzing a fixed-ended beam with variable cross-section—as you do—and when I got done, I wanted to plot up some of the solutions. So I fired up Gnuplot and… \$ gnuplot dyld: Library not loaded: /usr/X11/lib/libfreetype.6.dylib Referenced from: /usr/X11/lib/libfontconfig.1.dylib Reason: Incompatible library version: libfontconfig.1.dylib requires version 14.0.0 or later, but libfreetype.6.dylib provides…

# Fun with Python’s decimal library

You’ve probably run across a link to this cute math fact in the past few days: [\frac{1}{998001} = 0.000001002\ldots100101102\ldots900901902\ldots999\ldots] This relatively simple fraction generates a decimal number that contains, in order, every three-digit sequence from 000 to 999 (except, sadly, 998). Pretty cool. If it’s true. I don’t want to be cynical or disparage the…

# My .octaverc

Since I mentioned my ~/.octaverc file a couple of posts ago, I might as well show you the whole thing. It’s not much. The ~/.octaverc file is one of those dotfiles so beloved by Unix users. It’s a set of Octave commands that are run at the beginning of every session to customize the environment…