Iceland volcanoes might be back soon and strong

Well I am not sure that this is yet that dramatic, but it is beginning to look as though it might be, and so it is worth putting up a shot from the Icelandic Met Office about earthquakes in the Myrdalsjokull (Katla) region that I just noticed has happened in the last 24-hours {around 17 June}, actually at about 5:30 pm local time, on the 17th. The stars denote an earthquake greater than 3 occurring, and there has been a growing focus of the earthquakes around the Katla site over the past four months, some of which I had noted earlier. These now appear stronger and even more focussed.

Earthquakes in the last 24 hours {around 17 June} around the Mydralsjokull site (Icelandic Met Office )

Historically, the Katla volcano, under the Mýrdalsjökull glacier, has erupted around 18 months or so after the Eyjafjallajökull volcano. Eyjafjallajökull went off in April 2010, and you may recall that it shut down European airspace for several days. Katla produces much larger eruptions, so if the pattern holds, we may be in for some fireworks around September-October 2011. Katla has the potential to generate Volcanic Explosivity Index 5 eruptions, similar to the Mt. St. Helens eruption in 1981. Katla’s last major eruption was in 1918, and it has averaged about 50 years between eruptions over the last 1200 years. Keep an eye on the news about Icelandic earthquakes, as they can indicate magma moving prior to a volcanic eruption.

 

Advertisements

Physics-based Space Weather forecasting; faster, please

Martin-stojanovski-sun_martin_stojanovski_1289132681_med

image from spaceweather.com

In Sept. 1859, on the eve of a below-average solar cycle, the sun unleashed one of the most powerful storms in centuries. The underlying flare was so unusual, researchers still aren’t sure how to categorize it.  The blast peppered Earth with the most energetic protons in half-a-millennium, induced electrical currents that set telegraph offices on fire, and sparked Northern Lights over Cuba and Hawaii.

This week, officials have gathered at the National Press Club in Washington DC to ask themselves a simple question: What if it happens again?

A Carrington Event class solar eruption would be a catastrophic blow to civilization as it would almost certainly cause widespread damage to our electric power infrastructure. From historical records, we know that large storms causing low latitude auroras occur about once a century. We are statistically overdue, and we know that weak solar cycles do not rule out very high energy events.

Does antimatter fall up?

So, why do like electical charges repel and unlike electrical charges attract, while like mass ‘charges’ attract? How would negative mass particles behave if they exist?

According to quantum theory, forces like gravity and electromagnetism are the result of particles exchanging force carrier particles. For gravity, this force carrier is the graviton[0], and for electromagnetism, the photon. The photon is a spin-1 particle; it has 1 unit of angular momentum as a quantum mechanical property (photons don’t really spin in the classical sense). The graviton is a spin-2 particle; it has twice the angular momentum of the photon. It turns out that for forces carried by odd spin particles, such as spin-1 particles, like charges repel and unlike charges attract. So the negatively charged electron repels other electrons but attracts the positively charged proton. For forces with even spin carriers, like the spin-2 graviton, like charges attract and unlike charges repel! So, like mass ‘charges’ will be gravitationally attractive, and for normal matter that means the gravitational force is always attractive. If a negative mass object exists, it will be repelled by normal matter. But where can we find negative mass objects? We’d need some exotic form of matter.

Antihydrogen_1

Antimatter, composed of antiprotons and antielectrons, may have negative mass. I’ve always been curious about this, and today I found an experiment that will test antimatter to see if it is repelled by normal matter. This will answer the old question Does antimatter fall up?

AEGIS is that experiment at CERN. The idea is to make antihydrogen (composed of a positron and antiproton), taking care to keep it from annihilating on contact with ordinary matter, and measure it’s gravitational response to the Earth. No matter the answer, it will be an interesting experiment!

 

[0] The graviton remains unobserved in isolation, but the success of quantum field theory lends a lot of weight to the proposition that the graviton exists.

It came from Space! Small asteroid 2011 MD gets Really Close tomorrow.

