Writing XML and HTML in WordPress

It was frustrating for months… WordPress was swallowing angle brackets commonly used in XML and HTML as actual tags. This made pasting in sample tags into a message impossible. The fix?

From WordPress’s Admin menu, Options / Writing, and uncheck the box for “WordPress should correct invalidly nested XHTML automatically”. Also turn off the wysiwyg editor helps, done by Users and scrolling to the bottom left and unchecking the box.

Retrospect Express (hack to fix)

Retrospect Express, which comes as the default backup software with Maxstor One-Touch drives, breaks with .NET 2.0 – here’s how to fix.

Recently a XP user, let’s call him “dad,” obtained a Maxtor One-Touch 500GB USB/Firewire hard drive for remote storage. With it came some free backup software, Retrospect Express, which he used for making incremental backups.

It was working well enough until he upgraded to .NET 2.0, then mysteriously the software didn’t work anymore. It stuck at “Checking status…” and didn’t recognize any restore points. Nothing seemed to help.

I ran FileMon to watch what Retrospect Express was trying to do when it started. It was trying to repeatedly write to a log file and failing. So, I created the file, and tried again. It was an audit message saying it was failing at a .NET Hashtable. Clear evidence that the changes in the .NET 1.1 to .NET 2.0 collection API messed up Retrospect Express. Or, another way to look at it, Retrospect Express was trying to use the latest .NET, but was coded for the older .NET, and even though -both- were installed, it failed to run.

Turns out a lot of people on the Internet were having this very problem. And, everyone who contacted Dantz, the makers of Retrospect Express, seemed to get the same abusive treatment: left on hold for an hour, only to be told they’d need to pay to have assistance, and that the copy that came with the drive wasn’t registered. It wasn’t Microsoft’s problem, nor Maxtor’s. A fix had been promised on the web for months, but nothing was come of it. In the eyes of the online community Dantz was being an evil bastard company, and it was hard to disagree.

Luckily, persistence paid off, and a user I only know as Chris posted this in a forum:

  1. Close Retrospect Express, including the icon in the system tray.
  2. Create a file called Retrospect.exe.config and using notepad, put this in it:
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <startup>
    <supportedRuntime version="v1.1.4322" />
    </startup>
    </configuration>
  3. Save the file in the same directory as the Retrospect.exe file (usually in C:\Program Files\Dantz\Retrospect Express HD\) and try running Retrospect Express again.

This solved the problem, coercing the application to use the older v1.1 copy of .NET.

Chris, whoever you are — thanks.

Accessing Windows Machines from OS X

How to get your OS X system to see your files on Windows XP.

I have a number of friends who are making the switch from Windows to OS X, and I thought I’d pass along this simple step so they can easily access their Windows machines from their OS X systems.

Step 1) From Finder, choose Go / Connect to Server… (although, I almost always use the shortcut and press Command-K at the desktop)

Step 2) Enter the server address in this form

cifs://WORKGROUP;Walt%20Stoneburner@BOATANCHOR/C$

  • Use cifs (Common Internet File System)
  • Use :// …much like you do when you do http://
  • Make sure the slashes go forward
  • Specify the workgroup — you can find this by right clicking My Computer on the Windows box, choosing properties, and going to the Computer Name tab, then looking for Workgroup
  • Be sure to put a semicolon a the end
  • Specify your username, not your “full name” — you can find this by pressing Control-Alt-Delete and reading the “Logon information section: ‘…is logged in as BOATANCHOR\Walt Stoneburner‘”; press ESC as not to reboot.
  • If you have any spaces substitute them with the hex code %20 as shown above.
  • Use an at-sign and enter the machine name — you can find this by pressing Control-Alt-Delete and reading the “Logon information section: ‘…is logged in as BOATANCHOR\Walt Stoneburner'”; press ESC as not to reboot.
    If you want, you can use an IP address instead of a machine name.
  • Then specify a forward slash, followed by the shared resource. C: is C$, D: is D$, and so forth.

Once you Connect, you can press the plus sign to remember this setting so that you’ll never have to enter it again.

FireFox Bug: Text Disappears when Shift-Double-Clicked

In FireFox, if you shift-double-click while editing, the text vanishes. Bug? Or, is there a deeper story about design and bug reporting that this exposes…

