Saturday, January 01, 2011

New Year’s Day Labyrinth

Labyrinth at StoneStepsHow lucky we picked one of my favorite beaches for our low-tide run today. An extremely low tide on New Year’s Day 2011 gave sand artist Kirkos the opportunity to create a meditation labyrinth that was well attended. Indeed, parking was scarce and summer-like crowds milled about.
Labyrinth at StoneStepsPeople walked the labyrinth and brought items to help decorate this awesome artwork.
Labyrinth at StoneStepsLow tide provided plenty of beach for walkers, runners, and sand artist Kirkos.
Labyrinth at StoneStepsHere is Stone Steps Beach in Leucadia, looking north on a crystal clear (and sunny) New Year's Day. Happy New Years to all!

Friday, December 31, 2010

Culture Clash?


When life gets hectic, as only life can around the holidays, strange things happen. Early Christmas morning, I open up the ‘fridge and as I’m ferreting out the ingredients for our Christmas morning breakfast, I see a horrible sight. Way back under the deli meats tray is my prized chocolate pie brutally bludgeoned by a beer. Initially angered, I could only collapse in giggles when I realize that beer and chocolate pie make an utterly funny pairing.

But Coors Lite? This is easy to explain, but then again, not so easy.
I don’t always drink beer, but when I do, I prefer Dos Equis . . . or Sam Adams or Sierra Nevada Pale Ale . . . or anything but lite beer.
Never do I prefer Coors Lite. Okay, okay. There is one situation in which I do prefer Coors Lite. That is when I host (or play) beer pong. There. I said it. I do play beer pong (sometimes) and that is the reason that a Coors Lite beer landed in my prized chocolate pie. Well, that and the fact that my refrigerator was obviously packed to over-capacity.

For the record, although an ugly wound persisted after the beer can was extracted, a generous serving of whip cream fixed the pie up quite nicely. The beer was unscathed.

Monday, December 27, 2010

The Gift

Christmas time is here, and along with greeting cards, holiday parties, tree decorating, and lots and lots of great food, we all deal with gift giving. Society has long over-commercialized Christmas gifts and shopping, and we can easily lose the spirit of giving that embodies Christmas. However, I like to search through the torn Christmas wrappings and discarded bows and ribbons to find that nugget of Christmas spirit we all seek. This year I tell our family’s story of The Gift.

The story begins a few weeks before Christmas as invitations fly out to Christmas-themed parties. Both my twenty-something kids are attending the same gathering: An Ugly Christmas Sweater Party. Yes, wear that hideous sweater with garish yuletide motifs—a reindeer or a jolly ol’ Saint Nick. Extra bells or ribbons for adornments are a plus.

Now, my daughter has a particular problem or two. One, she finds it difficult to pick out clothing that is inherently ugly. Two, she ran out of time to scavenge the local thrift shops and second hand clothing stores. When her boyfriend’s mother volunteered to send her an ugly sweater, dear daughter said yes. A few days later, she received not one, but two ugly sweater candidates.

Well, apparently boyfriend’s mother has the same problem as daughter. The two sweaters she sent were perhaps a bit out of style. But they were not ugly. In fact, one was a soft red sweater with a fake fur collar. Would I wear this? No. But, at one point I am sure this sweater represented the height of wintertime elegance. The second sweater was a plain wool sweater-jacket with gold buttons. The shoulder pads screamed “no longer fashionable” and the straight cut was something, well, something my mother-in-law might like. In fact, daughter and I looked at each other and said, “Yes, Grandma would really like this. It’s perfect for Christmas.”

This red sweater-jacket was, in fact, in perfect condition. We took it to the dry cleaners for good measure and carefully wrapped it with paper and ribbon. On Christmas Day, Grandma opened her gift, fell in love with it, and immediately put it on. It fit perfectly. And it was a perfect Christmas sweater and a perfect Christmas gift.

Tuesday, December 21, 2010

Christmas Food Preparations

One year Christmas dinner was a thrown-together pasta, bread, and salad meal. My excuse was that we were in Cabo at the time. I don’t cook in Cabo. Other years we join the cousins at their home and my contribution is a pie or two. But this year Christmas dinner is at our house. I look forward to the planning and cooking. Indeed, hosting Christmas dinner is an honor.

Over the years I have relied on the Los Angeles Times Food editors as a source of great recipes and good food advice. The LA Times has perfected the turkey technique and I am now a fan. The recipe is easy and fool proof: dry brined turkey. Dry brining means that you salt the turkey with approximately one tablespoon for each five pounds of turkey, seal the bird inside a plastic bag, and let the turkey sit in the refrigerator for three days. The salt draws out the moisture, but the moisture and salt are then reabsorbed. When you roast the turkey, the meat stays moist.

