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.

Tuesday, March 01, 2005

I'm alive and well on Ganymede

We have finally moved from the Facility in the Middle of Nowhere to Casa New Jersey. All I will say about the move: next time, even if I end up declaring bankruptcy, I will hire profession movers to pack, load, ship, unload and unpack everything. And professional cleaners to clean up afterwards.

We have DSL at Casa New Jersey, but nothing is set up yet. We haven't had any Internet connection since Saturday so I'm afraid that any emails have been unanswered or bounced. I just tried collecting our email on the server this website is on, but somehow it's being sent to the previous admin of this system (who is kind enough to collect it for us) and I can't figure out why.

It's a right mess.

And if our moving last week was bad enough, The Company (where I work) has also been moving all of last week. I lost my cubicle with that neat Zen-like emptiness to it and am now sitting at a work surface along one wall of the new office. I do have a window seat though.

Anyway, I need to get back to finding out why all my email is being sent elsewhere …

Scientific legends and lore of the lost age of the 80s

I made the first home improvement here at Casa New Jersey. There was (“was” being the operative word there) this … overly ornate light switch cover in the master bathroom and the first order of business was to get that replaced. It was difficult to find the actual switch due to the intricate relief work of the switch cover. There's now a plain white switch cover and The Kids have a new, overly ornate light switch cover for their room.

I also unpacked lots and lots of small boxes of books (if they were large boxes of books, they would have been “hideously way too heavy” instead of the merely “ludicrously heavy” they were) and managed to make some room. As it stands, I'm having to play a form of Sokoban since I have so much stuff. I only have one shelf unit (fortunately it's the insanely large one) in its final place so I was able to load it up with books, revealing some floor space with which to shift some of the other shelves into place, which I can use to unload some more boxes to reveal more floor space with which to shift other shelves …

We're still without Internet access—we have it, it's just that we need to set up some computer to actually activate the connection, and I'm still a ways away from having enough floor space to layout the table in the bedroom (unfortunately, there is no separate Comptuer Room here at Casa New Jersey). But now that the living room is unpacked, there may be space to temporarily set up the computers there until I get my room squared away.

Oh, and the title to this entry? That's the comment Spring wrote on the box of encyclopedias.

Wednesday, March 02, 2005

Soviet-era grossly outdated 1980s knowledge

Well, I found out why my email is going to Outer Mongolia but I can't change it unless I want my email to start bouncing; for some reason local delivery of email on the server is borked.


Thursday, March 03, 2005

A computer ate my baby!

Five pictures I have were broken during the move (technically, they were broken during the move to the Facility in the Middle of Nowhere; I never bothered to get them fixed three years ago because the Facility in the Middle of Nowhere was only a “temporary” move—heh) so this morning I took them to an art store to get repaired—three needed new frames and two the glass replaced.

Fortunately for me, I was the only customer for the framing department. As I placed each picture up on the counter and explained what I wanted, the counter person would make measurements and write notes up on the computer, using some custom written software for the management of a framing department in an art store.

