Quote of the Moment

Anyone who mails me a quaesdilla (I don't care how it's spelt :p) gets eternal love... they sound so tasty :'( -Francis
(moar?)

Feel the burn

An intriguing proposition

At the beginning of this semester, we always get a lot of "OUMM"— OU Mass Messages— in our e-mail boxes. Most of them either don’t apply to anyone but a select few, or are things that I knew already. One of the messages, however, caught my eye…

Paid Exercise Study

The department of Health and Exercise Science is looking for volunteers for a 12-week study examining the effects of a 10-calorie energy drink (Celsius™) on fitness, percent body fat, and nutritional profile.

What’s in it for you?

  • $200 for participating
  • Accurate body fat measurements and fitness evaluation
  • 10 weeks with a certified personal trainer
  • A chance to lose body fat and get in great shape

What does it involve?

  • Consume one energy drink per day or one placebo per day for 10 weeks.
  • Choose exercise or non-exercise group:
    • Exercise: 25-35 minutes of training 5 days per week
    • Non-Exercise

Why sure, oink oink

I’m not particularly physically active (I play racquetball on occasion and like to bike, but do it less than I used to) for a couple reasons. Truly, the least important reason is the work involved; that doesn’t bother me so much. Much more annoying are the time commitment and the boredom of biking or running on a stair machine. A secondary reason was that I really don’t know what I’m doing in the gym, especially with regards to weight training… how many reps, how long, what weight, even proper form. As a result, I pretty much never hit the gym; my exercising is limited to biking to classes and such. If I participated in the study, I would find out exactly how I should be exercising, and that was way more valuable than the physiological side of things to me. So I replied to the e-mail and told them I was interested!

This won’t hurt a bit

I went in last Thursday at 5:30 a.m. for Body Composition testing— basically an über-physical that looked at body volume, body fat %, lung capacity, residual lung capacity (how much air is left after you get rid of all you can), X-rays, and more. One of the testers commented that the tests cost almost $1200! I started fasting last Wednesday about noon, and I didn’t sleep all night either, so by the time testing was over about 11 I was drained. I went to our health center, Goddard, for a blood draw (first time I’ve ever had blood taken, but it wasn’t bad), and after that I could finally eat and drink. Mmmm food hadn’t tasted so good in a long time. Then I slept all afternoon and again the whole night!

Bop till you drop

Last Friday was “max testing”— designed to test to see how far I could push myself. First, I rode a bike while the wattage increased slowly every few seconds. I was hooked up to all sorts of monitors, including a sort-of SCUBA mask that measured O2 draw and CO2 exhalation. I made it to 240 watts and started blacking out, but thankfully that was farther than most of the guinea pigs had gotten! (Yes, my ego still requires me to feel like I’m at least above-average, even in an area where I am admittedly extremely weak :D ) Then they tested bench-press and leg-press by adding more and more weight until I couldn’t lift anymore… and I am totally not admitting how much little I could lift.

In for the long haul

Now I’m in a regimen 5 days a week. M – W – F is cardio training on a bike. T – R is strength training, on bench press, leg press, curls, pulldowns, and more. As someone used to biking (especially back in high school when I would regularly do hundreds of miles a month), the cardio training is not disagreeable (yet— they say they’ll ramp it up soon). The weight training is brutal though. I’ve only done two sessions, and I’m more sore than I’ve ever been in my life. Even if I’m just sitting, things hurt. Forget trying to move. (On Tuesday, laughing hurt, thanks to my rectus abdominus being tender) But I know it’ll get better, and it’s great that I’m being forced to go even when I don’t really want to!

Time to go to the beach for spring break…

Upcoming posts: Tom Bihn, my new workout program, jQuery tricks, and Twitter and its uses in staying connected away from the Internet. (3)

MCAT behind

Yesterday I loaded up and drove to Tulsa, where I met Mom and Dad and we came the rest of the way home to Joplin.

Today, we left about 10am for Springfield, arriving just after 11. They dropped me off at the Prometric Testing Center to take… the MCAT! I had been studying quite a bit ever since Christmas break started, so I felt pretty ready. The test took about four and a half hours but honestly it was pretty fun and I enjoyed taking most of it. All except the chemistry– I hate chemistry :( Background on the MCAT: it’s the exam needed to get into medical school in the US; you take it the year before you apply (your penultimate year of university). The test comes in 3 and a half sections. Physical Sciences includes physics, inorganic chemistry, optics, E&M, and electrochemistry. Biological Sciences includes human biology, genetics, organic chemistry, and vertebrate anatomy. Verbal Reasoning has reading passages and associated questions. Each section gets a score of 1 to 15 points, where 15 is the best. The “half section” is essay-based; you write two short essays in 30 minutes each about a provided prompt. Some highlights:

  • I really decimated the Verbal section… I missed practically none. I’d say no more than 2.
  • Having switched to Colemak, typing the essays was kind of a beast. I practiced QWERTY for about 10 minutes before starting the writing section timer. I had to look at my hands the whole time but I got it done :D .
  • I really should have studied more chemistry.
  • Tutoring at ZAP really helped my Biology.

I think I did pretty well but scores come back in a few weeks, so we’ll see! Yay for it being over!

If you usually use syntax like var + "string" + var2 + var3 + "string etc.";, try this faster, prettier version: [var, "string", var2, "etc"].join(""); Also good for ["domain","directory","thefile.php"].join("/");

jQuery & application/xhtml+xml

For reasons previously discussed, serving your site up as application/xhtml+xml is a good thing to do. Check that post for all the reasons why.

So now, you’ve taken the plunge and swapped your content-types. Whoa! Why did everything on your site just break? The first reason, of course, is invalid HTML. If you’re getting the Yellow Screen of Death in Firefox, just fix what it asks and you’ll be back on track. However, if your JavaScript suddenly bites it, chances are that you were using methods that are deprecated and no longer supported. You see, when traversing an XML DOM, everything must be viewed in terms of elements. You can’t munge or alter the raw code, because you might generate invalid markup. Instead, you must insert, delete, or change existing elements.

“But but!” you cry. “I used the latest version of jQuery, just like you taught me! And I didn’t use anything but jQuery methods!” Well that’s great, but even jQuery can only do so much. Some of its methods rely on the unsupported innerHTML. So here’s how you fix the issues. Hey, it could be worse; you could have been using document.write!

html() & html(val)

These methods rely on innerHTML. Consider using text() instead to only replace the text inside elements. If you were using html() to copy an element’s contents, try clone(). Finally, if you used html() because you really wanted all the elements inside, use children(). The key is to think of an element’s contents as nodes along the DOM tree, rather than a bunch of tag soup. Is there an <img /> inside your element? Don’t try to copy the HTML somewhere else. Just think, “Hey, I have an image element there. I can query for its src value, which is the important part. Then, I can recreate that image anywhere I want.” Elements are always replaceable– you need only give them back their attributes.

$(“html here”)

This is a slightly lesser-used aspect of jQuery. It’s used to inject raw HTML into the DOM. See a problem? Yep, XHTML+XML doesn’t do raw HTML. Everything is elements! Fortunately, it’s easy to fix this in your code. Instead of $("<img src='muu.png' />"), try using $(document.createElement("img")).attr("src","muu.png"); Not too hard, right?

My Linkblog