Fresh rosemary sprigs
This year I’m adding fresh minced rosemary and thyme to the salt. We shall see, but this should impart a subtle rosemary-thyme flavor to the meat (not just to the skin). The turkey is sitting in the refrigerator, absorbing flavors right now. I just need to turn it and massage it once a day.

Another LA Times classic recipe is Mom Parsons’ Cranberries. I love this recipe. You can make the cranberries days ahead, stick them in the refrigerator, and forget about it. You start with a bit of sugar and water combined with whole cloves, allspice berries, and cinnamon sticks in a saucepan. When the sugar is dissolved, you add the cranberries and cook them until they just pop, about five minutes. You then add the zest of one orange—leaving your hands with the sweet smell of orange just to remind you of the yummy food coming your way soon!

Cranberries popping

Sunday, September 05, 2010

Out of State Coffers Feed Proposition 23

In the 2008 presidential election, I was distracted and excited about an Obama victory. In the midst of a European trip, I was in Paris on Election Day and the following day. We whooped it up, happy to celebrate the change in administration. I pretty much ignored Proposition 8. I didn’t pay too much attention to Prop 8 because I thought: This is California. We are a progressive state. We frequently lead the nation in social and environmental issues. I voted against Prop 8. What’s the problem?

The problem, as it turns out, is that out-of-state money helped fund blatantly false ads that scared people into thinking that . . . oh, I don’t know what! That gay marriage would not only undermine heterosexual marriage, but that gay marriage would undermine our society as a whole.

Fear is a powerful motivator and spending money to spread fear can help the fear mongers’ cause.

Two years later, we have another proposition on the ballot, another proposition being funded by out-of-state interests, and another proposition whose passage depends on fear mongering. I’m talking about Proposition 23. This ballot measure would suspend California’s Global Warming Law (AB 32) until the state’s unemployment rate drops below 5.5% for four consecutive quarters.

The Global Warming Law’s aim is to cut state’s emission of greenhouse gases to 1990 levels by 2020 by developing alternative fuels and generating electricity from solar, wind, and other (other than fossil fuel) sources.

The supposed reasoning behind Prop 23 is that AB 32 will cost jobs and we can’t afford to lose jobs right now. So, let’s just temporarily suspend AB 32 until our unemployment drops. It doesn’t sound too unreasonable.

There are a few problems with this logic. One—California’s unemployment hasn’t dropped below 5.5% but three times in the last 30 years. This proposition doesn’t suspend AB 32; it cancels it. Two—the real opposition to AB 32 and the real support for Prop 23 comes from out-of-state big oil. These out-of-state companies don’t really care about California’s unemployment figures. They really care about the profits of their own companies. And, they certainly don’t care about addressing the issues surrounding global warming. In fact, they would like you to believe that global warming doesn’t exist.

Two Texas-based oil companies have mostly financed Prop 23: Valero Energy Corp. and Tesoro Corp. Now, according to a September 4 Los Angeles Times article, a subsidiary of Koch Industries recently contributed $1 million to support the passage of Prop 23. Koch Industries owns refineries in Alaska, Texas, and Minnesota. It controls about 4,000 miles of oil pipelines.

Here are more facts about the supporters of Prop 23 according to the above article:

So far, the Proposition 23 campaign has raised $8.2 million, of which 97% has come from oil interests and 89% from out of state.

Also, according to the same article, billionaire brothers David and Charles Koch (owners of Koch Industries) have

“helped finance efforts to develop arguments denying that global climate change is a real phenomenon.”

Any job losses that occur as a result of AB 32 will be short-term as we create jobs to fuel an alternative energy-based economy. The fear mongering will say that AB 32 will cost California jobs and that global warming is not real.

Please, follow the money. Don’t let out-of-state big oil scare you into voting for Prop 23.Vote NO on Prop 23.

Thursday, June 10, 2010

Sweet Land of Liberty

I weep that this proud symbol has come to represent a nation that tortures

Two and a half years ago, I wrote a post decrying the practice of torture by the Bush administration. Way back in 2005 I participated in a letter-writing campaign and wrote a letter to then President Bush protesting water boarding and other “enhanced interrogation techniques.” I received a response from the White House, full of fluff and, well, hot air. Here is a portion of the reply:

"The President has repeatedly affirmed that he does not condone torture in any circumstances, and he has also directed our military personnel to treat all detainees in their custody humanely. American personnel are also required to comply with all applicable United States laws, including the Constitution, Federal statues, and our treaty obligations."