Bend it Like Beckham! Small Asteroid to Whip Past Earth on June 27, 2011

2011md_ca3

Trajectory of 2011 MD projected onto the Earth’s orbital plane. Note from this viewing angle, the asteroid passes underneath the Earth.

2011md_ca4

Trajectory of 2011 MD from the general direction of the Sun.

Near-Earth asteroid 2011 MD will pass only 12,000 kilometers (7,500 miles) above the Earth’s surface on Monday June 27 at about 9:30 EDT. The asteroid was discovered by the LINEAR near-Earth object discovery team observing from Socorro, New Mexico. The diagram on the left shows the trajectory of 2011 MD projected onto the Earth’s orbital plane over a four-day interval. The diagram on the left gives another view from the general direction of the Sun that indicates that 2011 MD will reach its closest Earth approach point in extreme southern latitudes (in fact over the southern Atlantic Ocean). This small asteroid, only 5-20 meters in diameter, is in a very Earth-like orbit about the Sun, but an orbital analysis indicates there is no chance it will actually strike Earth on Monday. The incoming trajectory leg passes several thousand kilometers outside the geosynchronous ring of satellites and the outgoing leg passes well inside the ring. One would expect an object of this size to come this close to Earth about every 6 years on average.

Yowza! A little bigger, and a slight orbital change, and this would be very interesting, in the sense of the Chinese Curse “May you live in interesting times.”

Exceptional Ruby: the book review

Exceptional Ruby is a new ebook by Avdi Grimm exploring exceptions in Ruby. My standing on one foot review: Buy this book if you are at all curious about exceptions in general and Ruby’s exception handling in particular. Error handling in software is a difficult but fascinating subject, and creating correct, robust error handling code is really, really hard. Exceptional Ruby will help you better understand exceptions, and how Ruby’s implementation of exceptions work.

The book has careful definitions of key terms and takes the view that software failure is a breach of contract. A software element fails when its preconditions are met, but the element does not fulfil its promised postconditions or fails to maintain element invariants. An exception signals failure. Avdi outlines the mechanics of Ruby exceptions, walking us through the syntax and semantics of Ruby’s exception handling mechanisms, including some lesser known areas such as retry and raising exceptions during exception handling. The code examples here are short but illustrate the principles clearly.

Next, he considers how to handle the error once the exception occurs. If the error is temporary, retrying the operation may fix the failure. If that isn’t possible, returning a benign value and perhaps logging the error may be the best one can do. But be careful, poorly tested error handling and logging code can introuce their own errors. The most unclear part of the book is the brief discussion of bulkheads, the software analogy to the physical bulkheads on ships which isolate failure consequences to a specific area. I’m not really sure how to construct one in software. The example given is just a general exception handling routine to make sure no exception is passed along.

Exceptions in many ways resemble gotos (more on that in a minute) and can easily be misued, so Avdi discusses alternatives to exceptions. He gives guidance on when exceptions should and should not be used, along with questions to ask and guarantees to give when using exceptions. He defines exception safety testing and how it ensures well defined semantics. He stresses that library clients shouldn’t be surprised by exception handling, and explores how libraries might deal with exception handling.

All that’s left is to wish you luck, provide some external references, and include a couple of appendicies containing proof-of-concept code for an exception tester and a tour of Ruby’s out-of-the-box exception handling. The book is short but information dense, and I recommend Exceptional Ruby even if you are not a Rubyist.

If software were a 10-year-old’s bedroom, failure handling would be the tangled mass of toys and clothes crammed hastily into the closet before Mom comes to inspect.

