XML

April 16th, 2012

XML is such a terrible technology. XSLT in particular makes my eyes bleed and makes me want to pull my hair out.

Yumdownloader violates POLA

February 8th, 2012

It’s good that my head is far enough away from my desk that I cannot easily smash it against the desk.

Yumdownloader is “a program for downloading RPMs from Yum repositories.”

Sounds simple enough. You give it a package name, and it should download the RPM for you. It also has an argument “–resolve” that will resolve the dependencies of that package and download those too. Logically, this argument should always behave the same. Take package, resolve dependencies of package, download them all.

Oh ho ho. You forgot that yumdownloader violates the Principle of Least Astonishment. In other words, as this comic so eloquently puts it

Did you just tell me to go fuck myself yum? I believe I did Tim.

yumdownloader resolves dependencies based on what is installed on the local machine. It could care less about what the dependencies specified in the RPMs say.

To illustrate the point, use yumdownloader to download a package with dependencies; for instance, perl-Nagios-Plugin. You get something like 5 or so extra packages downloaded because of dependencies. Now, install one of those dependencies and run yumdownloader again. Yumdownloader blithely disregards downloading that dependency.

Boy, I was certainly expecting that!

New doctor

January 20th, 2012

For many years I’ve seen the same endocrinologist.

He’s a pediatric endocrinologist though, so my mom suggested I might want to consider switching to an adult endocrinologist.

She’s still good friends with my original endocrinologist, and asked him if he would recommend anyone. He said, “yes, see this Dr.”

You could say that “This doctor” is my original endocrinologist’s protege’. They work in the same practice, so if anyone should be qualified, it would be this guy.

Result? He’s awesome.

He’s younger than my current pediatric endocrinologist. Young enough to click with me and gel with my current goals in life; where-as the pediatric Dr. was more fatherly.

When I asked him about the specific endocrinologist goals of a pediatric vs adult doctor, the new doc pointed out that as a pediatric endocrinologist, you tend to have 1 goal

  • Make the kid tall; squeeze every inch you can out of them
Now that I’m an adult though, that goal has come and past. I’m not growing any more. So an adult endocrinologist’s goals are a bit different
  • Maintain appropriate medicine levels to keep you normal
  • Educate you on family planning issues
  • Keep you away from various endocrine problems
  • Conn’s syndrome
  • Diabetes
  • Testicular adrenal rests
  • Heart problems
  • and a myriad of other badness that can occur

Most of the above badness is due, in large part, to you not keeping up with your medication.

I told him how I had specific physical goals in life, and how I wanted him to be the officer in charge of teaching me about my condition and handling the specific medical issues that may arise while trying to achieve said goals.

I know tragically little about my condition, and a lot of what I know is, as he put it when I described what I thought my condition meant, “voodoo” and “plain out wrong”.

I feel bad about that, since my perception of the condition has driven my life for the past 28 years; and my perception was wildly inaccurate.

So he and I had a long talk about a lot of things. He explained, in much more clear terms my deficiency in aldosterone and cortisol. I never knew what my medications replaced. Turns out Fludrocortisone replaces Aldosterone and Dexamethasone replaces Cortisol.

He also explained the tree of metabolic synthesis that happens to get cholesterol to 17-hydroxyprogesterone and that to aldosterone and cortisol. He explained the relationship between the pituitary gland and adrenal glands (finally).

It boils down to a positive feedback loop that occurs between Adrenocorticotropic hormone (ACTH) produced by the pituitary gland and the hormone Cortisol.

If the brain isn’t seeing those produced in significant quantity, it ramps up the ACTH production. Overproduction of ACTH can cause a range of badness to occur, mostly related to effects you see from increased testosterone in a person (not so bad for dudes, but tragic for dude-etts)

It was an enlightening experience. He ordered several tests to baseline my current state, and was thought that (based off my last blood test) that my dosages of fludrocortisone and dexamethasone may both be a little high, and we may be able to knock them back a little. Dexamethasone in particular has some crappy long term effects like osteoporosis.

I left feeling incredibly content, and much less stressed out.