The response itself enraged me to the point that I wrote the above-mentioned post. 2005 seems like a long time ago. We now have Obama as our president, and still the war in Iraq and Afghanistan drags on. We are supposed to be making America safer, yet I can’t help but feel that we’re making America less safe as our fighting and drone attacks kill many innocent people. I can’t help but thinking about all the investments we could be making in our educational system or our healthcare system or our infrastructure with the money we spend on wars, creating jobs while improving our country.

And then an article appeared in the Los Angeles Times that described a report prepared by a group called Physicians for Human Rights. The report is the accumulation of analyzing public U.S. government documents dealing with the treatment of prisoners in U.S. custody during the Bush Administration. You can read the full 30-page report here. Apparently, a strange catch-22 situation presented itself to the legal and administrative authorities of the Bush Administration. Here it is:

The well-known Department of Justice Office of Legal Counsel (John Yoo, Deputy Assistant Attorney General, Department of Justice, Office of Legal Counsel) redefined torture by establishing legal thresholds for torture acts such as water boarding, stress positions, prolonged isolation, and sleep deprivation. These acts of torture were deemed legal as long as interrogators did not cross the threshold for “severe physical and mental pain.”

Well, okay, that sounds mighty fine. So, how do you make sure that you don’t cross the threshold for “severe physical and mental pain?” Easy. You get some physicians, medical doctors (you know, those people who study many, many years to learn to heal the sick and above all do no harm?) and you have these physicians monitor the enhanced interrogation sessions and as soon as you’ve crossed the threshold, then you stop!

Well, no, you can’t do that. Because then you’ve crossed the threshold and now you’ve committed a crime—torture.

Okay, here’s another tactic. You get some physicians, medical doctors (you know, those people who study many, many years to learn to heal the sick and above all do no harm?) and you monitor each session very carefully. You keep accurate data. You can measure physical and psychological impact of the interrogator’s “enhanced” interrogation techniques and as you collect data, you can provide a clear basis for a legal defense against possible torture charges. This medical monitoring demonstrates to all clear-thinking, freedom-loving people a distinct lack of intent to cause harm to the subjects, uh, detainees.

Well, this well-thought-out plan to protect interrogators from violating any torture laws, the very foundations of the supposed defense (the medical monitoring), effectively violates “well-established legal and ethical codes” protecting prisoners (or anyone actually) against human experimentation. Quoting the PHR report: “This current report provides evidence that in additional to medical complicity of torture, health professionals participated in research and experimentation on detainees in U.S. custody.”

Hey, do you know what one tidbit of torture information they found out? (This is really useful stuff, so pay attention!) If you administer a water boarding session, you should use salt water instead of fresh water. Fresh water increases the risk of hyponatremia, a condition of low sodium levels in the blood (too much water, not enough salt), which can lead to brain edema and herniation, coma, and death. Now, how did they figure that out?

Are you sick yet?

Friday, April 02, 2010

Healthcare Reform: Yes We Can

Recently I participated in a virtual town hall meeting led by my Congressperson, Representative Bilbray. The phone-based town hall consists of constituents listening in and posing questions or bringing up issues. Bilbray also asked us to choose our top-priority issue out of five possible topics. I chose Issue Number Two, health care reform as my number one issue. Among the choices was, of course, immigration reform. (I say ‘of course’ because Bilbray always brings up immigration reform; indeed, that was the mainstay of his successful election campaign.) Immigration reform is an important topic in southern California.

I stayed on the line listening to questions posed by constituents. A woman in her forties was concerned about health care costs. I know. I am self-employed and have paid for my own health insurance for years. Health insurance is a large portion of our monthly expenses, our deductable is quite high, and it goes up every year. But Bilbray does not support health care reform. (Actually, he claims that he does. He supports letting you purchase your health insurance across state lines.)

A retired nurse came on the line next. She complained that illegal aliens appeared in large numbers in emergency rooms with sniffles and fevers, looking for medical care. “When are we going to stop providing medical services for illegals? I go in there and see so many Mexican people.” I was shocked at the obvious racism of this woman and Bilbray’s response (I am paraphrasing). “The problem is that the federal government has mandated that hospital emergency rooms must provide medical services to anyone, regardless of whether they can pay or not and regardless of his or her citizenship.” This is true for emergency medical care, but not for non-emergency medical care. How can someone in the medical profession embrace the concept of denying medical treatment to anyone? Aren’t we all people? Where is your compassion, woman? As I listened on the phone, I wondered where the humanity had gone. Do we need immigration reform? Yes! Should immigration reform begin by denying emergency medical care to illegal immigrants? No! First of all, as an emergency room attendant, can you imagine denying coverage to a dying patient (regardless of her citizenship) because she can’t produce papers proving her status? Do you carry your birth certificate or passport with you at all times? Oh, I’m sorry. Perhaps you’re not worried about that because you aren’t Mexican American? When I hung up the phone I was saddened that the solution to health care reform should be dumped on illegal immigration.