That’s the problem with bug reports in general. Something’s missing — because what you’ll hear back from the developers of FireFox is that it’s not a bug, it’s a feature, and it works by deisgn.

More importantly, …they’re right.

Allow me to walk you through the problem: you’re editing using GMail, WordPress, or LiveJournal — when you go to select some text by doing a Shift-Click and drag, your mouse stutters or perhaps by accidental muscle memory habit you end up accidently Shift-Double-Clicking. To your surprise all the text in the input box becomes invisible.

The content is still there, hust invisible. You can move the cursor around. If you submit, it gets sent. What gives?
It’s not an accidental one-time software glitch, it’s repeatable. It doesn’t matter if you’re selecting text, or shift double clicking in one spot: it happens consistently.

So, before filing a bug report, you try it on different browsers.

IE, no problem. Opera, no problem. Safari, no problem.

And there’s a surprising confirmation that FireFox behaves this way both on XP and OS X, so we’re pretty sure it’s a FireFox issue at this point. We try it on the latest build right out of the development tree, and it happens there, too.

Time to report a bug.

If you follow the directions, and many people don’t, you learn that this bug has already been submitted to the FireFox development team many times.

XP – BUG 307612 and BUG 307613,   OS X – BUG 317687.

I personally don’t think people who take the time to research and submit a bug are stupid or lazy, stopping just short of duplicate checking. I think that the keywords used to search for duplciates aren’t expansive enough to do the job well. I search for “Disappear” and get a hit, someone else searches for “Invisible” and gets a miss (so they report a bug).

Another problem, assuming you read all the bug reports to the end: The developers closed it.

The last thing that you want to see on a bug you just verified are the words RESOLVED and/or INVALID, because you know it’s going take some arm twisting to convince the development team otherwise.

One of the fundamental problems being on a development team is that you do get an awful lot of things that aren’t bugs reported as bugs. There’s tons of duplication, and worse, tons of ambiguity. Despite writing detailed directions explaining what information is needed and in what format, most bug reporters don’t do that. It becomes too easy to throw the baby out with the bathwater.
I almost wish there were was a flag attached to one’s bug reporting account that said “I’m either a professional software developer or I have worked in a QA division” that would weight the submissions higher in the developer’s mind. It’s the same problem as when you’re the company IT expert and you call Dell for a support issue and their level one technician wants you to reboot and reinstall the operating system.

The problem is also reversed. And this is a problem that needs fixing: developer responses can also be ambiguous. We’ve all seen cases where a bug is marked as “not a bug” or “works as designed” with no explaination.

But not in this case, luckily. One of the developers has the insight to point out that this is an AdBlock feature, and it’s by design. By design?
This explains a lot, everything to why it only appears to happen to FireFox — since that’s the browser that uses the AdBlock extension. It explains why the FireFox team is wasting time chasing after these, it’s not their problem. It explains why their responses are terse, as, again, it isn’t their problem. Disabling AdBlock itself, not just it’s filters, but the whole extension, solves the problem. Problem is, I like AdBlock. I need AdBlock. I want AdBlock.

Now sometime software works as it was designed to work, but fundamentally the design is wrong.

Joel Spolsky describes it like this: A user interface is well-designed when the program behaves exactly how the user thought it would.

And there is nothing about a text area waiting for input that makes me expect that Shift-Double-Clicking while trying to select text should permanently turn the entire contents of the text box invisible while editing.

That’s about as annoying as the folks who put the “Quit Application With No Save or Confirmation” menu item right next to the “Save” menu item, where a mere slip of the mouse spells disaster.

Further investigation of AdBlock’s development area, shows there’s a nifty feature called Quickblock, which allows you to Shift-Double-Click an element on the screen and make it turn invisible. It’s a great way to zap ads or annoying content!

Problem is, the trigger mechanism is very close to an action commonly used by editing. And, Adblock doesn’t make a distinction whether it’s an input control or not — and why should it, as if it did, advertisers would put ads in controls.

This doesn’t solve our problem as a user, though. It’s a good feature with bad interface design. Luckily, one that can be easily solved.
Either the shift-double-click needs to be changed to something else, or we need the ability to turn it off or lessen it’s sensitivity.

