I was supposed to run last night, but it was 28 degrees out, so I waited till the morning.
Not the early morning -- about 9:30 to be exact. But around my household, that's pretty early.
Day 3 of the Couch to 5K program calls for: 5 minute run 3 minute jog 5 minute run
I stretched it to about 5 / 4 / 6. I didn't have my watch with me so I can't be sure.
When I finished up, I found a big puddle outside my house completely covered with a thin sheet of ice. Reminded me of being a kid in Lodi. On cold nights, we'd get out the hose and make big puddles to see the ice on them in the morning.
This was the first exercise day I felt like I was pushing myself. Toward the end of the jog segment, I was winded and wheezing, experiencing a bad side ache and just feeling generally out of shape. I think it was a combination of things that made me feel this way:
morning tiredness,
no energy because I hadn't eaten,
dehydration from not drinking any water before I left, and
the cold (it's still only 32 degrees).
Is that enough excuses? But despite all the excuses, I did complete my goal. Once again, as on Day 1, I am coughing quite a bit, hacking from congestion.
The good news is this was the first day of the three that I haven't felt any pain in my joints. On the first two days, my knees and ankles were giving me some grief. Bad knees have plagued me since high school when I broke my knee playing basketball in gym class. Last time I tried to start up a running regime (about 3 years ago), I had to stop after a couple weeks because of my knees. That's actually one of the reasons I wanted to try the Couch to 5K program -- an associate at a former job told me it was the best way of gradually getting old and sore joints into shape.
Good post-run stretching is also important. Stretching also improves flexibility in general which is always a plus.
So far, so good, but then again, it's only Day 3. Cough, cough.
Following last night's State of the Union address, I watched a little bit of analysis and interviews on two different news channels. Both channels had a brief interview with David Axelrod, Obama's Senior Advisor. He answered all of the questions with essentially the same answers, apparently having his own agenda and message to push forward.
What was interesting to me were the questions.
On one channel, the questsions took the form of:
"David, how do you think the President reacted to the growing feeling among Americans that he and all of his staff and advisors are losing touch with America?"
"David, with last week's election of Scott Brown to the Senate and concerns about the possibility of the Democratic party losing their majority in Congress, do you think the President was taking a more centrist approach?"
"David, the fact that the President waited until half way through his speech to bring up health care ... does that indicate to you that he is ready to abandon his efforts to push through his unpopular health plan?"
And, on the other channel, the questions were like:
"David, our polls show that almost 70% of Americans had a positive reaction to the President's speech. Do these numbers surprise you?"
"David, the President did not bring up health care until almost half way through his speech ... does this indicate that he views other items as being higher priority to the American public?"
That first channel was the one I was watching just as the speech ended. The analyst's very first words after the speech:
"Well, it seems quite apparent that the President is taking a more moderate approach following the recent election of Scott Brown to the Senate and the increasing likelihood of the Republicans taking over control of Congress in November."
What disturbs me about all this is that the media is not at all on board with Obama's pleas to Washington to put politics and partisanship in the back seat while they work together through some important issues. I can't say with certainty but I would wager that the vast majority of Americans, regardless of which party has power, would like to see Washington make progress on health care, education, the economy, alternative energy, and the housing crisis. Are there Americans who are so partisan that they would rather see nothing done than see even small victories won by the other party in achieving goals consistent with their own? As Obama clearly stated, this is the current state of affairs in Washington. Too many politicians have an "America loses, I win" attitude. Can Republicans afford to compromise on any issues, if by doing so, they run the risk of increasing Obama's approval rating?
I can't remember a time when Washington was so stymied by partisanship. I have 100% confidence that if a Republican replaces Obama in 3 years, partisanship will dissipate as Democrats in Congress concede graciously and work to accomplish what they were elected to accomplish. It's a truly sad state of affairs and I'm not sure there's any easy answer. The only way to get a Republican Senator to work with the other side would be for the electorate to rally behind America's goals and force their representatives to take action if they want to be reelected.
I don't hear Obama saying much of anything controversial. He wants to work with both sides, he wants compromise. Mainly he wants things to happen. I can understand this, the way things are going right now, he may be a one-term president who accomplishes nothing more than breaking the color barrier to entry to the highest office. I'm amazed by how many people in this country refuse to acknowledge that there is a problem with health care. They've gone beyond criticizing Obama's plan to now firmly believing that America's health care system is perfect. I'm not making this up, I've spoken to these people at the Post Office in the very conservative little town I live in.
If there's no problem with health care, then why couldn't I get insurance for my family three years ago when I was out of work? I was a healthy man in my mid-40's with a healthy wife and three healthy children. According to the insurance company, it was because my wife had two ongoing prescriptions and because I had visited the doctor for a cold in the previous 12 months. I was forced to form a corporation and get a group plan, for which I pay almost $1000 a month. I've paid close to $100,000 for health insurance in the last 10 years. And yet, whenever I go to the doctor or the pharmacy, I'm still digging deep to pay the copayments. Then when the doctor's bill comes, they've got an unimaginable fee listed for services; this number is whittled down by what the insurance company agrees to pay with no argument from the doctor, who is just playing along with the system.
Unlike so many "uninsurable" Americans, I was lucky to be able to afford to incorporate and get group insurance, but the experience told me that something's wrong with health care in this country. I'm not saying I like Obama's plan. All I'm saying is, let's all agree that there is a problem and move forward toward a solution. Too many people are in favor of just ignoring the problem altogether because they don't like the plan that's on the table.
It didn't rain at all today. It was really quiet and still outside tonight.
Good night for a run. Or, in my case, a walk and a run.
Day 2 of the Couch to 5K program is the same as Day 1: 5 minute walk 2 minute jog 5 minute walk
It was definitely easier than Monday, and I didn't end up coughing at all. Not sure if that's because I got it all out of my system or maybe the air is different. After all that hacking on Monday night, my sinuses felt cleaner than they had in a long time. I felt extremely refreshed.
I did my 12 minutes tonight, then did some stretching and then put some salmon in the oven.
I liberally covered the fish with a Texas-style mango pico de gallo, some Tapatillo sauce and salt and pepper. I'm also steaming some zucchini and yellow squash splashed with olive oil and salt and pepper.
I really like to cook, but I'm the only one in my household that eats regular food, so I can only cook for myself.
When you're doing any sort of intentional exercise at all, it's impossible to eat badly because it makes you feel like all that work you put in on the exercise is for naught.
So, it's been almost exactly five months since we moved to Texas.
I weighed myself the other day and found I was about 35 pounds overweight. Since my ideal weight is about 205, an extra 35 pounds is like 20 pounds on a smaller man. But still, I consider myself as borderline fat right now. I was about the same weight two years ago and then I spent six months getting into shape. I got down to about 210 and was doing a regular routine of cardio-lifting. Exercising tended to make me want to eat right as well, so I was tracking calories and reading labels. I felt awesome.
But I faltered and gained just about everything back in less than the time it took me to lose it.
Then, as we were preparing to move to Texas, I did quite a bit of exercise for a couple months (painting, cleaning, packing), and was feeling fairly trim. However, Texas is all about lots and lots of really tasty meat and other fatty snacks, so it didn't take long to get back to a pretty uncomfortable heft.
Today I decided to gradually work into shape again. Unfortunately all of our workout gear is in storage in a POD in California and isn't scheduled to make the trip out here until April. So, for now, I'm just starting with some jogging.
I decided to try the Couch to 5 K program, which I'd heard good things about, so according to plan, today I walked 5 minutes, jogged 2 minutes and walked another 5 minutes. The symmetry is cool, because you can just walk 5 minutes away from your house, jog 1 minute, then turn around and come home.
I set off walking at a pretty brisk pace, and found myself breathing hard after about 2 minutes. I did not feel a great deal of exertion though, even after five minutes, but then came the jogging. Two minutes of jogging at a moderate pace and I was winded. It took the entire five minute walk home to recover. Then I did some stretching and took a shower.
But here's the thing that always baffles me about starting to exercise when I'm out of shape. Once my heart rate was back to normal, I started coughing and hacking like a pack-a-day smoker, but I don't smoke anything ever (at least not in the last ten years). Where is all this phlegm coming from? This condition definitely hammers home how out of shape I am. TWO MINUTES OF JOGGING and it takes me almost two hours to feel relatively calm and normal afterward.
It's not pleasant to be coughing and realizing how much work it will take to get in shape, but on the other hand, it sure feels good to have started to do something about it. Exercising has always been a love-hate relationship for me; I don't believe I've ever exercised consistently for more than a year consecutively, and over the course of my adult life, the periods of time that I haven't exercised probably outweigh the times I have by a factor of three or four to one.
There's something to be said for a job that forces you to exercise. When we flipped a couple houses in Tustin, I was working very hard every day for months, doing concrete, tile, drywall, framing, painting, cleaning, fencing, and landscaping, and I was definitely in as good a shape as I'd ever been. It didn't feel like exercise because it was my job at that time. I think computer programming is possibly the single job with the least exertion of any other on the face of the earth. A computer programmer sits very, very still for most of the day, moving only his fingers and eyes. A programmer's best work gets done when they exert the least amount of energy. Meetings, phone calls, going to lunch, anything that requires physical exertion detracts from writing code. And the worst part is, the more involved you get in the code you're writing, the harder it is to want to get up and do anything; you want to work until it's done. Today I worked 10 consecutive hours and spent about 9 hours and 45 minutes of that time sitting quietly at my desk.
According to plan, I should be doing the same 5 minute walk, 2 minute jog, 5 minute walk on Wednesday, but the forecast calls for rain, so we'll see what happens.
U.S. CO2 emissions fall 2.8% in 2008
May 21, 2009 Source: mongabay.com
Carbon dioxide emissions from fossil fuel use in the United States fell
2.8 percent in 2008, the largest annual drop in more than 20 years,
reports the Energy Information Administration. A slowing economy and
high gasoline prices contributed to the decline.
Emissions fell for all major fossil fuels: emissions from
petroleum fell 6 percent, natural gas dipped 1 percent, and coal
retreated 1.1 percent.
Emissions also fell across most end-use sectors including
electricity generation (down 2.1 percent), industrial use (down 3.2
percent), and transportation (down 5.2 percent). The only sector to see
a rise in emissions was commercial, which increased 0.5 percent.
Despite the largest decline since 1990, the transportation
sector remained the largest end-use source of energy-related CO2
emissions. Since 1990, transportation sector carbon dioxide emissions
have risen by 21.1 percent — 1.1 percent per year.
The carbon efficiency of the economy also improved, with emissions per unit of GDP dropping 3.8 percent in 2008.
U.S. emissions from fossil fuel burning in 2008 were 15.9
percent above the 1990 level (the baseline for the 1997 Kyoto Protocol)
and 2.8 percent below the 2005 level (the baseline proposed under the
American Clean Energy and Security Act of 2009 [Waxman-Markey bill]).
Problem: rich:modalPanel doesn't display/update data from backing bean
Possible Solution: This one has taken me weeks to solve. But finally, with the help of Max Katz, author of Practical Rich Faces, I was able to tackle it. There are many reasons why you might be having these problems. Your best bet is to go take a look at a tutorial that Max wrote on using a rich:modalPanel to allow editing of data in an underlying page. Max' solution even allows you to reRender just the row that was edited. I extended the code to allow adding a new entity as well. Click to see the tutorial.
If you have problems with the tutorial, Max is pretty good about answering comments/emails.
Max is also conducting free webinars on Rich Faces for redhat/Exadel. You can view the previous sessions and register for the upcoming sessions by clicking here.
Possible Solution: This error can occur for a number of reasons. I suggest that if my solution doesn't help you, then you keep doing google searches. There's a lot of different forum posts about this one, and there's a lot of different problems that can cause the error message.
I was getting this error (apparently) because I was bi-jecting a Seam entity though multiple session beans. When I changed this to bi-jecting just the id for the entity and then doing an entity manager lookup using the id (in each of the session beans), the problem went away. I worked on this for a long, long time, and when I found a solution that worked, I was happy to just stick with it. However, I don't believe that this is the absolute correct solution, because it means doing a database lookup on the entity each time a new page is displayed.
Anyhow, right or not, here's the details. I had a Seam entity called coupon, defined in Coupon.java. My first screen is a table to look up the coupon to work with. Previously, I had this screen's session bean setting an out-jected conversation context variable called selectedCouponObj. Then, the next screens would inject selectedCouponObj and work with it. Note that this actually worked as far as getting and setting the values inside the object. BUT, as soon as I did an entityManager.persist(selectedCoupon), I'd get the detached entity error.
So, the fix was: instead of out-jecting and in-jecting the Coupon itself, I out-jected and in-jected the Coupon id: selectedCouponId. Then, I' set the selectedCouponObj in each session bean by calling selectedCouponObj = entityManager.find(Coupon.class, selectedCouponId)
Like I said, this does not seem like the ideal solution, but it worked for me.
I have recently discovered the very talented Imogen Heap, shown here performing Goodnight and Go, in April, 2006 on David Letterman, and in the video of It's Good to Be in Love from the 2002 album Details (recorded as Frou Frou).
Error: value bound to h:selectOneMenu doesn't get set
Possible Solution:
This problem has given me serious problems on three different occasions. To summarize the problem, I've created an h:selectOneMenu control on a form. I've set the value attribute to be a property of a Seam component. The value is supposed to serve a bi-directional purpose. If it is non-null when the control is rendered, then the specified value will be selected in the resulting combo box. I haven't had any problems at all getting this to work. The problem is with the other direction. When the user selects a new item in the combo box, the property in the value field is supposed to get set using the class setter for the property.
So, I've had several issues, including just not understanding some things. I will try to document them all here.
The name specified in the value field should be a Seam component property, NOT a Seam context variable. For example, you should probably be using value="#{myList.selectedValue}" AND NOT value="#{selectedValue}". The first way will call the setSelectedValue() method of the class corresponding to the myList Seam component. The second will get the correct value when rendered, but I don't believe it will result in setting the value when it's changed. But I might be wrong about that.
The name you specify must equate to a Seam component name (i.e. something specified as @Name("name"). So, in the example above, you would need a class with @Name("myList") that defines a selectedValue property and implements a getter and setter for the selectedValue property. Note that if it's an EJB3.0 bean, then you will also need to define the getter and setter in the corresponding interface.
Of course, you're probably going to want to promote the changed value to a Seam context, so you'll probably declare the selectedValue property as an outjected context variable by placing an @Out annotation above the property declaration.
This to me was one of the trickier points that I did not see documented anywhere: the setter method is NOT called when the user selects one of the items in the combo box. Coming from a heavy JavaScript background, I assumed I'd see the setter get called each time I changed the combo box selection. However, instead, the setter is only called when the page goes away. Note, that if you have commandLinks on the page that rerender the page, that will also cause the setter to get called. Hence, the value should remain set after a rerender. The setter gets called whether the destination page is the same page or not. So, if you're debugging and trying to follow along, don't expect the setter to get called until a button is pressed.
This one was also tricky for my JavaScript-addled brain. The valueChangedListener attribute is NOT used to specify a method that gets called when the user selects a new item. The valueChangedListener only gets called when the property value changes.
Now for the most tricky point of all. THE selectOneMenu control MUST RESIDE IN THE SAME FORM AS THE BUTTON WHICH IS USED TO EXIT THE PAGE!!! I spent about eight hours trying to figure this one out. My page had two separate forms, one of them for my wizard-style buttons (because they are defined in a template.xhtml). I finally discovered the cause of the problem when I realized that one button on the page that just did a reselect of data for the combo box DID result in calling the setter, but the other button (to go to the next page) DID NOT!!. Once I put all the buttons into the same form as the combo box, it worked perfectly.