I am a “retired” postdoc in particle physics, trying to transition into the tech industry. I started out programming with Java around 1999, and more recently I’ve been doing a lot of work with Python, C, and C++, although I do occasionally dabble in PHP, Perl, shell scripting, and other languages.

  1. 2013
    Nov
    15

    Science comics

    When I teach classes, sometimes I like to show a comic at the beginning to lighten the mood a bit, or perhaps keep people from falling asleep quite so easily. So I’ve been accumulating this list of science-themed comics for a few years now.

    Newtonian mechanics

    • XKCD 123: Bond and centrifugal force
    • XKCD 135: velociraptor exam
    • XKCD 162: angular momentum slowing the planet
    • XKCD 226: weightlessness on a swing set
    • XKCD 228: resonance in the workplace
    • XKCD 332: gyroscopes are weird
    • XKCD 353: antigravity in Python
    • XKCD 594: period/frequency, and the uterus-hertz
    • XKCD 613: physicists not solving the three-body problem
    • XKCD 669: frictionless vacuums
    • XKCD 755: hitting psychology students with pendulums, interdisciplinary studies
    • XKCD 1001: centrifugal force in a bed
    • XKCD 1175: relative motion on moving sidewalks
    • Abstruse Goose 95: force and The Force
    • The mysteriously missing Abstruse Goose 318: projectile motion and rotations (I challenge you to find this one yourself)

    Electromagnetism

  2. 2013
    Nov
    14

    Preparing yourself for the big scary world of academia

    It’s time for the post where I make excuses for why I haven’t been keeping up with my target of one post per day this month.

    Don’t worry, I have a good one this time: I’m applying for postdoc positions. A lot of the application deadlines are coming up at the end of this month (well, actually a lot of them passed already, but the ones that haven’t are coming up soon), so in addition to cranking out blog posts, I have to prepare my application materials.

    I’ve found that in the world of physics, there’s a certain set of documents that you tend to be asked for when applying for a job or postdoc, or an award (which is another unfortunate necessity of success in academia). I’m going to save all you youngn’s who haven’t gone through the process yet the trouble, and list out the common documents which you should have prepared ahead of time and keep up to date as needed:

    • CV (curriculum vitae): from the Latin for “course of life,” this is something like a “master list” of your accomplishments in the field. It includes any …
  3. 2013
    Nov
    12

    Do Teslas really catch on fire less than gas cars?

    About a month ago, this happened: a Tesla Model S (electric car) ran over a large piece of metal which punctured its battery compartment, and the car caught on fire. It was a big deal because, according to CEO Elon Musk’s blog post (first link above), that was the first time a Tesla has caught on fire.

    Since then there have been two more similar incidents in which a Tesla was involved in an accident and caught fire. Naturally, people are getting concerned: three high-profile fires in one month is a lot! But these incidents get more than their share of attention because electric cars are new technology without a proven safety record. So the question we all should be asking is, how does the fire risk in a Tesla compare to that of a regular, gas-powered car?

    Most of Elon’s blog post about the first incident discusses how well the safety features of the car performed after it did catch on fire, and how this would have been a catastrophic event if the car were gas-powered like a normal car, and now we should all be driving electric cars and so on. My interest here is purely …

  4. 2013
    Nov
    10

    Adding 2D interpolation and quasi-Monte Carlo integration to GSL

    Here’s another post for my more technically-minded readers: in the course of writing the software for my latest research project (which I am still going to post about later this month), I needed algorithms for two-dimensional interpolation and quasi-Monte Carlo integration. Neither of these exists in GSL — the GNU Scientific Library, kind of a standard set of libraries for scientific software. So I wrote my own.

    • interp2d is a simple generalization of the 1D GSL interpolation routines to 2D interpolation
    • The insightfully named quasimontecarlo is practically a copy of GSL’s Monte Carlo integrator, except that it uses a quasirandom number generator instead of a pseudorandom number generator.

    These might be useful for anyone else doing scientific computation.

  5. 2013
    Nov
    08

    Announcing the Exam Timer

    Funnily enough my fluff post on exam proctoring got a good response on Facebook. I guess I should write more fluff. But for now, more on exam proctoring.

    A few years ago I was bored while proctoring some exam — what a surprise — and my mind drifted to thinking about the exam clock. Or the lack of one, really. Our exam rooms don’t have a clock positioned where the students can see it, but they need to know how much time is left in the test, so we would usually put up the official NIST/USNO time page on a projector.

    The problem is, this page is full of “junk.” It has a world map with day and night regions indicated, the date, assorted buttons and explanatory text, and in general all sorts of features that are not the one thing a test-taking student wants to know: how much time is left?

    In those days I had the luxury of being bored even after the exam was over, so I whipped up a small web app to display a countdown to the end of the exam. And nothing else.

    It was an instant success, in the sense that it was …

  6. 2013
    Nov
    05

    Confessions of a proctor; or The Percolation Game

    I had to proctor an exam tonight.

    If you’re not familiar with the idea, proctors are those people who walk around while you’re taking a test, making sure you don’t cheat.

    Proctors are BORED OUT OF THEIR MINDS.

    Yes, I’m supposed to be looking out for students cheating, and as far as they know, that’s what I’m doing. But actually, there’s no way I could make it through a 75-minute (or longer) test without some of these handy sanity-saving activities:

    • Testing every combination on the lock to the computer cabinet. Except the right one.
    • Trying to flip an eraser around its long axis. I can’t do it. I know I can’t do it, and I know why I can’t do it. But somehow, it still passes for interesting…
    • Wondering why there is a balloon hanging from the roof

    • Measuring the dimensions of the room in steps

    • Making weird hand gestures to confuse people who don’t quite remember the right hand rule
    • Calculating whether that irritating hum could be at the room’s resonant frequency
    • Pretending I’m a Pong ball
    • For the devoted: the Percolation Game. Credit goes to …

  7. 2013
    Nov
    03

    Stable standard deviation

    To kick off National Blog Writing Month, here’s something I’ve been saving up for my more mathematically inclined readers — and also for anyone who does scientific computing. It’s a quick computational trick to come out of all the stuff I’ve been doing lately that is not writing blog posts.

    Sometimes you have to calculate the standard deviation of a set of numbers. Although there are various definitions of the standard deviation, the usual way to do this in physics is

    $$\sigma = \sqrt{\frac{1}{N}\sum (x_k - \expect{x})^2} = \sqrt{\frac{1}{N}\sum x_k^2 - \biggl(\frac{1}{N}\sum x_k\biggr)^2} = \sqrt{\expect{x^2} - \expect{x}^2}$$

    where \(N\) is the number of data points and \(x_k\) are the values. But this can be pretty inaccurate when the values themselves are much larger than the variance — you wind up taking a difference of two very large numbers, the two terms under the square root, and expecting to come out with a small result. That’s bad. Sometimes the difference even winds up being negative!

    There’s a better method, described on John D. Cook’s website: instead of computing two large …

  8. 2013
    Nov
    01

    National Blog Writing Month 2013

    It’s that time of year again! November, as you might have heard, is National Novel Writing Month. All around the US, amateur writers strive to create a 50,000 word novel in a month.

    I’m no novelist, but I am a blogger, so in the past couple years I’ve been trying my own variant: 30 nontrivial blog posts in 30 days. So far, I haven’t made it, but regardless, it’s a great excuse to catch up on the blog posts I haven’t made in the preceding months.

    And this year, boy do I have a lot of them! I’ve been busy with other things since July or so, which means I didn’t get to cover some of the great science that’s been done since then. Things like

    • Nondetection of dark matter by the LUX experiment
    • Statistics of Tesla fires: are they really safer than gas cars?
    • The Mpemba effect, why hot water freezes faster than cold water
    • Could time be an artifact of quantum mechanics?
    • How the web is changing the way we do science
    • The role of gravity in determining cell size (and why that’s interesting)

    Plus, I promise …

  9. 2013
    Oct
    22

    Honesty in abstracts

    I like this:

    To illustrate the standard candle property of gamma-ray pulsars (and also to thereby confirm the recent first-principle calculation of pulsar gamma-ray emission), we “measure”, via the lightcurve fitting, three distances and one moment of inertia of some weak pulsars. We are not sure what the three distances are good for, but the measurement of the moment of inertia must be of interest for nuclear physics. Although we must state that the quality of the numerical program which we use to calculate the lightcurves and efficiencies is inadequate (as are the author’s qualifications as a numericist and data analyst), in good hands, and upon an easily doable extension to non-weak pulsars, the method’s yield should be impressive.