Saturday, March 27, 2010

A very well thought out Git branching model

Vincent Driessen nvie.com: A successful Git branching model

A successful Git branching model
In this post I present the development model that I’ve introduced for all of my projects (both at work and private) about a year ago, and which has turned out to be very successful. I’ve been meaning to write about it for a while now, but I’ve never really found the time to do so thoroughly, until now. I won’t talk about any of the projects’ details, merely about the branching strategy and release management.

Very nice, and well thought out, with developers working and collaborating naturally and productively, but still keeping the high quality main releases flowing out steadily.

Reblog this post [with Zemanta]

Friday, March 26, 2010

Rest In Peace, Hockey Stick

Unicycle hockeyImage via Wikipedia
We will start with the quote from Ian Jolliffe, and work backwards to unpack.

"http://neverendingaudit.tumblr.com/post/472646295/i-am-by-no-means-a-climate-change-denier-my"
“I am by no means a climate change denier. My strong [impression] is that the evidence rests on much much more than the hockey stick. It therefore seems crazy that the MBH hockey stick has been given such prominence and that a group of influential climate scientists have doggedly defended a piece of dubious statistics.”

-
Ian Jolliffe"
My comment:
I am surprised to hear, today, that considered authoritative option thinks that the "hockey stick" is bad statistics, and that people who believe in global warming should admit this error, strive to be more rigorous, and move on with the other overwhelming facts of global warming.

I will modify my view.
Lets now work backward.



Jolliffe requests an apology from Tamino, because he feels words were placed into his mouth, to give full liberty to any use of the statistical technique of "decentred PCA" when a different origin is considered to be meaningful, even though he did no such thing. "Decentred PCA" is the technique that Mann used to bring the hockey stick into clearly resolved existence.

A reasonable starting place, from a moderately skeptical point of view, for information on Michael E. Mann's "Hockey stick": "http://en.wikipedia.org/wiki/Hockey_stick_controversy"

Tamino apologized (also at "http://tamino.wordpress.com/2008/08/10/open-thread-5-2/#comment-21873"), re-iterated that "It also seems to me (and I'm by no means the only one) that the origin in the analysis of MBH98 is meaningful" and ended by emphasizing a part Jolliffe's reply - "... the evidence rests on much much more than the hockey stick. It therefore seems crazy that the MBH hockey stick has been given such prominence ..." - which can be interpreted as back-tracking.

This has allowed some merchants of obscurantism to make hay: "http://climateaudit.org/2008/09/08/ian-jolliffe-comments-at-tamino/".

[Edit 04/16/10]

The above applies only to the original Mann hockey stick, for an overview of the evidence from all available sources of evidence of possible climate disruption see:

Reblog this post [with Zemanta]

Thursday, March 25, 2010

How to help a daughter with Pre-Algebra, with a $5000 Mathematica seat

Wolfram ResearchImage via Wikipedia
(Actually, you will pay less for Mathematica than I do.  I believe you will pay $200)

Here is a session in Mathematica's Notebook REPL (Read-eval-print-loop).  If you are simply performing an operation on the last bit of output, simply type "%".  Remember, "Solve" works on equations, and inequalities require the use of "Reduce".  In "Reduce", don't be thrown by Mathematica taking care to note the domain of the variables.  "Expand" can force Mathematica to carry out all the productions in the expression.  "MapAt" is great to change just one part of an expression.  "Remove["Global`*"];" is how you can just re-evaluate a whole Notebook from scratch, and not have to worry about conflicts with earlier assignments as you were exploring different implementations and techniques.  "RegionPlot" is just the thing for viewing inequalities.

In:= Remove["Global`*"];

In:= slope[{x0_,y0_},{x1_,y1_}]:=(y1-y0)/(x1-x0)

In:= slope[{-6,3},{2,-5}]
Out= -1

In:= slope[{1,3},{-2,-1}]
Out= 4/3

In:= Solve[{-3x-y==2,-4x+2y==8},{x,y}]
Out= {{x->-(6/5),y->8/5}}
In:= N[%]
Out= {{x->-1.2,y->1.6}}

In:= Solve[-3x-y==2,{y}]
Out= {{y->-2-3 x}}

