svn merging is full of fail

 

2008-08-07 10:54:09 UTC

[SCENE: adium/branches/summer_of_code_2008/unit_testing. I'm merging changes from trunk to this branch.]

svn --version
svn, version 1.5.0 (r31699)
   compiled Jul  5 2008, 04:29:25

Copyright (C) 2000-2008 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - handles 'http' scheme
  - handles 'https' scheme

___
svn up
At revision 24694.
___
svn st
?      Docs
?      DoxyCleaned
~      Resources/Message Styles/renkooNaked.AdiumMessageStyle/Contents/Resources/Incoming/buddy_icon.png
~      Resources/Message Styles/renkooNaked.AdiumMessageStyle/Contents/Resources/outgoing_icon.png
~      Resources/Message Styles/renkooNaked.AdiumMessageStyle/Contents/Resources/Outgoing/buddy_icon.png
~      Resources/Message Styles/renkooNaked.AdiumMessageStyle/Contents/Resources/incoming_icon.png

(~ = “versioned item obstructed by some item of a different kind”)

rm -Rf Resources/Message\ Styles/renkooNaked.AdiumMessageStyle
___
svn up Resources/Message\ Styles/renkooNaked.AdiumMessageStyle
[snip]
___
cd ../../..
___
svn merge -r23936:24694 trunk branches/summer_of_code_2008/unit_testing 
--- Merging r23937 through r24694 into 'branches/summer_of_code_2008/unit_testing':
[snip]
Conflict discovered in 'branches/summer_of_code_2008/unit_testing/Resources/Emoticons/MSN.AdiumEmoticonset/Emoticons.plist'.
Select: (p) postpone, (df) diff-full, (e) edit,
        (h) help for more options: e
[I correct the plist to match what trunk has.]
Select: (p) postpone, (df) diff-full, (e) edit, (r) resolved,
        (h) help for more options: r
___
plutil -lint branches/summer_of_code_2008/unit_testing/Resources/Emoticons/MSN.AdiumEmoticonset/Emoticons.plist 
branches/summer_of_code_2008/unit_testing/Resources/Emoticons/MSN.AdiumEmoticonset/Emoticons.plist: OK
___
plutil -lint branches/summer_of_code_2008/unit_testing/Adium.xcodeproj 
branches/summer_of_code_2008/unit_testing/Adium.xcodeproj: file does not exist or is not readable or is not a regular file
___
plutil -lint branches/summer_of_code_2008/unit_testing/Adium.xcodeproj/project.pbxproj 
branches/summer_of_code_2008/unit_testing/Adium.xcodeproj/project.pbxproj: OK
___
plutil -lint branches/summer_of_code_2008/unit_testing/Frameworks/AIUtilities\ Framework/AIUtilities.framework.xcodeproj/project.pbxproj
branches/summer_of_code_2008/unit_testing/Frameworks/AIUtilities Framework/AIUtilities.framework.xcodeproj/project.pbxproj: OK
___
cd branches/summer_of_code_2008/unit_testing   %~/Projects/@otherpeoplesprojects/adium(0)
___
xcodebuild -configuration Development       
[snip]
** BUILD SUCCEEDED **
___
svn ci
Sending        unit_testing
[snip]
Transmitting file data .......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................svn: Commit failed (details follow):
svn: Checksum mismatch for '/Volumes/Home-etc/Users/prh/Projects/@otherpeoplesprojects/adium/branches/summer_of_code_2008/unit_testing/Resources/Emoticons/MSN.AdiumEmoticonset/.svn/text-base/Emoticons.plist.svn-base'; expected: '109d361ce47a49a66e53e98412251398', actual: 'a21c8336d1f839b9aaa8a2795a7e25f5'
svn: Your commit message was left in a temporary file:
svn:    '/Volumes/Home-etc/Users/prh/Projects/@otherpeoplesprojects/adium/branches/summer_of_code_2008/svn-commit.2.tmp'
___
cd Resources/Emoticons
___
rm -Rf MSN.AdiumEmoticonset 
___
svn up MSN.AdiumEmoticonset
A    MSN.AdiumEmoticonset
[snip]
Updated to revision 24694.
___
cd ../.. 
___
cd ../../..
___
svn merge -r23936:24694 trunk branches/summer_of_code_2008/unit_testing
svn: Working copy path 'Frameworks/Adium Framework/Source/AISharedAdium.h' does not exist in repository
___
svn merge -r23936:24694 trunk/Resources/Emoticons branches/summer_of_code_2008/unit_testing/Resources/Emoticons 
___
svn merge -r23936:24694 trunk/Resources/Emoticons/MSN.AdiumEmoticonset branches/summer_of_code_2008/unit_testing/Resources/Emoticons/MSN.AdiumEmoticonset 
___
svn merge -r23936:24694 trunk/Resources/Emoticons/MSN.AdiumEmoticonset/Emoticons.plist  branches/summer_of_code_2008/unit_testing/Resources/Emoticons/MSN.AdiumEmoticonset/Emoticons.plist
___
cd branches/summer_of_code_2008/unit_testing/Resources/Emoticons/MSN.AdiumEmoticonset 
___
svn pl Emoticons.plist 
___
svn st
___
popd
___
diff -u trunk/Resources/Emoticons/MSN.AdiumEmoticonset/Emoticons.plist branches/summer_of_code_2008/unit_testing/Resources/Emoticons/MSN.AdiumEmoticonset/Emoticons.plist 
--- trunk/Resources/Emoticons/MSN.AdiumEmoticonset/Emoticons.plist       2008-06-26 20:50:51.000000000 -0700
+++ branches/summer_of_code_2008/unit_testing/Resources/Emoticons/MSN.AdiumEmoticonset/Emoticons.plist  2008-08-07 11:20:27.000000000 -0700
@@ -367,7 +367,7 @@
                        Name
                        Cool
                
-               I don't know.gif
+               I Don't Know.gif
                
                        Equivalents
                        
[Um, OK. What happened to all the differences it had from trunk that I had merged over? Suddenly, almost all the differences are gone, and the files are nearly the same!]
___
diff -u trunk/Resources/Emoticons/MSN.AdiumEmoticonset/Emoticons.plist branches/summer_of_code_2008/unit_testing/Resources/Emoticons/MSN.AdiumEmoticonset/Emoticons.plist
___
cd branches/summer_of_code_2008                %~/Projects/@otherpeoplesprojects/adium(0)
___
svn ci unit_testing 
Sending        unit_testing
Transmitting file data ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................svn: Commit succeeded, but other errors follow:
svn: Error bumping revisions post-commit (details follow):
svn: Directory '/Volumes/Home-etc/Users/prh/Projects/@otherpeoplesprojects/adium/branches/summer_of_code_2008/unit_testing/Frameworks/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib' is missing
svn: Directory '/Volumes/Home-etc/Users/prh/Projects/@otherpeoplesprojects/adium/branches/summer_of_code_2008/unit_testing/Frameworks/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib' is missing
svn: Your commit message was left in a temporary file:
svn:    '/Volumes/Home-etc/Users/prh/Projects/@otherpeoplesprojects/adium/branches/summer_of_code_2008/svn-commit.3.tmp'
___
svn st            %~/Projects/@otherpeoplesprojects/adium/branches/summer_of_code_2008(1)
?      svn-commit.2.tmp
?      svn-commit.tmp
?      svn-commit.3.tmp
 ML    unit_testing
?      unit_testing/Docs
?      unit_testing/DoxyCleaned
  L    unit_testing/Release
  L    unit_testing/Release/openUp
  L    unit_testing/Release/Artwork
M      unit_testing/Release/Makefile
  L    unit_testing/Frameworks
  L    unit_testing/Frameworks/libgmodule.framework
  L    unit_testing/Frameworks/libgmodule.framework/Versions
[snip]

(L in third column = Locked)
___
svn cleanup       %~/Projects/@otherpeoplesprojects/adium/branches/summer_of_code_2008(0)
svn: In directory 'unit_testing/Frameworks/JSON Framework/Tests/json.org'
svn: Error processing command 'committed' in 'unit_testing/Frameworks/JSON Framework/Tests/json.org'
svn: Working copy 'unit_testing/Frameworks/JSON Framework/Tests' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
___
svn cleanup       %~/Projects/@otherpeoplesprojects/adium/branches/summer_of_code_2008(1)
svn: In directory 'unit_testing/Frameworks/JSON Framework/Tests/json.org'
svn: Error processing command 'committed' in 'unit_testing/Frameworks/JSON Framework/Tests/json.org'
svn: Working copy 'unit_testing/Frameworks/JSON Framework/Tests' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
[So I get to manually clear the locks. Yay!]
___
tar cjf unit_testing.tbz unit_testing 
___
cd unit_testing   %~/Projects/@otherpeoplesprojects/adium/branches/summer_of_code_2008(0)
___
svn st | grep -Fw L | head
  L    Frameworks
  L    Frameworks/JSON Framework
  L    Frameworks/JSON Framework/Tests
A L+   Frameworks/JSON Framework/Tests/json.org
A L+   Frameworks/JSON Framework/Tests/types
A L+   Frameworks/JSON Framework/Tests/format
A L+   Frameworks/JSON Framework/Tests/rfc4627
  L    Frameworks/JSON Framework/Tests/Examples
  L    Frameworks/JSON Framework/Tests/Examples/JSONChecker
A L+   Frameworks/JSON Framework/Tests/jsonchecker
svn: Write error: Broken pipe
___
ls Frameworks/.svn 
dir-prop-base format          prop-base/      text-base/
entries         lock            props/          tmp/
___
ls Frameworks/.svn/lock 
Frameworks/.svn/lock
___
rm Frameworks/.svn/lock 
___
svn st -N Frameworks 
  L    Frameworks/JSON Framework
  L    Frameworks/libintl.framework
  L    Frameworks/libpurple.framework
  L    Frameworks/libmeanwhile.framework
  L    Frameworks/LMX.framework
R L+   Frameworks/Sparkle.framework
  L    Frameworks/AutoHyperlinks Framework
  L    Frameworks/libgobject.framework
  L    Frameworks/OTR.framework
  L    Frameworks/libglib.framework
  L    Frameworks/ShortcutRecorder
  L    Frameworks/libgthread.framework
  L    Frameworks/AIUtilities Framework
  L    Frameworks/OCMock.framework
  L    Frameworks/PSMTabBarControl.framework
  L    Frameworks/RBSplitView
  L    Frameworks/Growl-WithInstaller.framework
  L    Frameworks/Adium Framework
___
svn st -N Frameworks/JSON\ Framework 
  L    Frameworks/JSON Framework
A  +   Frameworks/JSON Framework/dmg.sh
  L    Frameworks/JSON Framework/Tests
  L    Frameworks/JSON Framework/Site
  L    Frameworks/JSON Framework/JSON.xcodeproj
  L    Frameworks/JSON Framework/Docs
A  +   Frameworks/JSON Framework/bench.m
M      Frameworks/JSON Framework/JSON-Info.plist
M      Frameworks/JSON Framework/CREDITS
___
rm Frameworks/JSON\ Framework/.svn/lock 
___
svn st -N Frameworks/JSON\ Framework
A  +   Frameworks/JSON Framework/dmg.sh
  L    Frameworks/JSON Framework/Tests
  L    Frameworks/JSON Framework/Site
  L    Frameworks/JSON Framework/JSON.xcodeproj
  L    Frameworks/JSON Framework/Docs
A  +   Frameworks/JSON Framework/bench.m
M      Frameworks/JSON Framework/JSON-Info.plist
M      Frameworks/JSON Framework/CREDITS
___
find . -name lock -print0 | xargs -0 rm
___
svn ci 
svn: Working copy '/Volumes/Home-etc/Users/prh/Projects/@otherpeoplesprojects/adium/branches/summer_of_code_2008' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
___
rm ../.svn/lock 
___
svn ci
Sending        unit_testing
[snip]
svn: Commit failed (details follow):
svn: Directory '/branches/summer_of_code_2008/unit_testing' is out of date
___
svn up ..
svn: Failed to add file '../unit_testing/Frameworks/JSON Framework/dmg.sh': a file of the same name is already scheduled for addition with history
___
rm Frameworks/JSON\ Framework/dmg.sh 
___
svn up
D    Frameworks/libgmodule.framework/Versions/2.0.0/Resources/English.lproj
G    Frameworks/JSON Framework/Tests/Types.m
svn: Failed to add directory 'Frameworks/JSON Framework/Tests/json.org': a versioned directory of the same name already exists
___
svn st Frameworks/JSON\ Framework/Tests/json.org
A L+   Frameworks/JSON Framework/Tests/json.org
A  +   Frameworks/JSON Framework/Tests/json.org/1.json
A  +   Frameworks/JSON Framework/Tests/json.org/2.json
A  +   Frameworks/JSON Framework/Tests/json.org/1.plist
⋮
___
find . -name lock -print0 | xargs -0 rm
___
svn st Frameworks/JSON\ Framework/Tests/json.org
A  +   Frameworks/JSON Framework/Tests/json.org
⋮
___
cd ..
___
mv unit_testing unit_testing-fail
___
svn up unit_testing
A    unit_testing
With this fresh working copy, I'm able to build, so I believe I'm finally done.

How to make a RAM disk larger than 2 GiB

 

2008-08-06 12:10:55 UTC

The most frequent question I get about Make RAM Disk is “How do I create a RAM disk larger than 2 GiB?”.

Make RAM Disk uses Mac OS X's disk images system to do its work. Unfortunately, as of Leopard, the command to create a single RAM disk refuses to create one that is larger than 2 GiB in size, even if you have the RAM to do it.

However, there is a solution.

Jennek Geels, a user who asked the aforementioned question, worked with Jean-Sébastien Rousseau to figure out a solution using Mac OS X's software-RAID feature. Here's a refined version of their solution:

  1. dev1=$(basename $(hdiutil attach -nomount ram://$NUMSECTORS))
  2. Repeat step 1 as many times as necessary, changing the variable number each time (dev1, dev2, dev3, and so on).
  3. diskutil createraid stripe $VOLUMENAME HFS+ $dev1 $dev2 .. $devN

So, for example, to create an 8 GiB RAM disk:

  1. NUMSECTORS=4194304
  2. dev1=$(basename $(hdiutil attach -nomount ram://$NUMSECTORS))
  3. dev2=$(basename $(hdiutil attach -nomount ram://$NUMSECTORS))
  4. dev3=$(basename $(hdiutil attach -nomount ram://$NUMSECTORS))
  5. dev4=$(basename $(hdiutil attach -nomount ram://$NUMSECTORS))
  6. diskutil createRAID stripe $VOLUMENAME HFS+ $dev1 $dev2 $dev3 $dev4

diskutil createRAID will format and mount the RAID device automatically; you don't need to run newfs_hfs and diskutil mount like you do when creating a single-device RAM disk.

I tested the speed briefly (just one run each, not averaged over several runs). Copying 2,000 MiB from /dev/zero to an 8 GiB RAIDed RAM disk was about one second faster (~5 seconds) than copying it to a 2 GiB single RAM disk (~6 seconds). Your results may vary.

When you're done, you'll need to eject all of the devices separately, starting with the RAID:

  1. diskutil eject $RAIDDEVICE
  2. hdiutil detach $dev1
  3. hdiutil detach $dev2
  4. ..
  5. hdiutil detach $devN

If you don't remember the device name of the RAID device, you can look it up in the output of diskutil listRAID. Look for the line labeled “Device Node:”.

I have no immediate plans to add this RAID feature to Make RAM Disk, because I'd also need to write an app to handle the full clean-up procedure. For now, if you really need a RAM disk that big, you can probably handle creating it and tearing it down yourself.

Free stuff on Amazon: The full list

 

2008-07-30 00:05:20 UTC

The Amazon MP3 Store now has a list of all 1,429 free songs in their catalog. Some of these are from the archives, but the vast majority are newly-free, or at least newly-revealed.

iPhone sudoku follow-up: ACTSudoku

 

2008-07-29 23:29:13 UTC

A couple of weeks ago, I posted a list of requirements for an iPhone sudoku app. At the time, no app satisfied all of the requirements, but one did come close.

Pierre Bernard of Houdah Software posted a comment that his sudoku app, ACTSudoku, satisfied all but one of the requirements I listed. The only one remaining was rotational symmetry, which he asked about.

In response to our dialog on that post, he added rotational symmetry in ACTSudoku 1.1, which Apple has now approved. You can download it now for $2.99 USD (or free if you bought one of the earlier versions).

UPDATE 2008-08-01: As of yesterday, there's now a free version of ACTSudoku, which only generates easy puzzles. This is good if you'd like to try it for yourself, but you don't want to spend $3 just yet.

The interface is simple enough:

ACTSudoku's interface is a sudoku grid on a wooden background, with the difficulty below it on the left and the timer below it on the right. At the bottom is a toolbar with three items: A + button, an Info button, and an X button.

Notice that there's no row of numbers for input. The obvious thing to try is tap on a cell, and it works:

Tapping on a cell brings up a square pop-up containing nine numerals, possibly colored by pencil-marks.

In other words, the interface is obviously postfix. The key word there is “obviously”: One of my requirements was that it must be obvious how to input numbers.

The input method is not perfectly obvious, however. One thing that stumps a lot of people (going by Bernard's response to some iTunes reviews) is the fact that simply tapping on a number in the pop-up enters a pencil-mark, rather than locking in the number. You must hold down briefly to set a number in the cell. In the comments on the previous post, I suggested swapping these behaviors; I maintain that suggestion.

You may be wondering what all the green dots are. Those are pencil-marks, filled in automatically by the game. This is optional; you can turn it off in the settings, if you want to be completely free to make mistakes.

ACTSudoku's settings are in the Settings app; the only control there, as of 1.1, is a light-switch controlling the automatic pencil-marks.

With the automatic pencil-marks turned on, the game will not let you enter a wrong number. With them turned off, the game will let you enter a wrong number. Either way, you can clear the cell by tapping again on the cell and holding down on the giant number.

If you tap on a cell with a number filled in, the pop-up has only that number, and it fills the entire size of the pop-up. Holding down on it clears the cell (and, if automatic pencil-marks are turned on, restores the marks). In this screenshot, the cell has a 4 filled in.
Hold down on that giant 4 to clear it from the cell.

Of course, ACTSudoku is not perfect. It has some minor problems:

  • The interface confusion that I noted above. A long tap sets the number, whereas a short tap sets a pencil-mark. This arrangement makes no sense with automatic pencil-marks turned on—and they're on by default. It would make much more sense to have the tap lengths the other way around.
  • The northern, eastern, southern, and western blocks are have dimmed-looking gray backgrounds, for no apparent reason. This is slightly distracting (but not enough to qualify as “garish”). I would prefer if all the blocks were uniform white.
  • I'd like to be able to turn off the timer. Again, I find this distracting.

However, it satisfies all of my requirements, so I declare ACTSudoku the winner of the iPhone sudoku race. Congratulations to Houdah Software!

Requirements for a proper iPhone sudoku app

 

2008-07-12 14:05:38 UTC

  • A sudoku generator. The game should not cap me at x-hundred or x-thousand puzzles. Give me all the sudoku the iPhone OS' PRNG can create for me.

  • Proper sudoku puzzles, not Number Place puzzles. The difference is that a sudoku puzzle is rotationally symmetric: if you turn the puzzle 180°, it still looks the same.

    Starting with a proper sudoku puzzle, → 180° → rotation gets you the same layout of starting numbers.

    Many sudoku generators actually generate Number Place puzzles, which don't have this constraint. (In particular, all the Will Shortz puzzles are like this.)

  • Obvious input method. A row of numbers at the bottom doesn't work because I can't tell whether the game is prefix (tap number first, then cell) or postfix (tap cell first, then number). I could get used to either way, but a good interface doesn't make me guess.

    • Ambrosia's Mr. Sudoku uses handwriting recognition.

    • Platinum Sudoku is clearly postfix, because its input method is a ring of numbers around whatever cell you tap on.

  • The ability to set pencilmarks, to keep track of what numbers are viable for a cell (helping to avoid wrong numbers, especially at higher difficulty levels).

  • Simple, usable interface. This means two things:

    • No excessive artwork like Big Bang Sudoku has. I only have 16 GB of flash memory—don't waste it!

    • No garish colors. If your sudoku game is in CGA, then I don't want to look at it, which means I don't want to play it, which means I don't want to buy it.

New tool: sednames

 

2008-06-20 21:21:10 UTC

What if you could use sed to rename files?

Well, now you can.

sednames is a utility that lets you specify a program for sed on the command-line, which it then uses to rename the files that you also specify on the command-line.

The twist is that, unlike other batch-renamers, sednames also supports your VCS. For the most common cases (svn, hg, bzr, and git), there's a --vcs option:

% sednames -e 's/Replace/Mix/' --vcs=hg *

This command-line will use Mercurial (hg mv) to rename every file by replacing “Replace” with “Mix”. Of course, if a name doesn't contain “Replace”, then that name will be unchanged and sednames is smart enough to not try to rename that file.

Not only that, but just in case you're using some oddball VCS (or you want to copy instead of rename, or something), sednames supports using any program to rename your files, as long as it accepts both the before and after names in its arguments. The --help output is more specific, but to put it simply, it works similarly to find's -exec option.

You can download the current revision directly, or use the Mercurial repository to follow or contribute to its development.

Free stuff on iTunes: Cable TV

 

2008-06-17 13:06:47 UTC

From the podcast directory, some free cable TV talk shows. All of these carry (what appear to be) full episodes:

Note: I don't endorse any of these shows, and purposefully listed them in alphabetical order.

So you're using the unicode class's translate method, and it says:

TypeError: character mapping must return integer, None or unicode

You may be wondering what causes this. After all, you're duly using the string.maketrans function. Surely this should be valid?

Well, no: You can only use string.maketrans with str.translate. For unicode.translate, you must use a different kind of translation table:

… a mapping of Unicode ordinals to Unicode ordinals [int], Unicode strings [unicode] or None.

3.6.1 String Methods

In Localization Helper, I had to replace my string.maketrans call with this code:

dict(zip(map(ord, u'\a\b\t\n\v\f\r'), u'abtnvfr'))

Note that I need to call ord on each key character, because keys must be ints.

New tool: Localization Helper

 

2008-06-16 08:48:05 UTC

One thing that I noticed a few days ago while working on Growl 1.1.4 is that some strings aren't translated in a couple of the localizations. I reported this on our localization mailing list, but it got me thinking: I could really use a program that would scan a tree of source code and tell me of problems like this.

So I wrote one.

Localization Helper is a command-line tool to walk a tree of source code looking for .strings files, and compare different localizations of them. It reports duplicate (not-translated) strings, and will soon (maybe by the time you read this) report strings that are missing altogether.

Currently, it only compares all other languages to one primary language, which defaults to English. I didn't feel like making it compare every language to every other language. ☺

The program scans every directory you specify on the command-line. If you don't give it any arguments, it scans the current working directory. Also, it has some options, which you can see with the --help option.

Here are some excerpts of its output for the Growl 1.1.3 source code:

*** Found problems in Core/Resources/*.lproj/Localizable.strings
Duplicate strings in Localizable.strings between English.lproj and cs.lproj:
"User went idle" = "User went idle";
"You are now considered idle by Growl" = "You are now considered idle by Growl";
"No activity for more than %d seconds." = "No activity for more than %d seconds.";
"Growl was unable to create the socket for Network notifications." = "Growl was unable to create the socket for Network notifications.";
"You are no longer considered idle by Growl" = "You are no longer considered idle by Growl";
⋮
!!! Warning: Localized file Extras/GrowlSafari/de.lproj/InfoPlist.strings is missing
!!! Warning: Localized file Extras/GrowlSafari/ja.lproj/InfoPlist.strings is missing

*** Could not read plist file at path Extras/GrowlSafari/de.lproj/Localizable.strings
*** Could not read plist file at path Extras/GrowlSafari/ja.lproj/Localizable.strings
*** Could not read plist file at path Extras/GrowlSafari/pt_BR.lproj/Localizable.strings
*** Could not read plist file at path Extras/GrowlSafari/sv.lproj/Localizable.strings

You'll need to have either Leopard or Python 2.5 + PyObjC (Leopard comes with both) to use the program. (BTW: PyObjC rocks.)

Until I release it sometime later this week (hopefully), I provide two ways to get the program:

  1. You can download it directly.
  2. You can clone my repository: hg clone http://boredzo.org/localization-helper/hg/

Of course, if you clone your repository, then you can easily get updates by running hg pull.

Also, there's a commits feed, in case you want to stay on top of localization_helper's development using your feed reader.

Growl 1.1.3

 

2008-06-06 14:30:10 UTC

I just released version 1.1.3 of Growl. Some highlights from the version history:

  • Worked around conflict with Logitech Control Center 2.4, and implemented countermeasures in case another input-manager hack in the future has the same bug
  • Show notifications on every Space (Leopard)
  • Rewrote GrowlMail to fix conflict between it and Leopard, and make it much more robust for the future
  • Updated GrowlSafari to work with Safari 3.0 and later (thanks to Ben Willmore)
  • Fixed growlnotify to actually send the notification on Leopard
  • Fixed a hang on changing the default display
  • Fixed displaying a close widget on mouse-over

Those aren't the only improvements, but they're the most major. Growl and its extras are finally completely Leopard-ready.

You can download 1.1.3 either from the About tab in the Growl preference pane, or from the website.

In other news, this is my first release as the Lead Developer of Growl. I'm replacing Brian Ganninger, who was (IIRC) Lead Developer for the entire 1.1 series. Let us all thank him for his excellent work, and wish him well for the future.

WWDC Survival Guide

 

2008-06-05 18:46:58 UTC

I'm not attending WWDC this year (sorry!), but I did attend last year, so I have some advice for those of you attending for the first time (and I hear there are a lot of you).

  1. Walk.

    San Francisco isn't designed to handle car traffic—it's optimized for pedestrians, in several ways:

    • Most streets are one-way, meaning that a car must take a longer route than a pedestrian can.
    • The walk/don't walk signals don't have buttons, because you don't need them. When drivers get the green light, pedestrians get the walk signal—every time.
    • Almost all parking costs money per hour. Walking is free.
    • Parking is so sparse that you'll walk one or more blocks anyway. So, if you can walk from your hotel to Moscone and back, do so. You'll get there faster and more cheaply.
  2. Don't eat the lunch.

    The objects that Moscone serves as lunch are not food. Food, by definition, is edible. Eat out.

    Note that I'm only talking about lunch. Moscone serves food at other times of day: a mid-afternoon snack, and dinner. These are OK, and sometimes even pretty good. Only the lunch is inedible.

  3. Attend parties, or make your own.

    If you're at WWDC with some friends or colleagues, you may be able to work on some code with them at the conference. This is a lot of fun, especially if you can get together around a power strip.

    Either way, you may want to attend other parties. Some parties are listed on Upcoming. Additionally, there's CocoaHeads meeting at the Apple Store on Stockton St on Tuesday. If you know any others, please post a comment here and I'll link to them. (However, I'd stay away from the Thirsty Bear pub. The acoustics in that place are terrible. Forget conversation.)

  4. Bring your (US) AC adapter.

    They have charging stations at the conference, but the week I was there, the MBP chargers were broken. They never did get them fixed. I ended up buying a second AC adapter at the Apple Store.

    Additionally, Tim Burks recommends bringing a power strip—a good idea if you and your friends/colleagues intend to hack code together at the conference. More specifically, Mark Boszko recommends Monster Cable's (yes, them) Outlets to Go. He also notes the existence of 3- and 6-outlet versions, which you may prefer, depending on how much space you have in your bag.

  5. Grab a copy of The Onion.

    You may or may not know this, but The Onion is not just a website and series of books—it really does exist as a newspaper. It's available for free in newspaper racks in select cities, including San Francisco. I'm sorry, but I don't remember where the rack I got mine from was—I think it was on Market Street, but I don't remember the cross-street.

Some good eating places:

Enjoy the WWDC!

Also, be sure to read the comments on this post! Already, Jonathan Wight has made two very wise suggestions. You may also want to check back periodically so you don't miss any.

Things your ReadMe must include

 

2008-05-20 00:23:27 UTC

  • The name of your application
  • What it does
  • How to configure the application, if necessary (note: does not include installation)
  • Simple overview of how to use the software, once it's configured (detailed manual should be in the Help menu)
  • How to uninstall the software, if necessary (i.e., if it isn't an application)
  • FAQ
  • What it costs, if it's not free
  • How to register it
  • A link to your website (in case a magazine distributes your app on its CD)
  • Contact information for support questions
  • Contact information for sales (registration/pricing/currency) questions

Things that you may want to include, but aren't necessary

  • Screenshots
  • Troubleshooting information

Things that you shouldn't include

  • Installation instructions: If it's a plain app, you don't need an installer; otherwise, make an Installer .pkg. In either case, you shouldn't need instructions.

Formats I approve

  • RTF or RTFd
  • HTML or webarchive
  • Plain text

You may also want to provide a trampoline application to open a localized version of your ReadMe (for example, see the ReadMe on the Mac OS X DVD). Bonus points if you create a kit to make these, for the benefit of other developers.

Formats I disapprove

  • Word or OOXML format: Many people don't have Word, and everything else handles these documents imperfectly. Use RTF instead.
  • OpenOffice format: Many (probably most) people don't have OpenOffice. Use RTF instead.
  • PDF: Use PDF either for vector graphics (inside your app) or for documents you expect someone to print. If the user is going to have to print your ReadMe, you need an interface overhaul.

As usual, I invite suggestions, rebuttals, and amendments.

UPDATE 2008-05-24: Recommended including contact information, as suggested by ssp.

What I want: A “best of” plug-in

 

2008-05-18 21:36:00 UTC

I want a plug-in for WordPress that will do two, or maybe three, things:

  1. Put a “flag as best of” button on any post that I've authored. (I would have to be logged in.)
  2. Provide a function to insert a div containing n=10 random best-of posts. I could then call this function from the sidebar.
  3. (Optional) Provide a single public page containing a link to every best-of post.

Does a plug-in like this exist already? If not, I'm not afraid to write it.

Last week, John Gruber and Dan Benjamin released episode 20 of their podcast, The Talk Show. It was devoted to the Apple Extended Keyboard (the Saratoga) and Apple Extended Keyboard II (the Nimitz). This renewed my interest in bringing my own Nimitz back into service using a Griffin iMate.

The Nimitz is the greatest keyboard ever made for the Macintosh. It has the best keys, the best height adjustment, the best Caps Lock key (it physically locks down!)—everything.

One of its distinctive features is a couple of pegs near the top of the keyboard—one near the Escape key, and another near the Power key.

The Saratoga had, printed under the F1 through F4 keys, the words “undo”, “cut”, “copy”, and “paste”. Because these definitions were useless (not to say confusing) to most Mac users, the Nimitz moved these labels to a plastic overlay that came with the keyboard. Those who actually needed it could put it on, which they did by hanging it on those two pegs, and everyone else could simply leave it in the box.

This is a photo by Flickr user penmachine (Derek K. Miller) of an Apple Extended Keyboard II with Apple's overlay, cropped to show the corner of the overlay hanging around the Power key.

That overlay is even more useless today. But I think the idea of an overlay defining the function keys is a good one, especially as Mac OS X has made the function keys actually useful.

So I decided to make a new overlay.

This one does not have the seldom-useful F1–F4 labels. What is <em>does</em> have is labels under F9–F12, listing their default Mac OS X actions (the three kinds of Exposé, plus Eject).

My original plan was to distribute the EPS file for this overlay, and provide instructions on how to customize it.

After writing that it's easy to edit the file, followed by an entire page of instructions on how to do that properly, I decided it would be better to write an application to do it for you. I call this application the Apple Extended Keyboard II Overlay Generator.

I've included with the application two ready-made overlays: a replica of the classic Apple overlay; and my Mac OS X overlay. You also have the option of editing them or creating your own from scratch.

Assembly instructions (among other information) and the download are on the webpage.

Blog spam count: 2008-04

 

2008-05-01 19:57:34 UTC

Spam comments blocked by Negative Turing Test in April 2008:

44,573

Blog spam count: 2007-11 through 2008-03

 

2008-04-01 12:10:51 UTC

Average number of spam comments blocked by Negative Turing Test in per month from the start of November 2007 through the end of March 2008:

6,529.8

Total number of spam comments blocked by Negative Turing Test in the same time period:

32,649

Note that this is only on my blog, not any other blogs that use NTT.

Under my MacBook Pro, I use a Targus Laptop Chill Mat. The Chill Mat is an active-cooling pad: it contains two fans that suck in air at the top (i.e., between the laptop and the mat) and thrust it out the back.

And it is a piece of crap.

I'm currently on my second Chill Mat. The first one died when the connector in the mat went loose, so that the cable's connector no longer made a good connection with it. I sent that one in for warranty service, and got back the one I was using up until a few days ago. The way this one died is that the inline power switch on the cable is now permanently off, and just flops around; I cannot turn it on.

Looking at the website in preparation for this post, I noticed that the Chill Mat shown on the website looks different from mine. Maybe they've redesigned it, and the hardware is more reliable now. I intend to investigate this.

But, if that fails, I have three choices:

  1. Send this thing in for warranty service again.
  2. Surgically remove the inline switch, and hope the connector doesn't flake out.
  3. Get a different active-cooling pad.

I'm seriously considering #3, but I'm not sure of my options. (I am definitely not open to passive-cooling solutions such as Targus' coat rack.) Having made one bad choice before, I now turn the decision over to you.

Can you recommend a good USB-powered active-cooling pad for a 15″ MacBook Pro?

“Photoshop sucks” updated

 

2008-03-23 17:33:51 UTC

Upon inspiration by a comment, I've just updated my rant from a couple years ago, “Photoshop sucks”, to include a list of alternatives. Topping the list, of course, is Acorn; also included are Core Image Fun House, Pixelmator, DrawIt, and Iris.

I'm very glad that there are now solutions to the problem that is Photoshop. I dislike bitching about something without a solution to offer; now I have six to offer, so that rant is now complete.

Apple Bug Friday! 75

 

2008-03-21 19:44:43 UTC

This bug is TN2083 doesn't document all known Session types. It was filed on 2008-01-19 at 16:44 PST.

Read the rest of this entry »

UTI Property List Helper 1.0

 

2008-03-21 10:33:15 UTC

For a forthcoming blog post, I was recently writing a test app that displays images. This had me once again slogging through the list of System-Declared Uniform Type Identifiers and assembling type declarations for the image types by hand.

I'm tired of doing that. So I wrote a new application called UTI Property List Helper.

The main window consists of a table view, in which you enter UTIs, and two text views displaying chunks of Info.plist XML data.

This application automatically updates the CFBundleDocumentTypes and UTImportedTypeDeclarations arrays in its window with information on the types you enter, obtained from Launch Services' database of all types registered by any app on your system.

No more searching for that OSType, or leaving it out because it's too much work—this app does all the grunt work for you. Enjoy.