12 May 2012

A Note About Git Commit Messages

I want to take a moment to elaborate on what makes a well formed commit message. I think the best practices for commit message formatting is one of the little details that makes Git great. Understandably, some of the first commits to rails.git have messages of the really-long-line variety, and I want to expand on why this is a poor practice.

From 2008, but brought up in this Github discussion. I found in well worth reading.

Here’s a model Git commit message:

Capitalized, short (50 chars or less) summary

More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. In some contexts, the first line is treated as the subject of an email and the rest of the text as the body. The blank line separating the summary from the body is critical (unless you omit the body entirely); tools like rebase can get confused if you run the two together.

Write your commit message in the present tense: "Fix bug" and not "Fixed bug." This convention matches up with commit messages generated by commands like git merge and git revert.

Further paragraphs come after blank lines.

- Bullet points are okay, too./p>

- Typically a hyphen or asterisk is used for the bullet, preceded by a single space, with blank lines in between, but conventions vary here

- Use a hanging indent

2 May 2012

Bit Tooth Energy: Flaring and the Siberian temperature profiles

1_giss_temperature_anomolies_feb12_w_km
Russia has been flaring up to 50 billion cubic meters of natural gas a year. If a cubic meter of natural gas contains 37 Megajoules of energy and Russia is burning 50,000,000,000/365/24/3600 = 1,585 cu m/sec this is equal to 58,600 MW – six times the size of the nameplate Texas wind farms, recognizing that flaring goes on 24-7 while the wind turbines are much more intermittent. So it seems the topic has more validity than I might have thought, but is there an effect? If one looks at the global temperature maps that are issued by the Goddard Institute for Space Science (GISS) there is a consistent trend in those, which indicates the much higher temperatures that are found in Northern Russia and Siberia. These high temperatures are a significant contributor to the overall analysis that the average global temperature has been rising for the past 40-odd years.

No definitive answers to the climatic effects, but that is a stunning amount of natural gas being flared off. The World Bank and the Russian government are working to see that the gas is either captured and exported, or re-injected. Heading Out goes over the data to see what effect all these flares may be producing.

2 May 2012

Oh noes!

Facepalm

1 May 2012

Spelke-Pinker debate: The Science of Gender and Science

PINKER: But that makes the wrong prediction: the harder the science, the greater the participation of women! We find exactly the opposite: it's the most subjective fields within academia — the social sciences, the humanities, the helping professions — that have the greatest representation of women. This follows exactly from the choices that women express in what gives them satisfaction in life. But it goes in the opposite direction to the prediction you made about the role of objective criteria in bringing about gender equity. Surely it's physics, and not, say, sociology, that has the more objective criteria for success.

There is a nice article on Dr. Elizabeth Spelker in the NYT. In it, I found a link to a debate in 2005 between Dr. Steven Pinker and Dr. Spelke, both at Harvard, which was triggered by the (in)famous remarks of Larry Summers, then president of Harvard, on women in Science.

The debate is very interesting. They do not really differ on the facts, but on the interpretations. There is a video, and copies of the slide presentations, plus the text of the discussion at the end. Watch, listen, read, and make up your own mind.

29 Apr 2012

The Trust Molecule by Paul J. Zak - WSJ.com

Research that I have done over the past decade suggests that a chemical messenger called oxytocin accounts for why some people give freely of themselves and others are coldhearted louts, why some people cheat and steal and others you can trust with your life, why some husbands are more faithful than others, and why women tend to be nicer and more generous than men. In our blood and in the brain, oxytocin appears to be the chemical elixir that creates bonds of trust not just in our intimate relationships but also in our business dealings, in politics and in society at large.

"Baby, I was born this way." More and more, it looks as if the boundaries of our potential are wired into our genetic makeup at birth. IQ has a hereditary component, physical abilities have heritable components, and now it appears that trust and selflessness also have a physical foundation and thus a heritable component. But just like our innate physical abilities, while the boundaries may be set, what we actually do within those boundaries is in a sense up to our choices.

24 Apr 2012

Did exploding stars help life on Earth to thrive?

Sn_webdaclusters_alroy_r
The biosphere seems to contain a reflection of the sky, in that the evolution of life mirrors the evolution of the Galaxy.

Svensmark has put out a blockbuster of a paper, if it holds up. He's using a correlation between nearby supernova and biological diversity in the fossil record, after accounting for other factors which affect the biodiversity of the Earth. I'm going to read the paper several times before saying more...

A statistical analysis indicates that the Solar system has experienced many large short-term increases in the flux of Galactic cosmic rays (GCR) from nearby SNe. The hypothesis that a high GCR flux should coincide with cold conditions on the Earth is borne out by comparing the general geological record of climate over the past 510 Myr with the fluctuating local SN rates. Surprisingly, a simple combination of tectonics (long-term changes in sea level) and astrophysical activity (SN rates) largely accounts for the observed variations in marine biodiversity over the past 510 Myr.

 

10 Apr 2012

Baby We Were Born This Way

