The eclectic musings of a bitter software engineer.

Archived Posts

Displaying posts 201 - 210 of 593

Superman Returns

Saturday July 01, 2006 @ 09:53 PM (PDT)

Meh. Someone wake me up when James Cameron starts making movies again.

How not to get a job

Thursday June 29, 2006 @ 04:28 PM (PDT)

Here's a helpful tip: If your résumé claims that you're experienced in XHTML, DHTML, and JavaScript, you should probably be able to explain what DHTML is and how it differs from XHTML. Especially if your résumé includes the term "DHTML" eleven times. Also, you probably shouldn't mention in the interview that you don't actually know JavaScript and prefer to just "rip off other people's code".

Treasure!

Wednesday June 21, 2006 @ 04:14 PM (PDT)

While poking through the cabinets in the break room today hoping to find some hidden cream and sugar for my coffee, I stumbled upon a secret stash of Cups-O-Noodles. Boxes and boxes of them! Just sitting there begging to be eaten!

Maybe whoever stopped buying cream and sugar started buying Cups-O-Noodles instead.

A coffee conundrum

Tuesday June 20, 2006 @ 04:41 PM (PDT)

The following is an exhaustive list of all coffee-related paraphernalia currently to be found in the break room at Kryptiq:

  • 1 industrial strength coffee maker
  • 5 large coffee thermoses
  • 4 boxes of gourmet Columbian coffee (each containing approximately 144 thermoses worth)
  • various disposable cups, coffee filters, and plastic utensils

And now, a somewhat less exhaustive list of coffee-related paraphernalia that cannot currently be found in the break room at Kryptiq:

  • sugar
  • any form of liquid coffee cream
  • any form of powdered coffee creamer

There was once a time when all of the above items could be found in the break room. Then, one by one, they were used up, and no replacements appeared. First, the tiny cups of liquid cream went. Then, a few weeks later, the powdered creamer. Today, the last sugar packet was used. I don't know what magical force spawns these items in break rooms, but it seems that force has forsaken us.

And yet, the office continues to consume coffee. Every morning there are two fresh thermoses full, one normal strength, one double strength. Throughout the day, the thermoses are refilled three or four times each. Either the other coffee drinkers have all decided they like their coffee black, or they have secret hidden caches of coffee additives.

At least the soda machine still has Coke.

Remo Williams delivers

Wednesday June 07, 2006 @ 03:42 PM (PDT)

Remo Williams: The Adventure Begins was one of my favorite movies as a wee lad. I hadn’t seen it in well over ten years until Felicity and Loren and I watched it last week. It was even better than I remembered.

Remo: You know, Chiun, there are times when I really like you.
Chiun: Of course. I am Chiun.
Remo: And there are times when I could really kill you.
Chiun: Good. We will practice that after dinner.

That movie should have had many, many low-budget sequels.

MediaWiki is an ugly mess

Tuesday June 06, 2006 @ 11:46 PM (PDT)

I've been digging deep into the innards of MediaWiki, the software that powers Wikipedia and hundreds (thousands?) of other wikis, for a new website I'm working on. I chose to use MediaWiki because it's one of the most featureful wikis available, yet isn't so complex that it takes forever to customize.

Unfortunately, while it's a nice enough application on the outside, MediaWiki's insides are complete shit. The code is a horrendous mess, but that's not the worst thing about it. The worst thing is that it's a badly-architected horrendous mess.

There are places where the developers make feeble attempts to separate logic from presentation, which in many cases just ends up making things more complex, because you end up with a sort of pseudo-separation where some parts of the presentation layer are separate, while others (a lot of others) are still embedded in the logic.

For example, each section of the sidebar is defined in a completely different part of the application. One section is defined in, of all places, a language file. Another is defined in a skin template. Yet another is embedded in a PHP include deep in the heart of the application. It's ridiculous.

I was also shocked to discover a directory named maintenance, which is included in the web root of the application and contains hundreds of command-line PHP scripts intended to be run only by admnistrators. One of them is named eval.php. Guess what it does?

The only thing keeping the public at large from executing these scripts over the web is an .htaccess file. That's fine if you're using MediaWiki on an Apache server configured to allow .htaccess overrides, but what if your server isn't Apache? What if it's not configured to allow overrides? I didn't see anything in the install docs that warned me I needed to secure this directory.

