Sarah and I watched the first presidential debate tonight at a friend's house. I'm glad we did, even though I'm trying to keep a little distance from politics for my own peace of mind. I already knew I was going to be voting against Bush. After the debate I'm relieved to also say I'll be voting for Kerry.
His criticism of Bush's foreign policy aligns well with my own views, and I was impressed with how he presented the arguments. I was glad to see him aggressively challenge Bush's performance in Afghanistan, Iraq, Iran, and N. Korea. I'm also happy that he remained appropriately respectful. Bush has half of the country's support and deserves to be treated respectfully.
I was especially encouraged by Kerry's sketch of a plan for Iraq. Bush failed to present any sort of change in how to proceed in Iraq. Iraq is slipping towards civil war and our coalition seems increasingly unable to prevent it. We need help on the ground. Our military is already stretched too thin. We need serious commitments from our allies in Europe and Asia to support the transition of the Iraqi's to their independence. Bush has adopted a posture that makes any request for help a sign of weakness. By contrast Kerry seems to draw strength from the idea of international support. That difference in attitude is the first sign of hope for Iraq I've seen in months.
Also, Bush is too connected to the oil business for the rest of the world to believe that we're sincerely interested in helping the Iraqi's to create and sustain their own independence and not there for the oil. Regardless of whether you think Bush's motives are generous or selfish, you can hardly blame other countries for being suspicious of the Bush family oil ties.
It's not all roses of course. I am settling into a belief that we'd be much better off with powerful State governments and less powerful Federal government. Neither of these candidates offer any hope in that direction. At a glance, that sounds like a Republican ideal. But Bush cuts taxes with one hand while spend-spend-spending with the other. At least with Kerry I know what I'm getting into.
What's especially frustrating is the rhetoric of "The War on Terror". I may be alone in this conviction. Terror is not an enemy against whom you can actually wage war. Terror is a feeling, an internal state of mind. It is intense, overpowering fear. War cannot reduce that kind of fear. War depends on fear. It can only increase it.
Both candidates brag that they're the tough guy who will hunt down and kill the terrorists. Israel has demonstrated for decades that no amount of hunting and killing actually reduces terrorism. England's conflict with Ireland is also an instructive lesson from history on this score. We need a different metaphor to frame our thinking and unfortunately neither candidate has much to offer.
Having said that, Kerry did work a nice sound bite into his closing remarks. "Freedom, not fear" is a pretty good slogan. It is certainly in the right direction. What we need is freedom from fear, not a war on terror. "Freedom, not fear" is close, though. I hope it gets lots of airplay. Unfortunately it is still only a sound bite and probably won't change the world.
My sincere apologies if my comment moderation code has falsely accused you of trying to spam my web log. I try to keep this small corner of the net mostly free from advertising. My programatic censor has been a bit too aggressive since my last modification. I really am interested in your comments and feel especially bad about this particular mistake.
This has been difficult. Writing and publishing encourages me to carefully examine my ideas and helps to clarify them. But looking closely at my own failure hasn't been fun, even if it has been rewarding. Hopefully others can spare themselves the pain by learning from my mistakes.
Back in April, May, and June I had an embarrassingly bad time with the import problem I mentioned. I took three months banging my head against various aspects of the problem. In spite of my post about the importance of knowing when to stop I chased one wrong turn after another for three months. When Rob returned from his vacation he asked Paul to take over who finished it in four days.
Three months vs. four days. That is embarrassing.
It would be easier if I could claim to have solved most of the problem. But Paul's solution little resembled what I had started and addressed aspects of the problem I hadn't even considered. I know Paul is a better programmer. I know he is fast. But I was not prepared for the internal shock and dismay of so glaring a comparison.
With a few months hindsight I can see that I made my most fundamental and most drastic mistake right before I started working on the problem. I assumed it would be easy, but tedious. I underestimated my opponent.
I then failed to notice just how much I was actually struggling. This is especially hard to accept, even in hindsight. How on earth could I go on for weeks, let alone months, without noticing how seriously I had underestimated?
When presented with evidence that conflicts with our beliefs, we dismiss the evidence rather than adjust our beliefs. Getting my butt kicked by an "easy, but tedious" problem is inconsistent with my hot-shot-programmer self-image. I continued to believe the problem was easy and that I was on the verge of the solution, in spite of mounting evidence to the contrary.
The last dimension of failure grew from the same poisoned soil. I couldn't bring myself to ask for help on something "so easy." I didn't want to interrupt Rob and Paul who seemed quite busy on more important matters. I didn't want to admit that this busy-work was kicking my butt. I flailed and struggled and silently suffered along.
As in aikido, getting properly slammed into the mat can really focus your attention. A number of important lessons came hard and fast in July and August.
Sean McGrath's description of the breakthrough syndrome offered some solace, if not a solution:
The syndrome affects all walks of IT professional life but is most acute in software developers. ... The developer "wraps their head" around a problem. ... From that moment of immersion onwards, ideas for solving the problem come thick and fast [and] the developer gets a sense that a triumphant breakthrough is not far away.... That person is likely to feel - really and truthfully - that a breakthrough is just around the corner.
It may be, but it probably isn't.
Paul says "there's no busy-work in programming." I haven't heard that anywhere else, and it's still hard to believe. But there's no question that I would have called for help much sooner if I hadn't thought of it as busy-work.
My failure exposed the underlying importance of a collection of extreme programming practices. For starters, my silence violated three of the four XP values, specifically communication, feedback, and courage. Silence is not an effective form of communication. I was cowardly in concealing my failure rather than courageously admitting that Easy and Tedious had beaten me. I broke the feedback loop and we suffered for it.
By contrast, once my failure was out in the open, I was immediately back into the communication and tight feedback loops that are typical for bivio. Rob offered a couple rules of thumb to measure future progress: most tasks should take less than a day and the hard ones should be done in a week. These rules are hidden in continuous integration. In order to integrate continually, you have to break the tasks into day-sized chunks or smaller. Alarms should be going off if you can't integrate your code at the end of the day.
David called for the planning game -- something we hadn't been doing. For this particular problem, the split would have been especially valuable. I had misjudged the problem and taken on a task that was too big for me to properly get my head around. It would have been useful to get help early in slicing the problem into smaller pieces. Also, regularly reporting and adjusting scope and tasks would cause a failure like mine to fail fast. I would only have gone one week before the alarms started going off. If it went as long as two weeks, serious interventions would have been put in place and a months-long failure would have been averted.
I had to get over my hesitation to interrupt. This is about courage and communication. I had two fears holding me back. First, I was afraid of interrupting Rob and Paul. Second I was afraid of looking stupid. Courage is taking action in spite of fear. I need to trust Rob and Paul to manage their own interrupts. The fear of looking stupid is both simple and incredibly difficult. I simply need to get over it. That is substantially harder than it sounds, and also a story for another day.
Update: We only occasionally pair program. Doing that more consistently would obviously prevent a mistake like mine. If we were always pair programming, it would be hard for me to have even developed a fear of interrupting.
Perhaps the most important lesson of this whole experience is about my coworkers at bivio. No one berated me for my failure -- perhaps it was clear that I had that job well in hand. Instead they offered encouragement and stories of their own failures. In some way we bonded through my failure. We looked at the problem as a team and brainstormed various measures to learn from the experience. My mistake became an authentic opportunity to learn and grow, not to judge and condemn. That's not just a slogan on a motivational poster, but what really happened in action.
Here's how I think we have come to inspire so much hatred in the rest of the world. Sometime soon I'll share a few things that I'm trying to do about it.
The United States' produce over 20% of the world economy [1] with less than 5% of the world's population. [2] That suggests astounding leverage. Unfortunately we consume 30% of the word's oil. [3] The USA is a machine that consumes 30% of the oil to produce 20% of the GDP. The 10% difference is friction or profit depending on how you look at it.
Usually those numbers are thrown around by zealous environmentalists warning of impending ecological catastrophe. I, however, will take those numbers down a different path of impending doom. :-) In order to consume 30% of the world's oil, we must control 30% of the world's oil. If you want to understand the hatred of the US, look no further than the way we control and consume that 30% of the oil.
Like all effective forms of control we use a carrot and a stick. The carrot is the money we are willing to pay for oil. The stick is how we use our military to "protect" the world's oil supplies.
The major oil producers in the world can't afford to anger their biggest customer. They're stuck pretending to enjoy the dance with us even as we step on their toes or kick them in the shins. We don't really have to be a good dancer because they can't afford to say no to us. That kind of imbalance breeds deep resentment.
Our "protection" of the world's oil supplies is mafia protection.
You say, there's a 'dangerous element' threatening your pipelines and oil wells. Of course we'll protect you. How could we not? Welcome to the family. We can count on your undying loyalty, yes?
That claim goes completely against our national self-image. Aren't we the beacon of Freedom, a nation of the people, by the people, and for the people, a more perfect union?
When I get this cynical in conversations with my friend Jeff, he reminds me that we are the most giving nation on Earth. Actually, no. In absolute dollars, Japan is the most giving nation on Earth and we are second. [4] And we're way down on the list relative to GDP [5] or population. [6] Our generosity pales in contrast to our military spending. Ours is 37% of global military spending. China is a distant second with 8%. [7] That's a very big stick. What's more, we've shown a historical willingness to use it.
Peter Hartcher says the Congressional Research Service notes 200 US military interventions abroad since our independence. Unfortunately he failed to name the source of that figure so I went digging. The most likely candidate: CRS Report RL30172 -- Instances of Use of United States Armed Forces Abroad, 1798-2001 (160K pdf)
I count 299 instances of varying scale. Did Peter filter the list according to his own notion of military intervention, or draw from a different source? Regardless, the United States is only 228 years old and by our own reckoning we have conducted 299 military interventions abroad. As I've said before, the rhythm of our war machine is disturbing for its incredible consistency. It's like we're a geo-political vampire craving a bloody fix every few years regardless of who is in the White House. (How's that for cynical?)
Let me be clear. I love this country. God bless America. I wouldn't live anywhere else. I am completely blessed to have been born here. (No sarcasm nor cynicism in that sentiment whatsoever -- just in case my tone of voice in unclear in this written form.) Nevertheless, in our behavior abroad we fall very short of our own high standards. We talk a good game about freedom, but the walk we walk is enormously intimidating. Our global posture is why the country I love is the target of such widespread hatred.
We are at the center of a gross imbalance in the world. Oil is the foundation of the global economy. It's not that terrorism is directly about controlling oil. Rather, the imbalance in oil consumption reflects a broader imbalance of power and wealth in the world. It is the power imbalance which feeds the terrorism. Oil happens to be a useful way to measure the imbalance. Specifically, 5% of the world's population controls 30% of the oil.
Nature abhors imbalance. When things are out of balance, they fall. In human nature this rule often presents itself in bloody revolution. Those with little power become desperate enough to risk and even sacrifice their lives to oppose the imbalance. Throughout history the mighty have grown and grown only to fall at the hands of desperately oppressed people determined to reclaim their own power.
Here's what I mean by gross imbalance. Measuring wealth and power by oil consumption, if power were divided equally in the world, each person would get a bit less than a half-gallon per day. [8] But power is not divided equally and the US controls 30% of the oil. Pretending each US citizen gets an equal share of that 30%, I get just less than three gallons/day. [9] In order to redress the imbalance I would have to give up two-and-a-half gallons of oil per day or 86% of my current share of global resources. That is gross imbalance and that is the heart of the problem. However idealistic I may be, I cannot imagine how I could reduce my consumption by 86%. And so I contribute to the demand for oil. That contributes to the power imbalance.
Sarah added another dimension to the mix. The US is so powerful that there's no immediate need for us to listen to what the rest of the world might think. We mess around in the matters of other countries throughout the world either financially or militarily to protect our interests in their part of the world. We don't give much consideration to what's in the best interest of the other countries. If we were less powerful we wouldn't be able to behave so selfishly in the global theater. The imbalance of power enables our government to run roughshod over the needs of the rest of the world. It is an important dimension to the way the imbalance of power fuels international resentment.
The problem is our very way of life. It's not about our freedom. It is about our gluttony. The protection of our global interests supports our gluttonous lifestyle. It's fast-food, SUVs, shopping malls, televisions, movies, air conditioning, air planes, and clothing. It's our music, our computers, our American-dream single-family-homes, our two-car garages, our eight-lane highways, our parking lots, and our CostCos and WalMarts. It's the paper cup and plastic spoon we throw away each time we order a drink at Starbucks or McDonnald's. It's the extra helping of fries, and the quarter-gallon of carmel-colored corn syrup we drink to chase down a mediocre four-dollar hamburger.
In so many areas of our holy way-of-life we abuse our wealth and power in thoughtless waste and excess. Our military defends the world's oil supplies so we don't have to think about the stuff we throw away or the energy that went into its creation. As we sit in the line at the drive-thru, radio and air-conditioning blasting, we give no thought to the money and power we're burning idly away. As we throw the cup out the window, we give no thought to the energy that went into its creation, nor to the diesel fuel that delivered it from the factory to our favorite food joint. Unfortunately our thoughtlessness "trickles down" into international hatred.
[1] US GDP is $10.45 trillion, of the total $48.51 trillion globally. http://www.nationmaster.com/graph-T/eco_gdp
[2] US population is 290 million of 6.1 billion globally. http://www.nationmaster.com/graph-T/peo_pop
[3] The US consumes 19.7 million barrels of oil per day of 64.81 million barrels per day globally. http://www.nationmaster.com/graph-T/ene_oil_con
[4] The US gives $6.9 billion of $48.62 billion globally. http://www.nationmaster.com/graph-T/eco_eco_aid_don
[5] http://www.nationmaster.com/graph-T/eco_eco_aid_don_gdp
[6] http://www.nationmaster.com/graph-T/eco_eco_aid_don_cap
[7] US spends $276.7 billion and China $55.91 billion of $738.04 billion spent globally on military. http://www.nationmaster.com/graph-T/mil_exp_dol_fig
[8] (64.81 million barrels per day * 42 gallons/barrel) / 6.1 billion people = .446 gallons/day/person
[9] (19.7 million barrels per day * 42 gallons/barrel) / 290 million people = 2.85 gallons/day/person
Josh Bloch and Neal Gafter spoke at both Denver JUG and Boulder JUG last month. They gave a fairly thorough run-down of the features in Java 5 (that's what they're calling it now). If their show comes to your town and you want a quick boost into the Java 5 features, you won't be disappointed. There was plenty of code to give a flavor of how the new features improve your programming life.
It was interesting to look at Java 5 features after having programmed in perl and with bOP for the past eight months. I'll say out loud that I think they have made many improvements. They seemed rightfully proud of what they have created. But there's clerly a fundamental difference in values. Josh and Neal really appreciate the compiler and want it to do more work for the programmer. Whereas I'm getting much more value from tests these days. I suppose I shouldn't dis' compilers. Dynamic languages need 'em too. But in my experience with perl and python, the compiler is just the first set of runtime errors. :-)
Letting the 'for' loop also behave like 'foreach' is a great improvement. Coupled with type-safe collections you will have to do radically less casting. But I've also grown quite attached to perl's map and grep, and python's list comprehensions. These are related to foreach, but in many cases even more useful. Java still doesn't have them nor the first-class functions and closures needed to really appreciate what these language constructs can do.
Josh and Neal were quite excited about the new enumerations. Until I began work with bivio, I had never used enums. It was very nice to hear someone explain again when to use enumerations and why bother. I have been using enums for months now and implicitly know when to use them, but I don't know if I could have explained it until now. In case you are like I was, here's how I understand it. Enums are a collection of things that you might store in a table in a database except that you don't need to change the list of items at runtime. The example Josh offered was menus in your application. They're a group of related things that behave similarly, but you only change them with new releases of the software.
What Josh and Neal were excited about was that enums are full blown objects, not just integers with names as in C. That means you can add methods to them. Exciting if you're coming from a C or Java background. But Rob and Paul and David wouldn't be so impressed. bOP's enums have had methods for years.
I won't do any more blow-by-blow comparison of new java features with perl or python or bOP. My own experience looking at these new language features just validates Paul Graham's assertion that programming languages vary in power. So Java 5 is more powerful than 1.4, but not quite as powerful yet as perl and python. bOP adds some very useful things to perl. And we'd all be better, faster, and stronger in lisp.