He also suggested that if I remain on my 1.5 pills, that perhaps I should switch up the dose that I take in the morning and night. Right now I take the larger dose in the morning, but he pointed out that the peak of ACTH production occurs early in the morning (2 to 3 am), and that he asks his patients to take the larger dose at night for this reason.

I think he fits the bill. I’m glad to have been referred to him.

Carbohydrates

January 19th, 2012

Today I rode 25 miles on the trainer.

Usually during such rides I have a bottle of water and a bottle of Gatorade or Powerade to supplement the loss of carbohydrates, sodium, and electrolytes that keep one going.

To me it is particularly important to replace what is lost because due to the extra stress my body is under, my CAH tends to throw a fit, and I can end up experiencing over-training effects which keep me laid up for extra days.

I remember when I was training for my first 5k with my sister, that she pointed out that during the race, there will be two stands for refreshments; one for water, one for sports drink.

She cautioned us against taking the sports drink one because if you have not trained with sports drink, there is a good chance that it can affect you negatively when you slam it down during or after the race.

Negative effects included, among other things, cramps and nausea. Obviously this can ruin your performance during the race. And afterwards you’ll continue to be miserable.

Since I started riding, I have used Powerade or Gatorade as the sports drink used to refuel me. Since I started riding, I’ve felt miserable.

From what I’ve read recently concerning endurance sports (in my case cycling) I believe I have been approaching things wrong. I wonder though how much of it is mind and how much of it is matter.

In a nutshell I’ve had gastrointestinal distress almost from the moment I began using ANY sport drink.

During, but especially after an exercise, drinking even a small amount of sports drink would give me terrible nausea, cramps, acid reflux, bloating, and later, diarrhea.

Then I read in The Complete Book of Long-Distance Cycling that I should look for sports drinks that contain maltodextrin as their primary carbohydrate instead of fructose or sucrose.

Most sports drinks have between 6 and 10 percent carbohydrate. This is the concentration that most researchers say is best for maximizing fluid absorption and providing energy to fuel muscles and combat fatigue.
This carbohydrate can be either simple or complex (also known as polysaccharides).
The simple form is sugars such as glucose, fructose, or sucrose.
The complex form is similar to starches found in bread and pasta in the form of glucose polymers or maltodextrin.
The better drinks contain both types of carbohydrate in a proportion that aids stomach-emptying. Their labels will indicate a higher concentration of complex carbohydrate by listing it as the next ingredient after water.
Higher concentrations of maltodextrin tend to produce less gastrointestinal distress and fewer stomachaches when a large amount of sports drink is consumed.
Research has found, however, that there is no difference between drinks containing simple or complex carbohydrate when it comes to the rate at which they’re absorbed from the intestine into the bloodstream.

After reading this, I went and looked at the label of Gatorade and Powerade

Gatorade

 

 

 

 

 

 

 

 

 

Powerade

 

 

 

 

 

 

 

 

 

Well what do ya know, simple carbs are the main ingredients. I may be on to something here.

Ok, so what is a sports drink that has a complex carbohydrate as it’s main ingredient? I looked around, and after stopping at a Vitamin Shoppe, (but they sell it just about everywhere) I picked up a bottle/canister of Gu

Gu

 

 

 

 

 

 

 

 

 

I picked the Raspberry flavor. It’s a powder that you mix with water. Not exactly in “drink” form, but I consider it close enough because both the Powerade and Gatorade list “water” as their first ingredient. So I consider it a fair comparison

Ask me how I felt during and after the ride. One word. Excellent.

There was no, and I seriously mean it, no cramping, or nausea.

I really was shocked at the difference. But “what else did I do differently”  you ask. Surely this cannot be due, alone, to the different carb.

Well, ok I also had a Gu Gel pack before I started riding. In the past I used Clif Gel Shots. Look them up online though; #1 carb in them is “organic maltodextrin”. #1 carb in Gu gel?

Gu Gel

 

 

 

 

 

 

 

 

 

You read that right, maltodextrin. So the Gels probably didn’t make a significant difference in GI distress.

What else did I do? Mmmmm, nothing. I rode at a smooth 3.5 to 4 heart rate zone and went through my 50 oz Camelback twice. Pretty standard stuff.

So I have become a believer in maltodextrin being easier on the GI tract. I’m going to continue to ride with it to see if this was just a quirk or if it is actually making a significant difference, but so far, so good.

