Technology

Aaron Brazell On Blog Search And Findability

Aaron Brazell at WordCamp is talking about search and finability “not SEO.” Riffing on Ambient Findability, he asks:

  • Can people find your blog?
  • Can people find their way around your blog?
  • Can people find your content and services despite your blog?

Remember:

  • Your blog serves as a nexus for information about you.
  • You serve as the nexus for trust and relevance.

Going Further? Make your social content outside your blog searchable, findable via your blog. Brazell conveniently recommends using Lijit, which does just that.

Copying MySQL Usernames and Database Priveleges

Now that I’m the nominal MySQL DBA for PSU, it became my job to jimmy up the MySQL user privileges so that the new web server could connect. I’m not sure if this is the fastest, most efficient way to do it, but it worked quickly enough:

``` CREATE TABLE mysql.user_copy SELECT * FROM mysql.user; DELETE FROM mysql.user_copy WHERE Host NOT LIKE 'OLD_HOST_NAME'; UPDATE mysql.user_copy SET Host = 'NEW_HOST_NAME'; INSERT INTO mysql.user SELECT * FROM mysql.user_copy; DROP TABLE mysql.user_copy;   CREATE TABLE mysql.db_copy SELECT * FROM mysql.db; DELETE FROM mysql.db_copy WHERE Host NOT LIKE 'OLD_HOST_NAME'; UPDATE mysql.db_copy SET Host = 'NEW_HOST_NAME'; INSERT INTO mysql.db SELECT * FROM mysql.db_copy; DROP TABLE mysql.db_copy;   FLUSH PRIVILEGES; ```

Simply replace the OLD_HOST_NAME and NEW_HOST_NAME with the appropriate values. Most importantly, I didn’t have to know the passwords for each user to do this. This script simply copied the user info and gave them access from the new server.

Lyceum Vs. WordPress MU

The news about BuddyPress has fully shifted my attention from single-blog WordPress installs to multi-user, multi-blog installs.

WordPress mu is my platform of choice, but I was quite fond of Lyceum when I first learned of it a while ago. The big perceived advantage of Lyceum is that it uses a unified table structure for all blogs, rather than creating a new set of tables for each blog as WPmu does. I’m not so sure that’s important now, and WPmu’s scheme now looks a lot easier to partition onto multiple database servers, should traffic ever scale there. Still Lyceum is an interesting project, and their name and logo are great.

OAuth and WordPress

I just realized OAuth support is slated for inclusion in WordPress 2.7. It’s not in trunk yet, but that’s no reason not to get up to speed. Scott Gilbertson says OAuth and OpenID are foundations to the open social web, giving apps like WordPress a “secure, centralized means of identifying yourself and a way to control who knows what about you.”

Chris Messina, who says we currently treat user credentials “like confetti,” is more than a little excited and is building a series of WordPress Plugins to take advantage of these formats. Stephane Daury is excited too.

Is My PHP Script Running Out Of Memory?

I’ve got a PHP script that sometimes just dies with no errors to the browser and no messages in the error log. I’ve seen this in the past with scripts that consumed too much memory (yeah, it should have issued an error, but it didn’t, and increasing the memory limit fixed it), but now the memory limit is set pretty high and I’m not sure I want to increase it further. I certainly don’t want to increase it without seeing where it’s going wrong, anyway.

To do that, IBM developerWorks says the memory_get_usage() and memory_get_peak_usage() functions are for me. And they offer some other interesting tips as well.

Displays: Go Long, Go Wide

If you want more monitors than you’ve got DVI or VGA ports, your options include adding a video card, using a USB-based display, or this Matrox hack: a small box plugs into your computer’s monitor port, and two or three monitors plug into the box, no software drivers or additional hardware required.

If you want to send a video signal further than your monitor’s cable, your options include getting a longer cable (works up to about 50′) or get a different cable. From MAKE and Doug Burbridge: a sending VGA over Cat-5. This device promises to send DGA up to 600 feet. Or, send DVI 160 feet.

Web Application Design Book Recommendation

I’ve learned to ignore contests on the web. Banner ads that promise prizes if I click the right pixel are the least offensive, but the contests that have me creating content (and then force me to give up my copyright to it) for another person’s gain infuriate me. So when I saw author and experience […] » about 300 words

Web Development Languages

David Cloutman pointed to Craiglist’s job ads as an indicator of programming language popularity. Here’s the hit counts for “web design jobs” and “internet engineering jobs” in the Bay Area:

<td>
  PHP
</td>

<td>
  Java
</td>

<td>
  Ruby
</td>

<td>
  Python
</td>

<td>
  PERL
</td>
<td>
  167
</td>

<td>
  246
</td>

<td>
  85
</td>

<td>
  98
</td>

<td>
  109
</td>
<td>
  110
</td>

<td>
  71
</td>

<td>
  22
</td>

<td>
  19
</td>

<td>
  31
</td>

<td>
</td>
 
internet engineering jobs
web design jobs

Cloutman has a few ideas for what the numbers mean, but I’m just entertained by the data. (Note: he corrected his original numbers.)

Site Back Online, Further Downtime Expected

This site and a number of other projects are hosted on a Mac Mini that normally sits on my desk. Thing is…my desk moved. And, unfortunately, I didn’t confirm the firewall rules for the network in my new office before bringing the machine over. Thankfully Chris was happy to put the Mini on a different VLAN, and that solved everything (my other machines remain on the new “secure” network…ugh).

In the no too distant future, however, I’ll be moving the site again. This time to a private server somewhere. Varnish, the HTTPd accelerator, is a big part of my plans for that, though. So if I’m lucky (or smart, but better to bet on lucky), I’ll be able to do it without any additional downtime. Hopefully. And even if there is some downtime, it won’t be 24 hours again.

