I did it wrong!

“To help struggling homeowners, the plan requires the government to try renegotiating the bad mortgages it acquires with the aim of lowering borrowers’ monthly payments so they can keep their homes.”
Deal reached on financial markets bailout

Obviously, I should have gotten a highly suspect mortgage two years ago, rather than actually reading the fine print and deciding NOT to gamble with my financial future. Had I done that, Super Government would save me, too!

EDIT: Proposed legislation. Reading it now.

Consistency is key

On top of the aforementioned SERVER ERROR 500 issue occuring because I didn’t specify a USER_AGENT that matched the white list, I’ve been spending the last week trying to track down exactly why I couldn’t upload a file. I used the stock GalleryRemote program (isn’t sufficient for automation purposes) to test my server, and it all worked fine.

Well, after over a week (admittedly, I’m only poking it on the bus every few days, and only while driving into work), I managed to puzzle out enough from the source code of the Gallery Remote to figure out why my code wasn’t working.

If you’re executing a command, your message must be:
application/x-www-form-urlencoded

However, if you’re trying to upload data, your form must be:
multipart/form-data

Apparently, the system DIES if you try to consistently use one or the other. The former is simpler; the latter provides better performance for binary uploads. Mind you, this isn’t commented ANYWHERE.

I can understand the usage of the former when possible, and the latter when necessary. I can almost understand why no one bothered to mention it (After all, the W3 recommendation for form submission clearly indicates to use both as necessary). However, what I can’t understand is WHY my usage of the latter in all cases isn’t mapped the same way within PHP.

I mean, come on! Regardless of the way the data is submitted, the application platform should, for purposes of the dictionary-based lookup that PHP provides via the $form variable (I think that’s right, I don’t speak PHP), shouldn’t both submission mechanisms be abstracted away unless you want the added complexity?

I’m tired and have a cold, otherwise I would extend this rant into the direction of work. However, you may all count yourselves lucky. For I am going to sacrifice a kitten to my desire to snuggle something cuddly when I don’t feel well, and then I am going to bed. Nice deal, eh?

EDIT (16 Sept 08): Err. Maybe my bad. Turns out that while, by convention, a multipart/form boundary is specified as “———-” + RandomData, the actual usage as a boundary requires it to be prefixed with an additional two dashes. In other words, the actual, in use, boundary should be “————” + RandomData. Which, if you try to just look by eye, is far from visible. Unfortunately, if I had paid more attention to the documentation, the example they give isn’t prefixed by a series of dashes, and it’s far, far clearer. Still could have been explicitly documented (ABNF, anyone?). However, I’m not going to lambast the PHP team; they could have been working just fine all along.

All that you can’t leave behind

I’ve recently (finally) burned the majority of my pictures to backup DVDs. I kept the ones that were halfway decent or better, but I have some that are utterly unnecessary to keep.

Unfortunately, that meant I needed someplace to put twenty archive DVDs. I don’t have cases handy (working on it, believe me), but in the meantime, I have a half-dozen CD binders from my college years that I figured I could misappropriate. So I tracked down a couple of them (a guy couple — three (I had this argument with a female friend in college; I asserted that “couple” meant “2 or 3”, she took the monogamous definition. Oxford English Dictionary agreed with me… just sayin’)), and began consolidating. WOW I have random stuff kept.
Read more

Gallery Remote 500 Error? Read the code.

I’ve been following the dreadfully incomplete and near-incomprehensible documentation on how to access Gallery2 remotely. It’s not SOAP, it’s not REST. It’s custom formatted form submission.

And everything seemed to be working. So I kept going through the checklist of available commands, and then it stopped.

500 server error. No actual diagnosable response.

I’ve updated my Gallery2 install to the current release candidate. I’ve custom built ImageMagick locally. Nothing worked.

Then I came across a small, barely commented bit in gallery2/modules/remote/GalleryRemote.inc — “harmless” get-type operations are permitted. However, anything that attempts to make changes is verified — against a white-list of USERAGENT strings.

I have no idea who considered THAT a security feature, but adding a new USERAGENT to match my C# library’s USERAGENT, and everything suddenly works.

“Open” Source, huh?

Patience is a virtue and other lies

So after a coworker came in today to tell me how dreadful this year’s budget for raises and bonuses is, my lead followed me out of the standup meeting where I had just given him a hard time to tell me he wanted to finish one review before the end of the day.

Mind you, it’s 4:10pm when he talks to me. So since then, I’ve been “working,” all looking forward to my suddenly forthcoming review.

I know I did some rather good work in the last year, but the rumors I have heard have indicated that I should expect little, if any, financial reward — and no, I’m not in it for the money, but it doesn’t hurt. =]

He told me he would be ready around 4:45. Well, it’s now almost 5:30. He came by around 4:45 to tell me he wasn’t quite done. Which was fine, as I had had Mandrina ask me for a bit of assistance via voicemail while I was in the meeting, and then received a phone call from the police regarding the aforementioned PayPal spot of bother.

And I’m still sitting here. Still waiting. I have to leave here at 6:30 to make my bus. No stress. No sirree. In the back of my head, though, I remember people being fired at the end of the day on Friday, as they’re less likely to make a fuss. Fortunately, it’s Wednesday…

Does anyone else loathe Splenda?

I made a mistake yesterday. I bought some yogurt, and only noticed that it was the cheapest kind. After the fact, I noticed I had bought “Light” Yogurt. I can deal with that, not a problem.

Then I went to have one this morning. Took a single taste, and instantly recoiled. Checked the ingredients list, and… Splenda. I hate Splenda. I shrugged and finished it because I hate to waste food… and then felt ill for the next few hours. I’m going to endeavor to return the rest of the yogurt, obviously.

But I have to wonder: Mandrina uses Splenda rather than sugar in both coffee and tea. I can’t stand Splenda in anything I eat or drink. Does anyone else like the stuff?

My license has been revoked

On Sunday night, Mandrina asked me to start some water on the stove so she could make grits when she got home from rehearsal. As a pleasant surprise, I figured, “Hey, I can cook grits. They can be ready when she gets home!”

Now, let’s be clear. We’re talking “instant grits.” The steps consist of measuring water, heating water, adding grits, covering. Not rocket science. Not even science at all. The back of the box has less than half of the box covered in instructions — with one quarter of the box given over to branding, and the instructions provided in two languages and for both stovetop and microwave. Even they know it’s simple. And I’ve made grits before — with great success. Long before we were even married, Mandrina received grits as a present from her best friend back home, and I made REAL grits.

Not so on Sunday night. I expect to shortly receive formal notice from the Association of Men Qualified To Marry Southern Belles that my license has been revoked, as the grits I made ended up being worse than gruel. I’ll have to start from scratch again… Back to putting bacon in vegetables…