One last observation. While I was in Vitamin Shoppe, I picked up a couple different Gel products as I wanted to test them to find which flavors I preferred and which seemed to work better than other (since they will be breakfast, lunch, and dinner for the Century trip I’ll be riding later this year)

One of the ones I picked up was Accel Gel. It was more expensive than a similar Gu Gel ($1.50 vs $1.25) and look at it’s main ingredient (note that I bought it before I read the excerpt from the cycling book)

Accel Gel

 

 

 

 

 

 

 

 

 

Uh oh, simple carbs. I foresee the rides I take with these gels to be quite miserable; during and after.

Kidney stone – Part 2

December 10th, 2011

6:15 am the other day had me back in the hospital for another kidney stone that decided to take a trip down the water slide.

My experience so far with them has been that they are not the agony that most people make them seem. They are more of a nagging pain that just doesn’t quit. In any event, they still suck and I don’t like them.

Now, while you’re in the emergency room (if you decide to go or instead be a big man and try to tough it out) they will give you one or more happy meds that dull or eliminate the discomfort/pain.

The first one they start with is Toradol.

Toradol is like the injectable equivalent of 800 mg of Motrin or some other NSAID. It works. But for me I found that it only worked for about an hour. Then the pain started creeping back up the “perceived pain” ladder; moving from 1 to 4.

When the Toradol starts to feel like it is wearing off, they then tell you they’ve got an even better drug but it comes with a condition. That condition is that you’re not allowed to drive yourself home; you have to have someone come pick you up.

For me, that’s a problem, because first I live alone, and second, all my family is 30 minutes away from me and probably working or in school or something else.

But fuck it I want the more powerful stuff because the Toradol has worn off.

So the super drug they are referring to is Dilaudid, also known as hydromorphone. If you thought the Toradol was a fun ride, wait till they hit you with the Dilaudid.

After my release from the hospital, I went to Wikipedia to research both of them, and Dilaudid is basically an alternative to morphine. It was developed shortly after heroin was removed from clinical use.

Vicodin, which is often prescribed for outpatient pain treatment, is partially converted to hydromorphone in your liver. I’ve never had to use the Vicodin I’ve been prescribed, but I can imagine what it feels like.

Anyways, the Dilaudid hits you about 5 to 10 seconds after they put it in the IV. First side effect is a pleasant dizzyness. Then, all the pain goes away, and your breathing slows down to a very “comfortable” pace. If you had a stuffy nose, it’s gone, and you tend to just easily breath.

Next, you’re probably tired from stressing over the kidney stone, so the Dilaudid makes you realize that you’re suddenly tired (and probably contributes to your tiredness in a way) so the next thing you want to do is go to sleep…which you can…because the pain is gone and you’re happily dizzy.

The good news about the Dilaudid is that the effects last about 3 to 4 hours (for me) but afterwards, it’s back to pain if the stone hasn’t passed yet.

As you come down off the drugs they gave you, you’re likely to feel semi-nauseous for the rest of the day. Well, the nauseousness is probably a combination of things (the stress, pain, damage to urinary tract, lack of sleep, drugs, lack of food, etc) but write off the rest of the day.

For me, I just crashed at the fam’s house for the night and the next morning was feeling like myself again.

I was advised to see a urologist, and I will. They have procedures called Lithotripsy’s which use shockwaves to break up stones that still reside in the kidneys. Bad news is that there are risks from the procedure. I guess the urologist would know more.

That was my exciting weekend though

Elasticsearch queries

December 8th, 2011

I like the idea behind the Elasticsearch JSON query syntax, but for simple dorking around in the browser window, it’s a bit complex for me to wrap my head around.

So this post is a simple list of queries that have been helpful in generating results quickly before I go about creating JSON queries.

Search for documents which have a field called sourceSize with the values 991 or 990.

Then, sort the documents by sourceSize ascending.

Finally, because ES will only show you 10 results by default, increase the number of results that are returned to 20.

1
2
/_search?q=sourceSize:991+OR+sourceSize:990
&sort=sourceSize:asc&size=20

Swatch and equal signs

October 25th, 2011