In:= Solve[-4x+2y==8,{y}]
Out= {{y->2 (2+x)}}
In:= MapAt[Expand[#]&,%,{1,1}]
Out= {{y->4+2 x}}

In:= Solve[{y-x==3,2x+y==-2},{x,y}]
Out= {{x->-(5/3),y->4/3}}
In:= N[%]
Out= {{x->-1.66667,y->1.33333}}
In:= Reduce[y-x<=3,{y}]
Out= x\[Element]Reals&&y<=3+x
In:= Reduce[2x+y<-2,{y}]
Out= x\[Element]Reals&&y<-2-2 x

In:= RegionPlot[{y-x<=3,2x+y<-2},{x,-5,5},{y,-5,5}]
Out=


For some stupid reason, I alway forget "Rise Over Run" for the slope.  So now I can just cut and paste.
Reblog this post [with Zemanta]

Andrew Gelman said something significant, above my head

The Illustrated Sutra of Cause and Effect: 8th...Image via Wikipedia
A new post by Andrew Gelman, with a quite wordy title

The single most useful piece of advice I can give you, along with a theory as to why it isn't better known, all embedded in some comments on a recent article that appeared in the Journal of the American College of Cardiology


I would summarize, but I am embarrassed to say I understand very little of it.  In a comment, I made an attempt:
Hello Prof. Gelman,

Are you saying "model building" will naturally lead to applying fruitful transformations that will lead to statistics that do more than only prove "a formally statistically significant difference for a trivial effect"?

(By "model building" you mean the scientist taking responsibility for an abstraction that goes beyond statistics, i.e. causality and value judgments about what is more than a trivial effect.)

I am having trouble translating your description into something I can understand, so I would appreciate your help if I made a hash of things with my little summary.
I will add edits to this as I learn more.

I feel Pearl's causality graphs (directed acyclic graphs, to be specific) are the appropriate format to present any model.  If you want to allow the possibility of "no true zeros", then use multiple models, and "collapse" all the points where you wish to use statistics to show the possibility of "no true zeros", maybe even "collapsing" everything into a single point!  The multiple models you then have will now compete in different uses - based on predictive power, accuracy, ability to calculate meaningful error ranges, cost of collecting data, cost of computation, cost of comparison, ability to predict outcomes from interventions, cost of understanding, etc.

"No true zeros" - see Andrew Gelman's Review Essay "Causality and Statistical Learning" Section Heading: "There are (almost) no true zeroes: difficulties with the research program of learning causal structure" http://www.stat.columbia.edu/~cook/movabletype/archives/2010/03/causality_and_s.html

I also have a hard time understanding all this in isolation from a model of a rational being working under a motivating sense of responsibility to make a decision about an action (or remaining inactive).  Especially statistical analysis divorced from utility in making a decision.  Comprehension is nice, but comprehension that cannot play a part in any morally motivated decision is valueless.
Reblog this post [with Zemanta]

Tuesday, March 23, 2010

Fatty Liver means my Babylove wants me to stop drinking beer

Bottles of Imperial StoutImage via Wikipedia
I am not a big drinker, which is good news for me, because my father was a heavy cigarette smoker and is still an alcoholic. I don't care for wine at all, and don't care for hard liquor. But I do enjoy a fine beer, especially English beers. Yummy! Dark beer, ales, spicy little microbrews, all good stuff. My limit is two beers at one sitting, because I am all about the taste, not getting buzzed.

My problem is that I am overweight, and I store my fat in my liver - so, FATTY LIVER OVERDRIVE, BABY! So my Babylove wants me to stop drinking beer, even though I average only about 3 beers a week. Even the fattiest of livers can metabolize 3 beers a week without breaking a sweat, but the Babylove has spoken.

Not really a problem. I enjoy a good ice water. My Babylove also has this strange idea about drinking body temperature water, how this is supposed to be HEALTHY HEALTH OVERDRIVE, BABY! No way I am drinking piss-warm water. Take away my beer, but leave me my ice cubes.
Reblog this post [with Zemanta]

Friday, March 19, 2010

It is time for some humility - Oh Lordy...

HumilityImage by Perfesser via Flickr

"it is time for some humility, concludes [a deservedly humble man]"

http://julesandjames.blogspot.com/2010/03/statistically-improbable-phrases.html

The sheer nerve of a request for "humility" against those who put their reputations on the line by publishing, under the burden of responsible science.  A request for humility by a humbug.

My comment:

That piece is clearly not a book review (too short and too shallow), and it is not a piece of higher criticism because advances no thesis (concern trolling is the opposite of advancing a thesis).

It is a piece of opinion placed in a corner of Nature where the editors don't have to take any responsibility for the opinion.  And quite a shabby bit of opinion making.

And why this fringe voice chosen?  (Bjorn was caught out misrepresenting sources, the Superfreakonomics chapter was a hash, so RPJr steps up to the plate...  And RPJr's tack will run out quickly as well - it seems to be entirely based on the idea that facts can be "contaminated" by scientists who have a preferred policy outcome.  Because politics is a human activity, and scientists must not be human.)

An disreputable opinion published predominately without risk to reputation. Shameful.  If the self-described "reasonable voices" see the issue not as a matter of scientific fact but as a political or economic one, then commission a paper from a publishing political scientist or an economist.  Instead of publishing potshots and bobbing and weaving and concern trolling.

Was this garbage technique used before against other science that pained industries?  Is there a history of this technique used for tobacco or pharmacological marketing?  Or is energy policy widely understood by "the people who matter" to be all encompassing?

Obviously, industry funds a lot of research.  Is this garbage based on many industry voices among the circle of acquaintance of Nature's editors saying that the economic replacements for carbon fuels are just not ready yet, so the scientific question of human culpability in global warming has to simmer on the back burner for a while?  (Sadly, the industry concerns are probably more cynical than this - an indirect demand from those who get paid today that they deserve to get paid tomorrow, oil rigs or not, refineries or not.)

John Mashey did a bang up job tracking the pitifully few scientists who promote obscurantism against climate science, but I don't recall the editorial boards of top journals being included in his analysis.  And he didn't write about the techniques used in those journals to promote the Art of Controversy against uncomfortable scientific findings.

Reblog this post [with Zemanta]

Wednesday, March 17, 2010

Complicity and Sympathy for Comforting but False & Dangerous Ideas

St JudeImage by Fergal OP via Flickr
Comment on:

http://neverendingaudit.tumblr.com/post/455387977/i-think-we-can-get-past-the-lie-and-it-was-a-lie

When dealing with someone so bugfuck crazy like RPJr or Bjorn, you practically have no choice but to abstract away these bad actors into fake-controversy-creating-automatons, and focus on those who allow these trolls to be heard.  And, practically everywhere from practically everyone, you find complicity and sympathy for these comforting but false & dangerous ideas.

There is no evidence that humanity likes science or the burden of responsibilities that pay out decades in the future.  Humanity does not mind playing with some the end products of both, like consumer electronics or the body of modern medical knowledge, but humanity really doesn't like either science or the responsibility of the very long view.

Our only tools are to consciously move the Overton Window as quickly as possible to something compatible with humanity continuing to exist, and, in the mean time, remember "[Our] basic function [is] to develop alternatives to existing policies, to keep them alive and available until the politically impossible becomes the politically inevitable." (a quote from Milton Friedman, speaking about something other than climate change, but the idea applies).  Obviously, that means our last, best hopes will be way past their shelf life, and we will only be left crude largely ineffectual measures for cooling the globe and dumping antacid into the ocean.  It also means making the best arguments for the alleged "Conservatives" and "Libertarians" for them, because their mental failure modes mean they themselves cannot; because those bodies of thought, reasonably applied, have something to offer to guide towards sensible policy.

[Edit 3/18/10]

Consider RPJr's strange book review in Nature - he is reviewing 4 books, none less than 300 pages, and his review could fit comfortably on 2 sheets of college ruled paper, even though the books are competing for space with RPJr's opinions.

http://www.nature.com/nature/journal/v464/n7287/full/464352a.html

It is a perfect example of concern trolling.  Quoting:

> Incremental approaches to climate mitigation that can be modified by experience offer a chance that realistic and democratically grounded actions might rise to a challenge that will be with us for decades to come.

In other words, don't yell "Fire" in a crowded theater, especially if the theater is actually on fire.  Eventually, enough of the patrons will catch on fire to allow a rough consensus to take hold. Poppycock.

The piece is self-refuting, but the issue is that it was allowed to be published.  We should hold the editors of Nature up to ridicule.  If those editors wish that the issue is taken away from the facts of science and into the realm of political science and economics (as they must plainly feel), then print articles papers from publishing political scientists and economists.  Instead of concern trolls without any stake in substantive argumentation.

[Edit 03-26-10: see comment by Marion Delgado]
Reblog this post [with Zemanta]

No conspiracies - everything you should worry about is in plain view

{{en|Truman White House reconstruction. Title:...Image via Wikipedia
Conspiracies are very uninteresting. I am supposed to worry about Bush and Cheney bringing down the Twin Towers, but everything that happened during the GWB White House years was exquisitely planned and published before the fact by the conservative thinkers and the Neo-Cons. Why do we have to act surprised that they did exactly what they told everyone they would do?

That the Republicans and Democrats are two different faces of the Corporatist Party is something they don't even bother to hide. It is like accusing a five year old of a conspiracy to steal from the cookie jar when the little dude doesn't even bother to wipe the chocolate mess and crumbs from his little face. Using the word "conspiracy" is absurd.

Conspiratorial thinking is just a roundabout way to absolve yourself from any responsibility for taking action. It is a way to claim that any constructive action is pointless because the Big Bad Scary Forces pull the strings from the shadows. Garbage. Little thoughts for pathetic little people.

The conspiracy you should worry about is the conspiracy inside you, that makes you settle for 2nd best, 3rd best, 4th best, etc, when you possess the power to do more. The light of *personal* *responsibility* makes all the conspiratorial shadows disappear.

Because you should be thinking less about the state of the White House, and more about how much time you spend helping your daughter with her homework, or how you can tell your wife that you love her in a way that is meaningful to her, or all the personal battles that actually mean something in a life. Frick conspiracies in the tushie. Yeah, I said it: Frick conspiracies in the tushie!
Reblog this post [with Zemanta]

Friday, March 5, 2010

Catching up to my hand written journal

COPENHAGEN, DENMARK - DECEMBER 09: A delegate ...Image by Getty Images via Daylife
Catching up on my notebook, notes on: indulgences, financial assets, sovereign default, hierarchy, responsibility, free will, reason or excuse, interruption, implementation intentions, Keith E. Stanovich, Peter Gollwitzer, outrage porn, proselytizing, BRAC, Fazle Hasan Abed, enjoyment, rationality

In theory, each one of these points could be a blog post, but I have to clear out my notebook, so consider these placeholders.

Note 1: Adam Carolla and loving Red Wine

Adam Carolla talking about red wine.  He loves it so much, that he takes great pains not to abuse it, so he will never risk having it taken away from him forever.  This should be how I treat a lot of the things I eat and drink, like beef jerky, sweets, coffee, Monster Energy drinks.  Taken to an extreme, this could include internet porn and masturbation.  Some days later, the Upright Citizen's Brigade hosted the Adam Carolla podcast, and Ian Roberts talked about binge eating and binge drinking.  Using Carolla's advice, the pleasure you derive from eating and drinking should make you careful not to binge, because that is a path where others could rob you of those pleasures through rehab!


Note 2: Really existing financial assets, and what low interest rates and sovereign default really mean.

The Economist, October 10th 2009, p 76, Buttonwood - The Nature of Wealth.

http://www.economist.com/business-finance/displaystory.cfm?story_id=E1_TQVRSNGN  (subscription only)

[paraphrasing] Financial assets are not "wealth", but a claim on future real wealth.

My idea, to develop more later, is that "really existing" financial assets:

1) Pay interest as a reward for an obligation, under pain of punishing penalty, to not withdraw before a maturity date.

2) When a withdrawal is made, it is in chits that can only be used in a regularly scheduled auction of a fraction of outstanding assets that cannot risk drastically devaluing the whole.

3) Unused chits have a severe negative interest rate.

3) Transparency in preparation for future potential obligations is the only basis of relative soundness.

Under this scheme, paper money and a central bank goal of low interest rates is an appeal to the animal spirits of the monied masses, to make as much wealth as possible available for manipulation by bankers.  During "normal" times, this works very well to make capital available to those who will use it best, but, this is unsustainable, and so there is a predictable cycle of crashes by way of sovereign default, on the order of every 200 years or so.

Gold backed money is not a solution, because all you have done is added a superfluous level of indirection (you cannot eat gold), and you have denied the central bankers the ability to come arbitrarily close to a crash from time to time, while avoiding devastation of the full crash.  The gold standard is like an airplane designed to explode if it comes within 200 feet of the ground without an airport runway underneath.  The knowledge of the explosive charges will force the pilots to fly with more care, but no human could condone killing people when there is even a small chance of a maneuver for restorative assent.  So the cycle is 200 years between sovereign default with paper money, instead of every 225 years on the gold standard, with the gold standard assuring that 120 years out of the 225 are lived in sheer terror and deprivation.

Note 3: No right to the desired outcome, only a right to the prerequisite work

I forgot I already wrote this up: http://manuelmoeg.blogspot.com/2010/02/no-right-to-outcome-only-right-to-work.html

Note 4: Is my current action or inaction in opposition to any conceivable personal hierarchy of values and goals?

I am lying in bed.  I want to stay in bed.  I know, rationally, that my current inaction is in opposition to any conceivable personal hierarchy of values and goals.  So get out of bed now, dummy.

Note 5: It is not free will, it is a motivating sense of responsibility, that is the thing.

Because free will does not exist.  It is being hunted down the same way scientific inquiry hunted down vitalism [ http://en.wikipedia.org/wiki/Vitalism ], or the supernatural origin of man, or the supernatural origin of the world, or miracles, or the Jesus of the Scriptures, or primitive gods demanding sacrifice, etc.

But we need to explain differences in outcomes, so we care about a motivating sense of responsibility, and the rigor that demands to perform due the responsibility.

Note 6: Is what I am currently doing or not doing have a reason or merely an excuse?


Always because of reasons, never time to entertain excuses.

Note 7: To do right by a hierarchy of values and goals, you need the ability to interrupt merely coping or distracting activities.

Maybe to mentally visualize the interruption process, as practice.  Also, Peter Gollwitzer's implementation intentions - "mark the cue-action sequence with the conscious, verbal declaration: "when X occurs, I will do Y"."  [ from Keith E. Stanovich's What Intelligence Tests Miss: The Psychology of Rational Thought, page 200, referring to Gollwitzer P M 1999 Implementation intentions: Strong effects of simple plans. American Psychologist, 54, 493-503. Gollwitzer P M, Schaal B 1998 Metacognition in action: The importance of implementation intentions. Personality and Social Psychology Review, 2, 124-136 ]

Note 8: Avoid Outrage Porn

So many left-wing websites are simply outrage porn.  I am attracted to them because I agree with the viewpoint, but it is nothing but a coping mechanism for anxiety and a distraction.  No time for outrage porn.

Note 9: Free Will as a very scarce resource


To describe the process of enforcing motivating sense of responsibility, we use the language of "free will", without making any claim about free will existing (good thing, too, because it doesn't).

The moments when we take responsibility to rise above the constraints of situation, we call this a moment when we can exercise free will.  These moments are few and far in between.  They can be imagined as a single spark of energy & life.  What a terrific sin to squander them!

Note 10: Proselytizing for Rationality is very suspect.

If you have an agenda for rationality, your first subject should be yourself.  Your energies to make yourself more rational will never find a satiation.  So proselytizing to other for the cause of rationality is suspect, and probably a way to excuse yourself from the rigors of rationality.

Note 11: BRAC - Fazle Hasan Abed

The Economist p60 Feb 20th, 2010 "BRAC in business" - Fazle Hasan Abed has built one of the world’s most commercially-minded and successful NGOs

quote:

In a book on BRAC entitled “Freedom from Want”, Ian Smillie calls it “undoubtedly the largest and most variegated social experiment in the developing world. The spread of its work dwarfs any other private, government or non-profit enterprise in its impact on development.”

BRAC pays far more attention to research and “continuous learning” than do most NGOs. David Korten, author of “When Corporations Rule the World”, called it “as near to a pure example of a learning organisation as one is likely to find.”

Note 12: Failure of hierarchy of values and goals with perverse outcomes in the particular case

I have no idea what I meant here.  Just typing what I wrote longhand.  I think I already spoke to this above - I think it is more of not tolerating any coping or distraction that cannot possibly be congruent with any possible personal hierarchy of values and goals.

[ Edit 3/8/10 ]
I remember now.  Must have just woken up when wrote that in notebook.  It means that indulging in something that is in violation with any possible reasonable hierarchy of values and goals, will lead you to a place where you are denied the opportunity to every indulge in that thing ever again.

Note 13: Reason & Rationality follows Responsibility

I already spoke to this above.  Typing what I wrote longhand: More important than free will is self imposed burden of responsibility and confidence in being able to make meaning choices followed by meaningful commitment followed by meaningful action.

Just realized: I have a "duty" to enjoy myself, under my so-called "self imposed burden of responsibility", or else I just will not do it.  Hey, man, have fun, keep fun close, Mister Responsibility Man.

OK, Reason & Rationality follows Responsibility, got it - what then IS reason and rationality?

1) Avoid failure modes & make progress toward achievement of goals consistent with values.

2) Remove the contradictory from the set of goals & values