In the thread, “Quickblock makes me sad“, we see that other users are plagued by this problem, and some users have started building their own versions with this feature disabled.

Clever, but this is not something the source code should have to fork over. Nor, is it something the layperson should be expected to have to do just to be able to safely edit text.

Quickblock should remain a feature, but it should be possible to disable it, disable it for a list of specified sites, or have a mode where it’s possible to have it not affect editing controls. In fact, I’d be quite happy if when I Shift-Double-Clicked on an edit control if it then asked me for confirmation, but not on other elements.

I’ve proposed the change as a new minor feature, assuming I haven’t missed how to do it already (which is possible). But I have my doubts anything will happen.

Why? I’m a developer. And my natural knee-jerk reaction to an end-user is “if you are doing something that causes a behavior you don’t like then don’t do it anymore.” Problem is, developers don’t use systems the way end users do, and that makes them predisposed to not share the user’s perspective. Afterall, programmers don’t spend their days on the web writing in little edit boxes, and if there’s a problem with one, there are a dozen work arounds, including opening an editor, composing, and pasting. We think other users work like we do and know how to use other tools like we do.
But that’s not how users think or work.

My hope is that if you are also having this problem, you’ll find this article before you bug the guys at FireFox with it, and instead go here and add your voice, in a kind way, so that the great developers of AdBlock know how to improve the product further and to show that you support their tireless efforts.

OS X: Batch Rename from GUI

This is the third time I’ve had to go hunting how to enable batch filename manipulations for OS X. Now I’m documenting it so I don’t have to hunt this down again.

I keep forgetting about this trick, so I thought I’d post it in the event I have to ever do it again.

Part of the problem with a graphical GUI is that it’s very difficult to rename files in batches, for instance, prepending some text to a group of files.  This kind of thing is fairly trivial at the command line.

Apple has a facility to do this, but as it’s not something a regular user does often, it’s not enabled by default.  Here’s how to get all kinds of additional functionality out of OS X.

1) Open /Applications/AppleScript

2) Turn on Show Script Menu in menu bar

3) Optional: turn on GUI scripting, show library scripts, and choose where to show them.

You’ll notice up near the time in the menu bar a black scroll has appeared.

All the batch renaming and filename twiddling stuff is under the Finder Scripts.

UPDATE 19-Dec-2009: Upgrading to Snow Leopards deletes some useful scripts, specifically the Finder Scripts.

UPDATE 31-Aug-2010: The scripts live in “/Library/Scripts/Finger Scripts” and are

  • Add to File Names.scpt
    md5 4b0cd899acb19b5fc62ef2049d81a933 – 18114 bytes
  • Change Case of Item Names.scpt
    md5 af7429228be4d0e1a096092af5341c52 – 17808 bytes
  • Replace Text in Item Names.scpt
    md5 716493cab1c569953a7f40d76ed9a1f7 – 24328 bytes

Upgrading G5 Storage

The default Macintosh configuration my PowerPC G5 came in included 250GB of disk space, far less than I need. Additionally, within the last year I’ve have my bacon saved by RAID systems no less than three times. Consequently, I wanted more storage with RAID’s reliability.

This led me to purchase two 500GB SATA drives from Tiger Direct, and two external 500GB OneTouch II Firewire 800/400/USB drives from AxentMicro for backup purposes.

As an amusing aside, I ordered both orders the same day at about 3:30pm. AxentMicro surprised the pants off me, because for $7 in shipping, the order was sitting at my home at 3:00pm the next day — that’s less than 24 hour turn around time, and I paid for cheap ground delivery.

My dad happened to be over and eyeing the drives, so I ordered another online, and again AxentMicro had ultra fast deliver. They win on speed and price! New loyal customer here.

Meanwhile, I checked my TigerDirect order. They still had not processed it. It took two days of phone calls, redirection to an authorization department, and finally when I called a different number to cancel my order, they told me they had a server down and would ship immediately with second day delivery. It arrived three days later, but more importantly they never asked for any proof that I was who I said I was in order to authorize the purchase. Scarey. Next time I’m going to go with another dealer, even if it is slightly more expensive.