I was pulling my hair out earlier today trying to figure out why my swatch config was not working. I had what I thought was a very basic configuration. It looked something like this

1
2
3
watchfor /Virus Found/
    pipe /usr/local/.../tissue.pl
    pipe /usr/bin/python2.7 /opt/script.py --alerts=/tmp/avalerts.txt

Simple. Well, it wasn’t working.

With the –dump-script argument to swatch, I saw that it was making a swatchrc script that looked like this

1
&Swatch::Actions::send_message_to_pipe('ALERTS' => "/tmp/avalerts.txt", 'COMMAND' => ""

What the hell.

It eventually dawned on me that the “ALERTS” key was due to me saying “–alerts=/blah” in my pipe command. Swatch documentation says that

“The keyword and value are separated by space or an equal (=) sign.”

Well, it looks like it was ignoring my first space (after the pipe word) and finding the equal sign at the end of the line.

The solution was to just remove the equal sign from my pipe command.

Two misses

October 20th, 2011

I’m beginning to think it’s beyond my grasp. I’m impatient that my legs don’t get stronger faster, but I guess that’s nature for you.

I have a current cycling goal to ride a full length movie. Well, my last 2 attempts, Blitz and Tiger Cage, fell short. Ok, technically I rode Blitz, but my goal is to ride it continuously; not taking a break.

Tonight on Tiger cage, several weird pains crept up

  1. A pain in my left knee early
  1. This ultimately went away, but it took maybe 14 to 25 minutes
  • A sharp pinch in my right shoulder like you get from not breathing enough when running.
    1. With some shoulder rotating and extra breathing, this went away
  • A shin splint pain in my left shin.
    1. This really confused me. I don’t know what caused it, and it’s gone away, but the feeling of a shin splint while doing a low impact sport was surprising. Especially because I haven’t experienced it in the past
  • Hamstrings
    1. God these have been the killers lately. On both this last Tiger Cage ride and Blitz ride, my hamstrings have been my downfall. Tonight was no exception, they burned worse than another other part of my leg that I can remember. Is this good? I dunno….maybe that means they’re getting a workout. OTOH maybe it means “ur doing it wrong”
    In any event, I continue to push on in my quest to reach more goals and ride further. Being locked up indoors for the winter isn’t going to slow my training in the least.

    Cycling goal #1

    October 13th, 2011

    With my new trainer and the creeping up of the winter time, I’ve set a number of goals for myself.

    Riding with the trainer is more difficult that riding outside. First of all, it doesn’t ever give up. There’s no coasting to claim distance, so every stroke is one of effort.

    I usually watch movies on netflix while I ride, so my first goal was to cycle through an entire movie. Well, today I did; 47 minutes of it. The movie was called Deconstructing Supper and was OK.

    True, it was only 47 minutes, not a “full length” movie per-se, but 47 minutes at 100 cadence is still effort for me. I am improving though. I want to be fit enough to ride a century, straight through, come spring. And actually, I want to be able to ride a century, straight through on my trainer, before the end of the year. We’ll see how far I get on that.

    Ready for winter

    September 20th, 2011

    My cycle trainer came in the mail the other day and it’s all set up and ready to rock

    It’s pretty cool, and yes I finally found a use for the phonebooks they throw at my house every year.

    Is it boring? Mmmm, well, yes and no. I guess it can be boring. But watching TV can be boring too. So far I’ve managed to stem the boredom that one would experience from going nowhere fast by supplementing the going with watching Netflix, listening to music, etc.

    So yes, it’s more boring that riding outside, but when the weather sucks, there is no good way to get your riding in.

    It seems a bit more difficult to ride on than regular road, but I think that’s due to the rolling resistance of the trainer…basically there is 100% resistance; stop pedaling and your back tire instantly stops. So that resistance adds to the work required to keep the back tire spinning.

    The trainer itself is a Cyclops Fluid 2. The reviews seem to match the experience I’ve had with it so far. It’s a good product. It’s kinda not clear how to set it up at first, but a little dorking around with it and it’s ready to go.

    Almost finished with scanning and Lunar Silver Star for PSP.

    At work I had to convert an integration between CST and another app with a new REST API. It went off like clockwork. I’ll be finished with it tomorrow and ready to start cutting over detectors by Thursday. Win