Wednesday, June 10, 2009

JavaOne: A Tale of Two Technologies

JavaOne 09: Night Hackers Diner“It was the best of times, it was the worst of times . . .” and so begins Dickens’ Tale of Two Cities as well as this Tale of Two Technologies. For at JavaOne, indeed it seemed like the best of times with mostly exciting Keynotes (please, not Microsoft!), technical talks, and, my favorite, well-attended Hands-On Labs. The less-than-normal attendance made lunch-time so much more pleasant, although tearing off the requisite lunch tickets continued to challenge the most nimble of fingers. I was never herded into an overflow room nor ever denied entrance to even the most popular presentations.

But the worst-of-times feeling loomed large for many attendees, despite the ease with which we negotiated the underground maze of Moscone. Book sales at the Digital Guru book store were down by more than 50% from previous events (not just JavaOne—other technical shows as well). And the recent announcement of the Oracle takeover of Sun Microsystems, although perhaps a less troubling result than a Big Blue ownership, created a heavy cloud of dark unknown. What will happen at Sun Microsystems? What path will Java take? Is this the last JavaOne as we know it?

Following the long escalator down into the show, bean bag chairs dot the floor space in front of the nostalgic Night Hacks Diner mural, where James Gosling sporting a half-smile shares a cup of Java with Duke behind the counter. The Linux Penguin and the Dolphin (is this the Dolphin Express-MySQL bundle?) sit nearby. Is this meant to be some last-time gathering of close friends as they each make their separate ways into the world? And Scott McNealy’s reminiscent-laden Keynote sounded eulogy-like. Take heed, rumor has it that Sun Microsystems has a paid contract with Moscone for 2010. But, that’s no guarantee, mates.

Essential JavaFX book at the Pearson/PTR Booth at JavaOneBut back to my tale of two technologies. The biggest buzz of the conference was JavaFX. There were multiple hands-on labs, technical talks (I went to them all), and demonstrations at Keynotes featuring JavaFX applications. On the Pavilion Floor, there were the JavaFX-based App Store and early-stages-under-development slick JavaFX App Builder. Two JavaFX books make their debut at JavaOne (Essential JavaFX, ours, was one) with several more books in the works. JavaFX was the technology darling at JavaOne 2009. As both an attendee and book author, it was exciting.

The second technology I tuned into was zembly. As one of the co-authors of Assemble the Social Web with zembly, I have been involved with this Sun Microsystems-based technology since the fall of 2007. I have built widgets, data services, and Facebook applications. I have seen zembly grow and improve and I love it. We presented a zembly Hands-on-Lab at JavaOne this year. It was completely full and all participants received a detailed introduction to this amazing site. They all saw how easy it is to build (and zembly hosts!) Facebook applications. People want to know how to hook into the social-based application market. It’s new and young and the under-30 crowd seemed especially interested. zembly’s presence at JavaOne included one book debut (ours), one hands-on-lab, one technical talk (Todd Fast and Jirka Kopsa whipped up a Facebook application with amazing speed), and one station in the cavernous Sun Microsystems exhibit space. True, the product is officially in Beta, but it is a very mature Beta.Chris Webster, Gail Anderson, Paul Anderson, & Todd Fast at zembly book signing (JavaOne)

Bottom line, I’m waiting for the rest of the world to notice zembly. It’s something worth looking into. And, we all wish for the continuance of the Good Times for JavaOne.

Wednesday, May 27, 2009

Have Gun – Will Backpack

Our treasued National Parks
Is it just me, but why do people need to carry concealed, loaded guns or rifles in national parks?

Last week Congress passed a Credit Card bill. Riding its coattails is a clause that allows visitors to national parks to carry concealed, loaded guns and rifles.

I am officially registering my disappointment in the actions of these gutless legislators.

So, I am camping in Yosemite Park and the guy in the campsite next to me may have a concealed gun on his person. If I accidentally amble too close to the border of his campsite, will he shoot me thinking I’m going to rob him?

Or, let’s say I’m out backpacking. It’s bear country, so I dutifully rope up my food out of paw reach of would-be bear guests. But, the group 100 meters down the path ain’t so backwoods savvy. They leave their food just laying around. And, what do you know . . . that bear comes amblin’ in looking for a hand-out. Bam! That high-powered rifle sure stopped the bear. No problem. My bacon ain’t bendin’ to no bear-theft Yogi wanna-be! Jes protecting my property, thank you kindly.

I ask yet again—who needs to carry a loaded concealed weapon in a national park? What kind of country are we?

Sunday, April 05, 2009

JavaFX Path Animation (A Request)