3) Improve the consistency of the goals and values, using every new situation as an opportunity to do such.

That is it!  Up to date dumping out notebook!

Reblog this post [with Zemanta]

Statistics versus Causality - A predictable impasse

Stop LandminesImage by Cedric Favero via Flickr
My undignified reply to Andrew Gelmans's take on Causality and Statistical Learning


The causality people and the statistics people are talking past each other, your [Andrew Gelman's] 12 page magnum opus included.

Point 0) Sense of responsibility → decision → commitment to action/inaction → action/inaction ⇒ implies you possess a general description of reality, unless you are limiting yourself to a very narrow sphere of responsibility.

Point 1) Statistics cannot be the basis for a general description of reality because of Simpson's Paradox.  When it arises, the paradox can only be eliminated by an appeal to plausible causality, directly or indirectly.  Also, no statistical test exist, for a static situation, to make a prediction of what relationships would prevail if conditions change -- again, only an appeal to causality can do such.  (See Judea Pearl's book Causality, chapter 6)

Point 2) Causality cannot be the basis for a general description of reality because reality violates the assertion of independent variables needed for effective causal analysis ("no true zeroes" as you put it).  Reality doesn't even adhere to the laws of conditional probability [ http://www.stat.columbia.edu/~cook/movabletype/archives/2009/09/the_laws_of_con.html ] much less the structure of independence needed for causal analysis.

