?

Log in

Calvin

Recent Entries

Calvin

perplexed

It ain't what you don't know that gets you in trouble;
It's what you know for sure that ain't so.
- Mark Twain

View

Navigation

Skipped Back 10

June 13th, 2009

It's not too late, Khamenei

Share
spaceman spiff crashing
Dear Ayatollah Khamenei,

I am writing this open letter to urge you to consider the best interests of your people and the people of the whole world. Please declare that the recent election results must be reexamined and the results may have to be restated. Please uphold the principles of justice, equality and individual liberty. Please listen to what your people are telling you. These ideals are not un-Islamic, but suicide attacks are.

Ahmadinejad may fervently believe, but so did George Bush. Both Bush and Ahmadinejad were dogmatic, probably noble at heart, but stubbornly unable to adapt to the realities we face. If you did hate Bush on the one hand, how can you support Ahmadinejad on the other?

In our country, we have resoundingly called for change. Despite an opponent that was legitimately progressive, dissident, and, for chrissake, a true blue war hero -- a Republican you'd vote for if there ever was one -- our people disapproved of Bush Jr. so greatly that we still went with the ultimate anti-establishment figure: a demagogic, socialist, moving and inspiring young black man. Our generation's Martin Luther King.

Our price for this may be big government and crushing debt, but there is a price to pay for following your ideals. I can't recall the last time I voted for a democrat, before Obama. I am not 100% certain his economic policies are the best solution. But I am certain that he is the man I want to represent me.

For one thing, he does not believe so fervently that he is not open to change. I also believe that he will feel the pressure I imagine George Washington must have felt -- the need to be an example, to set precedent, to be the best possible leader, even at great personal cost. Obama must be powerfully motivated by his status as the first black president to give every ounce of effort he can, to never falter in will nor waver in courage. I believe he has good judgment and a sound mind of unusual power. I also suspect that much the same can be said of Mousavi.

The rule of law and individual liberty will benefit us all. That is the American interest here: we want to live in a peaceful and prosperous global society, especially in these Damoclean times.

We feast at the table while our fields wither into dust. The simultaneous and critical threats of climate change, exhaustion of natural resources and frightening demographic imbalances -- in short, everything detailed by Jeffrey Sachs -- present unprecedented threats. We have enough natural threats without adding human threats.

The coming century may be one of great death due to hunger, disease and natural disasters. Let's not add the burden of religious hatred and violent conflict. Let's get more butter and fewer guns, fund those worthy social programs that so desperately need it, and allow the people to elect their government. Trust the wisdom of your people. Iran has been a great nation and has a proud history of high civilization. Why can it not be so again?

Obama and Mousavi are each men of great intellect, noble purpose and true integrity. Please simply call for a de novo review of the recent election results in a fair court of law with appropriate jurisdiction. You can borrow one of ours in The Hague.

Do you really think Mahmoud Ahmadinejad is the kind of guy who should be allowed to be above the law? The American people didn't think George Bush was. That's why we elected a -- get this -- a constitutional law professor to the Presidency. It was time to rein in the executive branch, which had grabbed too much power. So we voted for a man who would truly uphold the Constitution.

Please bring justice to Iran, Mr. Khamenei, and lead with us to a brighter future for the entire world. Please call for a de novo review of the recent election results before a fair and independent tribunal. I fear there may be bloodshed otherwise.

I hope this letter finds you, and finds you well.

Kind regards,
Calvin

June 12th, 2009

Paul Blart: Mall Cop

I suppose it was fairly enjoyable. The girl was cute enough, the acting was decent and the production values were good, but the writing was lackluster.

What really bothered me was the fact that he never picked up a gun when he had the chance. There was a sporting goods store, for chrissake. He would probably have had an arsenal at his disposal. Failing that (say, the bad guys had secured that store) there would surely have been any number of scissors and box cutters in offices and store rooms, not to mention the vast array of cutlery available in any food establishment. Maybe even better would be an improvised club from a mannequin rack. Hell, my local mall has a knife shop -- he could have had a fucking samurai sword (though I think I'd go for a combat knife, so I can catch the falling body after I stab him in the heart -- gotta be quiet when you're outnumbered and behind enemy lines). I mean, come on. If you're gonna be in a life and death struggle, get yourself a deadly weapon, dammit! And a segway doesn't count.

I guess you have to be a kid to enjoy this; I found it unbearably silly. This is sad; I'm too young to be a curmudgeon already. But I can't help it, this movie just wasn't quite good enough to take me along for the ride.

June 11th, 2009

I love my new wireless headphones. I have been through half a dozen pairs this year, and I LOVE these. I may even have audiophile standards, I'm not sure. Certified audiophiles agree, though, that these are top-notch. You can even physically adjust the bass and treble response of the earbuds; I did this, and really appreciate the benefit of this individual tuning.

I was killing set after set of headphones because I sit in a rolling chair and can't sit still. The cord would get yanked apart again and again, until it couldn't take anymore.

So I went wireless. Being an idiot, I tried a bluetooth headset first. The sound quality is absolutely atrocious. Only acceptable for phone calls. But the Kleer wireless technology changed all that. It's CD quality, you'll never know the difference. Until you start to walk around, of course, and you can listen in the next room to crystal clear sound.

SA6 and the W-1 Wireless Bundle Kit

The batteries last about 8 hours and recharge pretty fast. I often wear them 16 hours a day or more, and I find them very comfortable. Worth the money.
Here's a snippet of javascript I wrote today. This will help me to use a single form in a multiple step process (registration) and in a single step (editing an existing account). When I refactored it to eliminate code duplication, I came up with a neat little strategy which I call the "puff, puff, pass" approach. See the middle part of Account_form.validateStep():