Things were going slowly due to the software—while it may have been beautifully written, the user interface was poorly designed and it was obvious to me (and I couldn't even seen the screen) that the programmers who wrote the software never actually used the software, or even had an understanding of what was required to run a framing department in an art store; it would have been faster for the counter person to take down written notes and hand print the work order than to use the computer.

Then, upon entry of the fifth and final picture the software crashed. All five orders were gone. Meanwhile someone had arrived to pick up some artworked with finished framing. The counter person decided to take care of that person (since all they needed was a receipt to take to the counter) when the printer stopped functioning.

At this point, I had to seriously consider the benefits of the use of a computer at all in this store. Sure, it could keep track of inventory and with some clever queries can puzzle out odd relationships where the arrival of rain causes an increase in sales of recycled polyester paint brushes, but when a mildly complex order like “these three pictures need new frames; these two I want that frame with this matting, this one that frame with no matting, and these two just need new glass” takes over an hour to complete it's clear that the people responsible for the software need to be taken out and shot.

Or at least forced to use their own software for a week.

In any case, the work order was submitted, and in two weeks I'll have the fixed pieces back in my hands.

Friday, March 04, 2005

Amusing Unix installs

The current project at work is to convert a Cobalt RaQ4 into a firewall for the new office. On the plus side, it's an x86 based system, 450MHz with two ethernet ports, 256MB of memory and a 30G of disk space—more than enough to act as a firewall system.

On the down side, it comes with no CD drive, no floppy drive and no video or keyboard ports.

On the scale of Unix installation difficulty, this rates around a 6 (the NetBSD install I did rated about an 8, and a Unix install I did on an old laptop was about a 9). And while there are some instructions on installing a new distribution of Linux on the Cobalt RaQ4, they all are somewhat involved.

I was able to get a Linux 2.4 kernel on the system (albeit it's a custom kernel for the Cobalt systems) so that's good (it also involved an upgrade to the BIOS to support the larger Linux 2.4 kernel). And it seems that all you have to do is put the kernel into a specific location with a specific name and it will automatically boot that kernel, which is good, since that means I can put the drive into another Linux system and do the install of whatever distribution we want on that, and put the drive back into the Cobalt RaQ—in theory. I'll find out if that works on Monday.

Saturday, March 05, 2005

We finally have Internetage! Woot!

Finally! After playing Sokoban for a few days, the bedroom is finally settled enough for me to get the network setup and running. Of course the phone line is on the other side of the room. I could have set up the computers over by the phone jack, but that would have disrupted the path to the dryer.

So I live with a cable across the middle of the floor.

Still have quite a bit of unpacking to do, but now my email is no longer being routed to Outer Mongolia.


Monday, March 07, 2005

A note to myself

Work is still being done on the new office space at The Company, with today's work being electrical in nature. What I must remember in the future is to make sure that the computer is plugged into the battery backed up outlets, and not the surge protection only outlets on the UPS.

How embarrassing.

The amusing Linux install just got more amusing

The difficulty rating of the Cobalt RaQ4 Linux install just went up.

It's not quite as simple as installing the Cobalt RaQ4 harddrive in another PC and installing Linux. I took the drive out (easy enough to do, just one screw to remove the case, then another to remove the harddrive assembly) and installed it on another PC (easy enough to do, as there was no cover what so ever on the PC). The BIOS saw the harddrive. Linux (which was installed on the PC) saw the harddrive during bootup, but after that, it refused to even recognize the drive.

So copying an existing distribution (Fedora Core) to the harddrive is out of the question.

I did, however, get iptables installed on the Cobalt RaQ4 and have it work. So I'll see if that's good enough for what Smirk wants it to do.

Tuesday, March 08, 2005

Even more amusing

New approach to installing a more modern Linux on the Cobalt RaQ4—getting another harddrive, doing the install on that, and putting that harddrive in the Cobalt RaQ4.

More on this as details become available.

I'd hate to think of what PHP would look like if Larry Wall got his hands on it …

Popular opinion about PHP is polarized. Language purists tend not to like the somewhat haphazard implementation of many features and some of the inconsistencies that have emerged over the years. At the same time, pragmatic problem solvers tend to love how PHP seems to almost read your mind and present itself as the perfect Web problem solving tool.

What it all boils down to is that PHP was never meant to win any beauty contests. It wasn't designed to introduce any new revolutionary programming paradigms. It was designed to solve a single problem: the Web problem. That problem can get quite ugly, and sometimes you need an ugly tool to solve your ugly problem. Although a pretty tool may, in fact, be able to solve the problem as well, chances are that an ugly PHP solution can be implemented much quicker and with many fewer resources. That generally sums up PHP's stubborn function-over-form approach throughout the years.

Do you PHP?

I still don't like PHP (it's the “language purist” in me) but at least this sheds some light on some of the oddities in the language (although it still doesn't explain what Rasmus Lerdorf was on when he created variable variables or superglobals<shudder>)

Wednesday, March 09, 2005

The future is back that-a-way.

Núñez now believes that he has definitive evidence that the Aymara have a sense of the passage of time that is the mirror image of his own: the past is in front of them, the future behind.

Thirty years ago, Miracle and Yapita pointed to the often incredulous responses of Aymara to some written texts: “‘Columbus discovered America&rsquo—was the author actually there?” In a language so reliant on the eyewitness, it is not surprising that the speaker metaphorically faces what has already been seen: the past. It is even logical, says Lakoff.

H ow time flies

A very interesting article about a group of people in Chile who view time differently than we Westerns do. Of course the past is in front of them— they've seen the past. And the future? You can't see behind you, so of course the future is back that-a-way.

I've got those Linux Installation Blues

It wasn't that easy, just putting a harddrive into another computer, copying the installation to that, copying the Cobalt RaQ4 kernel, and booting from there.


Didn't work.

Looks like I may have to do one of the more involved installations, or Smirk is just going to have to learn to live with what I've got.

Somehow, I'm guessing I'm going to be doing one of the more involved installations.

On the other hand, I've narrowed down why the PC didn't like the Cobalt RaQ4 drive, and it didn't have anything to do with the drive itself—I'm not sure if it was the cable or the controller. The IDE cable in the PC is an 80-wire cable (where every other wire is ground). One drive plugged in works. Two, the second one isn't recognized at all. I tried a traditional 40-wire cable and again, one drive worked, two didn't.

I'm not sure what to make of that. I ended up hooking power to the two drives from the PC, and using the 40-pin cable to hook the two drives to the Cobalt RaQ4. That was rather amusing but it worked.

What wasn't rather amusing was one of the fans on the Cobalt RaQ4—it sounded like I was working next to a jet engine. That will definitely have to be replaced.

More on this as details become available.

Thursday, March 10, 2005

Lovely … I get to debug code in PHP

I made a test order and when I clicked confirm order the next page said page cannot be displayed or error page, I am not sure. Please place a test order and let us know if it is working properly.

Trouble ticket I recieved this afternoon.

And thus I started my descent into osCommerce, written in PHP of course.

It took long enough, but I was able to finally track the problem down to the following bit of code:

function tep_href_link(
	$page = '', 
	$parameters = '', 
	$connection = 'NONSSL', 
	$add_session_id = true, 
	$search_engine_safe = true
  global $request_type, $session_started, $SID;

  if (!tep_not_null($page)) {
    die( error message with embedded HTML code, of course );

  if ($connection == 'NONSSL') {
  } elseif ($connection == 'SSL') {
    if (ENABLE_SSL == true) {
    } else {
  } else {
    die( yet another error message with embedded HTML code );
  // rest of function deleted 


The checkout code is running under a secure server ( while the actual site itself is under a different domain ( and for some reason, the code, in generating the link, is getting things mixed up and the link is being generated incorrectly. It's getting the secure server name (HTTPS_SERVER) but tacking on the location on the non-secure site (DIR_WS_HTTP_CATALOG) and thus leading to the dreaded 404 Not Found error.

I'm not really keen on trying to debug this any futher than I have to (the osCommerce package comprises over 500 files), I basically changed the code to look like:

if ($connection == 'NONSSL') {
  $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG; // XXX - spc hack
} elseif ($connection == 'SSL') {
// rest snipped

It works (even if it is a hack). Customer is happy. I'm happy (that I no longer have to dig into this program).

Now back to the salt mines—the customer is now wondering why he isn't getting his email …

'tis to be expected I guess

I forgot about this. A few days the NAP of the Americas sent out a message about an upcoming maintenance window.

In Microsoft Word format.

Of course everybody uses Microsoft Windows.

Of course.

This would seem to explain their rather odd stance of not having a crash cart anywhere in the six story data center.

Because, you know, everybody uses Microsoft Windows. For everything. Including servers.

I'm getting less and less impressed with the NAP of the Americas.

Because, you know, everybody uses Microsoft Windows.

Friday, March 11, 2005

The New Office Digs

I figure it's about time for a picture of my new working digs—this time it's the non-cubicle with that neat Zen-like window that looks out onto the walkway (we're on the second floor) which looks out onto the parking lot.

On the down side, my fellow cow-orker is such a dog

Saturday, March 12, 2005

You have company!

Spring's father, sister and niece are here for a week or so. On the down side, that's three more people in the house, one of which is three years old.

On the plus side, Spring's father, sister, niece and The Kids will be spending a day or two experiencing It's A Small World some two hundred miles to the north (and I won't be able to make it—gosh darn it).

Sunday, March 13, 2005

No place like home

Clump clump clump clump clump—


Clump clump clump clump clump—

quite like—

Clump clump clump clump clump—

a three year old—

Clump clump clump clump clump—

girl in ruby shoes with—

Clump clump clump clump clump—

large heels walking around—

Clump clump clump clump clump—


Clump clump clump clump clump.


Too many emails


Or rather, an abundance of email.

Smirk called, saying that one of our servers was dying under a severe server load, and asked if I could write a script to clean out the sendmail queues.

So I spent some time writing some Perl code to do just that.

I don't like Perl. To me, it represents the worst of /bin/sh, awk, sed and grep (among other throat clearing noises that represent Unix commands). But for one off stuff like this, it was probably quicker than trying to do this purely under /bin/sh or even C.

In retrospect, I think I could have written it faster in C.

First off, I write my Perl using “strict”; it's enough that Perl will gladly accept simple typos (unless in “strict” mode). But that lead to problem number one: I couldn't figure out how to use Getopt::Std (Perl code to parse the command line) in “strict” mode. I had to spend some time figuring out that the correct incantation to use would be:

use Getopt::Std;
use strict;
use vars qw($opt_h $opt_b $opt_d $opt_t $opt_D);


(in this code, -h is to scan the headers, -b to scan the body, -d to specify the queue directory and -t to specify where any email matching should be copied to, and -D to output debugging messages)

Okay, next problem: it's not finding anything. I grep through the headers, find something like “Subject: AdD Thr33 IncHes 2 ur MOrtgAge” then run the script:

./ -h 'Subject: .*[Mm][0Oo][Rr][Tt\?][Gg][Aa@][Gg][Ee3]' -D'

And nothing shows up.

Debug debug debug.

Turns out I'm a bit overzealous with using “my” (which is used to declare which variables I'm using in “strict” mode). Each instance of “my $variable” causes it create a whole new variable. So of course:

foreach my $entry (@queue)
  if (my $entry =~ /[dqx](.*)/)
	# blah blah blah

isn't going to work, since I effectively get two new variables by the name of $entry.

Okay, declare all the variables I use in one spot. That fixes that problem, and a whole slew of other problems related to scoped variables.

But at least the code is working.

Why yes, I'm still learning Perl.

And I still don't like it.

Monday, March 14, 2005

We're drowning in emails!

I found out why the server had an abundance of emails today—the primary resolving nameserver crashed.

There are four name servers running at The Company—two for people outside our network to look up domains we host, and two internally just for resolving DNS queries inside The Office. And one of the resolving name servers crashed hard. Totally offline.

And that threw everything out of whack.

I'm not sure why a name server (which isn't a single point of failure) crashing should throw the email system out of whack, but when I did get that server up and running (no idea yet as to why it crashed) things seemed to return to normal.

Odd, yes.

The email server in question should have queried the name server still running. And had we been running a stock installed system I might have actually attempted to figure out the root cause. But we run Insipid on that email server, with a (possible) custom installation of sendmail (configured (and possibly patched) to run under the control panel).

And I'm not about to debug that (Smirk isn't paying me that much money).

And that's not counting our spam firewall (which is a separate system), which also seemed to have problems when the primary resolving name server crashed. And I'm not about to debug why that didn't bother to use the secondary name server either.

The upshot was, a bunch of mail simply queued up (thousands—-we're talking thousands of email) because of domain resolution issues.

And that caused our customers to bitch complain that they couldn't get their email.

Now, what I can debug is why that particular server crashed. I may have to disable any hardware screen blankers, since when I plugged in a crash cart nothing was visible on the screen, and it was D-E-A-D to the point where the keyboard wouldn't register (which normally unblanks the screen). There wasn't anything obvious in the system logs, but I didn't have much of a chance to pour through them though.

Tuesday, March 15, 2005

I'm surprised I haven't already done this …

Beware the Ides of March

Beware the Ides of March

I should have listened to my own advice.

Things were slow at The Office. Quite slow. So slow that P (one of the other tech support guys) decided to leave early. Smirk was out sick (the flu) and the other remaining tech support guy, C, has had his hours cut back and wasn't in The Office today.

Leaving me.

Of course, once P left, the phone started ringing off the hook.

Okay, it wasn't that bad …

But I was kept busy today. When I wasn't requeing emails I was answering customers questions about why they weren't getting emails, downloading a new customer's site to our server (and finding out it wasn't so critical to be done todaysigh), talking to a customer that talked wouldn't stop talking—I knew what he wanted about thirty seconds into the conversation, but he just … wouldn't … stop … talking … and I couldn't even get a word in edgewise … just … okay … ye— … ok— … let— … me— … ye— … I'll— … I'll— … yes— … yes— … ok— … I'll— … ye— … I'llgiveSmirkthemessagegoodbye!click.


And then …

Another customer (who's actually next door to The Company) wants some modifications done to his osCommerce site—the same one I was working on last week. There are “too many clicks.” Wants me to remove a few of the check-out steps as the site only has two products.

There are over five hundred files in the typical osCommerce installation. Five hundred files written in PHP. And he wants me to remove a few steps.


Heh heh.

Oh, my side!

“Yes, just give me an estimate. If it'll take a few minutes, just say that. If it'll take three hours, good enough.”

“Um … how about days?

I think the desk is going to win.

… it's around here somewhere …

Spring's father wanted to eat at a steak house tonight. Not a problem if we were still living at Condo Conner or the Facility in the Middle of Nowhere. Having lived in that area for almost twenty years one gets to know the types and locations of a variety of restuarants that can match almost any need.

But here at Casa New Jersey?

Heck, it took me an hour to find the Home Depot that's just around the corner last week. And I've yet to locate an actual branch of my bank (heh—down in north Broward/south Palm Beach counties every other building contains a branch of my bank).

Gary (Spring's father) and I ended up driving for over half an hour looking for a Roadhouse Grill I glimpsed … last week? Yesterday? Somewhere … sometime …

Finally found it next door. I knew it was close by somewhere!

Wednesday, March 16, 2005

Decisions, decisions

I had a choice at work today—either deal with a Blech/qmail/Microsoft Outlook problem (basically, the customer couldn't send out email using Microsoft Outlook, and the server in question is running qmail under Blech) or to assemble a computer desk.

No contest, even though I did have to attach the keyboard tray twice, otherwise the back of the desk wouldn't fit, and the bolt nuts where just a tad tight and there was no room to work with.

Thursday, March 17, 2005

The Tax Man cometh

Tax time is just around the corner and I'm not sure if everyone knows that you can electronically file your Federal taxes for free (link via Jason Kottke).

Verbatim transcript of a telephone conversation I had with someone who didn't identify themselves







“Is [Spring's real name] there?”

“I'm sorry, she's sleeping right now. Can I take a message?”

“Is Mr. Dew there?”


“Then I guess this is Mr. Don't.” Click.

Um … okay …

Friday, March 18, 2005

That darned Peg Game

On each table at the Cracker Barrel, there's this peg game—a triangular piece of wood with 15 holes, 14 of which are filled with a golf tee. The object of the puzzle is to remove the golf tees by jumping one tee over another and removing the tee jumped over (much like making jumps in checkers) and end up with one tee.

I was never able to do that. Sure, I could reliably get three tees left. Occasionally two. But never one (and the one time I did that I did it backwards, starting with one tee and working the puzzle out backwards).

I even came across a computerized version where I could waste my time only getting three pegs.


I remakred to wlofie a few months ago about writing a program to play the game and find a solution to the problem, and a few weeks ago I finally got around to writing the program.

I don't consider it cheating because one has to have an understanding of the problem to instruct a computer to solve the problem. And it's an interesting problem to find a representation that can be modelled in the computer. A typical representation would be to use a two dimentional array to represent the board but in thinking about it, the programming required to implement a move got rather hairy quickly.

It turns out that of the fifteen spaces, twelve only have two possible moves, and three four moves and here I was looking at a mountain of code to express this with a 2D array.

I quickly abandoned that and went for a more abstract representation of the board. In the new representation, it's a linear array of spots, labeled A–O, with each spot having a list of valid moves, which spot one jumps over and the destination. Each spot also has an flag denoting the presence or absence of a peg. From there, it was relatively easy to write the code to play the game.

Also interesting to note is that, discouting rotations and reflections of the puzzle board, there are only four distinct solutions required.

Peg Game Board—Bold spots represent unique position
      B   C      
    D   E   F    
  G   H   I   J  
K   L   M   N   O

And the solutions?

Well … I'm not giving the answers away here …

Monday, March 21, 2005

I'm a sell-out

About two weeks ago, I received the following email:

To: <>
Subject: Google partnership
Date: Wed, 9 Mar 2005 14:50:48 -0500

Hello Sean,

Google is interested in advertising on your website, the Boston Diaries. Please contact me at your earliest convenience to discuss further.

Below is an example of two of our current blog related sites. (text ads running vertically) (text ads running at bottom of page.)

I look forward to hearing from you soon.

Best regards,


Google Inc.
1440 Broadway
New York, NY 10018

Um … Google?

Asking to advertise here?

I reply, and yes, it's legit.

Google wants to have advertising space here.

Well then …

Buried deep in the main template was a small, commented out section for the “Obligatory Text Ad” in the sidebar to the left. Now that Google wants to advertise, that section has been uncommented, rechristened “Obligatory Google AdSense” and away we go.

It's nice that Google allows you integrate their adversiting to match the style of your site so they're less obtrusive than they could be, but I'm hearing rumbles now as people are finding out that the filtering and matching technology used to serve up ads is less than optimal, and are removing the ads altogether.

I guess one way to look at that is that I'm late to the show and all the cool kids are no longer using Google AdSense.

Another way, that means less competition for me.

There is nothing in the AdSense policies or terms and conditions that forbid one of being critical of AdSense while using AdSense which is good (and if it seems I'm biting the hand that feeds me, the only investment I have is time, not monetary so if AdSense goes, big deal). It will be interesting to see how much this actually brings in for about two hours worth of work so far (most of that spent talking with a Google represenative about this program).

Tuesday, March 22, 2005

… is “die” with a “t”

I've sold out for twenty-four hours or so, and the majority of the Google ads I've seen are for diet plans.

I'm wondering if Google is trying to tell me something …

Reduced Configurations

I made mention of the RISCesque approach to service configuration in relation to control panels and I figured it was about time I expound on it, if only because P, a fellow cow-orker, is now having to deal with both Insipid and Blech.

I don't like control panels (that much should be obvious by now) because, among other things, they take control of the machine away and hide it behind an abstraction; they also make certain operations down right painful, if not outright impossible due to these abstractions. And the more I thought about them, the more they reminded me of arguments I've heard before, years ago. They sounded much like the arguments people used in heated debates between Assembly language and C (or other higher-level languages).

Dare we write “non-portable” code? Horror of horrors! What next? The liberal use of goto's? Slipping back into Assembly? Aaaaaah! Hell, if we allow that to happen, we might even get a Real-Time Unix kernal that's under 64K in size! Can't allow that to happen, ho sir. AT&T might kill us. BSD might kill us. Dijkstra might kill us. The whole XXXXXXX industry might blackball us for providing the customer with something that actually performs reasonably well.

Me, probably about 1991

As you can see from the above quote, you can see where I fell during that time (and for the record, I have since changed my stance on portable code since I had the opportunity to program under a variety of architectures). And now, here I am, sounding like my old self, only instead of programming exclusively in Assembly, I'm wanting to configure systems by the command line.

Now, at the time (late 80s/learly 90s) a very competent Assembly language programmer could write code that outperformed what a compiler could spit out, but times, they changed. First, compilers would always get better as more research was done; for instance the ANSI C compiler I used on the SGI machine at FAU could do optimizations across entire directories of source code (although it took a long time).

Second, research into what instructions compilers typically used lead to RISC—Reduced Instruction Set Computers. The idea behind RISC is that instead of wasting silicon on complex instructions rarely used (by compilers), instead make the instructions simple and then waste silicon on making those instructions fast (with the result that writing in Assembly on those systems is even more tedious than their CISC ancestors).

Third, programmer time kept getting more and more expensive while hardware kept getting both faster and cheaper so who cares if compilers produce less than optimal code? It's not execution time that needs to be optimized for anymore (well, there are still a few instances but if the code runs fast enough, that's good enough).

So it is with control panels.

First, the argument can be made that control panels can only get better. At least, I would hope so. The third point—the expense of humans will always be true—the less humans you have, the cheaper it is. And as with compilers, which means you can employ less experienced programmers (or fewer experienced programmers), control panels mean you can get by with less experienced sysadmins (or fewer experienced programmers). Not that this is a bad thing mind you—at one point it looked like everyone in the US would have to become telephone operators to handle the growth of phone calls and to a point, that's what AT&T did—it turned everybody into their own operator.

It's the second point that's the problem. The success that compilers (and RISC architectures) have had in recent years is due to a large amount of blood, sweat and tears in making it work well (CPU designs changed to make compiled code run faster, and compiler designs changed to adapt to the new CPUs). Now, does that mean that configurations will have to get simpler? Well … perhaps. As it stands, control panels do make certain tedious operations easier, as long as the tedious operation is something the programmers planned for. But I don't think simplification of configuration files is the answer. What may need to happen is a decoupling of the configuration from the service. Or a way to feed the configuration to (and from!) the service from different sources.

But what I see happening is a reduction in the ability to configure services, and not even a consistent set of reductions either! (for instance, Insipid has the concept of an “alias” for a site, where the same website comes up under two different names, but Blech doesn't—you can physically host a site, or have the request for a webpage forwarded to another server, but there didn't seem to be the option to setup an “alias” like you can under Insipid—on the flip side, under Insipid you can't set up forwarding like you can under Blech) And I prefer to edit files over using a GUI.

And I still like programming in Assembly from time to time.

Wednesday, March 23, 2005

Forget disturbing search requests, how about “Disturbing Ad Requests?”

Third day, and already I'm leary about Google's AdSense.

Earlier today it wasn't serving up ads. At first, I thought they took exception to my critical stance towards them, or of the disclaimer I have just below their ads and dropped me. But no, I was still signed up. It's just that for a period of time, Google just … couldn't serve up ads.

How odd.

Then, when it was working again, what do I see? An add for “Diary Of An Anorexic Girl” followed by an ad for “Fleming's Steakhouse” (at least the steakhouse is in Florida and not Massachusetts).

What is it with Google?

I've set up my site so that Google will index each individual entry, and yes, the Googlebot is pulling up individual entries, so why can't Google match the advertising better? I thought the whole point of AdSense was targetted text based ads.

Genres of advertising

To: “Sean ‘Captain Napalm’ Conner” <>
Subject: Google advertiser exclusion
Date: Wed, 23 Mar 2005 21:22:17 -0500

Not sure if you know, but you can go into your AdSense account and enter exclusions for the advertisers you don't want to see on your site.


I know you can excluse particular advertisers through AdSense, but not genres of advertising. So, while I could exclude ads from Weight-Watchers, that still means I get ads for FatBurners-‘Backwards-R’-Us. And if I go down the path of nuking individual advertisers, then I run into the set limit of 200 excluded advertisers. It was more of a way to exclude competitors.

Thursday, March 24, 2005

Now THAT would be cool!

I know that transparent screens (link via don't exist yet, but I want one. I really want one.

Friday, March 25, 2005

More like a foolish inconsitency

A foolish consistency is the hobgoblin of little minds.

Ralph Waldo Emerson

You want to use a database for a PHP project. Okay, PHP supports several different types of databases, like PostgreSQL and MySQL among others, and being SQL, there shouldn't be much difference bewtween SELECT statements, right? (wrong I know—there can be huge differences between SQL implementations, but like Alan Kay said, the simple stuff should be simple). So, I would expect something like:

$db = db_use('mysql');
$result = db_query($db,"SELECT widgets FROM parts WHERE color = 'red'");

$db = db_use('postgresql');
$result = db_query($db,"SELECT price FROM catalog WHERE parts='widgets'");

You select the type of database you want to use, and PHP automagically handles the details for you. The simple stuff should be simple, right?

But not in PHP. No. In PHP you get a show bunch of functions that work only on MySQL, and another set for PostgreSQL, and yet another set for Oracle. It's not like once you select a database that you'll end up changing it any time soon, right? Who changes databases? So chances are, once you select a database, that's it and who cares if there's a specific set of functions for this database and a different set for another database?

Well, unless you make it available for other people to use (open source or not) and they want to use one of those other databases? Heaven forbid that happening.

But hey, it could happen, right?

Which gets me to some PHP code I had the pleasure of dealing with today (and no, it wasn't osCommerce):

$result = $system_query("SELECT * FROM sometable$name");

Hello! $system_query? That's a variable! Hmmm … that's … interesting. Poke around some more …

$system_connect = $list[0];
$system_affected_rows = $list[1];
$system_error = $list[2];
$system_insert_id = $list[3];
$system_fetch_row = $list[4];
$system_num_fields = $list[5];
$system_num_rows = $list[6];
$system_query = $list[7];
$system_result = $list[8];
$system_select_db = $list[9];
$system_field_name = $list[10];

$system_connect = ereg_replace("\n","","$system_connect");
$system_affected_rows = ereg_replace("\n","","$system_affected_rows");
$system_error = ereg_replace("\n","","$system_error");
$system_insert_id = ereg_replace("\n","","$system_insert_id");
$system_fetch_row = ereg_replace("\n","","$system_fetch_row");
$system_num_fields = ereg_replace("\n","","$system_num_fields");
$system_num_rows = ereg_replace("\n","","$system_num_rows");
$system_query = ereg_replace("\n","","$system_query");
$system_result = ereg_replace("\n","","$system_result");
$system_select_db = ereg_replace("\n","","$system_select_db");
$system_field_name = ereg_replace("\n","","$system_field_name");

$system_connect = ereg_replace(13,"","$system_connect");
$system_affected_rows = ereg_replace(13,"","$system_affected_rows");
$system_error = ereg_replace(13,"","$system_error");
$system_insert_id = ereg_replace(13,"","$system_insert_id");
$system_fetch_row = ereg_replace(13,"","$system_fetch_row");
$system_num_fields = ereg_replace(13,"","$system_num_fields");
$system_num_rows = ereg_replace(13,"","$system_num_rows");
$system_query = ereg_replace(13,"","$system_query");
$system_result = ereg_replace(13,"","$system_result");
$system_select_db = ereg_replace(13,"","$system_select_db");
$system_field_name = ereg_replace(13,"","$system_field_name");

Um … okay … what's in SQLcalls.txt?



A list of the MySQL function calls in PHP are read in, then the trailing line ending characters are stripped. Never mind that could be done as:

$list                 = file("../SQLcalls.txt");
$system_connect       = rtrim($list[ 0]);
$system_affected_rows = rtrim($list[ 1]);
$system_error         = rtrim($list[ 2]);
$system_insert_id     = rtrim($list[ 3]);
$system_fetch_row     = rtrim($list[ 4]);
$system_num_fields    = rtrim($list[ 5]);
$system_num_rows      = rtrim($list[ 6]);
$system_query         = rtrim($list[ 7]);
$system_result        = rtrim($list[ 8]);
$system_select_db     = rtrim($list[ 9]);
$system_field_name    = rtrim($list[10]);

which not only would be slightly faster, but a bit more maintainable and portable (and I don't even know PHP that well and already I'm writing better code in it—sheesh!). But besides, that, the intent of the programmer seems to be a way to isolate the name of the function so that the code can be quickly “ported” to use different databases. Laudable, except for one small little detail—


Let's try using PostgreSQL. Well, let's see if we can map the MySQL functions listed to their PostgreSQL or Oracle counterparts:

PHP function equivalents between MySQL, PostgreSQL and Oracle
MySQL PostgreSQL Oracle
mysql_connect() pg_connect() ora_logon() or ora_plogon()
mysql_affected_rows() pg_affected_rows() ora_numrows()
mysql_error() pg_last_error() ora_error()
mysql_insert_id() pg_last_oid() (guess) ?
mysql_fetch_row() pg_fetch_row() ora_fetch()
mysql_num_fields() pg_num_fields() ora_numcols()
mysql_num_rows() pg_num_rows() ora_numrows()
mysql_query() pg_query() ora_parse() + ora_exec()
mysql_result() pg_get_result() ?
mysql_select_db() ? ?
mysql_field_name() pg_field_name() ?

It's beginning to look pretty bad, but that's not the worse of it. Let's just concentrate on the connect functions. mysql_connect() looks like:

$mysql = mysql_connect("","db_user","soopersekrit");

But that just connects you to the MySQL server. You still have to select which database you want to use. Then you have pg_connect():

$pg = pg_connect(" port=5432 dbmame=warehouse user=db_user password=donttellanyone");

In which you can specify the database. Now there's ora_plogon():

$oracle = ora_plogon("","shhhh");

Which supposedly will hook you up with the database in question. I guess. Because I couldn't locate the PHP Oracle equivalent to mysql_select_db(). But aside from that, notice anything about the three calls? Like how they're all completely different? mysql_connect() takes three parameters (well, there are more, but they're optional), pg_connect() takes just one, but the single string argument contains name/value pairs, some of which are optional! And ora_plogon() takes two.

Nice try, but a wasted effort.

How many variables changed? Let me count the ways …

The previous rant was brought to you by a site that moved from a Linux 2.4 system running Insipid, Apache 1.3 with PHP 4.2 and MySQL 3.23.x to a Linux 2.6 system running Blech, Apache 2.0 with PHP 4.3 and MySQL 3.23.y and wasn't working properly on the new system.

I can't say for certain that the problem isn't Apache, PHP, MySQL or Linux, but each piece works, and they seem to be working together, but given that PHP is the scripting language du jour it's not out of the question that the code which works (for the most part) under PHP 4.2 doesn't work under PHP 4.3.

Or it may be that it works under PHP 4.3 but only under Apache 1.3 and not Apache 2.0.

Or it may be that the database replication from one server to another one didn't work (but all 322 tables have been replicated).

Or it could be that it's a weird interaction with Apache 2.0 and PHP 4.3 and Linux 2.6

And let's not even get into the environmental differences between Insipid and Blech.

Today was not a fun day (and I never did figure out why the code doesn't work—I may leave that up to the customer to figure out).

Tuesday, March 29, 2005

The principle of Varnasrama Vindaloo Dharma

I reached one more branch out to her, in the form of misspelling the name of the god of destruction as a liquor brand. But it wasn't enough to get her to tell me to fuck myself, so I started making up my plan. Which was real simple: Take her money and cut and paste a paper together from the internet that was so obviously plagiarised that she'd be guaranteed to get caught. And then, if I was able to get the information out of her, I'd report her to whatever her school was, and who knows, maybe even pump her for double money in exchange for not turning her in. Either way, I'd eventually be writing the story up in this blog, and sending her the link to it.

Is this harsh? Eh, I don't think so. She got the syllabus saying she'd be kicked out of school for plagiarism, so she shouldn't be surprised. Plus, I have a nice little English degree that I did all the work for myself, so I find it a little offensive that this girl for whom money is no object is buying papers like that.

Via theferrett , Laura K. Krishna is a Plagiarist

The paper read like something I might try to get away with, but at least I would be the one doing the writing, not a professional comedy writer out to destroy my college career (I can do that perfectly well on my own thank you very much).

I also don't think Nate was out of line for what he did—he did give Laura several clues that he himself was clueless about Hinduism (the given topic of the paper) but Laura never clued in and continued pestering him about writing the paper (and willing to pay for it, money being no object). Such actions, if left unpunished, will only devalue college degrees (and they're pretty low as it is). And besides, it's not like colleges never mention “Don't plagiarize” to students—I recall that coming up every class I took.

Wednesday, March 30, 2005

… but her Mom is nice

About the principle of Varnasrama Vindaloo Dharma, my friend Steve Crane (on a mailing list we're both on) send a link to BoingBo ing, saying it's a hoax, an April Fools hoax, but yet, according to the original site, it's not:

So it became Monday, and instead of finishing off my nice prank I was going to share with two or three dozen real-life friends, I was faced with all of you people looking for blood. I didn't want blood. What I wanted was irony. Perhaps to facilitate the founding of a scholarship at her school, or get her to donate Hinduism books to the library, or even just to get her to actually write the damn paper. But it was all happening way too fast, and I knew at that point that the site would come around to her way faster than my timeline had projected.

So the e-mail revealing the link went out Tuesday afternoon instead of Wednesday morning, while I still thought there was a slim chance of warning her. Hours later, she found me on im. There was lots I wanted to ask her, and lots I wanted to shame her about. At this point, I figured that the internet had punished her, and she's already an example even if she doesn't get expelled.

Laura K. Krishna is Just a Dumb Kid With a Nice Mom

So, is it a hoax? Is the BoingBoing notice a hoax? Hard to say about this one (and if either is an April Fools hoax, they're still a few days early).

But, reguardless, it has brought up a nice debate about plagiarism and whether the punishment (of public ridicule on the Internet) fits the crime (of paying someone to write a college paper). I'm siding with the “not a hoax” theory myself and that Laura K. Krishna (not her real name) is learning a hard hard lesson.

Thursday, March 31, 2005

The magic switch

I called another hacker over to look at it. He had never seen the switch before either. Closer examination revealed that the switch had only one wire running to it! The other end of the wire did disappear into the maze of wires inside the computer, but it's a basic fact of electricity that a switch can't do anything unless there are two wires connected to it. This switch had a wire connected on one side and no wire on its other side.

It was clear that this switch was someone's idea of a silly joke. Convinced by our reasoning that the switch was inoperative, we flipped it. The computer instantly crashed.

A Story About ‘Magic’

The machine was incommunicado anyway.

We couldn't ping it, and it didn't respond when we plugged a keyboard into the machine. Dan, the network engineer had been wanting to move the machine anyway, since a colocated server shouldn't really be in the core router room (it was there because at the time, that was the only space for it). I figured why not? We'll be rebooting it anyway. Dan noted the phone number on the front of the computer (not a bad idea actually) and said I should notify the customer about the situation.

“Hello, this is Sean from—”

“I don't speak English,” said the woman's voice on the other end of the phone number. Perfect English, a slight hint of an accent I couldn't quite place.

Instinctively I raised my voice, because, you know, an increase in volume always brings about an increase in language comprehension. “Is there anyone there that speaks English?”

“I don't speak English.” Click.

Um …


Smirk's on vacation for the week, and only he knows his accounting system enough to plumb customer phone numbers from it. All I had to work with was the one scrawled on the front of the computer, and hey, I gave it a shot. This machine needs to be moved, then restarted. The move itself went quickly, even though the machine was an ungainly large tower based system. Plugged in the network cable, power, monitor and keyboard from the crash cart, and hit the power switch. Power supply fan started, then stopped—nothing. Hit the switch again. Power supply fan started, then stopped nothing. Went around to the front of the machine to see what might be going on. Hit the switch. Power light went green, the CD-ROM light flashed briefly, as did the floppy drive. Then all went dark.


Checking the machine, I found a switch on the back of the machine. So for several minutes I tried various combinations of switches. Then I unplugged the network card. Then the keyboard. The machine finally powered up.


Um … maybe.

The machine came up with this overly large Hewlet-Packard logo and just sat there. I wanted to nervously tap the Caps Lock key, but then remembered, the keyboard wasn't plugged in. So I just stood there nervously tapping the keyboard anyway. After three or so minutes I saw the familiar “Lilo” prompt, followly quickly by Linux booting.

I then stood there watching disk partition after disk partition being scanned. Two disks, each appeared to have seven or eight partitions. After about ten minutes the screen blanker kicked in.

Okay, I unplugged the monitor and put the crash cart away—there wasn't much I could do at that point and I figured it was another few minutes it would be up and chugging away serving whatever it was it served.

A bit later the customer called, saying his machine was down. I should have come up by now. Hooked the crash cart back up to it, keyboard still wouldn't respond and the screen was still blanked. Nothing much else to do but reboot it.

Okay, wait for three minutes looking at the Hewlet-Packard logo, then Linux is booting and Oh! fsck needed to be run manually on one of the partitions and it's asking for a root password.

I don't have a root password.

Okay, let's try booting into single user mode.

Nope, wait three minutes for the Hewlet-Packard logo, boot into single user mode and still need a password.

Okay, let's try using a rescue CD and manually check the partition.

Yes, waited three minutes and the CD worked.

Okay, take out said CD, and reboot the machine. Wait three minutes, see Linux boot, and the network interface failed to initialize.


Put the CD back in, then shut the machine down and try initializing the network interface using the rescue CD to see if it's a hardware or software issue.

Note, this time, instead of just resetting the machine, I power cycled.

Well, power downed. It wouldn't power back up.

And by now the customer was on the phone asking what had happened.

I told him, and asked him if there was any special procedure I needed to follow to get the machine up and running.

He wasn't aware of anything special, other than making sure the switch in the back was in the “On” position, and toggling the front button.

This was not good.

Customer suggested I unplug the CD-ROM. Which meant I had to open the computer. Which meant I had to remove the top to remove the side to remove the power from the CD-ROM. The side of the computer case had to slide all the way out. Not just back a bit then fall to the side. Nope, it had to sliiiiiiiiiiiiide all the way off. Not an easy thing to do while it was still in the rack.

Still wouldn't power up.

So, remove power to the floppy drive.

Still wouldn't power up.

By this time, I had both P and Dan crowded around the machine, and Dan noticed that the power supply for this huge system with dual harddrives and a CPU the size of Rhode Island only had a 250W power supply.

Okay. Swap in a larger power supply.

Now, mind you, I was on the phone with the customer while all this was going on—I had a mobile phone with a headset.

Take the machine back to the rack, power up.

Hallelujah that worked!

Machine powered up, sat there at the Hewlet-Packard logo for three minutes, booted into Linux and still refused to initialize the network interface. And now, I realized that the CD I wanted to boot was stuck in the still unpowered CD-ROM (the new power supply didn't have enough connectors on it to supply power to the CD-ROM).

Next scramble, new network card, in a different slot than the old card.

Now the wait was five minutes, and it still didn't work.

Next scramble, found a network card that was the same model as the one that was originally in the machine.

Wait five minutes, boot and hallelujah it initalized the network.

Only the machine was in the middle of the floor, with its cover off.

So the customer logged in, shut it down, so we could put the covers back on and slap it into the rack.

Wait five minutes—

—and the network card didn't work.

At the customer suggestion, I removed the covers, took out the replacement card, held it for a few moments, then put it back in. Powered on, waited five minutes, saw the system boot and—

—the network card was working.

“I'm not putting the covers back on. I don't want to touch the machine,” I said.

“I don't blame you,” said the customer.

I'm not touching that machine again.

Obligatory Picture

[The future's so bright, I gotta wear shades]

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:, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

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-2024 by Sean Conner. All Rights Reserved.