I have called Bilbray’s office numerous times as a constituent asking him to support health care reform. He doesn’t think that the government is capable of providing effective health care. He thinks the American health care system is basically just fine the way it is.

What’s wrong with the Canadian system? They spend less on health care, have a higher life expectancy, have less uninsured people, and are healthier.

Here is some data from a recent (2007) study. (Peterson, Chris L. and Burton, Rachel, Domestic Social Policy Division. Congressional Research Service: U.S. Health Care Spending: Comparison with Other OECD Countries. September 17, 2007.)

The United States spends more money on health care than any other country in the Organization for Economic Cooperation and Development (OECD). The OECD consists of 30 democracies, most of which are considered the most economically advanced countries in the world. According to OECD data, the United States spent $6,102 per capita on health care in 2004 — more than double the OECD average and 19.9% more than Luxembourg, the second-highest spending country. In 2004, 15.3% of the U.S. economy was devoted to health care, compared with 8.9% in the average OECD country and 11.6% in second-placed Switzerland.

How does the U.S. life expectancy compare to these countries?

The average life expectancy for a person in the United States is 77 ½ years — slightly below the OECD average, and 4½ years less than top-rated Japan. Life expectancy is nearly 2½ years longer in Canada than in the United States. The United States is ranked 22nd out of 30 countries on life expectancy at birth, but once people reach the age of 65, U.S. life expectancy improves to a rank of 11th for men and 13th for women out of 30 countries reporting.

I, for one, am glad that Congress passed health care reform. I am glad insurance companies can’t deny coverage for pre-existing conditions. I am glad that if I get sick, my insurance company can’t cancel my policy. Maybe now some of these people flocking to the emergency rooms for non-emergency situations will be able to get health care and go see a primary care doctor instead of an emergency room physician.

Tuesday, January 05, 2010

Does Avatar have lessons for us?

I have seen James Cameron’s 3D spectacle Avatar and I am a fan. The advanced technology it uses to create and animate the graceful beings on the moon-planet Pandora bring non-human forms to life with human-like facial expressions and emotions. Actors wearing specialized headsets with cameras recorded their emotions as they spoke and showed fear, anger, tenderness, curiosity, and even love. This digital information was then processed to create the vision we see on the screen. The audience relates to 10-foot blue-skinned people, the Na’vi. These are not cartoons we’re watching, but human-like aliens. Besides the people, Cameron also created a whole world with its floating mountains, communicating trees, and unique plants and animals. The Na’vi are basically hunter-gatherers, who tame, but don’t really domesticate, flying horse-like creatures that help them hunt.

The human (presumably American, but this is 2154, so who knows?) military-corporate complex is the evil intruder set on mining Unobtainium (a ridiculous name, but it is apt) at all costs, including the destruction of the Na’vi people. Scientists who have studied them are present for the appearance of good intentions only. The corporate president and the military commander are both unabashed stereotypes, sadly spouting rhetoric similar to our own military justification for the invasion of Iraq (yep, “preemptive” included), our long disastrous military presence in Vietnam, and our present quagmire in Afghanistan.

The lesson that Avatar seems to offer is that we (American military presence) should just go away. But today’s Los Angeles Times front page offers an intriguing alternative. A Los Angeles-based nonprofit, International Medical Corps, goes into areas that need its services and these places are typically war-ravaged with little or non-existent medical services. Medical personnel are able to go into these areas because they refuse to take sides. They work with the Taliban in Afghanistan as well as other community members. They have a presence in other countries as well. Besides providing medical care, they also train local people. This allows medical services to continue even after International Medical Corps people leave.

It seems that we have been trying to rebuild both Afghanistan and Iraq for years. But we’re rebuilding with tanks and guns and troops and helicopters. The Iraqis don’t “hate us for our freedoms.” They hate us for our guns and destruction.

So, let’s pull out all the troops and bring in medicine and doctors. Let’s build schools and hospitals, not military bases and war rooms. And while we’re at it, maybe we can also figure out how to provide health care for Americans too!

Enjoy Avatar!

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