Category Order 2.0.1 Released

November 6th, 2007

I’ve released a new version of the Category Order Wordpress 2 plugin. This plugin allows the blog administrator to set an explicit ordering, spacing, and indentation of categories in the category list that appears in the sidebar. The administrator specifies the ordering in the new “Category Order” management page. There is also an option for placing the category post count inside the link.

New changes:

  • Viewing a page now doesn’t cause categories to unfold. (Thanks to Tom Howard for the bug report and patch.)
  • Fixed a bug where a blog with no categories would cause a message from the plugin. (Thanks to Bruce and others for the bug report.)

A screenshot shows the management page. Download it on my code page.

Category Access 0.8.2 Released

November 6th, 2007

I’ve released a new version of the Category Access Wordpress 2 plugin. This plugin allows the blog maintainer to restrict access to posts belonging to particular categories on a user-by-user basis.

New changes:

  • Added a workaround for a WordPress bug that was causing the padlock to
    appear on static pages when a protected category was selected. (Thanks to
    gspark for the bug report.)
  • Added WordPress 2.3 support (Thanks to James Wurster for the patch.)
  • Moved the padlock in the category list to after the name.
  • Fixed a bug that was causing problems for people running the German translation. Thanks to Moritz Mueller for bugfix.)

Download it on my code page.

Dead, dead, dead… It was the hard drive after all

November 1st, 2007

A few days ago my MacBook Pro wouldn’t boot. Dropping down to single-user mode, I ran fsck and it found lots of errors. Perhaps foolishly, I tried to repair the errors multiple times. At the end of each run it would report that the drive could not be repaired. It looks like the disk problem I had earlier was a real disk problem and not just a bad image. Now I wish I hadn’t wasted so much friggin’ time reinstalling Tiger, upgrading to Leopard, installing apps, etc.