That said, the 500GB internal drives arrived just fine. There were no mounting brackets, no screws, no SATA cables, and no instructions — something that would be problematic for a PC install.

I connected an external Firewire drive up, booted, and ran Carbon Copy Cloner to “ghost” the drive; this is uncrippled shareware that makes an exact duplicate of your drive, which means it’s bootable. And unlike XP and it’s System ID (SID) problems, Apple doesn’t make you jump through hoops to clone your environment.

Curious, I opened the G5 case and saw two bays. Holding the existing drive in place was a large, well constructed tab that was simple to flip up.

I was also pleased to see that Apple had the power and data connectors already provided, already connected to the motherboard, and already threaded through the case. Sweet!

Getting the power cable off the drive was a little more problematic and required more force than I felt comfortable doing, but there were no problems.

The drive bay is clever design. The illusion is that you have two drives that slide in, one above the other. You don’t seem to have clearance to get the top one out, and there’s no way to take the case apart. But trust Apple, there’s magic.

Pulling the drive forward causes something interesting to happen. It descends. Those “parallel” tracks are actually kind of S-shaped. The drive came out without a hitch.

As for the special rubber rounded screws for the drive, I took the first set off the drive that came out. And the second set was built into the case right by the drive bay. Clever!

So, the drives slid back in, top one first, which magically lifted into place, followed by the bottom one. The cables connected with ease, and I put the cover back on.

The system booted from my external firewire drive without incident. Using Disk Utility, I built a RAID configuration from the two new drives. (OS X Extended, Journaled — do not use case sensitive, as some applications not used to true Unix don’t get things quite right.)
Then I ran Carbon Copy Clone to move things back.
Rebooting back onto internal drives, it just worked. Ya gotta love Apple!

(If applications don’t work, check the log files — most likely you’ll see “missing” files. Unlike Unix, you do not want case-sensitive filenames with OS X for historical reasons. For instance, Adobe checks for a directory called “version” in one place and “Version” in another, they should be the same, but Windows and default OS X installs don’t make this distinction, so it’d be a legacy artifact. These simple kinds of inconsistency problems suggest Adobe products won’t port to Linux for quite a while, which is a shame.)

Marcus Solves Alienware Problem

Marcus figures out how to make his Alienware laptop stop overheating. It’s a hack, but it works.

My friend Marcus is an amazing computer technician, and has found a way to prevent his Alienware Laptop from over heating.

I came home yesterday and started working on the laptop. After finding that their image uses a Japanese version of Direct X, I wiped the HDD and started over with my own build. I installed all the most up to date drivers, so on. I started with the most basic issue I have had, game crashes. The Event Viewer didn’t have anything to report.

Usually when that happens it’s a hardware to software write fault and it happens to fast for the Event Viewer to get a record. Games appeared to be crashing therefore from an unknown device. Based on my past experience with the laptop and known issues with the NVIDIA 6800 Ultra, I started there. The drivers are from 9/28/05, not that old, but not very up to date compared to Dell’s site. Sadly, the drivers are proprietary in design for laptops so I can’t use the Dell 6800 driver. Since I couldn’t go any further in that direction, I decided to look at any other video settings. The driver itself appears to be a basic default of options, nothing remarkable.

Then I decided to look at the laptop case and all of it’s physical options. There is a button on the keyboard for external video. It allows 3 settings for an additional external monitor. The first setting allows for a mirror image to be displayed on both the laptop screen and the external. Both run the same resolution which is based on the max res of the laptop’s screen. Next setting allows for one desktop to be expanded to both screens. The last setting turns off the laptop screen and puts the image only on the external monitor. This unassuming switch happens to be the root of all my laptop’s evil. If the 3rd option is used and video signal is sent only to the external monitor games crash and for that matter, IE crashes. I found that any time the video card reads a monitor that can go beyond the max res of the laptop’s own screen, the laptop overheats shuts off, crashes..so on.

This means that my laptop will now run as a standalone and only if the external monitor is set to mirror. Oh, it also means that it won’t run using the image they sent and that the video card driver needs a major update. I could send the laptop back using the RMA they gave me, but I [doubt] they will never figure out that their own HDD image is one of the problems. … My laptop has been operational with incredible performance the last 2 evenings without a single error.

Making Backseat Screen Navigation Work

