Bunny and I were talking about the lack of posts around here, and I gave two rather pathetic reasons for slacking off. The second reason deals with The Corporation—I'm not sure how free I can be with work details. Smirk isn't my boss at The Corporation (he's a fellow cow-orker) and I haven't brought the issue up with R, who is The Ft. Lauderdale Office Manager (and the one who hired me initially) nor with E, who I do report to but works out of the Seattle Office.
Sure, I could mention that The Protocol Stack From Hell™ says it's thread safe, but still requires a mutex around a few calls. And I could mention that in the source code to The Protocol Stack From Hell™ we do have access to I found a global variable being used when creating a packet of data, thus causing all sorts of issues with the multithreaded testing tool I'm writing. I could also mention the fact that The Protocol Stack From Hell™ failed to properly use C++ inheritance by declaring multiple copies of object member variables in subclasses. And I could mention that we paid quite a lot of money to use this wonderful Protocol Stack From Hell™.
[Related to that—I could write about the wonderful Protocol Stack From Hell™ every day, but even I got tired of my rants against control panels. The Protocol Stack From Hell™ is way worse in that we don't have access to the source (well, we have access to some of the source; just not the stuff that's real puzzling) and it's only after browbeating the tech support that we learn just how bad the stuff really is, such as obtaining a textual representation of an error that's stored past a certain structure our code receives that's so totally not documented. And this is a daily occurrence! Don't even get me started on the silliness of their SNMP support!]
So yeah, I could mention all that, but I'm not sure if I can. Or should. You know?
The first reason I'm slacking off had Bunny rolling on the floor laughing, and yes, I could see her reasoning. It has to do with manually updating MyFaceSpaceBook everytime I posted here; it just feels like too much work.
Okay, there's nothing compelling me to link to my post at MyFaceSpaceBook, except that I personally view MyFaceSpaceBook as another feed (much like my Atom feed or RSS feed), and thus, I feel compelled to update MyFaceSpaceBook when I update here.
Okay, I'll wait until you stop laughing.
So, given that The Protocol Stack From Hell™ was acting up yesterday, I decided to see what it would take to automatically update MyFaceSpaceBook when I post here.
My God MyFaceSpaceBook doesn't make it easy.
All I want to do is update my status. After several hours of reading,
registering as a developer (and man, I would link to that page, but now I
can't even find the page—sheesh!), manually running API web calls (I didn't know
openssl / s_client -connect host:443 until
tonight—wow!) to tweak settings in my account and learning curl (even though I've
written code to retrieve web pages, it doesn't support HTTPS and
that's a whole mess I'd rather skip for now), I have a
proof-of-concept program that can update my status at MyFaceSpaceBook.
The next step is to integrate the proof-of-concept into the blog engine and have it update MyFaceSpaceBook automatically.
And then, maybe, I'll start posting more often.
I didn't expect my “proof-of-concept” to take as long to integrate into mod_blog as it did, and I do apologize to my friends on MyFaceSpaceBook who got spammed earlier today with, frankly, bizarre posts as I attempted to debug the new code. It's working, but there's still a worrying memory overwrite buried deep in the code that I've yet to fully squash (“fixing” a bug by reordering function calls is not a fix, but a temporary workaround).
But I have accomplished my goal of updating MyFaceSpaceBook automatically. It involved:
- Registering the application at MyFaceSpaceBook (you need to have a MyFaceSpaceBook account to see the page, otherwise I'd link to the page).
- Manually entering the appropriate URL (from the “User-Agent Flow” section) to give my “application” access to my MyFaceSpaceBook account.
- Manually entering another URL to give my “application” access to update the MyFaceSpaceBook status.
- Adding the code to authenticate as an application, which gives me the token required for the last step.
- And finally, adding the code to update my status.
The first three steps took several hours on the development site (which is horribly organized by the way—it's taken about an hour just to find the pages again for this post) and the last two took a couple of hours today to properly add the code (to add configuration options, pass in the actual status text, the final 10% of the code that tends to take 90% to finish).
And with luck, this will post properly.
I can only hope.