Eccentric Flower:200912/Bits

From Eccentric Flower

«December 2009 «Eccentric Flower

Bits

Thoughts while watching SportsCenter during lunch (I didn't have a magazine):

  • College football is really where the action is. These guys play like their life depends on it.
  • Pro football this year, on the other hand, is completely boring. It'll be Saints-Colts in the Super Bowl and the wrong team will win.

(Yes, I know I was fascinated during the Patriots walkover year. The problem is that one walkover team is fascinating; two is boring. Besides, I hate the Colts and I hate anybody named Manning. If the Saints go to the Super Bowl I will watch it, but my heart will be heavy because I will just be waiting to see how they manage to lose.)

  • A SportsCenter analyst is predicting a Titans upset of the Colts. In an unrelated story, a SportsCenter analyst has been revealed to be abusing prescription drugs.
  • Allen Iverson is mighty full of himself.
  • It's amazing how many people, in a Harvard Square bar/restaurant not noted for its international crowd, will be riveted to a television watching random-draw selections for FIFA teams.
  • It's a sad day when SportsCenter has to resort to using photos from TMZ. In fact, it's a sad day when TMZ even exists, and it's a sadder day when an athlete's possible marital troubles are front-page news.

[ETA: As I gathered more emendations on this, I realized it was its own entry, so if you're looking for the paragraph that was here, that is where you will find it.]

  • "Just OK is not OK. It's time to love your beer" is a fine campaign, but not when applied to a commercial American light beer.




Speaking of the Phoenix, this week they had the most fascinating article about a woman in the Boston suburbs who sells pot.

Mary is no small-time peddler simply adding to her income with a $20-bag here or there. She has dozens of plants, which she methodically harvests every eight to 10 days, scattered throughout the house. She sells her crop to a mature, recreational-using clientele.

Nor, however, is she a ruthless street dealer. Instead, she has a bit of a Robin Hood streak - she gives away her product to those in chronic pain or with severely debilitating disease who can't otherwise afford it (even paying for delivery out of her own pocket). In doing so, Mary has signed on to an underground, global anti-pharmaceutical revolution that is gaining traction in this country, one which believes that the natural pain relief of marijuana is substantially more effective and less addictive than FDA-approved painkillers like OxyContin, to which the government, doctors, and Big Pharma typically steer sufferers.

Here's the funny thing: She is not your typical legal-pot advocate. She landed in this business because she got disgusted.

"I was on MS Contin and MSIR," she says - noting two types of morphine, one quick-release and one controlled-release - along with an impressive list of other pharmaceuticals, including Percocet, Dilaudid, Valium, Prednisone, Phenobarbital, Flexeril, Lidocaine patches, Diazepam, Klonopin, and more. Not to mention the stool softeners, anti-nausea pills, and antibiotics for staph infections, all taken to offset her treatment's side effects.

"I told my doctor [about nodding out at my son's reading group] and he said, 'That's good. That's how we know it's working. We want you to feel like that, so you're not aware of the pain. That's what pain management is for.'"

But she grew more and more frustrated with her walking-comatose-like state, until a doctor suggested that she try marijuana to help control the pain. The idea did not appeal to her at first. Since her Catholic high-school days, she'd thought smoking anything, even cigarettes, was "gross." And she'd always been anti-drug, especially since becoming a mother. But she was desperately unhappy with how dysfunctional she felt while on the pills, so she gave pot a chance. It wasn't long before she was making the transition from morphine to marijuana.

As much as I hate the idea of voluntarily inhaling any sort of toxins into my lungs, if a doctor said to me, "It's okay for you to be walking-asleep because that's how pain management is supposed to work," I'd probably become a pot advocate too.




In an unrelated story, the family of a Harvard student is suing the school over his suicide after the university's health service put him on heavy psychoactive drugs:

A nurse practitioner prescribed a drug to treat attention deficit hyperactivity disorder, a condition the overachieving Edwards had never been diagnosed with. Later, she prescribed two powerful antidepressants, Prozac and Wellbutrin, when he began complaining of anxiety, depression, and other side effects. Meanwhile, he was taking a fourth drug for acne, Accutane, that has been linked to suicidal thoughts.

I will spare you my usual rant and merely say that in my opinion this suit has basis.




There was a man in Harvard Square today who was playing an actual, honest-to-god, hurdy-gurdy.

I want one.

Mind you, I have twice now narrowly avoided buying an autoharp, an instrument I have a much better chance of playing, because it does not pass my stringent "Will I use this enough to justify the purchase cost?" test - so I think a hurdy-gurdy is right out.




Here's a puzzle I had to solve today.

It is meant to be a thinking puzzle and not an understanding-of-JavaScript puzzle, so I will rephrase the JavaScript in English after I give it. Don't worry! Utterly no programming knowledge is needed to solve this.

do{
     randNum = calcRandomNum(imageObj.filenames.length)
}while(randNum == lastNum);

This is part of code to load a random image onto our web page. The code is run every few minutes, and in the middle of it is this snippet. There is a pool of images to choose from. The number of images in the pool can vary. imageObj.filenames.length is just the code's way of getting the total number of images in the pool. It passes that number to the calcRandomNum function, which uses it to randomly choose a number from zero to one less than is passed in. In other words, if there's six images available, they are numbered 0-5 and calcRandomNum, if given a 6, will return a number from zero to five.

The "while" part says, "If you drew the same number you drew last time this code ran, go pick a number again, and keep doing it until you get a different one." So we won't pick the same image twice in a row, see.

Find the dramatic logical flaw in this code.

[ETA: Answer is given in comments so stop reading now if you want to ponder it.]


<< older | © 2009 columbina | newer >>




Jette:

I may even watch the Super Bowl this year if the Saints are in it. I mean, the Saints having a winning season! and in the Super Bowl! I grew up during the "baghead" days, so this is so bizarre.

-- 20:12, 4 December 2009 (GMT)


DanLyke:

I'm sure the article doesn't go into detail, but if I were attempting to use marijuana to self-medicate for chronic pain, I wouldn't inhale it into my lungs. I'd just end up eating a lot of foods rich in fats that I could use for the THC extraction.

Olive oil is healthy for ya, right? With some buds in the decorative bottles with those little pour spouts I think it could brighten up any kitchen as well as manage pain.


-- 20:18, 4 December 2009 (GMT)


Columbina:

In fact, Dan, in the article it says the stuff she gives away to pain sufferers is basically "pot butter" - a mix of marijuana and fat to aid in THC extraction and which can be used in a variety of eating applications without needing to inhale smoke.

-- 20:22, 4 December 2009 (GMT)


Mel:

Yes, but a hurdy-gurdy is much cooler than an autoharp. Yes, I've heard people get gorgeous music out of an autoharp, but it remains sort of an intrinsically dorky instrument.

-- 20:24, 4 December 2009 (GMT)


Columbina:

Nothing June Carter played can possibly be bad.

-- 20:29, 4 December 2009 (GMT)


Danima:

This probably isn't what you're looking for, but if for any reason imageObj.filenames.length returns zero (folder not found, someone decided to clear out the directory and start again, etc.), you've re-invented the infinite loop.

(I assume, foolishly, that lastNum is initialized and updated elsewhere in the code. If I were in fact digging out a bug, I would not make that assumption.)

-- 21:20, 4 December 2009 (GMT)


Columbina:

That is a mostly correct answer. In fact there are tests elsewhere in the code that flunk gracefully if there are no images available, but you had no way of knowing that from my description.

The real problem is that the same condition exists if there is only ONE image in the pool. It keeps trying to pull a different number out of the hat from last time, but there's only one number to pull, so it never stops trying. Eventually your web browser gets pissy and complains, and you complain to the programmer, who spends far too long trying to figure out why code that hasn't changed in ages is suddenly failing. (We'd never had only a single image in the pool before.)

-- 22:18, 4 December 2009 (GMT)


Danima:

Ah, yes. Am I imagining things, or isn't there an old programming adage that one is a special case of zero?

-- 22:21, 4 December 2009 (GMT)


Jweader:

Saints-Colts, if they played today, would be a fascinating game. I might pick in favor of the Saints - they're playing better ball right now. If they both make it to the Super Bowl, that's a different story. Indy's been good for a while now, so they're able to shrug off the pressures of a "big game". NO on the other hand... their game against the Patriots was, by all reports, one of the biggest sporting events EVER in NO. I'm not sure the team is quite ready for the circus that comes along with playing in the Super Bowl.

And from whence the hatred of the Mannings? (Not to say that there's not enough reasons... just wondering which one.) I like Peyton, in general, but really can't stand Eli. And I have no opinion on Archie.

-- 22:23, 4 December 2009 (GMT)


Columbina:

It amuses me that you can tell who's who by the people who asked about zero conditions or whether lastNum had been properly initialized - things a programmer would ask first (because you just develop habits of checking that sort of thing), but which I left out as not germane to the gist of the problem for a non-programmer! To a non-programmer you can just say "lastNum is magic, assume it's okay here" and leave it at that.

-- 17:09, 5 December 2009 (GMT)


Columbina:

I've disliked the Mannings ever since I realized their aw-shucks demeanor was fake. I don't dislike them nearly as much as Mr. Tom "GQ" Brady or Mr. Brett "It's really all about me" Favre, just to give some examples that come readily to mind. This Brees fellow, in addition to being a hella QB, seems like a nice, modest guy who does good works and just wants to do what's best for the ball club. Assuming that's true: More like that please. And if it turns out to not be true, then I will dislike him too.

-- 17:13, 5 December 2009 (GMT)


Joy:

Well, I'm half a programmer then because I wondered about lastNum, and I also assumed you were getting an infinite loop but didn't think about it being because of one image.

I hated debugging back when I took programming classes in college, and often managed to get away with coming up with the appropriate algorithm (the part I cared about) and then coding something up but not debugging it. Kind of amazed my profs let me get away with that. (To be fair, in the class where it really mattered I passed because I declared P/F and my 100s on the exams was enough to counteract my 60s on the programs.)

Anyway, I'm a total debugger geek now, when it comes to my experiments and various data analysis procedures, so I find it funny that I used to hate it that much

-- 17:30, 5 December 2009 (GMT)


Yarnivore:

As for the pot and pain article: I'm planning to get a CA driver's license in January so that I can get a marijuana card, with my sainted doctor's blessing. She'd have written me a "prescription" (you can't *quite* write a prescription for an illegal substance, but a doctor can write a letter recommending its use in a state where it's legal), but I need a letter from a CA-licensed doctor.

I discovered that it takes very little pot to give me substantial pain relief; way under my "it's disgusting to smoke this" threshold (which is damned low). And I have to add that I'm sick of dealing with single-month prescriptions for controlled substances. And furthermore? I'm really fucking sick of being in pain.

So three cheers for the suburban mom who grows pot. Who knows; the collective I'll probably use in CA may talk me into growing for them, too -- it's 100% legal to grow as a patient, and you sell back to the collective. Ha. I was *definitely* not "girl most likely to end up raising marijuana" in my high school yearbook!

I think you should get either a hurdy-gurdy or an autoharp, if either would give you a measure of joy. (Of course I agree about June Carter.) The Harvard suit has basis; I have no desire at the moment to fool with the logic problem thingy.

-- 18:29, 10 December 2009 (GMT)

Comment:

<< older | © 2009 columbina | newer >>

Personal tools
eccentric flower
fiction