Here is a screen shot from a JavaFX program that performs path animation (a request from a reader).
I just received a request based on a recent JavaFX Path Animation post: How to create an animation that
Path is simple circle.
Object is a line bar.
This bar should move around the circle.
I don't usually do this, but the request was indeed simple and it took a mere 10 minutes to put together the code. (The complete code for the Chutes and Ladders animation is included in the upcoming book I'm writing with Paul Anderson. If you like this, please buy the book. Look for it at--God willling and the stars align--JavaOne.)

Here is the complete code (minus the import statements). For more details on the JavaFX path animation, see the JavaFX 1.1 API.

// change these to change the
// dimensions of the path elements
def startX = 100;
def startY = 100;
def radiusX = 50;
def radiusY = 50;
// this provides the path elements for the animation
// (using PathTransition)
// and the Path (which is a Shape)
def circleElements = [
MoveTo {
x: startX
y: startY + radiusY
}
ArcTo {
x: startX
y: startY - radiusY
radiusX: radiusX
radiusY: radiusY
}
ArcTo {
x: startX
y: startY + radiusY
radiusX: radiusX
radiusY: radiusY
}
];
// this is the path, not needed for the animation,
// just shows the path
def path = Path {
stroke: Color.DARKGRAY
strokeWidth: 2
elements: circleElements
}
// marks the center of the "circlePath",
// not needed, just for decoration
def circle = Circle {
centerX: startX
centerY: startY
radius: 5
fill: Color.BLUE
}
// this is the object that gets animated
// along the path
def lineBar = Rectangle {
width: 40
height: 10
stroke: Color.BLACK
fill: Color.YELLOW
}
// put all of these things in a group
// you can change the location of the group
// with properties translateX and tranlateY
def group = Group {content: [ path circle lineBar ] }
// This provides the animation
// repeatCount can be a number (defaults to 1)
// also autoReverse: true lets the animation repeat
// in reverse, repeatCount must be at least 2
// for this to have an effect
PathTransition {
repeatCount: Timeline.INDEFINITE
duration: 15s
node: lineBar
orientation: OrientationType.ORTHOGONAL_TO_TANGENT
interpolate: Interpolator.LINEAR
path: AnimationPath.createFromPath(Path {
elements: circleElements
})
}.play(); // start the animation now

Stage {
title: "Simple Path"
width: 250
height: 250
scene: Scene {
content: group
}
}

Thursday, March 12, 2009

JavaFX Flickr Photo Carousel

JavaFX makes it easy to manipulate images and move things around in general. So, here is my take at a rotating photo carousel that displays today's interesting photos from Flickr.

Saturday, February 21, 2009

JavaFX Path Animation

Path animation in JavaFX lets you define a path (or several, if you like) and animate an object in the scene graph along a path. (JavaFX calls these objects nodes.) Here is an example that animates Circle nodes along three separate paths hooked together: the Chute, the Ground, and the Ladder.

Monday, February 16, 2009

A Little Bit of Beach

Sunset in Del Mar
Sometimes the pull of the ocean is strong and you just want to be there to see it, hear it and smell it.

Moonlight Beach in February
The ocean is always there, but it's always different. Some days it's smooth and lives up to its name "Pacific Ocean." Other days, it kicks up and crashes.

Friday, February 06, 2009

Checking Out JavaFX

Here is a handy widget that helps you tune your guitar, contributed by son Kellen:


Thursday, January 22, 2009

Obama-O-Rama

And we were there.

Well, not physically there in Washington, D.C., but there glued to our T.V. sets or streaming video to watch the inauguration.

A hundred years from now, when historians break down the series of events that helped shape this moment in time, what seeds will they say grew into the trees and forests that gave us the Obama presidency? The lofty may point to Abraham Lincoln and the Civil War that freed the slaves. Then, there’s Martin Luther King Jr.’s “I Have a Dream” speech in 1963. There’s also the Civil Rights era of the 60’s that led to reforms in education, employment, housing, and voting rights. These are all important events.

But getting closer to the particulars of Obama’s candidacy and victory are events that led people to believe “The color of his skin pales in importance to his character, his intellect, and his ability to lead our country out of the mess we’re in.” Yep, the depth of our mess has elevated the importance of Obama’s skill set so that people actually voted for him—not because he’s a black man and not in spite of the fact that he’s a black man—but because he made us believe not that “we can,” but that “we must.”