Here's a nice little snippet from MediaWiki's default skin class, MonoBookTemplate:

<div id="p-cactions" class="portlet">
    <h5><?php $this->msg('views') ?></h5>
    <ul>
<?php      foreach($this->data['content_actions'] as $key => $tab) { ?>
         <li id="ca-<?php echo htmlspecialchars($key) ?>"<?php
          if($tab['class']) { ?> class="<?php echo htmlspecialchars($tab['class']) ?>"<?php }
         ?>><a href="<?php echo htmlspecialchars($tab['href']) ?>"><?php
         echo htmlspecialchars($tab['text']) ?></a></li>
<?php       } ?>
    </ul>
  </div>
  <div class="portlet" id="p-personal">
    <h5><?php $this->msg('personaltools') ?></h5>
    <div class="pBody">
      <ul>
<?php       foreach($this->data['personal_urls'] as $key => $item) { ?>
        <li id="pt-<?php echo htmlspecialchars($key) ?>"<?php
          if ($item['active']) { ?> class="active"<?php } ?>><a href="<?php
        echo htmlspecialchars($item['href']) ?>"<?php
        if(!empty($item['class'])) { ?> class="<?php
        echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php
        echo htmlspecialchars($item['text']) ?></a></li>
<?php      } ?>
      </ul>
    </div>
  </div>

Notice the lovely mixture of HTML into a PHP class, as well as the complete lack of sensible formatting. This is just a tiny sample; there's lots more.

In spite of all this, I'm still going to be using MediaWiki, because, sadly, it's the best thing out there at what it does. That should tell you a lot about the general quality level of open source PHP applications.

Oregon is trying to kill your children

Tuesday June 06, 2006 @ 03:40 PM (PDT)

Up to about a year ago (or thereabouts), the school zone laws in Oregon were simple. There were essentially two types of school zones: the ones where the speed limit was 20mph when a yellow light was flashing, and the ones where the speed limit was 20mph when children were present. This was easy enough for drivers, because all you had to know was that if there was no light, you needed to look around for kids. No kids? No 20mph. Easy.

Then they changed the law. Instead of two simple, logical, easy to understand rules, the new law said that drivers had to do whatever the signs said. New signs went up in almost every school zone in the state. Some required you to slow to 20mph at all times, day or night, no exceptions. Others required you to slow down between the hours of 7am and 5pm. Others required you to slow down when children are present. Still others required you to slow down when a light is flashing. Some required you to slow down between 7am and 5pm, but only on school days. And that’s just a small sampling of the myriad variations.

The upshot of all this is that whenever you enter a school zone in Oregon, you have to strain to read the tiny print on the sign that tells you what you’re supposed to do. Depending on what it tells you, you may also have to check your watch and determine whether or not it’s a school day. And hopefully, while doing all of these things, you haven’t run over any children.

There were rumors at one point that the law was going to be changed so that all school zones would be in effect 24 hours a day. That would have been frustrating, but at least it would be consistent. I have no idea whether the law was actually passed, though, because the signs in most of the school zones I drive through still retained their confusing instructions.

Now the law is apparently changing once more. Effective July 1st, school zone speed limits are in effect when there’s a flashing light or, if there’s no light, then between 7am and 5pm on school days. So you still have to glance at your watch and dig out your school calendar, but at least the rules are slightly more consistent.

Still, I wonder if anyone has bothered to study the effectiveness of school zones, and whether frequently-changing laws result in a higher number of accidents. I suspect the number of accidents has probably remained pretty consistent, whereas the number of speeding tickets issued has probably gone up quite a bit.

Ebola: a review

Friday June 02, 2006 @ 10:44 AM (PDT)

A month ago, some anonymous donor left Ebola on my front porch. The book, not the virus. Seeing as how Ebola (the virus, not the book) fascinates and terrifies me, I couldn't avoid reading it.

Ebola, by William T. Close, M.D., is a moderately dramatized account of the first outbreak of the Ebola virus in Zaire in 1976. The book's cover and introduction make it a point to inform you that Dr. Close was there to witness the outbreak firsthand and "worked desperately to contain the first outbreak of the virus", but the book is written in the third person and Dr. Close never makes an appearance. It's clear that he changed the names of the other people involved, but why change his own name in a book he's writing? Strange.

Also somewhat strange is the fact that the word "Ebola" never appears in the main narrative. This is understandable given the book's focus on the characters rather than on the virus, but since the book's title is Ebola, I was expecting a little more information on the virus itself. Close's choice to focus on the characters rather than the virus is at times a good thing and at times perplexing.

The story begins slowly, establishing the look and feel of the village of Yambuku, its people, and the Flemish nuns running the mission there. As the first victims of the virus begin to appear, the foreshadowing gets a little ham-fisted. It almost feels like Close is intentionally portraying the nuns as unconcerned and even careless merely for the sake of adding to the suspense.

After the first hundred pages or so, things finally start to pick up and the really interesting stuff begins. The dedication of the nuns in caring for the victims under some of the harshest conditions imaginable, even as they themselves begin to contract the virus, is touching, and it's what makes the book worth reading.

Unfortunately, while the middle of the book is gripping and generally well written, the last third goes completely off track. When two doctors from the WHO finally arrive at Yambuku, the virus has already killed hundreds of villagers and is beginning to burn itself out. Without the constant influx of Ebola victims, the author seems to lose his bearing, and the story inexplicably shifts its focus to a schoolboy crush one of the doctors (who is married) has developed on one of the nuns. It's so awkward it's almost creepy at parts. After this confusing twist is resolved, the book just keeps on going for no discernable reason, following the nun as she flees Yambuku when it seems like the virus might reappear. Nothing interesting happens to the nun, the virus doesn't return, and the book just ends, having strung you along for the last hundred pages or so for no real reason.

There's another creepy thing about this book, and that's the author's apparent fascination with breasts. He describes them at every possible opportunity, often in unnecessary detail. The reader is kept constantly aware of the statuses of the breasts of nearly every female character, villagers and nuns alike. At one point we're even forced to read a description of the teats of one of the village's mangy dogs. I like breasts as much as the next man, but Close seems to think (and write) about them far more than is warranted, especially for a story primarily about Flemish nuns.

On the whole, while I wasn't crazy about it, the book did tell a compelling story. I think a better author could have made it even more compelling, but since Dr. Close was apparently there, he'll have to do. However, if you're looking for technical descriptions of Ebola, its effects, and its treatment, look somewhere else. This is a book about villagers and nuns and how they dealt with an outbreak; it's not a book about Ebola.

Nothing to write

Saturday May 27, 2006 @ 10:01 PM (PDT)

Every day for the past month, I’ve looked at wonko.com and thought to myself, “I should write something.” Sometimes I’ll sit and watch the cursor blink for a few minutes, trying to think of something to write, but nothing comes out. So I go off and do something else, and the blog stagnates.

I’d write about work, but the things that would be interesting to read about are probably things that I shouldn’t write about, and the things that I could write about wouldn’t be particularly interesting.

I’d write about life in the new house, but nothing terribly exciting is happening. Felicity’s been in Quebec with her grandma for the last two weeks, so Qubit and I have had the place to ourselves. There’s been lots of meowing and consumption of microwavable foodstuffs. That’s about it.

I’d write about politics, but there’s really no point these days, is there? Politics and religion are subjects worth discussing only with people who already share your opinions; everyone else is already convinced you’re wrong.

I’d write short stories, but that’s more Felicity’s territory. Wouldn’t want to step on her toes.

I’d write programming tutorials, but I haven’t got the patience. I love learning, but I hate teaching people.

I guess that’s the problem with having a blog about nothing in particular.

Clipboard Inspector

Saturday May 13, 2006 @ 10:45 AM (PDT)

I've just released Clipboard Inspector, a handy little tool I wrote that monitors the Windows clipboard and displays its contents in a variety of formats. It'll display clipboard data in Bitmap, CSV, File, HTML, RTF, Text, and Unicode Text formats, and you can save the data to a file if you wish. It'll even export clipboard bitmaps to GIF, JPEG, PNG, and TIFF, so it's pretty handy for saving screenshots taken with ALT+PrintScreen. And of course, it's free. Enjoy.

Copyright © 2002-2009 Ryan Grove. All rights reserved.
Powered by Thoth.