Illustration of the continuous version of Simp...Image via Wikipedia
Point 3) There are no other contenders for general descriptions of reality besides statistics or causality.

Conclusion) SOL

So people, under the burden of responsibility, must maintain several models of reality, over smaller and larger domains of applicability, some statistical, some causal, some based on symmetry & curve fitting, some based on the laws of probability, some based on scientific laws, some based on economic laws, some based on rules of thumb, some based on multiple simulation runs, some hybrids.  These models compete against each other, at the cost of maintenance, data collection, computation, and comparison, with the benefit of correct probabilistic predictions of consequences of action/inaction, or the benefit of demonstrations of broad range of uncertainty that swamps discernment of effects between decisions.

And the sense of responsibility is made of shifting sands, and human values and goals are not static.  So you could pay all the costs for a model, just to dispense with it.

An Inglehart-Welzel Cultural Map of the World:...Image via Wikipedia
But all this *still* can be done for individuals or small groups.  Once you get past 30 members, what is rewarded are techniques for rubber stamping decisions already taken by the politically powerful, under the name of "objective analysis" for political cover.

So "small" decisions can be made quite well, with effort.  And "large" decisions are made quite poorly, because evidence of a cold calculated analysis would be blood on the hands of the politically powerful (besides, the ability to perform such analysis is in opposition to dumb loyalty, which is the most prized character trait of the privileged in-group).  But these "large" lousy decisions possess notoriety, and thus human appeal.  So a thousand pages each over describing a thousand theories chase after a relative small number of very poor decision making processes.

The consequences of all this may dim my sparkling optimism, so I must leave that as an exercise for others.



Reblog this post [with Zemanta]