So, ironically, we must thank the inadequacies of the failed Bush/Cheney administration for giving us Obama. Without the depth of failures: the government that follows a doctrine of preemptive war, allows torture, is secretive and exploitative, is inept, is financially irresponsible, ignores science and trashes the environment as well as the constitution, and is basically dishonest—without all these failures the electorate of 2008 may not have seen the dire need for someone like Obama. I am reminded of the movie Gladiator and the stark contrast between the characters Commodus (Joaquin Phoenix) and Maximus (Russell Crowe). The glory that Maximus achieves would not have been his to earn without the treachery of Commodus. Without Commodus’ lack of leadership, Maximus would have returned to Spain to resume his life as a simple farmer. Indeed, without the destruction wrecked by Bush and Cheney, I am not sure that Obama would be our 44th president today.

Regardless, we were there. Yep. You can tell your grandchildren “I was there.”

Tuesday, January 06, 2009

In Anticipation of the Inauguration

I have contributed to Obama's bid for president since February 2007 (when he spoke at the Birch Aquarium in San Diego). I have given small amounts over these (almost) 2 years in the hopes that the policies of the current administration can be overturned. I embrace Obama's call to stop spending money on illegal wars and instead invest it in infrastructure, responsible energy policies, education, education, education, and healthcare. I celebrate this victory as a victory for all people, Americans as well as those who live outside our boundaries. I celebrate this victory for all party affiliates, Democrats, Republicans, and Independents. I celebrate this victory for all political leanings, conservatives and progressives. I celebrate this victory as a call to unite us in pursuing peace and prosperity. I celebrate this victory with pride. Thank you Barack for never wavering and thank you America for doing the right thing!

Saturday, December 06, 2008

Parlez-Vous Français?

Some years ago, in preparation for a two week sojourn to France, I decided to take up studying French. I had more than six months and a lot of drive. Obviously, fluency wasn’t a realistic goal, but I wanted to be able to carry on a simple conversation, such as “How much is the room?” “We’ll arrive on Thursday” and so on.

My quest was successful and since making another trip, I decided to brush off the cob webs and reacquaint myself with the cadence and vocabulary of this singularly fascinating language.

By revisiting some of my study materials, I’m able to look at the language from a fresh perspective. Had I known then (when I first started my French studies) what I know now, I would have saved myself some grief by investing in a bit of conditioning. I did not realize what a physically demanding language French is to properly pronounce. By physically demanding, I mean exactly that. American English is so relaxed, so lazy if you will, that we Americans are not prepared for the extreme physical demands that enunciating French requires of us. To be able to speak French properly, you must train. Here are a few basic exercises to get you started.
Note: Before beginning any new physical exercise program, please check with your physician, especially if you have any concerns about your current physical condition.

Let’s begin. Sit upright in a straight-back chair. Put your feet flat on the floor, about six inches apart and place your hands on your knees in a relaxed position. Make sure your back is straight and your shoulders are back, but relaxed. Tuck your chin slightly, close your mouth, and close your eyes. Relax all the muscles around your mouth. Think happy thoughts. This is the “base” position.

Now, slowly purse your lips together into a nice pucker. When you think you have it, push yourself past the pucker point into a downright pout. I know you guys are thinking “Wait . . . guys don’t pout.” And you may be right. But French guys pout, so just give it a try.

Here’s the tough part. You need to really strain your whole mouth here. You should feel muscles straining around your mouth, upper lip, and all over your chin. You should feel tension along your jaw line up to your ears. Your mouth will be slightly open. Take your hand and feel the tension in your lower face. This is the “pucker-pout” position.

Return to the “base” position and relax.

The next exercise starts at the pucker-pout position and morphs into a half-open “whee” form. Your tongue should be up against your pallet and a soft aspiration emits from your lips. Your mouth is in a half smile and there will be tension, this time in your tongue and chin. This is the “whee-smile” position.

Your training regiment should consist of several cycles starting at the base position, then alternate between the “pucker-pout” and the “whee-smile.” After a half a dozen reps, relax and return to the base position.

Serious Francophiles will want to build a workout routine to condition themselves before attempting to pronounce any words in French. I’m not sure how 3- and 4-year olds have the strength to speak French, but it just goes to show you that maybe we can learn something from the French after all.

Sunday, November 09, 2008

It's Obama!

Obama Yes We Did PosterThis historic election is still sinking in. Every morning I wake up and pinch myself.

Did America just really elect Barack Obama president? Did America really just demand a change? Did America really just do the right thing? Or, is it all a dream? (You see, we all have a dream.)

We spent the last two weeks traveling in London, around Belgium, and in Paris. We were in Paris for the election.

In Belgium (see here for my Belgian connections), Paul predicted an Obama victory and said that after the election he would wear his Obama for President hat and get his picture taken at the Arc de Triomphe. Our Belgian friends were rooting for us all the way. And even though we believed that Obama should win, we wondered what election irregularity would occur that would steal Pennsylvania like Ohio was manipulated in 2004 and Florida in 2000. We were cautiously optimistic.

