The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Monday, August 27, 2007

Back from the Dead

Hi.

I'm back among the land of the living, having finally kicked the cold, although it wasn't a plesant experience, let me tell you. Once I felt the cold settling in my lungs, I knew that if I didn't do something, the term “antibiotics” would soon be bandied about, along with “emergency room,” “deductable” and “bend over, this won't hurt at all.”

Yes, it was cough syrup time.

My hand written notes during Saturday (or was it Friday night?) are a bit tough to make out, but let's see …

“If you drink without rythm, you won't attract the worm.”

I feel like a cross between Hunter S. Thompson and Christopher Walken.

And it devolves from there, amid a margin filled with bizarre doodles. I'm thinking the bit about the worm was related to this video. At least, I hope it was related to that video because the very idea of a mashup between Dune, Fear and Loathing in Las Vegas and Brainstorm is too frightening to consider.

After I admitted to Spring that I felt like Carlos Castaneda she suggested I seriously cut back on the cough syrup.

By late Sunday I was feeling much better.

But my blogging software wasn't


And my blog's back from the dead as well

I was curious if my efforts at fixing some issues with my blogging software were having any affect. So I checked the current server logs and yes, my efforts did have an affect:

Slow death of a blogging engine
Site Bytes Hits Status
Okay (200) Redirects (300) Client errors (400) Server errors (500)
boston.conman.org 3,050,415,479 130,912 99,696 24,403 935 5,876

And some significantly bad affects if that last column is anything to go by (which were the number of requests that the server could not handle due to an internal problem, like my blogging software crashing).

Upon initial investigations, it appeared the problem was lost data—my program was generating output, but it wasn't getting to Apache. That's a buffering problem, and an easily fixed one (I just have to make sure that before my program ends, any data it has buffered is written out). But that didn't fix all the problems.

If anything, the problems were getting worse.

And they seemed to be smack dab in the middle of the actual blogging engine itself—a bit of code that I haven't really touched in six years. Mainly because I didn't want to touch this code. It was ugly. Convoluted. Comments like:

/*------------------------------------------------------------
; adjustments for partial days.  The code is ugly because
; of the reverse hacks I've done without really understanding
; how I actually *implemented* the reverse display of entries.
; Funny how I'm the one writting the code and even *I* don't
; fully understand what I'm doing here. 8-)
;-------------------------------------------------------------*/
and
/*----------------------------------------------------
; I have no idea how long ago I wrote this code, but in
; all that time, I never knew that blog->stentry or
; blog->endentry could become negative.  It didn't seem
; to affect the rest of the code, but with the new adtag
; feature, it became a problem.  This bit o' code ensures
; that they at least remain positive.  
;
; I still don't fully understand what I'm doing here.
;--------------------------------------------------------*/

litter the code. And to top it all off, the reverse printing of entries never fully worked right. The more I hacked on the code to get it right, the more I came to realize—

I'm going to have to scrap this mess and rewrite it from the ground up (well, not the entire program—just the portion that deals with collecting up the entries and displaying them, which works out to be about half the code).

The code is tricky because of two interlocking features—the first being you can display the entries between two arbitrary dates (or a date and a given number of entries, or on the main page, seven days worth of entries, which isn't necessarily seven consecutive days). The second feature is you can reverse the order of printing.

The original implementation left a lot to be desired. Frankly, it was a bad design, which made it difficult to get these two interlocking features right (not to mention the automatic generation of next and previous links) and something about the last feature I added (adding the entry title to the page title when there's only one entry being displayed) just broke the engine completely (although how, I have no idea).

So late Sunday I started rewriting.

My sleeping schedule was shot anyway due to being sick for the past couple of days.

I finished the work (for the most part—I still have to write code to add entries; for the time being I'm adding them manually) sometime this afternoon, much to my surprise.

So much for the boring stuff—now onto fun stuff


“A strange game. The only winning move is not to play. How about a nice game of chess?”

I don't even know now to begin describing episode two of Jmac's Arcade (Missile Command) other than it being a wonderful retrospective of both the game and of growing up in the 80s under the shadow of nuclear annihilation.

Oh, and of sending letters to the President.


M.U.L.E.

And speaking of 80s video games, I have to wonder if this M.U.L.E (link via Instapundit) is foreshadowing this M.U.L.E?

Or is it the other way around?


I can't rightly refuse an offer if it's not offered, now can I?

I never did hear anything back about the job offer from a large software company (I won't name it, but its initials are “Google”) but I found out why—they were more interested in Mark than me.

Ah well.

I also heard that Mark turned down the job offer— as he said, “if they want stuff I designed when I was 13, they can have it.” Heh.

Obligatory Picture

[It's the most wonderful time of the year!]

Obligatory Contact Info

Obligatory Feeds

Obligatory Links

Obligatory Miscellaneous

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: http://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

http://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2021 by Sean Conner. All Rights Reserved.