At least I have a reasonably recent backup. It’s only been a couple of days and yet I already wish I had taken the time to use the new Time Machine feature. :( So I thought I would try to recover whatever I could from the drive before sending the machine back to Apple. Here was my basic process:

  • Get my older PowerBook and connect it to the MacBook Pro with a firewire cable
  • Boot the MacBook Pro into target disk mode by holding “t” while it was booting
  • Wait 5 minutes while Leopard tries to fix the drive. It would then give up and mount it read-only, showing a nice message box that says “You’d better get your data off!”
  • Use rsync to get a few files off until it hit a bad file and would get hung.
  • Wait for 5 minutes until a read error would occur. Cancel rsync and unmount the drive.
  • Reboot the machine to unwedge it, and resume the copying, skipping over the bad file.

I did figure out a way to make this process faster. The first delay can be overcome by manually mounting the drive before Leopard decides to try to mount it and fix the problems. I wrote this script to beat the OS, mounting the drive read-only:

#!/usr/bin/perl

print "Waiting for disk...\n";

do {
$result = `mount -v -t hfs -r /dev/disk1s2 /Users/coppit/Desktop/oldmac 2>&1`;
} while ($result =~ /(No such file|Permission denied)/);

if ($result =~ /Resource busy/) {
print $result;

do {
$result = `mount -v -t hfs -r /dev/disk1s2 /Users/coppit/Desktop/oldmac 2>&1`;
sleep 1;
} while ($result =~ /Resource busy/);
}

print $result;

Basically I would start this script, then boot up the other computer. Oh yeah, you have to create the “oldmac” directory ahead of time.

Now with regard to the second delay, all you have to do is power down the MacBook Pro. In this case you’ll get a “you forgot to unmount” error which can be ignored. But at least you don’t have to wait for the OS to determine there was a read error.

Finally, here’s what I did for the copy command:
~/desktop/remount && rsync --exclude-from=/Users/coppit/Desktop/excludelist -avu /Users/coppit/Desktop/oldmac/Users/coppit ~/Desktop/recovered

As you can see, I called my remount script and then did the copy. In this case I am copying my home directory into ~/Desktop/recovered. Whenever the copy would hang, I would put the filename (and perhaps part of the path) into the excludelist file, CTRL-c to abort the copy, power down the MacBook Pro, up-arrow to get the above command back, press enter, then power up the Macbook Pro.

With this process I was able to fairly quickly bypass bad files and get off all my important data. If I was really motivated I would have automated the creation of the excludelist file by watching the transfer speed during the copy operation. Then all I would have to do would be to power cycle the other computer at the appropriate times…

A Super-Hot MacBook Pro Could be the Hard Drive

September 12th, 2007

So about 3 hours after getting my new MacBook Pro, the fan started blowing at full blast. No biggie, I thought, since I was in the process of installing a bunch of software. I stopped what I was doing, and checked the CPU usage with Activity Monitor. The CPU was idle!

At this point the area where I rest my left palm while typing was getting really really hot–too hot to touch for very long. The computer was also getting sluggish, sometimes waiting for over a minute to respond to my mouse clicks or keyboard commands. I shut down the system (with the hold-the-button-for-five-seconds-I-really-mean-it method) and considered my options.

After the machine cooled off a bit I inserted the OS X DVD and booted into the hardware tester program as described in the manual. As that was going on, I gave Apple a call. I told the tech my problem and that I suspected the hard drive. He had me reboot into Disk Utility to verify the disk. Sure enough, it was rife with errors. He said that either the disk was bad, or the original imaging of the software on the drive was erroneous. My best bet was to frst try and repair the disk, and if that didn’t work, wipe the drive and reinstall the OS and applications. Sigh.

After 6 tries the repair failed, so I spent a few hours wiping the drive and reinstalling everything. So far everything has worked fine. In fact, after filling up 80 GB space I still get no disk errors. I just wish that Apple had done a disk verify before shipping me the machine…

How to Resize a Boot Camp Partition

September 12th, 2007

There are a number of half-baked ways to resize a boot camp partition out there. Here’s the way I enlarged my NTFS partition. Your mileage may vary with FAT32, shrinking partitions, etc..

  • Use WinClone to clone your existing bootcamp volume
  • Use Boot Camp Assistant to restore your disk to one volume. When it’s done, reboot to Mac OS X. (I had to do this twice.)
  • Run Boot Camp Assistant again to create a new partition.
  • Start WinClone, and restore the image into the new UNLABELED partition.
  • Reboot, holding the option key to select the Windows partition. Windows will notice that something happened to the partition and will automatically run checkdisk. When you reboot again either partition will work.

I had to do a couple extra steps for VMWare Fusion to work. First, I had to delete my old virtual machine at /Users/[your_user]/Library/Application Support/VMWare Fusion/Virtual Machines/Boot Camp. Simply removing the disk didn’t work. Then VMWare complained that Windows wasn’t shut down cleanly. So you should maybe boot into Windows after the checkdisk before going back to OS X to fiddle with VMWare. Finally, just cancel the re-installation of VMWare Tools once the boot camp VM is running in Fusion.

Mac Annoyances

September 12th, 2007

Generally I’m really happy with my new MacBook Pro. It’s fast, quiet, and keeps me warm in sub-zero weather. But there are some things that bug me:

  • I can’t resize a window without accidentally changing both height and width. Apple needs to add modifier key support for one-axis resizing, a la Photoshop
  • Icon spacing in Finder is too wide with icon sizes are small
  • The file system is pseudo-case-insensitive. This means if you want to change the case of a file, you can’t do “mv A a” You have to do “mv A temp; mv temp a”.
  • There is no way to drag an item in Finder into the item’s parent folder.
  • Boot camp needs to have the so-called “sleep camp” feature, which does a safe sleep in OS X, then boots into Windows. Reboots cause Coppit to lose desktop state, which makes Coppit sad. :(
  • My mighty mouse doesn’t have real buttons, which means that if I need to drag something from one corner to the next, I have to shove my keyboard out of the way to get there. With a buttoned mouse, I could keep the button down while I lifted the mouse and put it back down.

My Mac Customizations II

September 12th, 2007

The College upgraded my machine… I now have a nice MacBook Pro. I’ve had a few issues which I’ll blog separately about. First I thought I’d revisit my Mac customizations, which I first published last year.

Good free software:

  • Cyberduck: Secure FTP
  • StartupSound.prefPane: Silence the startup “bong”
  • Growl: System-wide notifications
  • NicePlayer: A clean movie player
  • Codecs: Perian, Flip4Mac WMV
  • iStat Menus: Shows CPU, network, memory, disk usage in the menu bar. It also supports showing the date along with the time.
  • MacFUSE and sshfs: Mount a remote directory for read/write access.

  • Audio Recorder: In case I need to record something using the built-in microphone
  • Eclipse: For software development
  • GraphViz for Mac: Awesome GUI for an awesome graph layout tool
  • Integrity: Link checker
  • iStumbler: WiFi finder
  • Pacifist: Extract files from packages. Useful if you need something from your install DVD
  • Sightspeed: For video chatting with people who don’t have iChat
  • Thunderbird: News reader, and graphical email viewer
  • Spark: Control iTunes with the keyboard
  • SimplyRar: Unpack rar archives
  • Jing: Screen capture utility. It’s functional but doesn’t have a lot of options.
  • SafariBlock: Adblock for Safari. It works with Safari 3.0, but you have to put it in /Library/InputManagers and chmod -R root:admin it.
  • Gallery Remote: Upload photos to my gallery
  • Fink Commander: For installing Unix stuff like subversion, tetex, etc.
  • Apple OS X Developer Tools: gcc, plus a lot of cool performance tools like Shark. Link the /Developer/Applications directory to /Applications/Developer for easier access.
  • TinkerTool: Advanced tweaking of options, such as not creating .DS_Store folders on Windows mounted drives

Non-free Software:

  • Adobe Acrobat Pro
  • Adobe Photoshop CS3. An interesting contender is Pixel Editor. Since I get a site-license discount for Photoshop I use that, but Pixel might be just as good
  • AutoPano Pro: Expensive but really good panorama stitching software
  • Quicktime Pro
  • Saft: A relatively cheap way to improve Safari with features like type-to-search. Not Safari 3.0 compatible yet.
  • Compost: Automatically manage the trash can
  • Apple iWork: I’m sick of how MS Office for Mac is still stuck in 2004. I thought I’d try out Apple’s offering
  • VMWare Fusion: For running MS Office when I really need to and other Windows-only apps. Their “unity” mode is pretty good although it has a few rough edges. I picked VMWare over Parallels because it’s a bigger company with a longer track record, my own good experiences with VMWare on Windows, and relatively less complaints about their VM.
  • Adobe Lightroom: For folder-based management of digital pictures and (hopefully soon) videos. I like the interface better than Aperture’s. iPhoto is just too primitive. They won’t let me arrange photos into folders, for example (and “events” doesn’t fully solve the scalability problem). Pretty much the only thing I use iPhoto for is the redeye correction, which works great when it works.

Deprecated software:

  • Quicksilver: It’s just too buggy. And on my new laptop Spotlight is usable as an application launcher
  • Fugu: I switched to Cyberduck. I like the interface better.
  • MS Internet Explorer: Not offered any more
  • Norton Anti-Virus: Just not necessary
  • iView MediaPro 3: Bought by Microsoft, and generally very clunky. I really like (1) how it can manage videos, and (2) its folder-based management. The second issue is handled decently by Lightroom (but not iPhoto), and I hope the first issue will be resolved soon.
  • Synk: I’m using a hand-rolled rsync solution which works with my unRAID server to make backups take up less space.
  • Missing Sync: I’m limping along without syncing my Palm for now. I’m hoping that Apple will add appointment entry soon to the iPod Touch so it can become my new PDA.
  • RealVNC: You can connect with the vnc:// built-in now.
  • iChatOnLogin: iChat has this functionality now.
  • iCalFix: It’s fixed now.

Category Access 0.8.1 Released

August 1st, 2007

I’ve released a new version of the Category Access Wordpress 2 plugin. This plugin allows the blog maintainer to restrict access to posts belonging to particular categories on a user-by-user basis.

New changes:

  • Added “Check all categories” and “Uncheck all categories” buttons to the options and user pages. (Suggested by David Katz)
  • Fixed a bug where category filtering would sometimes fail, especially for things like RSS fields. (Thanks to Tim Lockwood for the patch.)
  • Fixed a problem where post titles would be protected in situations where they shouldn’t be, such as in the dashboard comment list. (Thanks to Joe Church for the bug report.)
  • Updated the wp-commentsrss2.php modification in the README for WP 2.2 or newer. (Thanks to Aniesh Joseph for the bug report.)
  • I also fixed a problem in the comments RSS modification documentation where posts would be entirely removed, even if you had enabled “Show the title and links (but not the summary or content) instead of hiding posts.”
  • Changed the options page so that it uses Javascript and CSS to show only the visibility options for only the selected class of users. This cleans up the interface and allows for possible future support of roles.
  • When surfing to the permalink for a protected post, the user will now be redirected to the login page if they cannot view the post and are not logged in. Note that after logging in, they may still see an Error 404 if they do not have permissions to view the post. (Thanks for the feature suggestion by Jason Holtslander.)
  • CSS styles are now used for protected titles, posts, categories, and padlock icons. (Thanks to Tyler Gore for the suggestion.)
  • Fixed a bug where the padlock icon HTML was being inserted into the category link title.
  • Fixed a bug where the previous and next post links would always be protected if the post for the current page was protected.

Download it on my code page.

Trip: Madison, WI

July 30th, 2007

We just got back from three days in Madison, WI. We were there to help Tina Greico with her research studying young kids with bilateral cochlear implants. Christopher was played different sounds, and she would look to see which direction he would look (left or right), which would tell her which side he thought the sound was coming from. Unfortunately Christopher was pretty non-responsive. I’m guessing that he’s just too young… He’s only heard with 2 ears for 6 months.

She also had Christopher do another study where he would listen to some made-up word and look at a made-up shape. After seeing the word and shape a lot, they would then show him the shape and say the wrong word. Here they were trying to see if he learned the new word or not, based on his response to the wrong word. He did pretty well on this study, since he is very good at focusing on pictures.

Overall we weren’t that impressed with Madison. It’s a university town, but seemed kinda run-down and yucky. The main drag, State Street, had a lot of ethnic restaurants, and the capitol building was nice. We also got down to the university terrace to listen to some live bands. It was kinda odd to leave Virginia to hear bluegrass, though. One other observation: folks in Wisconsin love their beer and brats—I think I gained 2 lbs in two days eating everything under the sun.

Madison CI Study

SIGBeach

July 23rd, 2007

We spent last week on the outer banks at the SIGBeer 2007 reunion. There were something like 12 adults and 15 kids in one big beach house. We had a great time… it was good to catch up with people, some of whom I haven’t seen in several years. Christopher was the perfect age to start to enjoy the beach, even if the water was freezing cold. He started to warm up to the other kids some, although I’m sure they didn’t notice. :)

Christopher’s 2nd Birthday

June 21st, 2007

Dorothy and I decided to make Christopher’s next birthday a big one, since he’s more likely to remember it. This year the theme was to do all his favorite things: breakfast at IHOP in the morning, followed by looking at the animals at the pet store, then a nap, then a birthday party in the afternoon and Busch Gardens in the evening.

He now says “hap-day” for “happy birthday” when he sees a cake or someone wearing a party hat.

SafariBlock

June 10th, 2007

I finally got fed up with Firefox’s lack of threading support. This means that the entire application hangs when rendering a webpage. I switched to Safari, which is much more responsive. Unfortunately, I immediately found out how ad-infested the web is… I’ve been running Firefox with the Adblock Plus plugin for so long, I didn’t realize how annoying the web had gotten.

After a bit of hunting around, I found SafariBlock by FSB Software. It’s an Adblock-like plugin for Safari.

One downside is that it doesn’t ship with a list of filters. There are filters out there for Adblock, but SafariBlock doesn’t yet support regular expressions like Adblock does. Here’s the solution:

  1. Download and install SafariBlock
  2. Download the latest version of FilterSet.G from http://www.pierceive.com/
  3. Open the text file in Wordpad, and copy and paste it into the deregifier
  4. Copy the output list into a new filter file, and remove any regular expressions that deregifier couldn’t handle
  5. Import the new filter file using SafariBlock’s import feature in the preferences.

I also discovered another downside: The basic “*” pattern matching that is does support is very basic, only working at the beginning and end of a pattern. This means that a pattern like “*.example.com*.swf?*” won’t work.

AFOSR PI’s Meeting in Syracuse

June 8th, 2007

I’m spending the week in Syracuse, NY attending the Air Force Office of Scientific Research annual PI meeting. The meeting is a week long because they’ve combined the software and security presentations. Next year they plan to split them up, which is a shame since I have found the security presentations the most interesting.

I found out some other interesting tidbits of information: the NSF funds the majority (90% IIRC) of all university research in computer science, and AFOSR’s software research budget is increasing. Given the highly competitive nature of NSF funding, with 10% or less of proposals normally being funded, I’d bet that AFOSR will be getting more and more applications in the future as researchers look elsewhere.

Trip: Minneapolis, MN

May 28th, 2007

Dorothy and Christopher joined me in Minneapolis, MN. During the days I attended ICSE, while they went off to visit the Mill Museum, the Mall of America, and other attractions. Overall it was a nice, clean city to visit, at least during the spring. I’m guessing there’s a really good reason that the downtown buildings are all connected to each other by walkways.

Minneapolis

Spotlight at ICSE

May 28th, 2007

I presented a formal research demonstration at ICSE last week. The demo highlighted Spotlight, our research prototype for software plans. Software plans are like architectural plans of a building in that they allow programmers to work on semi-independent aspects of their programs in semi-independent views, then later integrate them to create the final system. You can check out the latest version of Spotlight, which is built in the Eclipse IDE here.

Category Order WP 2.0.x Compatibility

May 16th, 2007

Let me know if you’re using WordPress 2.0.x and are having trouble with my Category Order plugin. One thing to try is to change this:

function get_category_by_slug($slug) {
$categories = get_categories();

in category_order.php to this:

function get_category_by_slug($slug) {
$categories =
$wpdb->get_results("SELECT * FROM $wpdb->categories ORDER BY cat_name");

Fidelity 120

May 10th, 2007

Amber Gardner at UVa was nice enough to go ahead and upgrade Christopher’s software to the Fidelity 120 strategy recently released by Advanced Bionics. This strategy emulates 120 virtual channels on 12 physical electrodes by modulating the voltage between two adjacent electrodes. The quality is supposed to be a lot better, especially for music.

It’s great that we’re able to get the upgrade now. This means that he’ll have the new processing strategy for 2 months before we participate in a study in Madison, WI. Tina Grieco there is studying the language acquisition of kids with one versus two implants.

Category Access 0.8.0 Released

May 9th, 2007

I’ve released a new version of the Category Access Wordpress 2 plugin. This plugin allows the blog maintainer to restrict access to posts belonging to particular categories on a user-by-user basis.

New changes:

  • Added MySQL 4.0.x compatibility (Thanks to Giorgio A. Schwarz for the patch.)
  • Set the priority for this plugin to really low, so that other plugins can have a chance to work on comments and such without interference. (Thanks to Ian Beck for the bug report.)
  • Added support for internationalization. The first language is German (Thanks to Michael Rothfischer for the patch.)

Download it on my code page.

The power of abstraction

May 6th, 2007

Lately Christopher has been amazing us with his understanding of abstractions. Dorothy showed him a puzzle piece that showed just the eyes and forehead of a horse, and he said “neigh”. Yesterday they were drawing circles on a page and he said “ball”.

I guess this is the first step toward being amazed by your kids. :)

Category Order 2.0.0 Released

April 26th, 2007

I’ve released a new version of the Category Order Wordpress 2 plugin. This plugin allows the blog administrator to set an explicit ordering, spacing, and indentation of categories in the category list that appears in the sidebar. The administrator specifies the ordering in the new “Category Order” management page. There is also an option for placing the category post count inside the link.

The major new feature of this release is the ability to “fold” indented categories until the parent category is clicked. The plugin also will add up the post counts of the hidden categories and add that to the visible parent category.

New changes:

  • Added folding of sub-categories until the user clicks on the parent category. (Thanks to Ana Luiza Bergamini for pointing out the incompatibility of this plugin with the Fold Category List plugin, which caused me to add this functionality to this plugin.)
  • Fixed a bug where sub-lists in the original list of categories HTML would cause extra <li>’s to be inserted in the output list. (Thanks to Jessica for the bug report.)
  • The order is now stored using category IDs rather than slugs, since the former are unique. Added a warning for the case when two categories have the same slug and the permalinks use slugs rather than IDs. (Thanks to Gautam Jain for the bug report.)
  • Fixed a bug where the parser would complain when there were no categories. (Thanks to Jason for the bug report.)

A screenshot shows the management page. Download it on my code page.