I know there’s a knee-jerk reaction that this can’t be right: ‘There’s no way there’s a gene that’s responsible for my politics,’ ” says Matthew C. Keller, a behavioral geneticist at the University of Colorado. “For me, this is a genetic IQ test. If they say that type of thing, it means they don’t understand genetics that well.

Fascinating article in the New York magazine about genetics and politics. I can't wait to read Jonathan Haidt's new book "The Righteous Mind." But the NY mag article needs to be tempered by another of Dr. Haidt's observations, which comes from an interview at an Edge conference...

"I just briefly want to say, I think it's also crucial, as long as you're going to be a nativist and say, "oh, you know, evolution, it's innate," you also have to be a constructivist. I'm all in favor of reductionism, as long as it's paired with emergentism. You've got to be able to go down to the low level, but then also up to the level of institutions and cultural traditions and, you know, all kinds of local factors. A dictum of cultural psychology is that "culture and psyche make each other up." You know, we psychologists are specialists in the psyche. What are the gears turning in the mind? But those gears turn, and they evolved to turn, in various ecological and economic contexts. We've got to look at the two-way relations between psychology and the level above us, as well as the reductionist or neural level below us."

3 Apr 2012

Ivy tower research doesn't always hold up in the Real World

During a decade as head of global cancer research at Amgen, C. Glenn Begley identified 53 "landmark" publications -- papers in top journals, from reputable labs -- for his team to reproduce. Begley sought to double-check the findings before trying to build on them for drug development.

Result: 47 of the 53 could not be replicated. He described his findings in a commentary piece published on Wednesday in the journal Nature.

Seeing irreproducible or misleading results published as peer reviewed scientific results is extremely disheartening. Science absolutely depends upon honest disclosure of experimental results along with transparent discussion of any real or suspected problems. Scientific papers designed not to further understanding but simply to further careers ought to result in career destruction. This sort of  dishonest research work harms Science, harms society, and ultimately harms humanity. Richard Feynman said it best in his famous Cargo Cult Science commencement address at Caltech...

It's a kind of scientific integrity, a principle of scientific thought that corresponds to a kind of utter honesty--a kind of leaning over backwards. For example, if you're doing an experiment, you should report everything that you think might make it invalid--not only what you think is right about it: other causes that could possibly explain your results; and things you thought of that you've eliminated by some other experiment, and how they worked--to make sure the other fellow can tell they have been eliminated.

Details that could throw doubt on your interpretation must be given, if you know them. You must do the best you can--if you know anything at all wrong, or possibly wrong--to explain it. If you make a theory, for example, and advertise it, or put it out, then you must also put down all the facts that disagree with it, as well as those that agree with it. There is also a more subtle problem. When you have put a lot of ideas together to make an elaborate theory, you want to make sure, when explaining what it fits, that those things it fits are not just the things that gave you the idea for the theory; but that the finished theory makes something else come out right, in addition.

21 Mar 2012

Distributed production of radioactive medical isotope Tc 99 may solve longstanding problem.

We are currently using a centralized production model for this isotope with just a six hour half-life. This model involves just a handful of dedicated, government-funded research reactors, producing molybdenum-99 from highly enriched uranium (which is another issue for another time). Moly, as we’ve come to affectionately call it, decays via beta emission to technetium, and when packaged into alumina columns, is sterilized, and encased in a hundred pounds of lead. It is then shipped by the thousands to hospitals around the world. The result: the world has come to accept Tc-99m, which is used in 85% of the 20 to 40 million patient scans every year as an isotope available from a small, 100 pound cylinder that was replaced every week or so, without question, without worry. Moly and her daughter were always there…but in 2007 and again in 2009, suddenly they weren’t. The world had come to realize that something must be done.

Distributed solutions can be more robust than centralized solutions, especially if coordination problems plague the central model. Here is a great example of how distributed production of Tc 99 may be superior to centralized manufacturing.

The great weakness of distributed models centers around communication, and when the task being distributed requires little to no communication, distributed solutions usually scale very well (e.g., image processing).

16 Mar 2012

Not so fast: neutrinos don't exceed light speed

We now have yet another indication that neutrinos cannot travel faster than the speed of light after all, provided by a neighbor of the OPERA detector that set off the fuss in the first place. OPERA's detector sits deep underground at Gran Sasso in Italy, where it receives neutrinos from a beam generated at CERN, 730km away on the French-Swiss border. Because the neutrino beam spreads out over the intervening distance, it's possible to run multiple detectors at the same site, all listening in on the same beam. The team running one of Gran Sasso's other detectors (called ICARUS) has now performed time-of-flight measurements on neutrinos and determined that they don't seem to be moving faster than light.

Both ICARUS and OPERA use the same neutrino source, and so have the same clocking capabilities. ICARUS uses a slightly different technique to detect neutrinos, but without some compelling explanation for the new data, it is safe to put the OPERA results down as "likely experimental error." Relativity wins the day, again.

Fred Nixon's Posterous

Father, utility infielder developer, bibliophile, aspiring Rubyist, erstwhile professor, and physics geek. If it is technical, I'm interested.