Eiffel Tower, Paris

On November 4th Paul donned his Obama for President hat. We went up the Eiffel Tower (it was a sunny day) and then over to Sacré-Coeur Basilica to get a great view of the city. A few people shot encouraging comments and smiles our way. It is an understatement to say that all of Europe longed for an Obama victory. They have been watching this campaign with intense interest. After all, what we do affects them. A lot.

We heard that Harry’s New York Bar on Rue Daunou in Paris was a gathering for those interested in the U.S. Presidential Election. Ha! It was a veritable block party! The police barricaded the street, the bar was packed, and a long line of election watchers waited to get in. We met three young men from Paris who peppered us with questions about American politics. They were interested in our thoughts of Obama, would he prevail?Three Parisians watching the U.S. election results

As it turns out, Harry’s holds a straw vote every presidential election (Obama won). We stayed at Harry’s until 2:00am and when we left, there were no results yet.

Harry's New York Bar in Paris

Back at the hotel, we watched SkyNews and CNN. When Obama won Pennsylvania at 3:00am, we felt we could go to sleep.

The next morning, we turned on the TV just as Barack was giving his acceptance speech.

People will continue writing about this election for weeks. Where were you? What was it like? What were you doing? (My friend Tom hosted a poll in his garage in California and was just barely putting things away when the election was called.)

Sandy Banks, a columnist for the Los Angeles Times, printed the following text message a man sent to his mother, Margaret Kean, during the campaign.

Rosa Parks sat, so Martin could walk. Martin walked so Obama could run. Obama is running so our children can FLY.

And we all voted so Obama could win. Yes we did.Paul celebrating the Obama victory at the Arc de Triomphe in Paris

Wednesday, October 15, 2008

Dear Laura,

Laura's Empty ChairRemember that evening in November of 2006 as we watched the election returns and the Republicans were stripped of their majority in Congress? We (you, Fiki, and I) marked it as a moment of change, a moment of hope, a moment of demarcation, when better leadership would improve our country’s standing at home and abroad. We both embraced Barack Obama as someone who might make a difference.

In January 2007, you left this earth. I mourn your departure—my loss. You are at peace. You didn’t see how this promise is yet not fulfiilled. The thin 51-49 margin was not enough to change around our country. We continued to spend millions in Iraq. The sub-prime mortgage industry blossomed into a toxic cloud, raining pollution on our housing industry, leaking fumes to our traditionally steady financial institutions. We don’t know how it’s all going to turn out.

But tonight, Laura, I thought about you. I thought about how you said you’d vote for Barack if given the chance. You thought he had some good ideas, that he made sense when he spoke. In your rural North Carolina foothills—not the most progressive area in the country—you and Joop were shining flickers of forward thinking. Your involvement in your community, in education, in theatre and dance, imported from that city of all things artistic, New York, made you both respected citizens.

I thought about you tonight Laura, because, for the first time, I am truly hopeful that the dream we had that November in 2006, that pearl of inspiration that formed that night, might really happen. That ray of hope we saw may give way to a flood light of strength and decency and change. I wish you could see this.

When I vote, in my mind I will cast only ½ my vote and somehow delegate the other ½ to be from you. Because I know that’s how you’d want it.

Saturday, October 11, 2008

You Betcha

Obama supporter sighting in California
In the parking lot of our local Seaside Market, I spied this wonderfully decorated RV spouting Election '08 catch phrases. Hockey Parents for Obama. You Betcha.

Get out and vote!

Wednesday, October 01, 2008

The Rubik's Guy

Brooklyn BridgeHe held the Rubik's cube easily in his hands, his long slender fingers wrapped around its edges, twisting first one way then another. He moved fast, his eyes focused on each new pattern, quickly seeing multiple sides. When he got close to solving the puzzle, he paused to look at each side before launching into a new series of twists and turns. I watched him surreptiously from my seat on New York City's Uptown 5 Express metro. I watched him because he was so engrossed in the process. He wasn't playing video games. He wasn't listening to music. No. He was the Rubik's Guy. Young. Slender. Confident. Absolutely intelligent. Kind of like Obama, only younger.Grounds outside New York Public Library

Before we reached 42nd Street - Grand Central, he solved the puzzle. He held it momentarily, a pause of satisfaction, then proceeded to completely randomize the cube before stuffing it away into his pocket. All ready, presumably, for the next subway ride. How fun!

Friday, September 12, 2008

This ol' trailer ain't goin' nowhere

Cactus-laden trailerThis trailer caught my eye. I love how something that is suppose to move is obviously not going anywhere. The cactus blocking its way is sprouting new growth.