Aubrey's aimless blog

So low, even PHP is fun

I jokingly like to think of programming in PHP as a form of self-punishment, and the fact that I chose it as my system of choice for making this blog is no mystery whatsoever. You know, given my state of mind.

A neat web series I've been waiting for launched yesterday: 13 Reasons Why, an adaptation of one of my favorite YA novels. I've been watching that, and while I can safely say the series is extremely well made, there's only so much I can binge. Basically it's about a high school girl committing suicide and rubbing in everyone's faces how they were total toolbags to her. Yeah.

So, needing to get out of my head, I gave PHP a whack. I knew what I wanted to do; find a way to take post metadata out of the files the posts are stored in and create a sort of array of post metadata objects that can be used to dynamically generate things like the post index on the main page, as well as some of the content in each of the pages.

function createPostList()
    global $posts;
    $output = '<ul class="postlist">';
    foreach ($posts as $file => $post) {
        $output .= $post->formatListEntry($file);
    return $output . '</ul>';

I didn't remember much from the PHP courses I took in school, but it wasn't too bad once I remembered how objects and classes are supposed to work. :-/

So even though it was pretty excruciating troubleshooting that, it was really nice that, once I thought I'd gotten all the bugs, I uploaded the new version and the output looks identical to what I'd had before. Victory, and now it's a lot easier to maintain.

Still very cloudy today. Brain not happy today; Brain looking for reasons not go to into work tomorrow, but Brain going to lose this fuckin' fight. I paid my bills, I did my lil PHP thing, and I set up an appointment with a new therapist (albeit THREE WEEKS OUT UGH) and hopefully I can maintain a modicum of outward normalcy until then. Almost lost my shenanigans today, but I snagged some ice cubes and squeezed them until they were gone. No SI, so that's good? Right?


I've been wondering about just how good an idea it is putting my super depressed self on the public internet. Two thoughts:

  1. Nobody is going to read this crap anyway.
  2. Even if anybody reads this crap, I can't imagine living more than a couple more years tops, so what could it fucking hurt to have this outlet if it isn't going to matter anyway.

Time to go to bed.