So says Avdi in the Introduction, and it is very true. The consequences are prefectly expressed in Weinberg’s Second Law: if builders built buildings the way programmers write programs, the first woodpecker that came along would destroy civilization. Writing error handling code, and I mean readable, correct, robust error handling code, is a terribly difficult problem. Exceptions, because they interrupt the sequential flow of the program, acting like the mythical come-from statement, place a huge burden on the developer to Get It Right. Avdi tweeted a pointer to Joel Spolsky’s Making Wrong Code Look Wrong for the other side of the exceptions–Joel doesn’t like exceptions, and explains why after a very interesting discussion of the difference between Apps Hungarian and System Hungarian notation. Read Joel’s post! You’ll learn something. Joel points off to Raymond Chen’s discussion of exceptions (he thinks he isn’t smart enough to use them, and if Raymond Chen isn’t smart enough…) which I definitely encourage you to read as well. Raymond’s advice is sound: When you’re writing code, do you think about what the consequences of an exception would be if it were raised by each line of code? You have to do this if you intend to write correct code. He points out how easy it is to use exceptions to write code that is cleaner, more elegant, and wrong.

The final takeaway: exceptions are extremely powerful, easily misused, and must be carefully constrained to avoid causing very hard to find bugs in very easy to get wrong code.

Added: Be sure to read the comments to Raymond Chen’s Cleaner, More Elegant, and Wrong.

2 require tips for Rails 3.1 assets bundling with sprockets

Require and sass: if you use the variables or mixins, you should use the @import of sass instead of require. With require, each file is compiled separatly and then are bundled together. But if a variable is declared in one file, this declaration will not appear in the compiled CSS and so can’t be used in sass files that require this file. But, with @import, files are regrouped before the compilation and so you’ll avoid this problem.

Debug mode: when you are debugging Javascript, it’s annoying to have only one bundled file. For example, it’s hard to find the line where you want to put a breakpoint in firebug when you have several libs like jquery in this file. But Rails 3.1 has a solution for this specific problem: the debug mode. If you put :debug => true on the javascript_include_tag, each JS file will be loaded in a separate <script> tag. For our project, we use this line in our layout file:

<%= javascript_include_tag "application", :debug => Rails.env.development? %>

Two handy tips for using the asset pipeline in Rails 3.1.

Anatomy of a Ruby Web Application

Let’s start exploring at the bottom of the stack, with our Rails (or other) application code, and work our way up. I’ll give names of various libraries and servers along the way, but this is not a tutorial on setting up Mongrel with Nginx, or any other configuration. This article is about understanding Ruby web application deployment in general, so you are better informed and more able to evaluate new technologies and participate in conversations.

High level intro to application servers, Rack, and reverse proxies in web programming.

Helicity, Chirality, Mass, and the Higgs

My goal is to explain the sense in which the Standard Model is “chiral” and what that means. In order to do this, we’ll first learn about a related idea, helicity, which is related to a particle’s spin. We’ll then use this as an intuitive step to understanding the more abstract notion of chirality, and then see how masses affect chiral theories and what this all has to do with the Higgs.

I’m enjoying Dr. Tanedo’s series on the Standard Model. Simple, informative, accessible, and even though physics-by-analogy is fraught, very accurate. I especially like the little spin diagram above.

If you want to start at the beginning, and it is a very good place to start, go to http://www.quantumdiaries.org/2010/02/14/lets-draw-feynman-diagams/

USS Clueless — Science and Engineering

At it’s most fundamental level we can define science as two different activities: the collection of facts about the universe, and the attempt to create explanations of how those facts relate to each other. The scientific enterprise has been going on as long as humans have existed, but science as we now use the term dates from about the fifteenth century, which is where it finally got onto the right track, and also when it finally started developing procedures which work.

Time to repeat this classic explanation of three important words: conjecture, hypothesis, theory.

Calorie restriction and improved cognitive functioning

One of the first questions many people ask after going a few rounds with their senior moment brains is: can the decline be reversed? These are often the questions asked by people who want to increase their life span. The surprising answer to both questions, in a few cases described below, is yes.

Executive summary: The decreased cognitive functioning in aging brains appears to be related to changes in gene expression patterns which in turn affects functonal connectivity of neurons. These global gene expression patterns of aging cells can be slowed or reversed by elevated levels of the SIR2 protein. Calorie restriction leads to elevated levels of SIR2. It may also be possible to produce the same effect without the calorie restriction part, living better through chemistry. To which I can only say, faster, please.