Search Trends vs Community Standards

Via MotherJones: Pensacola residents Clinton Raymond McCowen and Kevin Patrick Stevens, producers of a very NSFW website last week faced a judge in an obscenity and racketeering trial for their work. The interesting thing? The defense planned to use Google search trends to demonstrate community standards. “Time and time again you’ll have jurors sitting on […] » about 200 words

Censorship, Unpublishing, and New Media

The actual reasons may never be discovered, but Boing Boing, the perennially top ten ranked blog, has “unpublished (NSFW)” stories by, about, or mentioning author and sex columnist Violet Blue (NSFW).

Much has already been said about the Orwellianism of “unpublishing” and how it conflicts with the ethics of the web, as well as the incongruence between these actions and Boing Boing’s position on web censorship, media manipulation, and revisionism. And on July 1 Boing Boing itself joined the discussion. Thad didn’t go so well.

One theory suggests that Blue’s April 2007 column slamming Amanda Congdon may have touched this off. Another theory suggests that Boing Boing was pressured by (or simply wanted to please) closely embedded Federated Media. And if you think you know how this will play out, then play the news game (above), where they suggest this all started with a lovers’ spat.

My interest in this, however, is in how new media like Boing Boing are struggling with growth from small personal sites to multi-million dollar businesses ($one million in 2006). The question now is if the site will survive the transition without alienating the community that makes such sites successful in the first place.

WordPress Survey Tools

Lorelle and Samir both point to a number of plugins to do surveys within WordPress, but neither of them say any of them are that good. And Samir is pretty disapointed: “at the end of it all, I never did find my ideal online survey tool.”

Survey Fly is the best recommendation from both of Lorelle and Samir, but it isn’t WP2.5 compatible and was las updated in summer 2006. It’s also limited to tracking only one survey at a time. Ugh.

Optimizing Inserts/Updates On MySQL Tables

When doing a bulk insert/update/change to a MySQL table you can temporarily disable index updates like this:

``` ALTER TABLE $tbl_name DISABLE KEYS ```

…do stuff…

``` ALTER TABLE $tbl_name ENABLE KEYS ```

From the docs:

ALTER TABLE ... DISABLE KEYS tells MySQL to stop updating non-unique indexes. ALTER TABLE ... ENABLE KEYS then should be used to re-create missing indexes. MySQL does this with a special algorithm that is much faster than inserting keys one by one, so disabling keys before performing bulk insert operations should give a considerable speedup. Using ALTER TABLE ... DISABLE KEYS requires the INDEX privilege in addition to the privileges mentioned earlier.

While the non-unique indexes are disabled, they are ignored for statements such as SELECT and EXPLAIN that otherwise would use them.

Truemors Powered By WordPress

In the “They Did This With WordPress” category (though from about a year ago, sorry) comes Truemors, a Digg, del.icio.us, Reddit clone from Guy Kawasaki.

Calling it a clone might be a backhanded non-compliment, but the truth is that it does a credible job in this increasingly crowded space*. And it’s built on WordPress.

The relevant plugins are WP-PostRatings and Share This. Electric Pulp did the design, and the whole thing apparently went live quickly on a tiny budget.

Anyway, add this to the growing list of sites using WordPress in some rather interesting ways.

  • My real feeling is that all these sites could probably learn something from MetaFilter, where the inward facing parts are as important or more than the outward facing bits. Have you ever heard of a del.icio.us meetup? MetaFilter has them regularly.

1975 Programming vs. Today’s Computer Architecture

Poul-Henning Kamp, the guy behind the Varnish reverse proxy, talks about 1975 programming:

It used to be that you had the primary store, and it was anything from acoustic delaylines filled with mercury via small magnetic dougnuts via transistor flip-flops to dynamic RAM.

And then there were the secondary store, paper tape, magnetic tape, disk drives the size of houses, then the size of washing machines and these days so small that girls get disappointed if think they got hold of something else than the MP3 player you had in your pocket.

And people program this way.

They have variables in “memory” and move data to and from “disk”. […]

Well, today computers really only have one kind of storage, and it is usually some sort of disk, the operating system and the virtual memory management hardware has converted the RAM to a cache for the disk storage.[…]

Virtual memory was meant to make it easier to program when data was larger than the physical memory, but people have still not caught on.

MySQL Bug?

After an upgrade to MySQL 5.0.51b on RHEL 5 I started seeing curious results in a fairly common query. Here’s a simplified version:

``` SELECT ID, post_date_gmt FROM wp_posts GROUP BY ID ORDER BY post_date_gmt DESC LIMIT 5 ```

What I expected was to get a handful of post ID numbers sorted in descending order by the post_date_gmt. Instead, I got a list of post IDs sorted in ascending order by the ID number. Something like this:

``` 3 2007-05-21 00:00:00 4 2007-05-21 00:00:00 5 2007-05-21 00:00:00 6 2007-05-21 00:00:00 7 2007-05-21 00:00:00 ```

After some fiddling I discovered that the GROUP BY clause was causing a problem. So this query works:

``` SELECT ID, post_date_gmt FROM wp_posts ORDER BY post_date_gmt DESC LIMIT 5 ```

…and outputs the results I expected:

``` 337832 2008-06-20 15:20:03 335991 2008-06-17 13:00:42 337777 2008-06-02 12:15:46 337390 2008-05-28 00:00:00 337831 2008-05-28 00:00:00 ```

The GROUP BY clause may be unnecessary, though it was originally written in to accommodate conditions where a JOIN (which is often added when the query is dynamically generated) causes MySQL to return multiple rows representing the same record ID.

Still, isn’t this behavior weird? It’s certainly different from previous versions.