Mon 31 Mar 2008

Backend rewrite

I spent this afternoon fixing my blog's speed problem: I dumped all 1,500 posts into MySQL, and rewrote the frontend to use it. Database queries are faster than munging 1,500 files over a slow NFS link on a busy server. Let me know if you see any problems.

Posted at 2008-03-31 00:58:00 by Richard NewmanLink to Backend rewrite
Comments, trackbacks.

Fri 28 Mar 2008

Slow

I just figured out why my blog has been brutally slow since I switched it over to Dreamhost: NFS. Individual flat files on disk don't scale when a page load is having to scramble over them on an NFS mount.

It also doesn't help that the shared host has a load average above 17 most of the time… right now, the CPU utilization on the box is about 75%. Maybe I should switch back to dedicated hosting!

Posted at 2008-03-28 13:28:08 by RichardLink to Slow
Comments, trackbacks.

Genius

Elaina's iPhone is showing the “Connect to iTunes” image on the display. Bad news: her machine is at home.

I connect it to mine, and iTunes pops up a dialog:

iTunes could not connect to the iPhone foo because it is locked with a passcode. You must enter your passcode on the iPhone before it can be used with iTunes.


Great, thanks. I would if I could.

Posted at 2008-03-28 10:58:06 by RichardLink to Genius
Comments, trackbacks.

Tue 25 Mar 2008

I hate Eclipse

Terrible options layout, abysmal text editor, shameful iconography, and the windows don't resize when your display changes. I currently have one gigantic window where I can reach neither the title bar nor the resize handle.

Did I mention it's slow and cumbersome on my dual-2.5GHz machine with 4GB RAM?

Posted at 2008-03-25 15:17:33 by RichardLink to I hate Eclipse
Comments, trackbacks.

Sun 23 Mar 2008

UPS annoyances

My NAS is plugged into my APC 550 UPS. The UPS's USB status cable is plugged into the NAS, so it gets notified of status changes.

No power outages have occurred, but occasionally the NAS will shut itself down. I've figured out why.

The UPS reports minor power outages (such as a spike when the printer warms up) like this:
16:15:18 Power loss detected.
16:15:24 Power has returned.

The NAS shut itself down this morning. This is what the log says:
11:07:41 Power has returned.
11:07:42 Power loss detected.

That's right! The message cancelling the shutdown arrives one second before the shutdown message. The NAS dutifully cancels a non-existent shutdown, then goes right ahead and starts its shutdown timer.

This is really dumb. My Mac can read the UPS battery status (allowing behavior like “shut down when UPS battery level is critical”) and the power status, rather than relying on this erroneous transition model. Why can't my Linux-based NAS?

Posted at 2008-03-23 11:34:32 by RichardLink to UPS annoyances
Comments, trackbacks.

Building sqlite3 from MacPorts

Getting this error?
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_sqlite3/work/sqlite-3.5.7" && gnumake all " returned error 2
Command output: sort -n -b -k 3 opcodes.h | -f ./mkopcodec.awk >opcodes.c
/bin/sh: -f: command not found
gnumake: *** [opcodes.c] Error 127

Do this:
export NAWK=/opt/local/bin/gawk
sudo port clean sqlite3
sudo port install sqlite3

The Makefile isn't looking in the right place for awk. The Macports trac page thinks this problem doesn't still exist… I'm not so sure!

Posted at 2008-03-23 00:43:20 by RichardLink to Building sqlite3 f…
Comments, trackbacks.

Sat 22 Mar 2008

OmniGraffle Pro

I just upgraded from 4 to 5, and it's a pretty awesome leap: you can write outlines in a sidebar (or move them back and forth to OmniOutliner!) and it'll automatically lay them out as a mindmap, circles, tree, &c. It's a very cool “check this out!” feature.

It's always a pleasure when an app can be both fun to work with and a reliable workhorse. By contrast, Visio crashes every time I use it on my Vista machine, and seems to exist to make my life hell.

Oh well.

Posted at 2008-03-22 23:32:55 by RichardLink to OmniGraffle Pro
Comments, trackbacks.

Visual languages are insufficiently dense

Once the interpreter worked well enough to start writing simple programs, I was able to see how bad the density problem was.

Posted at 2008-03-22 21:27:59 by RichardLink to Visual languages a…
Comments, trackbacks.

Google
Web holygoat.co.uk
  • richard is: