Friday, November 13, 2009

Saying goodbye to zembly

I was involved with the leading-edge web site, zembly, beginning in fall 2007, writing example widgets, applications, and data services for the companion book ‘Assemble the Social Web with zembly.’ zembly, the brain child of Todd Fast, began at Sun Microsystems as a web-based social development environment, enabling users to write widgets and other software. The site automatically keeps track of versions and publishes code, deploying the services and widgets for you. You can share the widgets, embedding them in web pages or posting them on sites such as Facebook. The site also lets you build and deploy Facebook applications. The book was published early this year and we presented a sold-out Hands-On Lab at JavaOne in June. Sadly, the site announced its closure this week. Besides thoroughly enjoying the time I spent coding applications on zembly, I really appreciated the interaction with the zembly folks, including Todd, Chris Webster, and especially Jirka Kopsa.

I have two favorite examples I built for the book. One is a Facebook application, Capital Punishment, which helps you learn the world’s capitals using a 20-question multiple choice quiz. Capital Punishment Facebook applicationYou see each answer mapped using Google maps. It includes all the usual social features of Facebook applications—challenging friends and letting you compare your scores with your friends.

Probably my favorite is a widget that shows you how to navigate the London Tube. It maps the station sequence (with Google maps), drawing a color-coded line (matching the tube station colors) to each station. London Tube WidgetThe data comes from tubeplanner.com, via Dapper. With Google maps, you can follow the route. Markers locate the stations and information windows tell you the station name, line, and where you need to change lines.London Tube Widget destinationIt's tough saying goodbye to zembly. It will be missed by many!!

Thursday, November 12, 2009

Fighting for choices in alternative healthcare

I am one of the many people who regularly use and passionately embrace alternative healthcare. Yes, I still make annual visits to my OBGYN and see traditional doctors for acute injuries. But I visit my chiropractor for illnesses such as colds, the flu, any back or leg aches. I haven’t taken any antibiotics for 20 years until this year (ear infection from body boarding in the ocean). I take vitamins regularly, including fish oil.

In their Health section this week, the L.A. Times published an article (Alternative medicine becoming mainstream by Tammy Worth, November 9, 2009) describing how more and more people (not just the ‘out-there fringe’) are taking advantage of alternative healthcare. The article is a caution for those who choose to follow alternative healthcare, with these three broad points:
“Then there’s the issue of safety” meaning that vitamins and supplements don’t go through the rigorous approval process of the FDA.
Until the medical industry separates itself from the profit motives of the pharmaceutical industry I don’t think traditional medicine can criticize alternative healthcare. We are constantly bombarded with ads for pharmaceuticals on television and in magazines. The possible side effects always seem worse than the original problem. Somehow people think that if you list the side effects then it’s okay to take the drug (even when possible side effects include death!).
Only one-third of people who use alternative healthcare discuss their treatment with their physicians.
This does not surprise me. I tell my doctor about the vitamins I take and the treatment I follow from my chiropractor. Usually this admission is met with derision. I always feel like my doctor and my chiropractor should work together to provide the best of both worlds for me. But, it is up to me to judge the treatments of both alternative and traditional medicine and pick and choose myself. I’m not happy about that, but I see no other choice. I’m certainly not going to give up either form of healthcare.
“I think people using alternative medicine are wasting their money and are being fooled into thinking they are getting something that is beneficial for them.” (Dr. Jerome Kassirer, distinguished professor at Tufts University School of Medicine and former editor in chief of the New England Journal of Medicine.)
Uh, maybe this is why more people don’t discuss alternative healthcare with their doctors! Unfortunately, Dr. Kassirer’s broad dismissal is not uncommon among traditional healthcare providers.

I look forward to the day when the medical industry becomes more open-minded and chiropractic and other alternative treatments are given a well-earned place in mainstream healthcare.

Thursday, October 01, 2009

Not In My House

Photo by Tom Mills
Congratulations to the Padres on an exciting game, denying the Dodgers' celebration at PetCo. LA Times sports writers gave no credit to the Padres for the win, but we know--we saw--amazing pitching, hitting, and most of all, great defense. Labeled the likes of "lowly Padres" and "next-to-last-place team," opponents don't seem to quite realize how well the Padres have played in August and September. Cabrera may make an error, but he more than makes up for it with dazzling plays. In fact, sometimes I think he makes an error just so he can initiate the double play for the next batter. And, what's with the wrestling move, (ex-Padre) Loretta?

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 (screen shot) at a rotating photo carousel that displays photos from Flickr.
JavaFX Photo Carousel Screen Shot

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 a screen shot of an example that animates Circle nodes along three separate paths hooked together: the Chute, the Ground, and the Ladder.


Chutes and Ladders Screen Shot

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 screen shot of 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!