var Account_form = function(){
    return {

        /**
         * VALIDATE FORM
         */
        validateForm : function(){

            Account_form.validateStep('all');
        },

        /**
         * VALIDATE STEP
         *
         * @param mixed i Which step to validate, or all of them. Valid inputs: { 1, 2, 3, 4, 'all'}.
         */
        validateStep : function(i){

            var errorMessages                = new Array();
            response.showProcessingMessage('Validating form');

            // "puff, puff, pass" (when i = 'all')
            if (i == 1 || i == 'all'){
                errorMessages.concat(Account_form.validateStepOne(errorMessages));
            }
            if (i == 2 || i == 'all'){
                errorMessages.concat(Account_form.validateStepTwo(errorMessages));
            }
            if (i == 3 || i == 'all'){
                errorMessages.concat(Account_form.validateStepThree(errorMessages));
            }
            if (i == 4 || i == 'all'){
                errorMessages.concat(Account_form.validateStepFour(errorMessages));
            }

            if (errorMessages.length > 0){
                Notice_overlay.clear();
                Notice_overlay.title        = "There were some problems submitting your form";
                Notice_overlay.subtitle     = "The following errors were encountered:";
                Notice_overlay.details      = errorMessages;
                Notice_overlay.error();
                return false;
            } else {
                return true;
            }
        },


        /**
         * VALIDATE STEP ONE
         *
         * Step one: username, password, retyped password, email
         */
        validateStepOne : function(errorMessages){

            // Validate username
            field                           = $('input[name="Account|username"]').get(0);
            state                           = Account_form.validateUsername(field);
            if (state == 'required'){
                errorMessages.push('Username is empty');
            } else if (state == 'error'){
                errorMessages.push('Username is invalid');
            }

            // Validate password
            state = Account_form.validatePassword();
            if (state != 'ok'){
                errorMessages.push('Password is invalid');
            }

            // Validate email
            field                           = $('input[name="ContactInfo|email1"]').get(0);
            isRequired                      = true;
            state                           = Account_form.validateEmail(field,isRequired);
            if (state == 'required'){
                errorMessages.push('Email address is required');
            } else if (state == 'error'){
                errorMessages.push('Email address is invalid');
            }

            return errorMessages;
        },

         *** (other class code omitted) ***
}();
$(document).ready(Account_form.init);

June 7th, 2009

Some days you just wake up proud and grateful to be an American. Our government is far from perfect (it can't quite stop itself from using the blank check on China's account) but I know we run a true meritocracy (or just about as close as society has ever gotten). Witness Barack Obama. A black man who is truly competent and lives up to his potential can actually grow up to be the President of the United States. We mean what we say about equality, diversity, justice and opportunity.

Every day -- or, more precisely, every time I hear him speak -- I'm loving Obama more and more. I almost always vote Republican but I voted for Barack this time and I don't regret it. I'm not 100% sure the current economic policies will save us, but I am grateful for his strong leadership and ability to legitimately restore the self respect and moral leadership of our nation and for ourselves and for the world.

The challenges that face us in the coming century are up as serious as another world war, cold war, or great depression. (In fact, if you consider Islam, we *do* have a world war going on -- a culture war that regularly leads to violent conflict, just like Fascism and Communism.) I'm reading Jeffrey D. Sachs' Common Wealth: Economics for a Crowded Planet. I picked it up at the UN bookstore. Some seriously scary shit. Makes me want to buy a Prius and survival gear and head for the hills. And a gun.

June 6th, 2009

Air France Flight 447

Share
perplexed
Nobody knows how it went down. More and more, the wild-eyed ideas seem plausible -- it was hijacked by terrorists and the first thing they did was cut the communications link; they just had to pull the right plug or snip the right wire, right? They were in unmonitored (by radar) intercontinental airspace the last we saw them. Well, where could they have gotten to with the amount of fuel on that plane? Are U.S. spy satellites checking likely destinations for a wayward Air France jet? Hell, it could be in Liberia. Anybody look there yet? Maybe it's already stopped in Colombia for a load of cocaine, and it's headed for Topeka with a new paint job. The sky's the limit for the possibilities here. So to speak.

Maybe it's in Libya in a jumbo chop shop, yielding its technological secrets under the dissecting knife. Secrets soon to be shared with other rogue states. Just the sort of working example you'd want to provide some guidance for your own teams trying to perfect the art of intercontinental ballistic missiles. *cough*North Korea*cough*. It probably used some ship as an impromptu runway (a long container ship or oil tanker? are they long enough?) and sailed to Pyongyang in the cargo hold. There have got to be shipping lanes within range, with large ships, accessible while remaining in international, unmonitored airspace. So we have no idea where they took it, and we won't know it's gone for sure until we search the ocean floor thoroughly. So, never.

Truth? Perhaps. Stranger than fiction? Definitely.

I applaud the planners' cleverness in timing the assault to coincide with turbulence and a thunderstorm. Definitely throws the dogs off the scent. Or, maybe lightning fried something and it crashed. No guarantee it would happen immediately, and their communications were out, so they could be pretty far from their last known location. Like Amelia Earhart, they could stay lost for a long time.

June 3rd, 2009

This is an actual bit of code from my recent work:


// Paid, naked and related: just how we like 'em!
const XTYPE_PAID = 1;
const XTYPE_NAKED = 3;
const XTYPE_RELATED = 4; // unused by us at this time

public $willGetPaid;
public $willGetNaked;


(FYI, I'm talking about search feeds -- organic results, paid placement results, and related search terms.)

June 1st, 2009

yeehaw

Share
perplexed
My mother thinks I may need to get an x-ray. I may have broken my finger riding the mechanical bull. I think it's just a nasty-looking sprain. Just another weekend in Vegas. The wedding was a blast, a real rockabilly hoedown.
Powered by LiveJournal.com