A simple scheme for locating stuff on the screen for another user.

We’ve all had it happen, someone else is driving the mouse and you’re trying sitting next to them trying to tell them what to click.

Confusing Screen

“Click Movie Trailers.”

“Where?”

“Right by your mous…you moved it.  Go down.  No dow…too much, go back up…stop, no up an inch.”

“I don’t see it, where?”

“In the blue box.”

“What are you talking about?  The whole screen is blue.”

“Stop wiggling the mouse! You’re almost on i…no, stop, you’ve missed it again. :sigh:
Can I drive for a second?”

“Fine!!!”

Sound familiar?

This all too common conversation is the source of much frustration.  I’ve had it with my wife, my parents, and even with coworkers… people who use computers every day.  So what’s wrong — why isn’t the obvious… well… obvious?

The problem is that the way we use mice is like the way we drive a car.  We don’t think about using it, instead it magically seems to follow where our focus of attention is on the screen.  So, when something isn’t apparent on the screen, we go searching for it and our attention wanders, and the mouse follows it — much to the annoyance of the person feeding instructions by relative offsets of where our attention was, not is.

What we need to solve this problem is a simple way of getting both parties focused on the same area using absolute terms. When the resolution of attention is focused tight enough, the desired object will easily leap off the page.

Here’s a technique I came up with while backseat driving my wife through a software application.  I’ve successfully used it at work in complex development enviroments.  I’ve even guided someone through an OS install and update from 10 feet away using it.  You’d be surprised at how simple the technique is.

Simply agree to divide the screen into a 3×3 grid, assigning each cell a number 1-9, using the same scheme as a touch tone phone.

Dividing Up a Screen

Just call out the cell number.  e.g., “8”

If the person doesn’t click on the thing you told them to, then divide up that grid, mentally, the same way.

Grid in Grid

To which you call out a sub-cell.  e.g., “2”  (Thus, this is cell 8-2.)

Grid, two deep

I’ve never had to go deeper, as the originally sought item becomes apparent to the user.

So, back seat driving would sound like this “Click ‘Movie Trailers’, eight, two.”  And in moments, the user has it.

Jumping Optical Mouse: This Is Gross

How to fix the most common problem with optical mice — warning: it’s gross.

It seems that there are a large number of people experiencing problems with optical mice erratically jumping to a new position on the screen.

In the most common case, this is simply a matter of the table surface being oddly patterned or textured.  You know this is the problem when the mouse just goes in the wrong direction for no good reason.

In the least common case, there’s actually a hardware problem, and you can often get the vendor to replace it.  This exhibits itself as the slightest touches sending the mouse pointer rocketing to one of the screen corners.

But there’s a fairly common problem that most people have over looked, and it’s friggin’ gross, but knowing about it fixes the problem in most cases.  I put this tech solution in the “Everybody Poops” bin. You know you have it when your optical mouse works fine most of the time, and for no apparent reason will make a short hop to a new location near by the old mouse cursor position.
Perhaps you’ve heard of keyboard plaque, that nasty cruft that collects on keyboards?  Well, part of the reason we’re all using optical mice is because a wheel mouse picks up dirt and dust off the table and it eventually gets wrapped around the internal rollers, meaning you have to take the wheel out and pick the crud off.  But with optical mice, that shouldn’t be a problem… right?

Problem is our hands sweat as we use a mouse.  Natural oils and preperation rub off on the table.  This can make small sticky areas for dirt and dust.  Dead skin comes off too, which some estimates say is what 90% of indoor dust really is.   This builds up as an area of concentrated table plaque.

If you look real carefully and up close at the area where your mouse sits on the table, you’ll see it is covered with little dark grey specs.  And long before you notice these, your optical mouse has to dance over them.  Unchecked, they’ll get quite visible and even flake off.
Who knows what the mouse optics see, but the texture and reflectivity radically change for an instant, and your optical mouse will jump on the screen trying to compensate for the motion it incorrectly perceived.

The solution is simple, borrow a credit card, cause you most likely won’t want to use your own, and scrap the table surface with its edge.  You’ll notice stuff coming up easily, and a hint here: it’s not the finish.  In moment’s you’ll have a clean surface, and surprisingly your mouse will start working again.