1. 2011
    Nov
    29

    Digital signatures in Gmail

    Courtesy of Slashdot, I’ve discovered a tool called GPG4Browsers that allows you to send digitally signed and/or encrypted emails from Gmail’s web interface. Digital signatures are the web’s equivalent of handwritten signatures. They allow you to verify that emails are coming from the person they say they’re coming from, which among other things, makes it a lot easier to weed out spam. (Spammers rely on the fact that the emails they send can’t be traced back to them.) The more people are aware of this technology and use it, the better.

    GPG4Browsers is only available for Google Chrome (or Chromium) right now, and it’s a little rough around the edges (it doesn’t generate private keys, for example; you need another program to do that for you), but I fully expect both of those problems to be resolved in time. On the bright side, since the tool is implemented in Javascript, your private key stays on your computer. If you use Chrome, give it a try!

  2. 2011
    Nov
    28

    Mozilla's Call the Senate day

    The Mozilla Foundation, the group behind Firefox, is organizing another campaign against the PROTECT-IP Act. This time, they’re asking voters to call the Senate next Tuesday (they don’t give a date, but I’m guessing this is tomorrow) to register their opposition to the act.

    As I’ve previously written, PROTECT-IP is a bill designed to discourage distribution of copyrighted material online. It would greatly expand the actions that the government is allowed to take with respect to websites or online services that are suspected of being involved in this distribution. There is a widespread concern that the powers granted by this bill are too easily abused, and that they will be ineffective. If you believe, as I do, that this is going too far, please consider contacting your representatives in Congress to let them know.

  3. 2011
    Nov
    28

    The Burzynski Clinic and corporate intimidation

    I had never heard of The Burzynski Clinic until today, when I read this blog post by Rhys Morgan.

    You probably haven’t heard of a man named Stanislaw Burzynski. He offers a treatment called antineoplaston therapy, which he claims can treat cancer, in a centre called the Burzynski Clinic in Houston, Texas. That’s quite a claim, but the Nobel Prize Committee does not need to convene quite yet, because this treatment has been in non-randomised clinical trials since its discovery by Burzynski some 34 years ago. Moreover, no randomised controlled trials showing the effectiveness of antineoplaston therapy have been published in peer reviewed scientific literature.

    It goes on to say that the clinic’s lawyer has been threatening Rhys with a libel lawsuit over some claims made in an earlier post about the ineffectiveness of the antineoplaston therapy.

    Now, I don’t know any of the facts about the therapy, other than what I’ve read in those two posts. But assuming that the posts are accurate, I really want to see Rhys stick it to the man (in this case Burzynski and his lawyer, Marc Stephens) because it shows that being right beats being tough. When it …

  4. 2011
    Nov
    28

    Computing field lines

    Problem 12.9 in the infamous Jackson Classical Electrodynamics asks you to find (or prove) that magnetic field lines of the Earth are described by the equation

    $$r = r_0 \sin^2\theta$$

    Your starting point is the equation for the magnetic field of a dipole,

    $$\vec{B} = -\frac{3(\vec{M}\cdot\unitr)\unitr - \vec{M}}{r^3}$$

    Sure, you can look at a vector plot of the field, and join the arrows to make lines. This is the kind of thing they have us do in introductory E&M classes. But how do you do it mathematically? There are two ways that I know of:

    1. Define some scalar function \(f(\vec{r})\) whose gradient is everywhere perpendicular to the magnetic field, by the condition \(\vec{B}\cdot\grad f = 0\), and use that condition to solve for \(\grad f\). This is useful because the level curves of a function (lines of constant \(f\)) are perpendicular to the gradient. So once you find what the gradient is, you can integrate it to find \(f(\vec{r})\), and get the level curves from that.
    2. Or, just use the traditional “rise over run” definition of slope. Imagine a spherical polar coordinate grid …
  5. 2011
    Nov
    25

    Previewing shortened URLs: longurl.org

    URL shorteners (like TinyURL) can be convenient when you’re writing with a limited character count, but they hide the true destination of a link. And clicking a link without knowing what it links to is potentially dangerous — that’s how people get computer viruses. So I strongly recommend that you take a look at LongURL and download either their Firefox extension or Greasemonkey script, which will let you see the real target of any shortened URL.

  6. 2011
    Nov
    25

    Mean of the harmonic numbers

    A while ago, somebody posed an interesting problem on Physics Forums: how to evaluate the infinite sum

    $$\lim_{n\to\infty}\frac{1}{n}\sum_{k=1}^{n}\frac{k-1}{k}$$

    It’s not hard to start: convert it to

    $$\lim_{n\to\infty}\frac{1}{n}\sum_{k=1}^{n}\frac{k}{k} - \lim_{n\to\infty}\frac{1}{n}\sum_{k=1}^{n}\frac{1}{k}$$

    The first term is obviously equal to 1, and in the second term, the series \(\sum_{k=1}^{n}\frac{1}{k}\) is well-known under the name “harmonic numbers.” It’s easy to look up the behavior of this sum as \(n\to\infty\) and thereby determine the answer, but I’m not interested in the answer. I’m interested in the method that you could use if you didn’t have the world’s mathematical references at your fingertips.

    A common way to evaluate a sum with large numbers of terms like this is to approximate it by an integral. You may know that the Riemann integral, which is the first definition of an integral that students in intro calculus classes usually learn, is nothing more than the infinite limit of …

  7. 2011
    Nov
    24

    Syndication feeds from templates

    One of the must-have necessities for any blogging or other web publishing software is the RSS (Really Simple Syndication) feed. RSS, or its younger and sexier sibling Atom, is the file format used by news aggregators, which give you a frequent listing of posts and stories published by your favorite blogs, newspapers, journals, whatever you want, without you having to actually go to their website. Usually the RSS feed is generated by some library of code where you construct your feed as an array of objects or data structures. Here's how you put together an RSS feed with PyRSS2Gen, for instance:

    rss = PyRSS2Gen.RSS2(
        title = "Andrew's PyRSS2Gen feed",
        link = "http://www.dalkescientific.com/Python/PyRSS2Gen.html",
        description = "The latest news about PyRSS2Gen, a Python library for generating RSS2 feeds",
    
        lastBuildDate = datetime.datetime.now(),
    
        items = [
           PyRSS2Gen.RSSItem(
             title = "PyRSS2Gen-0.0 released",
             link = "http://www.dalkescientific.com/news/030906-PyRSS2Gen.html",
             description = "Dalke Scientific today announced PyRSS2Gen-0.0, a library for generating RSS feeds for Python.  ",
             guid = PyRSS2Gen.Guid("http://www.dalkescientific.com/news/030906-PyRSS2Gen.html"),
             pubDate = datetime.datetime(2003, 9, 6, 21, 31)),
           PyRSS2Gen.RSSItem(
             title = "Thoughts on RSS feeds for bioinformatics",
             link = "http://www.dalkescientific.com/writings/diary/archive/2003/09 …
  8. 2011
    Nov
    22

    Internet censorship in the US

    Thanks to campaigns like last week’s American Censorship day, computer users around the United States (and beyond) have been sitting up and paying attention to two bills regarding online copyright infringement that are now working their way through Congress: SOPA and PROTECT-IP. There is a lot of hype about how the law represented by these bills would be a terrible affront to free speech, and it may or may not be right, but as usual when it comes to legal matters, many people don’t have the knowledge to judge for themselves. With this blog post and possibly others like it, I’m trying to get relevant information out there so we can all make more informed decisions.

    (Full disclosure: I am personally opposed to the passage of SOPA/PROTECT-IP, but I’ve tried not to let that bias come through too strongly.)

    A brief history of information exchange

    Back in the days before internet use was so widespread, media redistribution was not a major problem. If you wanted to share a song or a video with someone, you had to physically lend them a tape, CD, or DVD. Yes, it was possible to make copies of media, but …

  9. 2011
    Nov
    22

    Average lifetime of a radioactive atom

    Some time ago I posted about the theoretical justification for exponential decay. In that post, I showed that you can quantify exponential decay with this equation:

    $$N(t) = N(0)e^{-\lambda t}$$

    where \(N(t)\) is the number of undecayed atoms at time \(t\) and \(\lambda\) is a constant representing the decay rate. If you plug in \(N(t) = \frac{1}{2}N(0)\), the condition for the half-life, you can find that

    $$\lambda = \frac{\ln 2}{t_{\frac{1}{2}}}$$

    But physicists usually write the formula like this,

    $$N(t) = N(0)e^{-t/\tau}$$

    where \(\tau\) is called the time constant. We prefer this to using the decay rate because, as I wrote in Calculating Terminal Speed, it’s often best to write a physics question in terms of dimensionless ratios like \(\frac{t}{T}\), where \(T\) is some time characteristic of the physical system you’re studying. We could use the half-life for \(T\), but the time constant \(\tau\) is more appealing for a couple of reasons: it keeps that ugly factor of \(\ln 2\) out of the formula, and more importantly, \(\tau\) is physically meaningful because it’s the average lifetime of an individual atom …

  10. 2011
    Nov
    21

    Yo Momma's so fat this counts as TWO blog posts

    I have a bunch of good posts lined up for later this month (and beyond), but since I’m busy packing for Thanksgiving travels today, I haven’t had time to polish them up properly. So have some marginally physics themed fat jokes instead. (It should go without saying that these are not to be taken seriously)

    • Yo Momma so fat, every time she turns around, the Earth skips a day

    • Yo Momma so fat, she really is a spherical cow

    • Yo Momma so fat, she has her own atmosphere

    • Yo Momma so fat, she’s hogging all the Higgs bosons (no wonder the LHC hasn’t found it)