Joseph Barillari's weblog

Core dumped.

29 October 2009

lxml on RHEL

Screen-scraping again. I opted for lxml instead of BeautifulSoup because lxml is faster and BeautifulSoup appears to be on the way out. (Its author explains: "I no longer enjoy working on Beautiful Soup.")

lxml is easy to install on Debian; you just say "apt-get install python-lxml". Red Hat is another story.

I haven't had root access to a Red Hat box since 2002 or so, when my TP i1482 laptop died* and I installed Debian on its replacement. The screen-scraper needs to run on a Red Hat box.

* When the backlight failed and I couldn't get a replacement to work properly, taking the housing off the screen and shining a bright light through it made it sort-of usable. An external monitor was even better. Then, the power supply or possibly the mobo started to fail and it took many tries to get it to boot. Unfortunately, my too-rapid power cycling blew the hard disk. At that point, I retired it.

Unfortunately, the box's yum repositories did not contain an lxml package. lxml depends on versions of libxml2 and libxslt more recent than those in the repository, so I had to install those before I could install lxml from source.

I tried binary RPMs of libxml2 and libxslt, but I think they depended on libraries newer than those in the yum repository:


# rpm -i libxml2-2.7.6-1.x86_64.rpm
warning: libxml2-2.7.6-1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID de95bc1f
error: Failed dependencies:
libc.so.6(GLIBC_2.7)(64bit) is needed by libxml2-2.7.6-1.x86_64
rpmlib(FileDigests) <= 4.6.0-1 is needed by libxml2-2.7.6-1.x86_64

Then I tried the source packages:


# rpmbuild --rebuild libxml2-2.7.6-1.src.rpm
Installing libxml2-2.7.6-1.src.rpm
warning: InstallSourcePackage: Header V3 DSA signature: NOKEY, key ID de95bc1f
warning: user veillard does not exist - using root
error: unpacking of archive failed on file /usr/src/redhat/SOURCES/libxml2-2.7.6.tar.gz;4aea24a1: cpio: MD5 sum mismatch
error: libxml2-2.7.6-1.src.rpm cannot be installed


Googling this error did not reveal anything useful, so I elected to install both packages from source. Fortunately, this wasn't too complicated. Here's a cleaned-up version of what I did.


(cd $HOME; mkdir mylib) # don't clobber the rpm-installed versions
(cd libxml2-2.7.6; ./configure --prefix=$HOME/mylib ; make ; make install)
(cd libxslt-1.1.26; ./configure --prefix=$HOME/mylib/ --with-libxml-prefix=$HOME/mylib/ ; make ; make install)
(cd lxml-2.2.2; python2.6 setup.py build --with-xslt-config=$HOME/mylib/bin/xslt-config --with-xml2-config=$HOME/mylib/bin/xml2-config)


Invoke Python as follows, and lxml should work:

env LD_LIBRARY_PATH=$HOME/mylib/lib/ PYTHONPATH=$HOME/lxml-2.2.2/build/lib.linux-x86_64-2.6/ python2.6

28 September 2009

Transit

Continental Airlines Flight CO 3160 on a bus in coach class

I'm wondering if I can get the computer to suggest something even weirder.


24 September 2009

Disks are slow

I have a simple SQL query. It does an inner join of a small (1000 row) table against three or four other tables. The indices are all properly configured, so looking up the joined rows should take close to constant time. But the query still took 30+ seconds.

Then I remembered: the other tables are huge. And disk seeks are really slow.

You can run hdparm -tT and learn that your disk can pull 150 MB/sec straight from the metal -- but that's _sequential_ access. Peter Norvig reminded budding programmers that seeks are four orders of magnitude slower than sequential fetches. You can download from this page a tiny C program that tells you how slow your disk really is. My vintage-2008 laptop can seek about 55 times a second.

In the above query, the joined tables were colossal and the joined rows widely separated, so every read took a seek. Even with O(1) lookup time, if the constant in front of the big O is about 18 ms, that's 18 seconds. Since the query joined several such tables, the actual duration was a few times that.

Since the data that this query interrogates change rarely, I can just cache the result. I wrote a little Python decorator for that. It uses cPickle, but could easily be adapted to use memcached. Note that this function doesn't check for staleness. It expects an external process to purge stale cache entries.
def diskcache_wrap(fcn):
""" wrap this function in a diskcache access """
def wrapper(*args, **kwargs):
" the wrapper iteself "
hashl = hashlib.sha1()
if args:
hashl.update(cPickle.dumps(args))
if kwargs:
hashl.update(cPickle.dumps(kwargs))
digest = hashl.hexdigest()
path = os.path.join(CACHEDIR, "wrap-%s-%s" % (fcn.__name__, digest))
if os.path.exists(path):
try:
return cPickle.load(open(path))
except (cPickle.UnpicklingError, EOFError, IOError, ValueError):
os.unlink(path) # probably broken, trash it
result = fcn(*args, **kwargs)
if not os.path.exists(CACHEDIR):
os.mkdir(CACHEDIR)
cPickle.dump(result, open(path,'w'))
return result
return wrapper

23 September 2009

Mysql replication confusion

Mysql's replication-setup instructions boil down to this:

- Stop all activity on the master with FLUSH TABLES WITH READ LOCK;
- Make note of the binary-log position on the master with SHOW MASTER STATUS;
- Dump out the future master with mysqldump, using the --lock-all-databases or --master-data options
- Release the locks, load the data on the server, start the slave.

The idea behind the locks is so that the dump is a consistent snapshot
of the database. No activity should happen between taking the lock and
finishing the dump. Presumably, that means that the master's position
in the binary log as given by SHOW MASTER STATUS; should not change after the user issues FLUSH TABLES WITH READ LOCK;

But that presumption would be wrong. Here's what I did:

Open mysql, issue:

mysql> flush tables with read lock;
Query OK, 0 rows affected (0.00 sec)

mysql> show master status;
+------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000124 | 21494 | | |
+------------------+----------+--------------+------------------+
1 row in set (0.00 sec)


Leave that session open. At the command line, issue:

$ mysqldump -u root -p'the-password' --databases names of the databases --master-data |gzip > masterdump.sql.gz

Go back to the read lock session. Issue flush-tables again. And, lo and behold:

mysql> show master status;
+------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000124 | 21565 | | |
+------------------+----------+--------------+------------------+
1 row in set (0.00 sec)


The position changed! Evidently, --master-data (which is supposed to
stick the CHANGE MASTER TO statement into the dump so the user doesn't
have to) must either release the original read lock or perform an
action that bypasses it.


The CHANGE MASTER TO statement included by --master-data refers to the
latter timepoint:


--
-- Position to start replication or point-in-time recovery from
--

CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000124', MASTER_LOG_POS=21565;


So, what happened between 21494 and 21565? Dumping the log reveals:


# mysqlbinlog /var/log/mysql/mysql-bin.000124

[most of log snipped]

# at 21494
#090916 13:38:32 server id 8887 end_log_pos 21565 Query thread_id=86 exec_time=0 error_code=0
SET TIMESTAMP=1253122712/*!*/;
FLUSH TABLES/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;


Between 21494 and 21565, the log contains a 'set timestamp', 'flush
tables', and 'delimiter' statement. These must have been added by
mysqldump.

I'm assuming that those statements have no effect on the integrity of
the dump. Still, I find it a bit surprising that the manual doesn't
mention this. (Interestingly, if you issue the --lock-all-tables
option instead of --master-data, mysql does the same thing, except
that CHANGE MASTER TO is not included in the dump. You have to add it
yourself, deciding whether to trust the pre-dump or post-dump
timestamp.

For reference, I'm using Debian's mysql-server-5.0 package, version
5.0.51a-24+lenny2.

21 September 2009

Windmill Testing Framework == AWESOME

The Windmill Testing Framework was written by the Open Source Applications Foundation (of Chandler and Dreaming in Code fame) is simply awesome. Not only was the project easy to install and fairly easy to start working with, not only were the people on the IRC channel really helpful, but, after I wrote my tests in Firefox on Linux, I switched to Internet Explorer on Windows and ran them all...without changing a thing.

Actually -- that's not exactly true -- I had to adjust the waitForPageLoad timeouts upwards to account for my currently-slow Internet connection and some caching issues inside my code. But besides that, I was stunned by how easy it was to switch browsers (which is the whole point of automated testing, anyway).

It was a little difficult to get started, because (a) the documentation for Windmill is a bit sparse; it's a fairly new project and (b) it wasn't obvious to me what the Right Way to set up test cases was. You can save the tests as Python or JavaScript; you can run the tests from the command line, or, it appears, within the browser by serving static .js files from your server. I haven't tried the latter cases; I saved the tests in Python and run them from the command line. They work great. Windmill even has Flash integration in the works. I hand-hacked my Flash integration by providing ExternalInterface hooks that I call from Windmill to assert various things about the state of the Flash, but I'm looking forward to see theirs in the next release.

One note: when you install Windmill, ez_setup might complain about a syntax error. This is probably fixed by now, but the IRC channel people advised me that it could be safely ignored -- the file in question isn't currently used.

09 September 2009

Firefox automation

I have access to a web page that produces interesting pipe-delimited data, given a number. There are several hundred numbers for which I want data. The website is behind a gnarly security system to which I have access, but so far, only via a browser---I don't really want to try to figure out how to get access to it from a scripting environment like Python. The login process involves SSL, cookies, a bunch of redirects, and other things that would probably take ages to work out.

There are a bunch of Firefox plugins that claim to handle browser automation. My task is pretty simple, so this should be a nice test:
  1. Pop a number x from a predefined array of numbers. If the array is empty, stop.
  2. Plug x into the form.
  3. Submit the form.
  4. The web site will send back a pipe-delimited text file. Save that under the name x.txt.
  5. Go back to 1.
Here's what I tried:

CoScripter by IBM Research. Includes record function! Nice use of natural language. But it can't interact with browser chrome. Plonk. (Also: deleting a command is counterintuitive: you have to backspace all over it, rather than right-clicking and picking "delete" or similar.)

ChickenFoot by Michael Bolin from csail. No record function, but it has a tempting write() function. Unfortunately, the server sends the file as

Content-Disposition: attachment; filename="filename.txt"
Content-Type: application/octet-stream

...which forces Firefox to pop up the "You have chosen to open" dialog box no matter what and grays out the "Do this automatically from now on" check box, so you have to sit there and click. Not cool. This is a firefox problem, not a ChickenFoot problem.

Eh. I fired up Wireshark, copy-pasted the cookie, and used Python to automate the fetch. That worked.

08 September 2009

Dependencies

If you need to run java on Debian, you can install gij.
If you need to run ant, you can install ant.

Unfortunately, if you do this, ant might not work. You may get an error like this:

$ ant
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-1.5.0-gcj-4.3-1.5.0.0/lib/tools.jar

That file is actually part of the package java-gcj-compat-dev, which is for whatever reason not an ant dependency. Install it and the problem might go away.

01 September 2009

Threadsafety and matplotlib/pylab

Matplotlib and pylab are two different interfaces to the same (very useful) python plotting library. Pylab is the easier-to-use and more succinct of the two, but, unfortunately, it relies on global state which makes it most definitely _not_ threadsafe. If you try to use it on a multithreaded web application, you'll get graphs overlaid on top of each other, random changes to your graph parameters, and all sorts of other nasties that don't really bear mentioning.

You can avoid this by switching to matplotlib's Figure()-based api. This thread has a nice example. (Note that the thread is actually about a failure of matplotlib to work multithreadedly. But it sounds like an obscure one.)

13 August 2009

The single best article on consumer-driven health-care I've read in ages

http://www.theatlantic.com/doc/print/200909/health-care

10 August 2009

gdb to the rescue

I've written a program that starts a bunch of threads, reads a bunch of data from various computers on the Internet, packs it up, and ships it off to another computer for safekeeping. It runs several times an hour, triggered by a cron job. I also have a watchdog alarm that goes off if that process hasn't run for a while.

Today, the alarm went off. I investigated and realized that one of the several thousand threads it launched was hanging because I'd opened a socket using without setting a timeout. The process won't finish until each and every thread finishes, so that single socket was holding up everything. I wrote the program in Python with urllib, and I'd failed to add a line like this to the top:

SOCKET_TIMEOUT = 20
socket.setdefaulttimeout(SOCKET_TIMEOUT)

The problem was that I didn't want to lose the data that was inside these processes by simply killing them -- it's time-sensitive. If I lost those readings, there would be no way to get them back. But I couldn't think of an easy way to close those sockets. I looked into tcpkill, but that only works if packets are moving back and forth. These threads were hanging because the destination server wasn't sending anything.

Fortunately, there was a fairly straightforward solution.

First, I did a quick scan for the stuck processes:
$ lsof |grep python|grep www

python 14139 jdb 12u IPv4 155056253 TCP mybox:49535->failpc:www (ESTABLISHED)
python 24844 jdb 28u IPv4 154951225 TCP mybox:60415->failpc:www (ESTABLISHED)
python 26287 jdb 26u IPv4 153763806 TCP mybox:44628->failpc:www (ESTABLISHED)
python 28168 jdb 9u IPv4 155145417 TCP mybox:37225->failpc:www (ESTABLISHED)

This used lsof to list all sockets held by Python processes that were connected to port 80 (www) on the remote machine. "mybox" is my machine, and "failpc" is the machine that's doing nothing.

The fourth column is the file descriptor for those sockets. The 'u' means that the descriptor is both readable and writable.

I used gdb to unstick the processes by closing the sockets:

$ gdb /usr/bin/python
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) attach 14139
Attaching to program: /usr/bin/python, process 14139
Reading symbols from /lib/i686/cmov/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
[New Thread 0xb7d416c0 (LWP 14139)]
[New Thread 0xb5906b90 (LWP 20872)]
Loaded symbols for /lib/i686/cmov/libpthread.so.0

(a whole bunch of loading-symbols cruft was snipped)

(gdb) print close(12)
[Switching to Thread 0xb7d416c0 (LWP 14139)]
$1 = 0
(gdb) cont
Continuing.
[Thread 0xb5906b90 (LWP 20872) exited]

Program exited normally.


What I did was open gdb, attach to the running python process, and call close() on the socket. The offending thread exited, and the supervisor thread eventually noticed, gathered the data from all the threads, saved it, and exited.

The reality was a bit messier: the threads opened two sockets in a sequence, so I had to repeat the above steps for each thread: I ran lsof to find the new file descriptor, hit Control-C in GDB to stop the process again, and closed the new FD, too. I could also have left tcpkill running with parameters like this

tcpkill -i eth0 dst host failpc

...which would have killed new connections to failpc as soon as they were opened. I used that approach for most of the connections to save time.

You might not be able to reuse gdb processes -- in my case, if I tried to attach to a second process after the first one exited, gdb printed warnings like:

warning: Cannot initialize thread debugging library: versions of libpthread and libthread_db do not match

I found it easier just to quit and start a new session each time.

05 August 2009

Softwar

Thoughts on Softwar, former Economist correspondent Matthew Symonds's bio of Larry Ellison.
  1. Symonds's agent, Andrew Wylie, brokered a deal in which Ellison had the right of reply---in footnotes. These added some color to the book, but not as much as I'd hoped.
  2. Most of his conversations with Ellison appear to have taken place on private planes, yachts, or exotic resorts --- not the places that one would expect to find a biographer who wanted to play Robert Caro to Ellison's Robert Moses. The author himself is in twenty percent of the book's group photos featuring an adult Ellison.
  3. The most interesting part of Ellison's career --- how he went from being an itinerent rock-climbing hacker to founder of a fast-growing database company --- is compressed into far too few pages. I realize that paper is expensive these days, but I would have preferred more material about Oracle/SDL/RSI's early stages and fewer anecdotes about how Ellison's head of sales talked him into ditching his "cheap Seiko wristwatch" and buying a Rolex---"'but in stainless. I couldn't deal with gold.'" An entire chapter (I skipped it) is devoted to sailboat racing. Some of the "lifestyle" material -- for instance, the Adelyn Lee wrongful-termination/extortion case -- is illuminating. Most isn't.
  4. One early anecdote featured the proto-Oracle nearly running out of cash because, despite some early sales to three-letter intelligence agencies, Ellison & Co. hadn't realized that the feds can spend years between closing a sale and cutting a check.
  5. Ellison himself presents some intriguing ideas. It's better to reengineer business processes to fit software than the other way around (p. 476) Software is so abstract that the key to selling it is customer references: "selling the architecture only works with a few early adopters"; "people have this innate belief that there is safety in numbers". (p.239).
  6. The California Oracle license-sales debacle was, according to Symonds, an attempt to smear Gray Davis that happened to involve Oracle. Oracle, by way of the systems-integrator Logicon, actually gave California a spectacular deal on licenses. When the scandal (which involved an ill-timed campaign donation) broke, Oracle even offered to cancel the contract, but the state declined. (On that note, there are few scandals in the book where Symonds concludes that Ellison or Oracle was less sinned against than sinning.)
Recommended.

04 August 2009

No, I don't understand it.

Exhibit A:
(AP Photo)

Exhibit B:
(link)

02 August 2009

pexpect = EPIC WIN

I needed to read a bunch of data from a database only accessible via a menu-driven Unix shell program. Expect is designed for just this problem, but I understand that it invovles using Tcl, and Tk horrifies me so much that I wanted nothing to do with Tcl whatsoever.

Then I discovered pexpect, which is like expect but uses Python, which was the most win I've ever seen crammed into just 1.3 kloc of source code. Pexpect lets you script programs that expect human input. You tell it what to look for; it tells you what it read; you tell it how to respond. It even works on python 2.3, which was great, because the host with the shell program only had python 2.3.

One pitfall was that either pexpect or python 2.3 tended to leak file descriptors.
If I spawned the database client too many times from my pexpect script, Python would eventually fail with complaints about running out of file handles. This happened even when I called close() on the handles. The solution was to wrap the pexpect script in another python script that in turn called os.system wrote the results to an append-only file. This was a gross hack, but I got the data I needed without wearing out my fingers. Highly recommended.

29 July 2009

Amazon: mostly win. Windows: bleh.

Have you ever needed to run a Windows application without a suitable machine handy? Today, I wanted to install something that required Microsoft IIS. My laptop runs Windows Vista Home Premium*, which has IIS preinstalled. You can activate it by going to Control Panels->Add/Remove Programs->Add/Remove Windows Components. Unfortunately, it lacks a bunch of features that the program required, like Windows Authentication, Digest Authentication, and a bunch of others. So the installer complained and refused to install.

* I wasn't planning on running Vista very often, so I wanted to save on the Microsoft tax.

I have an ancient laptop with Windows XP Pro. Amazingly, it still booted. But I couldn't find the WinXP install CD to install IIS. (Vista keeps the files on disk, so it doesn't need a CD). The hard drive was also full and I didn't want to spend the afternoon nuking old files.

Then I remembered that Amazon's EC2 service lets you run Windows. I thought this was perfect --- I could install the app without actually having to muck around with actual computers.

This blog post
is a nice walkthrough. Things have changed a bit since then --- the part about security groups now appears to be automatic (Amazon now walks you through the setup and turns on remote desktop by default). Because Vista Home Premium doesn't have Remote Desktop, I booted into Linux to use rdesktop. (Bliss!)

Things more-or-less worked as expected after that. Some pitfalls to avoid:
  • The EC2 virtual machine takes forever to boot. I believe there was a 20 minute interval between when Amazon started billing me and when the machine finally went from "pending" to ready, and then from ready to actually ready (ready enough that it would give me the password).
  • Internet Explorer is set to fascist mode by default. It won't let you download much of anything. Somehow, Firefox became infested with these settings, too, so Firefox won't let you download anything either. All the downloads came up "cancelled". You can switch these settings off by going to Add/Remove Windows Components and turning off Internet Explorer Enhanced Security Configuration.
  • EC2 blows away your image when you shut down. If you want to keep it, you can use the menu option "Bundle Windows AMI" to save it to S3. (Yeah, that's really obvious.) It will prompt you for an S3 bucket. Note that you have to create buckets in advance and the bucket name has to be globally unique across all S3 users. The EC2 managment console won't tell you that you screwed up until it finishes the agonizingly long "bundling" process, at which point it will say "failed" with the helpful error string "AccessDenied(403)- Access Denied" if your bucket collided with someone else's. You can use a tool like s3fox to create a bucket.
  • The English in s3fox (example: "IT MAY SO HAPPEN THAT THIS EXTENSION MAY BE DISCONTINUED AT ANY POINT. I WON'T BE HELD RESPONSIBLE FOR THAT.") does not exactly inspire confidence. I do hope that it doesn't send my secret key to Elbonia so that I can wake up to a $5 billion AWS bill next month. That said, S3fox was remarkably easy to use, once I realized that by "folder", it meant "bucket."
Aside from those issues, EC2 was pretty much all win. I didn't have to dig up a WinXP CD, or buy a more outlandish version of Windows, or fiddle with my registry settings, or edit my bootloader, or turn my computer upside-down and strain crushed tomatoes through it. I think the total bill for the month will be about a dollar. Highly recommended.

27 July 2009

Public service announcement



To the people who lame up a perfectly good FFT YouTube video with a voiceover: knock it off. I'm watching for nostalgia. I want the original soundtrack. I don't want to hear your worthless eurobeat playlist*, and I especially do not want to hear you MST3K all over it.

That is all.




* Particularly if it's from some other FF game. What on earth is wrong with you?


PROTIP: When searching YouTube for FFT videos, make judicious use of the -exclude operator to filter the lame posters.

Don't ask questions in Windows filenames.

Windows doesn't support the ? character in filenames, so Cygwin doesn't, either.

I have a bunch of files in a mercurial repository with question marks in the name. (They're dumps of web pages for testing a bunch of scripts that process web pages, so they're of the form foo.cgi?bar=3&foo=someargument. I noticed after untarring the archive on Windows (I had to move it from the Linux half of my laptop on a MicroSD card; don't ask.) that tar was choking on all of the filenames with ? marks.

You can fix that quite easily with a script like this. (You'll have to run it on a Linux machine or something else that doesn't fail on ? marks, of course.)
#!/usr/bin/python
import subprocess, os
names = subprocess.Popen(r"find . -name '*\?*'", shell=True, \
stdout=subprocess.PIPE).communicate()[0]
for name in names.split("\n"):
name = name.strip()
if not name:
continue
print name
os.system(r"hg mv '%s' '%s'" % (name, name.replace("?", "@")))
I would have done this in bash, but I couldn't figure out how to iterate over filenames with spaces in them.

Cygwin+OMPM=fail

If you ever have the occasion to install Dell's OpenManage Printer Manager on Windows, note that it may screw up your Cygwin installation -- if it does, cygwin will complain about a shared-memory library version mismatch. I fiddled with the PATH environment variable (Start->Control Panel->Classic View->System->Advanced System Settings->Environment Variables), but I either didn't correct it properly or that wasn't the problem.

I tried movin the c:\program files\dell directory out of the way, but something prevented me from doing so, even after I shut down the OMPM service. Finally, I just uninstalled the thing.

But it wasn't going to go quietly: when I launched Cygwin again, I got the message "bash.exe warning could not create /tmp".

Oh.

The first Google hit to that phrase was this forum post, which suggested running cygwin setup. I ran it, reset the root directory from the directory Dell had used to c:\cygwin, and breezed through the install prompts. It started downloading the base packages again, so I assumed that it didn't see the directory, and stopped it. I then restarted, changed "Install from Internet" to "Install from Local Directory", set c:\cygwin again, and ran through. Cywin installed those packages, but now, instead of getting the bash error message, bash launched but couldn't find anything. Even ls didn't work.

Suspecting a path issue, I ran setup.exe once more, this time changing "Install For" to "All Users (RECOMMENDED)". I think Dell had changed that setting, too. I ran through the process and this time, I closed all cygwin windows before running setup.exe. When I finished with setup.exe and launched cygwin again, it worked.

OK. Next time, I'll use a virtual machine.

(The software does have a Linux version, but that started to choke when I pointed it to my MySQL installation and I just couldn't be bothered to try to debug it.)

23 July 2009

Oh wow

18 July 2009

That seems a tad high

Continental has connecting bus service from Newark to Allentown, PA. You can search for that route directly (without a connection), which yields:



That seems a little high for a 90-minute bus ride. But, hey, under what other circumstance can you earn OnePass miles on a bus?

"It's amazing how much can be accomplished when one is an unemployed bum living in one's parents' basement"

This guy translated Final Fantasy III into Latin.

I'm not sure how many nerd points you get for that, but it's got to be over 9000.

EPIC saving data FAIL

I'm not sure how I managed it, but while pulling and merging the latest changes from Mercurial repositories on several machines, I somehow managed to blow away all of the uncommitted changes to one of the files in my working copy.

It's my own fault because I've lost work enough times to know about the emacs variable version-control, which, when t, tells emacs to keep multiple versions of the tilde backup files. (I managed to blow away the original tilde file before I noticed what had happened, so I couldn't use that.)

You can set this variable with (setq version-control t) in your dot-emacs (~/.emacs.el, in my case) file. Or you can do M-x apropos, type in version-control, click the bolded version-control in the frame that opens, click customize in the next frame that opens, pick "Always" from the value menu, and hit "Save for future sessions.". (I prefer the former approach.)

Emacs will thereafter save numbered foo.c.~1~, foo.c.~2~, foo.c.~3~... backup files instead of wiping foo.c~ each time. You can use these to recover from errors like this.

Some people dislike the idea of having lots of ~ files littering their directories. These people must enjoy losing data. Even if you never make a mistake, the software you use must have bugs in it. By all means, do a rm *~ periodically, but do be sure you know your code is committed somewhere, first.

Switching on version-control did nothing to restore the file I'd already lost, of course. To find that, I hard-rebooted (you will want to reboot immediately or the old file risks getting overwritten) into Linux. (I was working in Cygwin on Vista due to network-card issues that do not bear getting in to). I grepped the raw Windows partition for a string I knew was in the file. The grep command was something like this:

grep -a -C 1000 OPTIONAL /dev/sda1 > /root/optional

OPTIONAL was my string and /dev/sda1 was my partition. -C 1000 tells grep to dump 1000 lines of context to each hit (the file I wanted was only a few hundred lines). If you want to monitor the progress of your grep, find its pid with ps, go to /proc/$pid/fd and do an ls -l to find the fd of the file grep is searching (probably 3), and then cat /proc/$pid/fdinfo/$fd to see grep's byte-position in that file.

I then gzipped grep's output, saved it to a flash card (Windows can't read my Linux partitions and Linux can't write my Windows partition), and rebooted into Vista.

If you have a fairly-generic query string like mine, lots of spurious hits will show up. I skipped these by re-grepping the file for other strings that I knew should have been there. I found a mostly-complete copy of the version I wanted and pasted in the appropriate bits. And then I made darn sure to commit my changes.

17 July 2009

Lie back and think of Canada




http://en.wikipedia.org/wiki/Lie_back_and_think_of_England

15 July 2009

Open-air pharmacy

From Freedom to Tinker:

Washington Square, in New York City, was for many years a place where drugs were sold. A fellow would stand around quietly saying to passersby "Smoke, smoke!" However, this so-called "steerer" held no drugs. His role was simply to direct the buyer to the "pitcher", who had the drugs somewhere nearby, and who kept silent.

Was for many years? Past tense? Heck, that happened to me two days ago. I thought the guy was trying to bum a cigarette. I told him I didn't smoke.

Geez, has it really been that long since I last used Cygwin?

If you want to get the clipboard to work in Cygwin's X server, start X with

X -clipboard -multiwindow

(assuming you also want multiwindowing.)

14 July 2009

Twitter: sheer win. On degeekifying the geekery.

Back when I took the whole "blogging" and "personal website" thing seriously, I had a fairly sophisticated system for seeing who read my blog. I counted referer* headers, search strings, and hits over time with software like visitors. I had my own scripts that grepped the logs for Princeton IPs and resolved them to the names of people visiting. I even emailed people when it looked like their computers were infected with Nimda or Code Red or whatever the virus-of-the-day was back in 2001.

This sort of naval-gazing was great fun -- in fact, I'm sure I made a lot of posts just because I loved seeing the names and numbers scroll by. But I eventually got bored with it, especially after I graduated and moved to a school where I no longer could instantly resolve an IP address to the name of a human being.

It was also a huge pain to make all of that software work, given that I ran Debian Unstable which (true to its name) would occasionally break during an upgrade.

On that note, I used to read blogs with feedonfeeds. One day, an apt-get update broke php4-mysql, which broke feedonfeeds. I would have fixed it, but I realized that I was saving a whole bunch of time by not following the Internet echo chamber, so I never did.


With an RSS reader, you can track lots of peoples' blogs, but you have to understand what RSS is all about, find the RSS links at the sites you use, paste them into your reader, hope that you don't get Atom and RSS 0.9 and RSS 1.0 confused and plug the wrong URL for the wrong format into your reader. (This was apparently a very important technical and even political issue back in the day.) There are very smart people working on RSS readers, but I think it's still too much trouble for a lot of people.

The real genius behind Twitter was combining both of these pieces.


With ordinary web sites, you can use one of a zillion log-analysis plug-ins or, if you have access to the raw logs, roll your own. Neither choice is easy. On twitter, you have a count -- a count! of real human beings! -- following you. And you have their names! Or at least their Twitter handles. You have what I had at Princeton without having to know what httpd.conf is, or how to edit a crontab file, or how to install a Debian package, or any of a zillion other things completely irrelevant to the task of finding out how popular you are on the Internets. Even teenyboppers with Xanga accounts still had to know enough to put the sitemeter tracking bug into their layout, and of course that wouldn't tell them who visited, only the IP address of the visitor. With Twitter, you have a number and a list.

The second thing that Twitter made vastly easier was that it replaced RSS with something far easier. With RSS, you can track what lots of people are writing, but you have to be clued-in enough and sufficiently inclined to bother. Twitter made this trivial:


With RSS:

  • Find something you'd like to subscribe to.
  • Hunt around for the RSS link.
  • Is that it? Is it called XML? RSS? Atom? Feed? News feed? Rich Site Syndication? What?
  • Does it have that little radar logo? The XML button logo? Where the heck is it? Maybe it's here! Here in the title of the page! Aha! They used the link tag!
  • Oh, wait, that lets me add it as a Firefox Live Bookmark. I don't want a Firefox Live Bookmark! I want the URL so I can paste it into my reader! (In fairness, Firefox makes this much easier these days, but back in the day, it wasn't easy.)
  • Do I want the RSS or the Atom? What's the difference?

With Twitter:
  • Find an interesting feed
  • Click "follow"

I'll also add that the @notation for replying is total win. Back in the day, I wrote a blog post that linked to another website (sadly offline today; here's the archive), speculating about what the author would have thought. He apparently noticed it in his referer logs and wrote an email to tell me. You'd have to know a fair bit of technical mumbo-jumbo to do that in 2004, but in 2009, I'd just type @whoever into Twitter. Heck, I could even leave out the @; lots of people search for themselves. My hosting company "followed" Over-vu within minutes of my mentioning them.

I'm hardly the first to observe that some of the most successful business ideas on the Internet come from adapting and simplifying things that geeks take for granted. I did log analysis because I could. Few people would find it worth the bother. Twitter made it trivial. I had a personal webpage because I was willing to go to the trouble of building one. I wish I could remember the name of the pundit who observed that what Facebook and Myspace and Friendster did was make it trivial for non-geeks to have a web presence. I could search my email because I knew how to roll a search engine with Lucene and had the always-on server to do it. Gmail made it easy for everyone to search their email.

It's not merely enough to make it easy to use -- all of these applications have been transformative. Twitter affords less space than a blog, which means both that posts fit in SMS messages for mobile users and that terseness becomes a virtue. Facebook doesn't really let you post a homepage -- it lets you fill out forms. Consequently a Facebook profile is far cleaner and more inviting than the average Geocities (or Myspace) page. Twitter doesn't do log analysis and geolocation and referer tracking, but I don't think Twitter users miss these --- popularity as a single number is much easier to understand than "I got 5,603 hits from Yemen last week!" Twitter's follower counts (dare I call them scores?) are even more impressive than facebook friend counts, because you can hide most of your profile from a facebook "friend" and filter them from your news feed, but a twitter follower has to see all of your updates.


The multi-billion-dollar business question is: what do geeks have today that hasn't yet been adapted for the masses?


* Yes, that's the correct spelling in this context.. Whoever wrote the HTTP spec famously spelled it incorrectly.

06 July 2009

Dovecot gotchas

A few days ago, the EECS IT staff sent a series of cryptic emails alluding to a recent "security incident." As far as I could tell, someone had a bad password, some baddie's SSH-bot discovered it, said baddie then logged in to discover that they were on a machine with a r00table system, which they then proceeded to r00t. Unfortunately, this was one of the EECS login servers.

I usually use SSH pubkey auth, but I wasn't 100% certain that I had never typed my passwords on an EECS machine that might have had a keylogger installed, so I decided to change them all. At the same time, I thought I might as well fix a long-standing issue with my system: to log into IMAP via SquirrelMail (if I happened to be behind a fascist firewall or a connection too slow for SSH), I had to enter my actual password. Sure, I was using SSL, but it was with a self-signed certificate for which I didn't always have the fingerprint to hand.

So, after reading the wiki (http://wiki.dovecot.org/AuthDatabase/PasswdFile), I thought I'd just comment out the stanza that used PAM for passwords in /etc/dovecot/dovecot.conf and replace it with:

passdb passwd-file {
args = scheme=plain username_format=%n /etc/imap.passwd
}
I populated the /etc/imap.passwd file as described, with

foo:{plain}mypasswd

(You might be sniffing about the use of plaintext passwords. The password has to go in plaintext in my ~/.muttrc anyway, so I didn't care. And anyone who can read the /etc/imap.passwd file or the ~/.muttrc file could also just read the darn emails in ~/Maildir).

But that didn't work, of course. After setting "auth_debug = yes" and "auth_debug_passwords = yes" in /etc/dovecot/dovecot.conf, I noticed lines like these in the logs:


dovecot: 2009-07-06 07:43:55 Info: auth(default): passwd-file(foo,127.0.0.1): no passwd file: scheme=plain username_format=foo /etc/imap-passwd

Googling that wasn't enormously enlightening, so I tried running strace

# strace -f -o /tmp/st /usr/sbin/dovecot -F

Be sure to include the -f, or you won't catch the login process. The strace logs indicated that dovecot was failing to find a file called "scheme=plain username_format=foo /etc/imap-passwd". Apparently, options weren't supported in whatever version of Dovecot Debian supplied. I've since upgraded to the latest version that Debian provides, but I haven't felt the urge to check if those options are now supported -- I cut back the stanza to this, and it just worked:

passdb passwd-file {
args = /etc/imap-passwd
}

One bonus tip. While I was messing around with dovecot.conf, I changed the userdb as well. It used to point to the standard password file; I changed it to /etc/imap-passwd, as well, for simplicity's sake. The wiki page suggested that this was possible:

userdb passwd-file {
args = /etc/imap-passwd
}


Then I started getting log messages like this

dovecot: 2009-07-06 07:51:20 Error: user foo: Logins with UID 0 not permitted

I didn't bother to investigate this -- I just switched back to using /etc/passwd -- but my guess is that since I didn't specify the UID in the /etc/imap-passwd file, Dovecot assumed that it was 0. Oops.

24 June 2009

Mercurial + ediff

If you want to use Mercurial with Emacs's wonderful ediff->File with Revision command, which lets you selectively accept or reject changes to a file under version control, as far as I know you have to upgrade to emacs22. I don't think vc-hg.el has been backported to 21.

If you don't want to use Mercurial with Emacs's ediff->File with Revision, you really should anyway. It's that awesome.

22 June 2009

Unfill-paragraph

If you use Emacs to compose text that you paste into web forms (like, say, blog posts on blogger), you might want to remove the hard returns on the end of every line. Otherwise, you may get random spurious line breaks when the post is reformatted by a program that replaces \n with
or something equally awful. Here's a piece of code I found ages ago that provides a simple command to undo the formatting.
;; swiped from http://linux.umbc.edu/lug-mailing-list/2002-06/msg00300.html
(defun unfill-paragraph ()
(interactive)
(let ((saved-fill-col fill-column))
(setq fill-column 9999999)
(fill-paragraph nil)
(setq fill-column saved-fill-col)
))

(global-set-key "\C-c`" 'unfill-paragraph)

Just add it to your .emacs.el. To use it without restarting emacs, run M-x eval-buffer on .emacs.el.

Security lols

Windows Vista protects certain sensitive information, like your WEP, WPA, and WEP2 passphrases/keys, by encrypting them with a Windows API function called CryptProtectData. Needless to say, since Windows itself needs to access those keys, there's no way they can be truly hidden from the user, any more so than DRM keys can be truly hidden from the user. (A Fritz-chip can make keys harder to access, but the fact remains that a device in the physical possession of a dedicated individual cannot really be expected to act against that individual's will.) Not that Windows is trying to do so. The Microsoft's manuals even explain how to extract the keys:

If your process runs in the context of the LocalSystem account, then
you can unencrypt key material by calling CryptUnprotectData.



The fun part is, if you're not terribly familiar with Windows, this can take you ages. Here's how I did it.

Before you start, note that there are programs which will do this for you. WirelessKeyView is one. If you're like me, though, you might be worried about running a random closed-source app that wants administrator privileges. Even if LifeHacker liked it. So here's how do to it the hard way.





First, you need to get the encrypted key. On Vista (XP apparently
doesn't bother with this encryption), wireless network keys are stored
in the directory
c:\ProgramData\Microsoft\Wlansvc\Profiles\Interfaces\, each subdirectory of which is an interface GUID, each subfile of which is an XML document that looks like this:




<?xml version="1.0"?>
<WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
<name>This is the name of your network.</name>
<SSIDConfig>
<SSID>
<hex>This is your SSID in hex.</hex>
<name>This is where your SSID is.</name>
</SSID>
</SSIDConfig>
<connectionType>ESS</connectionType>
<connectionMode>auto</connectionMode>
<MSM>
<security>
<authEncryption>
<authentication>open</authentication>
<encryption>WEP</encryption>
<useOneX>false</useOneX>
</authEncryption>
<sharedKey>
<keyType>networkKey</keyType>
<protected>true</protected>
<keyMaterial>!!!!! This is the key that you want. !!!!!</keyMaterial>
</sharedKey>
</security>
</MSM>
</WLANProfile>




If you have a lot of these files and don't fancy opening them one by one to find the correct interface, do a grep -R for the SSID to find the file you want. If you don't have grep installed, I highly recommend installing Cygwin.




The hex string (replaced by "This is the key that you want" above) in the keyMaterial element contains the encrypted key. In order to decrypt it, you have to call CryptUnprotectData. There is a fair bit of material on the Internets explaining how to call this function. I first tried calling it with
this wrapper library, using Visual C++ Express Edition. I ultimately discovered on this page that said I could use Python instead, so I promptly switched to Python. Here's a little Python program that does the decryption, derived from a program posted by "Dirk" in the comments at the above remkoweijnen.nl blog post.




import win32crypt
mykey='replace this with your keyMaterial'
binout = []
for i in range(len(mykey)):
if i % 2 == 0:
binout.append(chr(int(mykey[i:i+2],16)))
pwdHash=''.join(binout)

output = win32crypt.CryptUnprotectData(pwdHash,None,None,None,0)

print "hex:", "".join(["%02X" % ord(char) for char in output[1]])

print "ascii:", output[1]



Note that to run this, you'll need
the Python for
Windows extensions.
. (And, of
course, Python.)



Now, there's a catch. If you execute the code above, you'll get an
error like this:




C:\Users\Joe\Desktop>"c:\Python25\python.exe" foo.py
Traceback (most recent call last):
File "foo.py", line 23, in
output = win32crypt.CryptUnprotectData(pwdHash,None,None,None,0)
pywintypes.error: (-2146893813, 'CryptUnprotectData', 'Key not valid for use in
specified state.')


You will get that error even if you run cmd.exe as an administrator. Here's where you need to know a bit about Windows that, as a Windows n00b, I didn't know: the LocalSystem account is different from the administrator privilege. In order to run cmd.exe with the LocalSystem account, you need to install a Microsoft package called PsTools. Inside PsTools a program called PsExec, which is a little bit like sudo on Un*x. Just download the zip linked at the bottom of the Microsoft TechNet page above and unzip it somewhere where you can find it.

To use PsExec, open cmd.exe as an administrator (open the start menu in the bottom-left of your screen, type cmd.exe into the search box, and press Ctrl+Shift+Enter to run it as an admin). Hit "continue" on the User Account Control dialog box that opens. In the command shell that opens, navigate to the directory where you unzipped PsTools. Now run "psexec.exe /s /i cmd.exe". After you agree to PsTools's EULA, PsTools should open a new cmd.exe shell window
running as LocalSystem.

Now, in that new command shell, navigate your way to wherever you saved the above python script and run it:




c:\Users\Joe\Desktop>c:\Python25\python.exe foo.py
hex: (the hex of the wep/wpa/whatever key)
ascii: (the ascii of the same, which is hopefully printable)


Enjoy. And switch to Linux as soon as you possibly can.

20 June 2009

Ubuntu fail

L.'s laptop takes 10-15 minutes to go from powered-off to ready to browse the web. I volunteered to put a Linux partition on it. Which was of course the usual carnival of errors:

  • The laptop, a Toshiba Satellite M45, wouldn't recognize either of the two CDs (a Debian netinst or a Ubuntu LiveCD) that I inserted into the drive. It would just merrily boot Vista for ten minutes (unless I held down the power button and tried not to think about blowing the drive.)
  • Netboot from my Debian box worked, and was surprisingly easy -- you just install tftpd-hpa server, add "filename 'pxeboot.0'" to the DHCP server config (I did have to switch from the "dhcp" package to the "dhcp3-server" package for reasons that are not clear to me. Why does Debian even have two different DHCP servers? Sigh), and change a few other things. These instructions were useful.
  • Ubuntu would load the bootloader and the install/rescue screen, but after I picked any option, I'd see the kernel loading messages and then get a black screen. Oops.
  • I tried Debian instead, but that had the same problem.
  • I tried using my USB-SD dongle as a USB boot device, but the Satellite didn't support those.
  • Eventually, I hit on the idea of hitting Fn+F5 to iterate the display outputs after the screen went black during the netboot. That did work.
  • The NTFS resize process failed --- it turned out that the partition was flagged dirty (because of my hold-down-power-until-Vista-gives-up trick). ntfsresize told me to run chkdsk /f, but I assumed that I would need the administrator password for that, which I didn't have and couldn't easily get (I could call L., but she was at the hospital -- she might have had her arm most of the way into someone's colon when I did.) Fortunately, rebooting into windows and shutting down normally fixed it.
  • Installation thereafter without much of a hitch. I couldn't shrink the NTFS partition as much as I'd like (ntfsresize complained about some feature not being supported), but I managed to squeeze enough space out of it.
I rebooted, and it worked! Even the wifi card worked! I wrote to Z., telling him how awesome Ubuntu was, because on Debian I had had to write a shell script to get my encrypted WiFi connection to work.

Of course, I spoke too soon. I must have had the Ethernet cable still plugged in (or maybe it worked for purely spurious reasons), but the wifi card promptly stopped working. There was still a list of networks in the menu, but I couldn't connect to mine. If I typed "iwlist wlan0 scan" at a root prompt, I got nothing. If I typed "iwconfig" at a root prompt, wlan0's entry said "encryption key: off", even though I'd typed it into the box. (Oh, and the SSID was blank, too.)

Ubuntu had asked when I first logged in if I wanted to install a proprietary driver (madwifi) for the Atheros wifi card. No, I didn't. Now I did. Where did that icon go? It was in the menu. Googling turned up a post that said to try "System > Proprietary Drivers". But I don't _have_ a system menu. Oh, in Xubuntu (which I chose to ease the load on the laptop), System is under Applications, and "Proprietary Drivers" is now "Hardware Drivers". OK, there's the list. I'll click "Activate" and...

...nothing. The button registers the click event, and the window freezes. Covering it with another window and then moving that window away leaves a blank spot -- the app is completely wedged. Several minutes of waiting did nothing, so I clicked the close box, and Ubuntu eventually asked me if I wanted to kill it. I tried this a few more times, to no avail.

So, what did that app do underneath? Could I do it myself? I tried installing the driver packages by hand (linux-restricted-modules and madwifi-tools) and blacklisting ath5k in /etc/modprobe.d/blacklist, but all that did was convince the system that the card didn't exist.

OK, I thought, maybe it's a permissions issue. I could run "Hardware Drivers" as root, but I have no idea how to launch it from the command line. Just from the menu. So I thought I'd log in to the GUI as root.

Except that gdm was configured to prohibit that. I'm sure I could have reversed that with another several minutes on Google, but I thought that it would be easier just to figure out what the app was called. I ran ps -auxw, and found "/usr/bin/python /usr/bin/jockey-gtk", which appeared after I opened "Hardware Drivers". I ran _that_ as root, clicked "activate" and...success! The wifi card started working again.


As they say, Linux is only free if your time has no value.

18 June 2009

If you need to do named entity recognition

Try this: http://nlp.stanford.edu/software/CRF-NER.shtml

Internets win

A friend from college sends the following:

"How long until they release a handheld device whose entire purpose is to receive Twitter feeds and browse Facebook? I know--they can call it the SketchPad."

I literally LOLed over that one.

(inb4 techcrunch tablet)

mod_python tip of the day

If your apache starts segfaulting in mod_python, check for an infinite recursion.

MySQL replication gotcha

If you set up mysql replication for backups, resist the temptation to use a very long password. The slave will silently truncate it when storing it and you'll get auth failures. You can see if it did this by looking at master.info in the mysql datadir.

Lol energy fail


Wow: the U.S. wastes more electricity on transmission losses than it generates from coal and hydropower combined.

Internet Explorer 8 is awesome

Not only does it actually stick to standards, it even has a Firebug-like debugger built in. Of course, I'll still use Firefox, but it's nice to have for cross-platform checks.

Music fail

Why are linux music players so awful? Somehow, people have managed to
make them _worse_ over the years, rather than better. Some examples:

  • I thought that playing through the web would be cool. There's a PHP app called jinzora that purports to do that. After wrestling with the installer for ages while it repeatedly ignored my "no database; use filesystem" settings until I relented and switched to sqlite, it dumped me at a page saying "Security breach detected". Plonk.
  • OK, I'll install SSHFS and use XMMS. At least I can understand _that._ But XMMS no longer installs, due to some Debian package screwup involving an ancient version of GTK -- probably because XMMS is no longer maintained. OK, here's something called XMMS2. Wait, that doesn't even bring up a GUI! Apparently, they've made it so abstract that you have to figure out how to bring that up _separately_. Plonk.
  • Oh, here's something called "bmpx", which is _also_ supposed to be a successor to XMMS.


$ bmpx

** (bmpx:4210): CRITICAL **: DBus Error: dbus-launch failed to autolaunch D-Bus session: Autolaunch error: X11 initialization failed.

bmpx: Couldn't connect to session bus: dbus-launch failed to autolaunch D-Bus session: Autolaunch error: X11 initialization failed.


Er, WTF? Plonk.

I'm getting too old for this stuff.

Forget it. My music player was YouTube, and it's going to stay YouTube.


Update: The package "beep-media-player" actually works and has most of the
functionality of XMMS ca. 2001. I can even almost forgive the
light-blue on very-light-blue color scheme.

Watchdogs

I have a computer with a dodgy onboard ethernet card.* It used to be that it would fail every year or so, printing a bunch of messages like this to /var/log/messages:

May 19 04:34:01 tashtego kernel: NETDEV WATCHDOG: eth0: transmit timed out
May 19 04:34:01 tashtego kernel: sky2 hardware hung? flushing

These days, it does that a lot more often. I ought to replace it, but since it's just (ha!) a backup box, I'm not very inclined. I had an equally dodgy solution: a watchdog script. Now you can have it, too:

#!/bin/sh
logger user.info "batman, robin here. monitoring network..."
wget --spider -q http://www.harvard.edu
if [[ $? != 0 ]] ; then
logger user.warn "holy flapjacks, batman, harvard timed out!"
sleep 60;
wget --spider -q http://www.mit.edu
if [[ $? != 0 ]] ; then
sleep 30;
logger user.warn "holy bran muffins batman, so did mit!"
wget --spider -q http://www.google.com
if [[ $? != 0 ]] ; then
logger user.err "holy s---, batman, google is down too. I'm rebooting!"
/sbin/reboot
logger user.err "batman, reboot happened with status $? ; wtf?"
fi
fi
fi
logger user.info "oh, we're fine..."

This is not an elegant solution by any stretch of the imagination, but it does the job. I trigger it from root's cron every five minutes, like this:

0,5,10,15,20,25,30,35,40,45,50,55 * * * * /root/watchdog.sh



* I'm sure it's not made any longer, but if you're curious:

02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 19)
Subsystem: Giga-byte Technology Marvell 88E8053 Gigabit Ethernet Controller (Gigabyte)

Nostalgia win

A blast from the past, courtesy the NY Times:
http://www.nytimes.com/2001/03/01/technology/state-of-the-art-putting-a-new-soul-in-your-pc.html?partner=rssnyt&emc=rss&pagewanted=all

In 2001, Ximian was a big deal. At least, it was a big deal on Slashdot. (One more college habit I've managed to kick.) This article describes the carefree, freewheeling environment of the bubble days, when you could expect random people on the Internet to su to root and source a shell script from a web page into their computer:

# lynx -source http://go-gnome.com | sh

For you non-nerds, this is the computer equivalent of taking a syringe from a random stranger and jabbing it into your arm. Ximian went out of business a long time ago, and go-gnome.com is long dead, but you can see the old shell script here.

Uptime fail

On Tuesday, I knew something was amiss when my ssh sessions on barillari.org suddenly stopped echoing. Unfortunately, I was 200 miles away at the time. I called Z., who kindly checked the cables and hit the reboot switch, but it remained unpingable. So much for a 400+ day uptime.

When I came to check it out, I discovered that I must have upgraded the kernel at some point during the year-plus period it was switched on. The system booted the upgraded kernel which for some reason renamed all of the drives from /dev/hd* to /dev/sd*. This freaked out grub, which couldn't find /dev/hda1. I bypassed that by hitting 'e' on the grub screen and changing root=/dev/hda1 to root=/dev/sda1. When the system booted, the drive-mounting process (or maybe it was fsck) freaked out again, because all of the fstab entries were wrong. Fortunately, it let me enter the root password, fix the fstab entries, and boot the machine. (The kernel upgrade also reordered the drives, so hdc became sdb. Gag.) I'm still not sure what brought the system down to begin with, but if there's a lesson in this, it's to never upgrade your kernel ever.

(Man, I remember the days when I used to compile my own kernel. The things that one puts up with when one is younger...)

Dragging data kicking and screaming out of your Motorola Maxx Ve

I have a Verizon-branded Motorola Maxx Ve. It does the basics just fine, except that it has a few problems, for which I have (sort-of) solutions:
  • If the phone gets wet, it might short out the volume button, leaving the phone unresponsive to input. When this happened to me, none of the buttons worked except the volume switch. If I pressed it, the volume would slowly sink to mute, unless I pressed and held "louder" to fight it. I managed to fix this, but inelegantly -- I snapped off a piece of the housing around the volume control with a screwdriver, cleaned the contacts, and snapped the piece back into place. This was inelegant, but it did work.
  • If you want to transfer a ringtone via bluetooth, you may have to change its extension from ".mp3" to ".qcp" to get around a Verizon-imposed restriction.
  • It's not easy to get data out of the Maxx. BitPim doesn't support the Maxx directly. But there is a workaround. Using version 1.06 in Debian, plug the phone into the computer with a standard USB connector, open the settings dialog in BitPim, tick "Read Only" and set "phone" to "other CDMA phone". Click "Browse" next to "Com port" and pick "USB Device - Vendor Motorola PCS, Product #2B24 (Interface #00)." Close the settings dialog. Most likely, BitPim will complain that it can't detect your phone. That's fine. Under the "View" menu, make sure "view filesystem" is checked. Click "Filesystem" in the left-hand pane, and click the triangle next to the root folder in the pane that appears. If you get an error relating to USB permissions, that means that you don't have access to the USB port. You could figure out how to grant this, or you could be lazy and insecure like me and just run bitpim as root. Bitpim should turn on its "busy" light and put "Reading phone file system" in the status bar. About 30 seconds later, it should show you the phone's filesystem. To get your SMS messages, go to /brew/mod/syncom2. Right-click the folder "msging" and choose "backup entire tree". Some minutes later, the system will ask you to save a zip file.
  • Once you have the zip file with the messages, unzip it. The single-letter folders inside contain your SMS messages: d for drafts, i for inbox, o for outbox, s for saved, and I'm not sure what w is. The messages are encoded in some odd format which inserts a NUL between every adjacent pair of characters (this makes the strings command fail); if you just want the text, pipe the .env files through tr to remove the NULs (cat 01.env | tr -d '\00'). index/mb.idx also has the messages, but it truncates them, so if you want the full messages, look at the .env files.
  • The data files for the notepad and the calendar apps are in /brew/mod/rm_planner/tools/notepad and /brew/mod/rm_planner/tools/calendar. I have no idea how to decode the date format in the calendar app, but I'm just glad to have a copy of the data.

mean reversion

I used to blog here: http://barillari.org/blog. It was a cool setup: I used Blosxom in html-generation mode so that the posts were all static web pages, which meant no database, no scripting language, and no difficulty in porting to a new server. I never did figure out how to make caching work, so it took several minutes to regenerate the blog after each new post, but that didn't matter. I could monitor the traffic! And create graphs of it! Back in the day, Princeton used to put everyone's netid in their computer's hostname, so if you did a reverse-lookup on the IPs visiting, you could even tell who was reading your blog!

Then, sometime in 2007, I had a disk crash. I used the freezer trick (put the drive in a freezer, plug it back in, pray), which worked, but I must have forgotten to copy the heavily hacked blosxom script. I think I also forgot the scripts that generated the photo galleries at http://barillari.org/photos. In any event, I never did have the time/inclination to fix either.

That said, I've fought with enough silly tech problems that I thought I ought to put the solutions where Google can find them. I had to give up all of the cool tracking features of the old blog but, honestly, I can't say that I care. Expect only nerd content here. Enjoy.

23 June 2007

How to waste an evening


One of a series on my
continuing
adventures in
computer
drama.



I thought I’d take a few minutes to upload this video of the Harvard
Law School building-moving
project
to YouTube. As
usual, the project stretched into three or four hours, complete with
the usual triumvirate of poorly-documented software, inexplicable error
messages, and mysterious crashes.



First, the fun part:





There are also photos.



Now, the geeky part. If you’re not a computer nerd, the rest of this
post may bore you.



I wanted to concatenate a bunch of videos I took with my camera,
rotate the ones that I took at a 90 degree angle, strip out a few
seconds of chaff, and append a title card to each end. And I wanted to
speed them up. It’s impressive to see a house creep down a street at
all, but on the Internet, no-one wants to spend more than a minute on
it.



I settled for concatenating the videos. (And speeding them up.) Here’s
what actually worked, after several zillion different things that
didn’t:




the AVI files together. (Concatenating them with cat
and running them through mencoder is a bad idea
(despite what some may
suggest
) — it produced a file that crashed most of other programs I tried
to run on it. Concatenation is easy: avimerge -o out.avi -i
in1.avi in2.avi in3.avi …




video. Go to Video->Frame Rate. Click “Change to ___ frames per
second” and set that to some multiple of the original frame rate (I
used 10, so 15 fps became 150 fps). To ensure that the file is not
insanely large, you also have to decimate the video. Click “Decimate
by ___” and fill in the multiple of the frame rate you used (10, in
this case.) N.B.: transcode is a Linux program and
VirtualDub is a windows program, so I needed two boxen just to
upload a video to YouTube!
Of course, I’m hardly the first to
rant about this stuff.




  • Compress the video (Video->Compression), because YouTube only


handles videos up to 100MB. I just picked the first codec that
worked “Indeo® video 5.10”). (I also dropped the audio (Audio->no
output, for a small savings.)




  • Upload it. This was the easy part.



Now, for the stuff that didn’t work:




  • VirtualDub has a wonderful interface for a piece of free video


software. It may be the only piece of free video software with a
wonderful interface. The problem with VirtualDub is that it’s
fantastically finicky about the video it will take. This became an
issue when I tried to paste my title cards (15 fps) onto my video
(15.00015 fps). Yes, of course, it refused.




  • Avidemux, despite being possessed of a…utilitatian (but very


functional) GTK2 interface, didn’t refuse to concatenate video
because of a tiny difference in the frame rate. The problem was that
it would randomly stop opening the videos it produced for reasons I
never understood. I’d use it to append a bunch of mpegs
together. (These were either straight from the camera or from the
camera via VirtualDub, where I’d rotated and cropped them.) It would
happily save the concatenated video to a file…then refuse to open
it. I’d open one of those files, and the application would instantly
quit without so much as an error message.




  • So I switched back to Linux. I took the clips that I’d rotated and


cropped and tried assembling them using the
catandmencoder method. Flop: I couldn’t slice
out the extra frames using the VirtualDub decimator. VirtualDub
would abort 1/3 of the way in and complain that the file was
corrupt. Same deal if I used the avimerge technique.




  • So I switched to Linux again. My guess as to how to drop the


unnecessary frames didn’t work: I tried the
—frame_interval option to transcode...but
transcode promptly crashed. Like this:




jdb@bigbox:/mnt/max/park$ transcode -i merge.avi --frame_interval 120 -o fast.avi
transcode v1.0.3 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg
(dvd_reader.c) no support for DVD reading configured - exit.
[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms
[transcode] auto-probing source merge.avi (ok)
[transcode] V: import format | MJPG RIFF data, AVI (V=ffmpeg|A=avi)
[transcode] V: import frame | 320x240 1.33:1
[transcode] V: bits/pixel | 1.562
[transcode] V: decoding fps,frc | 15.000,0
[transcode] V: Y'CbCr | YV12/I420
[transcode] A: import format | 0x1 PCM [11024, 8,1] 176 kbps
[transcode] A: export | disabled
[transcode] V: encoding fps,frc | 15.000,13
[transcode] A: bytes per frame | 733 (734.933333)
[transcode] A: adjustment | 1936@1000
[transcode] V: IA32/AMD64 accel | sse (sse 3dnowext 3dnow mmxext mmx asm C)
tc_memcpy: using sse for memcpy
[transcode] warning : no option -y found, option -o ignored, writing to "/dev/null"
[transcode] V: video buffer | 10 320x240
[import_avi.so] v0.4.2 (2002-05-24) (video) * | (audio) *
[import_ffmpeg.so] v0.1.12 (2004-05-07) (video) ffmpeg: MS MPEG4v1-3/MPEG4/MJPEG
[export_null.so] v0.1.2 (2001-08-17) (video) null | (audio) null
[import_avi.so] format=0x1, rate=11024 Hz, bits=8, channels=1, bitrate=176
[transcode] input is mjpeg, reducing range from YUVJ420P to YUV420P
[filter.c] Filter "levels=output=16-240:pre=1" with args (levels=output=16-240:pre=1)
[filter.c] Filter "levels=output=16-240:pre=1" not loaded. Loading ...
[filter.c] Loading (levels=output=16-240:pre=1) ..
[filter_levels.so]: v1.0.0 (2004-06-09) Luminosity level scaler #0
[filter_levels.so]: scaling 0-255 gamma 1.000000 to 16-240
[filter_levels.so]: pre-processing filter
[mjpeg
0xb6953c68]invalid id 23618.38 fps, EMT: 0:05:53, ( 0| 0| 0)
Segmentation fault (core dumped)


(Sharp-eyed readers will note that that command wouldn’t have done
anything anyway, because the computer complained that I didn’t pass a
-y argument, so it wrote its output to /dev/null. I
didn’t notice this until just now. I tested it with an actual
-y argument: -y mjpeg,null (because the input was
mjpeg). That also bombed:




jdb@bigbox:/mnt/max/park$ transcode -i merge.avi --frame_interval 120 -o fast.avi -y mjpeg,null
transcode v1.0.3 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg
(dvd_reader.c) no support for DVD reading configured - exit.
[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms
[transcode] auto-probing source merge.avi (ok)
[transcode] V: import format | MJPG RIFF data, AVI (V=ffmpeg|A=avi)
[transcode] V: import frame | 320x240 1.33:1
[transcode] V: bits/pixel | 1.562
[transcode] V: decoding fps,frc | 15.000,0
[transcode] V: Y'CbCr | YV12/I420
[transcode] A: import format | 0x1 PCM [11024, 8,1] 176 kbps
[transcode] A: export | disabled
[transcode] V: encoding fps,frc | 15.000,13
[transcode] A: bytes per frame | 733 (734.933333)
[transcode] A: adjustment | 1936@1000
[transcode] V: IA32/AMD64 accel | sse (sse 3dnowext 3dnow mmxext mmx asm C)
tc_memcpy: using sse for memcpy
[transcode] V: video buffer | 10 @ 320x240
[import_avi.so] v0.4.2 (2002-05-24) (video) * | (audio) *
[import_ffmpeg.so] v0.1.12 (2004-05-07) (video) ffmpeg: MS MPEG4v1-3/MPEG4/MJPEG
[export_null.so] v0.1.2 (2001-08-17) (video) null | (audio) null
[export_mjpeg.so] v0.0.5 (2003-07-24) (video) Motion JPEG | (audio) MPEG/AC3/PCM
[import_avi.so] format=0x1, rate=11024 Hz, bits=8, channels=1, bitrate=176
[transcode] input is mjpeg, reducing range from YUVJ420P to YUV420P
[filter.c] Filter "levels=output=16-240:pre=1" with args (levels=output=16-240:pre=1)
[filter.c] Filter "levels=output=16-240:pre=1" not loaded. Loading ...
[filter.c] Loading (levels=output=16-240:pre=1) ..
[filter_levels.so]: v1.0.0 (2004-06-09) Luminosity level scaler #0
[filter_levels.so]: scaling 0-255 gamma 1.000000 to 16-240
[filter_levels.so]: pre-processing filter
*** glibc detected *** transcode: malloc(): memory corruption: 0x080f97a8 ***
=== Backtrace: =====
/lib/libc.so.6[0xb7e8682d]
/lib/libc.so.6[0xb7e8726c]
/lib/libc.so.6(__libc_memalign+0xab)[0xb7e8812b]
/usr/lib/libavutil.so.1d(av_malloc+0x2d)[0xb7fc155d]
=== Memory map: ====
<snip>
Aborted (core dumped)



  • I couldn’t find an equivalent option in mencoder, so I decided that


the rotate-and-crop videos must have been corrupted. I ditched them
and went back to the the raw ones from the camera. After some
fiddling, these actually worked.




  • In retrospect, I probably could have tried using VirtualDub to


assemble the cropped-and-rotated videos (I didn’t before, because I
was trying to add my title cards, which it wouldn’t do — at least,
I couldn’t produce title cards that it would take.) Ah, well. Next
time.



28 February 2007

Uh-oh


I entered the date for my qualifying exam on my cell phone’s calendar.

I typed in “qual” (7825) using the T9Word (“guess what I’m typing”) option.



Its first guess was “suck”.



I hope that’s not a bad omen.



25 February 2007

Unsolicited parenting advice



The New York Times, today:




IT’S difficult when you have a kid,” the photographer Justine Kurland
said. “If they’re in a good mood, you can get work done. But if
they’re in a bad mood, you’re at their mercy.”



Ms. Kurland is known for photographing people in American wilderness
landscapes, but the scene this day was the rent-stabilized apartment
she shares with Casper, her 2-year-old son, on the Lower East Side of
Manhattan.



Casper, named for the 19th-century German landscape painter Caspar
David Friedrich, had just given a textbook example of one of his
trickier moods. His father, the sculptor and multimedia artist Corey
McCorkle, who lives 10 blocks away, arrived to take him out for
breakfast, but he refused to budge. Instead he sat sobbing, rooted to
the kitchen floor, a stunt Ms. Kurland said he increasingly liked to
pull when she was scouting locations on the extended road trips she
takes for her projects. [continued…]



AAAAAAGH! I can’t even COUNT how many times my parents pulled that
stunt on me as a kid. I wanted to stay home; instead, I got a tour of
the most boring parts of Massachusetts from the backseat of the
car. Every. Single. Weekend. I’m surprised that I didn’t start huffing
paint thinner.



For heaven’s sake, lady: Leave. The. Kid. At. Home. It’s not as though
she’s living in North Dakota — this is NYC. She can find a nanny. And
it’s not as though she has to pay through the nose to avoid the nanny problem
—- she’s an artist, not a politician. Hire an illegal; no-one’s going
to check.



My parents wouldn’t have even needed a nanny —- just park me in
front of the Nintendo, thank you very much. It would have been good
practice for the interminable hours of being parked in front of a
computer in college.

18 February 2007

Coincidence?



  • September 2000: Enter Princeton University.

  • September 2001: Shirley Tilghman is installed as the first female president of Princeton University.

  • September 2004: Enter Harvard University and the Massachusetts Institute of Technology.

  • December 2004: Susan Hockfield is installed as the first female president of MIT.

  • February 2007: Drew Faust is selected as the first female president of Harvard University.



I sense a trend.

23 January 2007

Kafka on the Charles, Chinese child theft, and the usual sex scandals


Two stories hit the wires recently: a tiff between Princeton
University and the townies (dog bites man; sky blue) and a child
custody dispute in Tennessee. Both emerge from a little-discussed and
highly sordid corner of college life: University justice.

First, from the Princetonian,
there’s a fight between Princeton University and the local prosecutor
over a case of assault involving some undergraduates. What appears to
be at issue is the University’s judicial process, which the locals
think is interfering with their investigation.



For reasons that also remain unclear, Mercer County
assistant prosecutor William Burns threatened the University with
legal action when it began its internal disciplinary hearing.



“If you continue to demand [that the victim] supply documents
pertaining to any criminal charges, you may be charged with
… Obstructing the Administration of Law [and] Hindering
Prosecution,” Burns was quoted as writing to the University on Jan. 8,
according to a reply letter by University General Counsel Peter
McDonough.


Given that the University judicial process (oops, two judicial
processes —- the Honor Committee, which handles in-class cheating,
and the Committee on Discipline, which handles everything else) has
never been a shining example of transparency, I tend to side with its
critics, whatever their reasons. Unfortunately, the article doesn’t
tell us prosecutor’s beef is.



The alleged assault victim’s lawyer has a more pointed critique:



The recent conflicts between the University and law
enforcement authorities show that current practice of dual,
independent frameworks is unacceptable, Murphy said. Calling the
University disciplinary process an attempt to “resemble a
fully-functional mini-criminal trial,” Murphy said that the
University’s efforts usurped the power of local authorities.


My feelings exactly —- you’ll see why in a moment.



A bigger-deal case just made the national headlines: a Chinese couple
won custody of their daughter after the Tennessee Supreme Court
overturned the decision of a Memphis judge who had awarded custody
to a foster family.



According to the article, the parents, Shaoqiang He, and his wife, Qin
Luo He, fell upon hard times and sent their month-old daughter to live
with another family [editor’s note: WTF?!] temporarily. When they
wanted her back, the other family refused to give her up.



The case spurred the usual complaints about anti-Chinese prejudice in
the judicial system; how it was stacked against foreigners with poor
English; the usual. (Interestingly, half of the Google hits during my
searches on the subject were from English-language versions of Chinese
newspapers.) But that’s not the interesting part. The interesting part
is how the He family’s financial difficulties came
about. According to the AP story:




Anna Mae was born in 1999 shortly after her father, a student at the
University of Memphis, was accused of a sexual assault. He was
ultimately acquitted, but the charge cost him a scholarship and the
student stipend that was his family’s primary source of income.


A 24 January 2002 article from Life magazine provides a bit more detail.




Anna Mae was born on Jan. 28, 1999, into poverty and turmoil. Her father, “Jack” Shaoqiang He, 37 — known around this friendly Southern town as “Mister He” — was a visiting college professor from China who came to the USA on a student visa and was pursuing a doctorate in economics at the University of Memphis.



Here he married “Casey” Qin Luo, 34, a Chinese woman he met through a friend back home. She spoke no English, but she shared his strong faith and love for America, Mister He says. They planned to build a good life together.



But in 1998, when Casey was pregnant with Anna Mae, her husband was charged with assaulting a fellow student. He and the student, a Chinese woman named Xiaojun Qi (pronounced Key), went to a computer lab alone; a week later Qi went to school officials, displayed bruises and said Mister He caused them during a sexual assault.



Mister He vehemently denies the allegation. He says he left the lab feeling uncomfortable after the woman asked him for a $500 loan. But the university dismissed him, his income from the university vanished and his student visa hung on his collegiate appeal.



On Thanksgiving in 1998, the Hes left their one-bedroom apartment and went to the grocery store. They were attacked by several men, and Casey was knocked down. That night she began suffering vaginal bleeding. Her condition worsened until doctors finally, in January, delivered Anna Mae by C-section, one month premature.



With a $12,000 hospital bill, a criminal assault charge and a continuing legal fight to try to get reinstated at the university, the Hes sought help in caring for their baby. Friends at their church suggested a local adoption agency.



Mid-South Christian Services agreed to place the baby in a foster home for three months. They placed her with Jerry and Louise Baker.



One minor point: according to Factiva, the marriage between Shaoqiang
He, 37 and Qin Luo, 33, is listed in the marriages section of the
January 9, 2002 Memphis Commercial Appeal — meaning that the
parents would not have been married at the time of the birth of the
child in four years before, in 1998. Either the Appeal article is
mis-dated (it wouldn’t be the first time), or the Life author has
his timeline wrong (“husband” should have been “future husband.”)



Soon after the Baker family foster placement, the legal wrangling over
the child began. But the interesting part is how they got there: the
University judicial process that prompted the He family to place their
kid in foster care in the first place. It reminded me of a href=“http://www.thefire.org/index.php/article/169.html”>case on the
Foundation for Individual Rights in Education’s website:



A Harvard graduate student has been barred from
continuing his studies because a fellow student accused him of sexual
assault in January of 2002. The student was acquitted on all six
counts of rape and assault by Middlesex Superior Court last August and
his accuser was shown to be fabricating parts of her story at the
trial. Despite this, Harvard has not readmitted him and has not
dropped its own charges against him.


(FIRE, it should be noted, is a pressure group —- if you hadn’t
guessed when you saw that they refer to Harvard as “Kafka on the
Charles.” Not that I disagree with much of what that they do.)



The Boston Globe
and the Harvard
Crimson
also
covered the case. As a biographical tidbit, the non-assault didn’t
happen in Child Hall, which is right near where I used to live. It’s
the Gropius-designed wall on the left side of this
photo.

Apologies on the lack of a better picture.



I don’t know what has happened to the student in question, Georgi
Zedginidze. The latest word that I saw was a Crimson columnist blasting
the University’s policy of wrist-slapping convicted rapists while
simultaneously jack-booting the acquitted. The author laments the
“Coalition against Sexual Violence’s” successful demands to eliminate
the right of confrontation from the University judicial process.



Erin O’Connor, who writes about academic excess, had similar complaints about the He case back in 2004:




Had officials at the University of Memphis accorded Shaoqiang He due process, had they held firmly to the tenet that in this country a person is always innocent until proven guilty, he would not have been expelled on the basis of an accusation. He would not have been deprived of his education, he would not have had his career prospects ruined, and he would not have lost his daughter.



[...]



The Hes plan to return to China after the dispute about their daughter is settled.



If they do plan to return, now that they have four children, I wonder
how they’ll skirt the one-child policy? I understand that a lot of
Chinese who intended to go back elect to stay in the U.S. when they
realize that their kids will get the worst of it when they return.



On that note, despite O’Connor’s closing line, Larry Parrish, the lawyer
for the foster family, accused the Hes of engineering the dispute as a
means of staying in America. An href=“http://media.www.dailyhelmsman.com/media/storage/paper875/news/2006/10/13/News/Custody.Battle.Continues.To.Rage-2348600.shtml?sourcedomain=www.dailyhelmsman.com&MIIHost=media.collegepublisher.com”>article
in the University of Memphis’s student newspaper quotes Parrish:




“Jack He is extremely intelligent and very fluent and is a con-artist. He is the best I’ve ever seen,” Parrish said. “He plays on the sympathies of other people. He creates situations that are not real.”



Parrish contended the Hes were using the situation as a way to stay in America. If not for the custody battle the Hes would have been deported, Parrish said.



Parrish also said, “he is the most dishonest witness I have ever seen. That’s why the courts have found him completely without credibility.”



I assume this is the usual character assassination one would expect from
an thorough attorney. Does it lend any credence to the original
charges against He? It’s doubtful: He was cleared by a court of law.



And that’s where the stories converge: in each of these cases, a
University judicial system ignored the verdict of a court of law and
soldiered on, either finding the student guilty or thrusting him into
academic limbo. In the Harvard case, Zedginidze had taken a leave
during the trial, and was all but told not to petition for
re-admission, as Harvard might (if he reapplied) actually find him
guilty of rape and expel him.



According to the Globe, if Zedginidze managed to persuade the
university to schedule a hearing, he’d have no right to confront his
accuser, no right of cross-examination, and no right to an attorney —
in other words, standard practice for the Star
Chamber
a University tribunal. The Honor Committee at
Princeton has much the same rules. I’m not sure about the Committee on
Discipline, but I’d be shocked if it were much better.



As for the He case, the articles that I’ve read do not give the
specifics of the University’s sanctions. Was He actually expelled? Was
he “persuaded” to take a leave of absence, as was Zedginidze? Or did
the U. of Memphis just cancel his fellowship? As doctoral students are
generally paid by the University to go to school, the latter would be
a crippling loss. In most fields, if you are paying for a doctorate,
you’re probably being ripped off. There is a quid pro quo, of
course: the students provide fairly cheap labor, which is why schools
(particularly schools of the humanities) admit so many of them. But I
digress — you can read more about that
here.



In any event, one can only be happy that the He family has been
reunited. One wonders how we ended up with a system were
unaccountable-bureaucrat courts can ruin students’ careers (and,
indirectly, break up families) on the basis of allegations that real
courts have found to be baseless.



On the other hand, would Shaoqiang He have fared better, had he not
been in tried by the University of Memphis’s tribunal, but in his
native China?



The awful part is that I’m not sure.

16 January 2007

Bleg! Bleg! Bleg!


My brother Davide’s soap opera “The Gates” made the semifinal round of
the SoapU contest. If you can spare a second, I’d love it if you could
help him out by voting for his episode. (Voting takes about three
seconds — you don’t actually have to watch the episode if you’re in a
hurry.)

To vote, just go to SoapU.com and click
the preview pic next to “The Gates; Columbia University; Davide
Barillari”. The show should start playing. You can click one of the
rating buttons below the video to vote for the episode. (I recommend a
“10”, but of course, I’m biased.)



I had some trouble with Firefox, but your mileage may vary — I have
some exotic extensions installed. Internet Explorer worked perfectly,
though.



If you had a chance to vote, thanks!



10 January 2007

That's not something you see every day



BE Professor Threatens Hunger Strike to Protest Tenure Denial

By Joyce Kwan
STAFF REPORTER



An African-American associate professor has threatened to go on hunger
strike unless the provost resigns and his tenure is granted,
protesting what he claims were racist motives behind the denial of his
tenure. The Department of Biological Engineering decided not to
advance BE Associate Professor James L. Sherley.s case for tenure on
Dec. 13, 2004. Since then, Sherley has asked senior administrators to
overturn his department’s decision.



[...]



In a December letter sent out to MIT faculty calling for support,
Sherley said, “I will either see the Provost resign and my hard-earned
tenure granted at MIT, or I will die defiantly right outside his
office. This is the strength of my conviction that racism in American
[sic] must end. What better place to kill a small part of it than at a
great institution like MIT.”



There’s no doubt that the tenure process needs reform. That the
current system makes it very difficult to have women to have both
children and a high-powered academic career is beyond dispute. The
left decries the lack of minority professors at top schools and cries
racism. The right regularly blasts “tenured radicals” and demands
limited-term contracts for faculty. (A small number of (usually
obscure) schools have even tried this.) I have my doubts that
Prof. Sherley’s tactic will work, but I’m also surprised that more of
the media haven’t picked up on this.



Incidentally, if you read magazines like First Things or The
Weekly Standard
and see references to an MIT professor who bashes
embryonic-stem cell research and flogs adult stem cells, it’s often
Prof. Sherley. See, for instance,
this and
this,
both by my former college classmate Ryan Anderson.



11 December 2006

Overheard in the Lamont Cafe


“Oh my God, do you think Goldman Sachs would have me take the
Chinatown bus?”

07 August 2006

ObPhDComicsRef


This strip is absolutely perfect. In a few panels, it conveys the disorientation and, er…wait, what was I talking about?

25 May 2006

ph33r my 1337n355


“So…,” I said to Dan around 3:30 p.m. yesterday, “I’m sorry—-I’ve
got to run. I want to put this computer together so I can show the
product to people by the close of business today.”






Ha.

Thirteen hours later, I now think that I might — might! — have the
computer working.



This is why I didn’t go into hardware.



Some tips, so you don’t repeat my mistakes:




  • Bring the laptop. Always bring the laptop. When I took the new


computer from Boston to Cambridge (where it resides for now), the
voice of reason won out: “Joe, it’ll only slow you down. It’s
really heavy. Besides, you have another computer there. Why would
you need the laptop?” Needless to say, I answered this one around
2 a.m., when I spent an hour or so trying to sort out a DHCP
failure at two in the morning with two potentially-broken
computers.




  • Don’t move a CD-ROM drive while it’s spinning. I trashed a Knoppix


CD this way. I might have even trashed the drive, because it didn’t
seem to work properly after that (but it might not have been working
to begin with).




  • The Gigabyte GA-8I945GMF motherboard isn’t just bleeding edge, it’s


freakin’ hemorrhaging wound. Linux 2.6.15 isn’t 31337 enough for
it, apparently — to get the on-board Ethernet to work, I needed
2.6.16. (Note that I said “work”. 2.6.15 recognized that there was
an Ethernet card, but pointedly discarded any data I tried to send
through it. An ancient 3COM boomerang card (which I fortunately had
snagged from MIT reuse some months back) did work, though.




  • On that same note, if you’re trying to use the motherboard with both


PATA (IDE) and SATA devices, make sure you switch the “On-Chop SATA
Mode” to “Enhanced”. Otherwise, you’ll get delightful errors: after
I booted the Debian installer from CD, it would complain that it
couldn’t find a CD-ROM drive. No, I’m not making this up.




  • After I managed to get the OS installed and booted, the kernel


started spewing KERN_EMERG errors (“CPU0: Running in modulated clock
mode” “CPU0: Temperature above threshold”) to the console. Googling
confirmed that these are generated by the processor when it thinks
it’s overheating. A gob of thermal paste didn’t help matters, but
reseating the heatsink did. It’s not as though you have to push the
heatsink anchors down hard. You have to push them down really
really really damned hard. I could have sworn I was going to
ruin the motherboard —- which would have been one of the least fun,
but not the least fun, experience I’ve had for $90. (According to
Intel, you’re supposed to mount the heatsink after installing the
motherboard in the chassis — so it’s anchored a half-inch above the
case by a bunch of screws, and has a lot more room to bend than if
it were on the floor.) After I managed to get the confirmatory
click from all of the anchors, I haven’t seen the CPU core
temperature rise above 52 degrees. (Yet. I’m sure it will spike as
soon as I publish this, just to spite me.)




  • I actually had a related problem with an AMD processor last year


(which is why I had the thermal paste.) I should have learned my
lesson: buy nothing bigger than a Pentium II. Any speed gains from
the speedier processor are more than consumed by the trouble of
getting the faster one not to burn up.




  • I have a newfound respect for the guys who immersed their entire


computer in cooking oil as a new form of liquid cooling. I’d link to
them, except that I don’t have a web browser. (I’m typing this at
the console. Did you think I was enough of a masochist to try to get
X11 working on this thing?)




  • I now have the urge to rig up the computer to send me an SMS message


if the CPU core temperature gets too high. I’m not sure what’s
worse: that I know how to do this, or that I am tempted to do so.



All in all, I’m amazed that there are so many Internet sites that
publish twenty-page articles comparing heat sinks or motherboards or
processors — or anything else that requires you to take apart and
reassemble the heatsink-mobo-processor combo more often than
absolutely necessary. (I mean, as far as unpleasant hobbies go, at
least being a fire-eater or a shock rocker gets you the chicks, right?
I am unaware of anyone, anywhere, of any gender, ever having been
seduced by a tricked-out PC.)



24 May 2006

Here's one for the search engines


As googling for the neologism “Tilghwoman” will confirm, Google
appears to have dropped the online archive of Tiger PDFs from my junior year at
Princeton. Perhaps the link above will fix that.

(Interestingly, as of this writing, Yahoo!'s search engine still
returns a hit for “Tilghwoman”. Score one for Yahoo.)

26 March 2006

I totally understand this



Some people have interpersonal drama issues. No matter what they do, or how much they try, they always seem to be involved in some kind of clusterfuck or another. You’ve known these people: everything they get near turns into a disaster, and no matter how nice they seem, they are best avoided.

Me? I have computer drama issues.



I have completely dysfunctional relationships with machines. The simplest thing, that normal people do every day, starts a big screaming fight. I only rarely find myself in situations where I’m genuinely angry at a person, and yet, computers leave me in a blind rage on a pretty regular basis. It’s been worse in the last few weeks, but there have been a couple times in very recent memory where I had to make a conscious effort to close my eyes, breathe deeply and talk myself out of smashing things…



(Continued here.)



Today, I spent several hours trying to do something *completely
simple*: install a second video card in a Linux box. Some highlights:



The obvious solution (X -configure) crashed with an inexplicable error message:




*** If unresolved symbols were reported above, they might not
*** be the reason for the server aborting.



Backtrace:
0: X(xf86SigHandler+0×88) [0×80897b8]
1: [0xffffe420]
2: X(xf86DriverlistFromCompile+0×29) [0×80813b9]
3: X(DoConfigure+0×11) [0×8073dc1]
4: X(InitOutput+0×655) [0×8071a05]
5: X(main+0×239) [0×80d6589]
6: /lib/tls/libc.so.6(__libc_start_main+0xd0) [0xb7e6ced0]
7: X [0×8070131]



Fatal server error:
Caught signal 11. Server aborting



Heaven forbid that this should be that easy. (When X -configure works, it actually works.)



I tried two different PCI video cards, then no PCI video card. No
luck. I tried upgrading the kernel (and everything else). No
luck. Signal 11. Looks like I had to do it the hard way.



So I dinked around with settings for a while before realizing that one
of these cards was just not going to work. I switched to the
steam-powered TI Permedia 2 card, for which I had an old copy of the
correct Display settings (which had been spit out by X
-configure
before it decided to die on me. For those of you who
have this card:




Section "Device"
Identifier "Card1"
Driver "glint"
VendorName "Texas Instruments"
BoardName "Permedia 2"
BusID "PCI:0:11:00"
EndSection


I’m not sure where I came up with the BusID. It’s not the entry
given by lspci, which is




0000:00:0b.0 Display controller: Texas Instruments TVP4020 [Permedia 2] (rev 01)


I think I eventually gleaned it from complaints that the computer was
excreting into /var/log/Xorg.0.log (if I remember correctly, it
complained that there was no device for PCI:0:11:00, and I eventually
got the hint…)



I had to figure out the HorizSync and VertRefresh settings for the
monitor. Because I couldn’t find the manual on the Internet (there’s
no obvious relation between model number on the back and the monitors
on the manufacturer’s website, and I was too impatient to download
every 1.5MB PDF manual from the manufacturer’s dinky 30kbps Internet
link). Fortunately, the screen displayed “OVER RANGE” (instead of
blowing up) when I set the HorizSync too high, so I just
binary-searched it down to the right range, restarting X over and over
and over and over and over.



As a final kick in the crotch, I couldn’t get it to shift to the
native resolution (1024×768, I assume). Below a certain HorizSync, it
would go to 800×600, above it, it would go to an ugly 1152×864 (!?). I
couldn’t figure out how to force 1024×768, so I eventually just gave
up and left it at 800×600. At least it’s easy to read.



(Yes, I realize that switching to the Mac or Windows would have made
this easy. Of course, those platforms introduce a host of their own
disgusting problems which pushed me to Linux to begin with. I’m wondering
if I should just go back to punched cards and paper tape.)

25 March 2006

Results of recent media testing


(Apologies to jwz.)

I’ll refrain from including
spoilers
for V for Vendetta below, unlike a certain magazine whose
ending-revealing commentary
I had the misfortune to read before seeing the film.



Some random impressions:




  • The Bill O’Reilly/Rush Limbaugh character is too articulate. Then


again, he’s British. (The Wikipedia article, which includes what is
nearly a scene-by-scene commentary, notes that he may be a jab at
Christopher Hitchens.)




  • London is too clean — it’s simply not squalid enough to be a


convincing dystopia.



24 March 2006

Metal revisited


I’ve discussed death metal naming conventions before. But after reading a Wikipedia article, I couldn’t resist taking another swipe:


Relapse signed the band and issued a Pig Destroyer / Isis 7” (*Pig
Destroyer* covered the Carcass classics Genital Grinder and
Regurgitation Of Giblets) on the label’s Singles Series in July
2000. 38 Counts of Battery was released in 2000. This album was a
complete discography up until this point which included the remastered
tracks of Explosions in Ward 6, the demo, the tracks from the Isis
split, and more. Their latest release, Terrifyer, contains a 30 minute
DVD track entitled Natasha.



Guitarist Scott Hull is also a member of notable grindcore band
Agoraphobic Nosebleed and was at one point a member of
noisecore/grindcore icons Anal Cunt.



As David Thorpe put it:




The best part of this stuff is the band names, which sound like
ten-year-olds trying to name their secret no-girls-allowed clubs.

27 February 2006

NYCBSOD


26 February 2006

This has to be some sort of prank, right?


src=”/images/bhscrop.jpg”/>


Butte High School

“Home of the Pirates”


Do they actually call themselves the Butte Pirates? That’s got to lead to some awkward moments during school cheers.









I know, I know, I should be working. But I had this juvenile urge to
see if Wikipedia had a butt
pirate
article. You’ve got to hand it to Lucene’s stemming algorithm:



13 February 2006

Low point


At some point on Saturday night, someone asked me where I was in my graduate studies. I told them:

If grad school were the digestive system, I would be in the
duodenum.


What’s worse is that I don’t remember who received this tidbit, or,
for that matter, whether it was Carlos’s or Zak’s party where I met
them. I suspect the former, but can’t be certain. This isn’t due to
alcohol, by the way — I think it’s some sort of memory loss. Maybe
from ingesting too much Teflon from nonstick cooking pans. (I used to
use a metal spatula.)



What’s worse still is that “the duodenum” may be a bit optimistic.



20 November 2005

Advice for New Americans


George Soros, the Hungarian financier who
former Malaysian PM and noted judeophobe Mahathir bin Mohamad blamed for the
Asian financial crisis, endowed the Paul & Daisy Soros Fellowships
for New Americans,
a fellowship for recent
immigrants and children of immigrants. I’m not eligible. But I have
some advice for people who are. In the first essay, you’re asked to
describe “activities you have undertaken that might give evidence of
creativity, accomplishment, and commitment to the values expressed in
the U.S. Constitution and the Bill of Rights
.” My suggestion? Before
you write the essay, see as many trucker/biker movies as you
possibly can.
For starters, I recommend these classics:


— Mayhem and freight-hauling. A gold-star trucker gets coerced into
running weapons to save his family. Features Patrick Swayze, Meat
Loaf, and some of the most incredible 18-wheeler stunts I’ve ever seen.




Former Seattle Seahawks linebacker Brian Bosworth is an undercover
cop/player/unbelievably ripped biker sent to infiltrate a
white nationalist biker gang. Fight scenes are simply not to be missed, nor is the courthouse shootout at the end.



I can think of no more effective way to learn the applications of the
Constitution than these films, which touch on everything from the
second amendment to the Interstate Commerce Clause. They are
particularly recommended for immigrants from the E.U., who are less
likely to realize the need for constitutional protection of their
fundamental rights.



(Interested in more advice like this? Contact HPME Consulting,
care of yours truly, using the “Contact details” link at the
top-left.)

09 October 2005

Oh, so that explains it


Malcom Gladwell’s latest article on elite-school admissions is well worth a read:

If you let in only the brilliant, then you produced
bookworms and bench scientists: you ended up as socially irrelevant as
the University of Chicago (an institution Harvard officials looked
upon and shuddered). “Above a reasonably good level of mental ability,
above that indicated by a 550-600 level of S.A.T. score,” Bender went
on, “the only thing that matters in terms of future impact on, or
contribution to, society is the degree of personal inner force an
individual has.”






In the nineteen-eighties, when Harvard was accused of
enforcing a secret quota on Asian admissions, its defense was that
once you adjusted for the preferences given to the children of alumni
and for the preferences given to athletes, Asians really weren’t being
discriminated against. But you could sense Harvard’s exasperation that
the issue was being raised at all. If Harvard had too many Asians, it
wouldn’t be Harvard, just as Harvard wouldn’t be Harvard with too many
Jews or pansies or parlor pinks or shy types or short people with big
ears.

29 September 2005

Emblematic














!/images/BDSM-emblem.gif!

BDSM emblem. (source)
HST
emblem. (source)
(HST imprint is on the other side of
the frisbee.)





Coincidence? I think not.



(One wonders what the New Pathway emblem looks like…)

28 September 2005

Time decay


Some uplifting thoughts on graduate study from Emanuel Derman’s
My Life as a Quant: Reflections on Physics and Finance:

...[A]s a postdoctoral researcher at Oxford in 1976, I
experienced a minor epiphany about ambition’s degradation. At age 16
or 17, I had wanted to be another Einstein; at 21, I would have been
happy to be another Feynman; at 24, a future
T.D. Lee would have
sufficed. By 1976, sharing an office with other postdoctoral
researchers at Oxford, I realized that I had reached the point where
I merely envied the postdoc in the office next door because he had
been invited to give a seminar in France. In much the same way, by a
process options theorists call time decay, financial stock options
lose their potential as they approach their own expiration.

17 August 2005

"Did you get the memo?"


I’m still floored that people who lament the lack of
majors/women/minorities/non-nerds/funding in academic computer science
continue to use the terms “computer science” and “information
technology” interchangably.

As I mentioned a few weeks
back,

corporate “information technology” embodies everything that’s
repelling people from the field. Computer science is what people do
in research labs and academic departments. Corporate “information
technology” is what people do in Douglas Copeland’s
Microserfs,
for instance:



“...reworking old code for something like the Norwegian
Macintosh version of Word 5.8.”


Men in computing


The
Geomblog

carried a link to a
commentary
on the Bill Gates-Maria Klawe talk
held in Redmond a few weeks back.

Professor Klawe worries aloud about the CS funding crunch and the
dearth of women in computing. Again, I can’t say much about the
former, but the most elequent answer to the latter came ten years ago
(a veritable eternity in this field) from Philip Greenspun:



Intelligent people with PhDs are working as C
programmers; The average engineering career lasts seven years, pays
average, and doesn’t justify an MIT education that costs $120,000;
anyone smart enough to make it as a computer scientist can make it
with less work and risk as an MD, MBA, or JD; there has been so little
progress in programming environments, systems, and computer languages
in the last three decades that programmers in India and other Third
World countries are perfectly capable of taking over the majority of
American computer science jobs.






Your January issue [of Communications of the ACM] asks
“Why are there so few women in computing?” Maybe you should do another
issue asking “Why are there so many men?”



07 June 2005

Cliffs Notes for The Organization Kid


David Brooks compresses his 2001 article
into a single page.

27 May 2005

More impressions from Reunions 2005


Still just as hideous: The tables on the third floor of Frist still have those dehumanizing
battleship-gray full-length lamps. You can’t see the face of person across from you. You can’t
see the faces of the people at the other tables. You can only see
their heads and their bodies. You are aware of the presence of a
person, but not who they are. They belong in a French science fiction
film.

Early impressions of Reunions 2005


I just noticed that this blog wasn’t negative enough. That’s easily fixed.

Reliving another private Princeton tradition: while hacking on
a broken program, struck with overwhelming urge to sleep. Something
about the sub-three-hours last night probably had something to do with
it. Threw coat over head, set alarm on phone, collapsed onto Frist
couch. Spent very little time wondering what the older alums would
think.



Now I know what Gordon Zellaby felt: while elbowing
my way through a crowd of septuagenarian alums and their silent,
blank-staring, flaxen-haired grandchildren. Thankful that whatever the
admissions office means by “diversity” in a given year, it never
means more of these people.



Another miserable failure of the
Chimpoid
administration
: the marriage initiative.
Many of the older married alums are displaying tumor-like beer
guts. Can there be anything worse than an institution that apparently
encourages this? Maybe marriages, like laws, should require periodic
reaffirmations to remain in effect. (I can’t imagine that this crowd
sees much divorce; there’s too much money involved.) Whatever the social cost, it would force more people into the gym.



21 May 2005

Nifty Python Graph Library


If you need to do any graph-wrangling, I highly recommend
NetworkX, a handy graph library
written in Python. (This is for graphs in the nodes-and-edges sense,
not graphs in the bars-and-charts sense. For the latter, I’d use
Ploticus or Gnuplot.)

19 May 2005

Good old days


Do you think grad school is too hard? Oh, for the glorious fifties:


[snip]



I arrived with my wife, Helene, in August 1951 from the University of
Alberta, to try for a Ph.D. in chemistry. The Butler Tract was filled
with veterans from WWII, so we had to seek housing elsewhere. Our
first room was with a family on Ewing Street and later with another
family on Princeton-Hightstown Road. My assistantship paid $1,200 from
which $700 was deducted for tuition. Health care? Dental care? Never
heard of them.



Helene is a nurse and worked at the Princeton Hospital for $120 per
month, meals included. We had to buy an ancient Buick so that we could
get from our quarters to work – thank goodness insurance was not
required!



And the Castle on the Hill – after about a year or so I heard of it
but never during my three years was I so much as invited to share a
meal, let alone to be immersed in a Princeton experience. I did have
many rewarding experiences with undergraduates in my laboratory
classes.



We had our first child in 1952 and got a discount from the hospital
because Helene worked up to her final day, and walked down the hall to
deliver. A kind obstetrician also gave a discount. Helene continued on
the night shift while our daughter and I burned the midnight oil.



[snip]



G. William Goward *54



Clinton, Conn.

22 April 2005

The Hot One Hundred and Ten


Update: There are mistakes in this list which I have yet to fix
(namely, some people have advised theses indicated in the catalog but
not in this dataset). I plan to fix this at some point. Mea culpa.


The thesis catalog is
quite spotty about advisors; well over 30,000 of the 53,820 records do
not have advisors entered. Of those that do, I now present the Hot
110; the advisors with at least 20 theses to their names. They are
sorted by number of theses, with ties broken arbitrarily.




  1. (70 theses) Bhatt, Swati

  2. (57 theses) Danielson, Michael

  3. (56 theses) Liu, Bede

  4. (53 theses) Cherkes, Martin

  5. (53 theses) Cadden, Michael

  6. (47 theses) George, Robert

  7. (46 theses) Comer, Ronald J

  8. (45 theses) Herbst, Jeffrey

  9. (43 theses) href=“http://libweb5.princeton.edu/theses/thesesvw.asp?Lname=&Fname=&Submit=Search&Title1=&Title2=&Title3=&department=&Class=&Adviser=Wheeler”>Wheeler,John
    A

  10. (40 theses) Kornhauser, Alain L

  11. (40 theses) Goldman, Michael

  12. (38 theses) Katz, Stanley

  13. (37 theses) Wolf, Wayne

  14. (37 theses) Sandberg, Robert

  15. (37 theses) Mulvey, John M

  16. (37 theses) DiBattista, Maria

  17. (35 theses) Bonini, William E

  18. (33 theses) Rosen, Lawrence

  19. (32 theses) Vanderbei, Robert J

  20. (32 theses) Kulkarni, Sanjeev

  21. (31 theses) Garvey, Gerald

  22. (31 theses) Danspeckgruber, Wolfgang

  23. (31 theses) Calder, Kent

  24. (30 theses) Kuhn, Harold W

  25. (30 theses) Danson, Lawrence

  26. (30 theses) Cooper, Joel

  27. (30 theses) Cook, Perry

  28. (29 theses) Wolpert, Julian

  29. (29 theses) Wilmerding, John

  30. (29 theses) Kateb, George

  31. (29 theses) Jolly, Alison

  32. (29 theses) Gleason, William

  33. (28 theses) Wood, Michael

  34. (28 theses) Wagner, Sigurd

  35. (28 theses) Trotter,Hale F

  36. (28 theses) Cadava, Eduardo

  37. (28 theses) Billington, David P

  38. (27 theses) Richardson, James

  39. (27 theses) Mendelberg, Tali

  40. (27 theses) Forment, Carlos

  41. (27 theses) Fischle, Mark

  42. (26 theses) Woolfolk, Robert

  43. (26 theses) Wilder, Gita

  44. (26 theses) Silver, Lee

  45. (26 theses) Ramadge, Peter

  46. (26 theses) Poor, H Vincent

  47. (26 theses) Kornhauser, Alain

  48. (26 theses) Hammoudi, Abdellah

  49. (26 theses) Fuss, Diana

  50. (26 theses) Crerar, David A

  51. (25 theses) Weigert, Martin

  52. (25 theses) Tilghman, Shirley

  53. (25 theses) Smith, James A

  54. (25 theses) Schor, Esther

  55. (25 theses) Littman, Michael

  56. (24 theses) Suppe, John

  57. (24 theses) Roche, Thomas P Jr

  58. (24 theses) Powell, Warren B

  59. (24 theses) Nunokawa, Jeff

  60. (24 theses) Naquin, Susan

  61. (24 theses) McPherson, James M

  62. (24 theses) Maxwell, Robert

  63. (24 theses) Littman, Michael G

  64. (24 theses) Levine, Arnold

  65. (24 theses) Fernandez, Kelly Patricia

  66. (24 theses) Enquist, Lynn

  67. (24 theses) Deodatis, George

  68. (24 theses) Ashenfelter, Orley

  69. (23 theses) White, Lynn

  70. (23 theses) Ullman, Richard

  71. (23 theses) Sigmund, Paul

  72. (23 theses) Faulk, Patricia

  73. (23 theses) Doig, Jameson

  74. (23 theses) Dobson, Andrew P

  75. (23 theses) Billington, David

  76. (22 theses) Wolfson, Susan

  77. (22 theses) Seleny, Anna

  78. (22 theses) Schwartz, Jeffrey

  79. (22 theses) Nelson,Edward

  80. (22 theses) Knoepflmacher, Ulrich

  81. (22 theses) Judson, S Sheldon

  82. (22 theses) Goedde, Petra

  83. (21 theses) Suleiman, Ezra

  84. (21 theses) Sturm, James C

  85. (21 theses) Soboyejo, Winston

  86. (21 theses) Shapiro, Harold

  87. (21 theses) Scovronick, Nathan

  88. (21 theses) Calaprice,Frank

  89. (21 theses) Jamieson, Beth

  90. (21 theses) Gould, James L

  91. (21 theses) Flint, Jane

  92. (21 theses) Emerson, Caryl

  93. (21 theses) Drakeman, Donald

  94. (21 theses) Colomina, Beatriz

  95. (21 theses) Adelman, Jeremy

  96. (20 theses) Wolf, Wayne H

  97. (20 theses) Shenk, Thomas

  98. (20 theses) Rubenstein, Dan

  99. (20 theses) Prucnal, Paul R

  100. (20 theses) Prakash, Gyan

  101. (20 theses) Reynolds,George T

  102. (20 theses) Lyon, Stephen

  103. (20 theses) Lizzeri, Alessandro

  104. (20 theses) Kobayashi, Hisashi

  105. (20 theses) Jones, Maitland Jr

  106. (20 theses) Hollocher, Hope

  107. (20 theses) Hollister, Lincoln S

  108. (20 theses) Durbin, Enoch

  109. (20 theses) Curtiss, H C Jr

  110. (20 theses) Bogan, Elizabeth

  111. (20 theses) Arnold, Oliver

19 April 2005

I don't need a hobby. I need fewer hobbies.



This is a catalog of the
most popular words and phrases in Princeton senior thesis titles from
1926 to 2004.



An update, inspired by
this classic Prince column:





Full disclosure works


Timeline (I think this is everything important):


















































13 Apr 01:28:45 -0400 Phishing email exploiting unchecked redirect arrives
13 Apr 01:54:51 -0400 Emailed webinfo@capitalone.com to report it
13 Apr 01:53:00 -0400 Blog post posted
13 Apr 16:29:45 -0400 Inform Capital One of my intention to post to bugtraq in 24 hours
13 Apr 16:31:11 -0400 Capital One form letter arrives: “this [phishing] email has not compromised Capital One’s systems in any way,”
13 Apr 16:44:42 -0400 Reply to Capital One form letter: “this email has taken advantage of a compromised Capital One system: Capital One’s website redirects URLs without checking them….please see the note about bugtraq below”
13 Apr 16:47:15 -0400 Another form letter: “A Capital One representative will respond to your e-mail inquiry, usually within 24 – 48 hours. Please note, due to high email volumes, this timeframe may be extended to up to 72 hours”. I wonder if saying “bugtraq” provokes this response.
19 Apr 16:32:15 -0400 Four business days later (well beyond 72h), redirect is still unchecked. Post bug to bugtraq and cc Capital One
19 Apr 16:53:46 -0400 Reply to Capital One (signed by a human?) form letter: “the point is that the phishing email has exploited a flaw in Capital One’s systems. Your website permits unchecked redirects. This makes a phisher’s job much, much easier.
19 Apr 18:01:00 -0400 A bugtraq subscriber tells me that he’s emailed abuse@capitalone.com (I should have thought of that)
19 Apr 14:27:05 -0800 Another bugtraq subscriber tells me that it’s fixed. Checked myself —- apparently, it is.
19 Apr 18:55:38 -0400 Send email to webinfo@, thanking them for fixing the unchecked redirect.


18 April 2005

Nothing new under the sun


The Old Grey Lady has just noticed the Anscombe Society,
a newly-formed Princeton student group dedicated to promoting chastity.

Whatever. Back when I was there, the school also had a
chastity-promoting club. We just didn’t have a pretentious
brit-fop name for it: we called it the School of Engineering and Applied Sciences.



See also this post from 2003.

31 March 2005

My new role model


British graffiti dauber. Hung rouge paintings in MoMA and the Met;
ho-hum, seen it before. Title card’s explanation of the work “a
beautiful example of the neo post-idiotic style” gets points for
effort. But the stencils
are unquestionably wonderful.

22 March 2005

GSAS vote result




From: Benjamin G Lee
To: gradsdirect@deas
Subject: [gradsdirect] FW: poll results
Date: Tue, 22 Mar 2005 21:06:11 -0500

Results of the GSAS vote on Larry Summers:



Total participants: 1543



1. I lack confidence in the leadership of Lawrence H. Summers.



Affirm – 608
Deny – 699
Abstain – 90
Need more information – 146



2. I regret the President’s mid-January statements about women in
science and the adverse consequences of those statements for individuals
and for Harvard; and also regret aspects of the President’s managerial
approach. I appreciate the President’s stated intent to address these
issues, and to seek to meet the challenges facing Harvard in ways that
are collegial and consistent with longstanding faculty and student
responsibilities in institutional governance.



Affirm – 945
Deny – 362
Abstain – 149
Need more information – 87




The first question is (at least) direct. I’m pleasantly surprised that
President Summers garnered a majority of the votes cast for a position
(rather than abstentions and NMI).



The second question is a mishmash of several questions that any useful
poll would separate; everybody who voted on it probably interpreted it
differently.

21 March 2005

Troll of the week


Don’t miss
this
excellent, excellent troll post from
insidehighered.com. It’s 1500 words of a college instructor
complaining about students leaving his class to use the bathroom. The
comments range from incredulous to irate, which is the hallmark of a
truly great troll. It’s not quite up to the quality of Is your son a
computer hacker?,
but it’s very, very close.

Text of the GSAS poll on President Summers


The Graduate Student Council of the Graduate School of Arts and Sciences is holding a poll on the same questions that the Faculty of Arts and Sciences (the faculty responsible for Harvard College and GSAS) considered last week. The text of the poll is below:



Graduate Student Vote on President Summers




Questions marked with a red asterisk (*) are required. You must answer all required questions to have this survey considered complete.

You are logged in as: Joseph Barillari  (HUID: redacted)


(your answers will be separated from your identity
before they are visible to course staff)
Last
Tuesday the FAS faculty voted “lack of confidence” in President
Summers. Today and tomorrow GSAS students will have chance to vote
anonymously on the same question. Harvard and the world want to know
what thousands of Harvard graduate students think about their
university president.

Polls will be open from 7am Monday (March 21) to 5pm Tuesday (March 22).

The two questions are those offered to faculty last week.

It’s a quick and easy process, and the results are vital to the ongoing debate.


1./strong>

I lack confidence in the leadership of Lawrence H. Summers.

 

 

Affirm
Deny
Abstain
Need more information

 

2.

I regret the President’s mid-January statements
about women in science and the adverse consequences of those statements
for individuals and for Harvard; and also regrets aspects of the
President’s managerial approach. I appreciate the President’s stated
intent to address these issues, and seek to meet the challenges facing
Harvard in ways that are collegial and consistent with longstanding
faculty and student responsibilities in institutional governance.

 

 

Affirm
Deny
Abstain
Need more information

 
 





Copyright ©The President and Fellows of Harvard College


poll and the faculty poll were conducted by secret ballot — but it’s
probably necessary. If a few tenured FAS faculty were willing denounce
President Summers for his remarks in January, some of the very most
hysterical might try to stomp on untenured colleagues or graduate
students for failing to fall into lockstep behind them. (I would
certainly hope this wouldn’t happen, but I was surprised that the
President’s remarks were received the way they were to begin with.)—>



I would be curious to know the results of both polls broken down by
department; or even just with the science and non-science departments
separated.



I’d be wasting pixels if I commented on the controversy itself;
instead, I’ll point the reader to FAS Prof. Steven Pinker, who published a
detailed treatment of it in
TNR.
Shortly after President Summers’s speech, he also appeared in a
delightful interview in the Crimson:




CRIMSON: Were President Summers’ remarks within the pale of legitimate academic discourse?


PINKER: Good grief, shouldn’t everything be within the pale of
legitimate academic discourse, as long as it is presented with some
degree of rigor? That’s the difference between a university and a
madrassa.


Update: see this.

06 January 2005

If only "The Organization Kid" had been written in 2005


Someone should give David Brooks an
account at princeton.thefacebook.com. I’m sure that if he saw
this, he’d have an
orgasm on
the spot.

(Yes, I’m aware that it’s probably just a response to
this. The
truth should never get in
the way of a good story.)



Last names and faces obscured to protect the guilty.

20 December 2004

I wonder if this is the joke issue




2004 President Resigns In Plagiarism Scandal



By Emily M. Craparo



Two months after their election to class of 2004 president and vice
president, Alvin M. Lin and Nikhil S. Gidwani resigned in the wake of
revelations that their campaign platform was largely plagiarized. The
positions remain vacant.





Gah. You should at least be creative with your empty promises and
cloying platitudes. (It’s not as though anyone’s going to call you on
them!) But here’s the best part:




Lin’s apology letter to the class of 2004, drafted to announce his
resignation, itself contained a sentence from President Clinton’s 1998
speech to the nation admitting an affair with Monica Lewinsky.


I wonder if Clinton wrote that sentence himself, or if an uncredited
speechwriter did.



(N.B.: 90% of this article is lifted from The Tech. Ha! —-Ed.)

09 December 2004

Inspector Proctor


Alex Kazazis placed the collected
Inspector Proctor strips online
for your enjoyment. I suggest reading them all (there are only
twelve), but if you’re pressed for time,
this is one of my
favorites.

24 November 2004

JP topic on spatial annotation


Using the campus map and floorplan info at
http://whereis.mit.edu/map-jpg ,
write a program that outputs a
TADS or
Inform source code file that
contains a spatially correct MIT campus. Bonus points for handling
corridors correctly (easy method: split them when you run out of
reasonable exit directions to use), more bonus points for building a
reasonable model of the outside map. Extra super bonus points for
descriptive text of the public areas.

I’m tempted to try this myself.

21 November 2004

Oversloganated


The heck with “bench to bedside.” I’d like to see some
“bench to bedroom” technology transfer.

(I’m adding the former to the “overused slogans in biomedical
research” list.)

04 November 2004

The tragedy of the mirror image


Members of the National Socialist party of China demonstrate near Harvard Yard. Film at eleven.




Or maybe it’s just Falun Gong. Either way, I’m nervous.

28 October 2004

3 a.m. in Maxwell Dworkin


Remember, kids, you can’t spell 'algorithms’ without 'orgsam’!

(Apologies to /usr/bin/fortune.)

26 October 2004

Makes you want to donate to the Porc, doesn't it?




Shut Down Final Clubs



[snip]



Final clubs are only the most direct representation of the patriarchy
structurally inherent at Harvard. The power dynamics between men and
women on a Friday night at the Spee are mirrored in the rest of life
on campus—-men speak more than women in class, students will have
more male professors, sexual assault happens and goes unreported and
men are likely to be much more financially successful after college,
in part because of the networks that final clubs enable.



[snip]



Men have space and resources at Harvard. Women don’t. Where can
female students go to feel safe? Often, people propose getting a
student center, or even buildings for women’s clubs, as the best
solution. Yet though Harvard needs new social spaces, they cannot
coexist with final clubs. Women’s clubs not only have several
centuries of power and resources to catch up with, but they also
reinforce heterosexist gender binary and economic exclusiveness. While
elite male clubs exist, women cannot be equal anywhere on
Harvard’s campus.



[snip]



Julia M. Lewandowski ’06, is a history and literature concentrator
in Dudley House. She is co-founder of SASSI-WOOFCLUBS, Students
Against Super Sexist Institutions – We Oppose Oppressive Final
Clubs. For more information about SASSI-WOOFCLUBS , e-mail
lewand@fas.harvard.edu.





Sassy Woofclubs?

03 October 2004

Only at MIT, part 3


“Did you know that just under half of the men at MIT
pledge (i.e. join) a fraternity?” (rush.mit.edu)



  • “Each semester Theta Chi’s GPA is consistently among the highest of


all living groups.” —- Theta Chi




  • “...our house GPA is typically one of the highest among all


fraternities,” —- Nu Delta




  • “We have one of the highest GPAs of all fraternities at MIT...”


—- Chi Phi




  • “Our house GPA is consistently one of the top 5 on or off campus.”


—- Alpha Epsilon Pi




  • “For the past couple of years, we have maintained a grade point


average that is well above the all-men’s average, and one of the
highest on campus – a 4.47 on a 5 point scale.” —-
Phi Sigma Kappa




  • “With one of the largest varsity athlete populations on campus,


along with the 3rd best GPA on campus (4.4/5.0),...” —- Phi Delta Theta




  • “Yes, our GPA is significantly higher than the campus average, but


to us academics go beyond numbers.” —- Zeta Beta Tau




  • “Additionally, our house GPA is one of the best on campus.” —- Theta Xi




  • “...we’ve consistently had one of the highest GPAs on campus…”


—- Sigma Chi




  • “SigEp brothers consistently maintain a high house GPA...” —- Sigma Phi Epsilon



19 September 2004

It doesn't take long to become a curmudgeonly alum


In fact, I think I was one before I even registered as a
freshman. (Note that the Princeton alumni association grants
alum-status to anyone who matriculates at Princeton, so all I needed
was the “curmudgeonly” part.)

But I’m not the only one. The Daily Princetonian’s new “Street”
section features a sex columnist, Rachel Axelbank,
who ruffled the feathers
of a pair of recent alums with such tasteless gems as “cobwebs in her
panties,” and “porking the circling buzzard.”



Rachel’s pants-happy prose also tripped my vulgarity threshold, but
what irritated me the most was not the vulgarity, but the tendency —-
endemic to sex columnists —- to dance around the issues with
cute-yet-disgusting euphemisms. By contrast, I’m a firm believer in
straight talk. As such, if I were still a Prince columnist (and had
the necessary cojonoes*), I’d submit
this, which I’ve had sitting
around for several months, which I suspect would get me hauled
before at least one of the University’s disciplinary committees, and
which no-one would accuse of skirting the issues.



* Cute vulgarism.


24 August 2004

Work-avoidance mode


This site always gets more attention when I should be doing real
work — as such, revamped the photos section’s layout,
uploaded a whole mess of new photos, and even started organizing them
by keyword.

If you should be doing something useful right now, by all means,
have a look.



29 May 2004

Update on photos


Photos are being updated in near-real-time. Check the photos
page
for details. If one of the links
just gives you a directory listing, rather than a contact sheet, it’s
still being updated — just check back in ten minutes or so.

Update: The photo count is nearly 1500.

28 May 2004

1954/2004




Larger version

07 May 2004

Columnar conclusion


My most-likely concluding column as a columnist for the Prince is online.

20 April 2004

Up, up, and ever up


The latest Prince
column

is up. Click for discussion of overindulgent course ratings.

13 April 2004

OMG!!!!!111!!1!!! Redux


Second in a series.

Another instance of
trolling
at Princeton! The
Prince
reports that a controversy has marred the contest for the ’06
presidential race:




It all started 1:39 p.m. Sunday, when Matt Mims ’06 sent an email
to Quadrangle Club’s email forum, requesting recipients to look at one
of Thompson’s recent campaign emails.


Mims specifically pointed out one sentence in Thompson’s email
—- “Let’s get chris lloyd Out of office” —- and argued that the
capital 'O’ in “Out” was a deliberate jab at Lloyd’s open
homosexuality, “telling us that this is a reason we should vote
against him.”


Within a few hours, a dozen emails were sent to the forum on the
topic, including one from Thompson and several from his friends,
who vigorously defended him and questioned Mims’
logic. Eventually, the flurry of emails died down, but feelings
are still raw on both sides.


Alex reminded me that this is a reprise of the alleged “fniger”
controversy on Slashdot, as
recorded
by Trollaxor.





Lastly we must not forget another thing that’ll cause
all-around general trolling mayhem on Slashdot: [Slashdot chief
editor Rob]
Malda’s detestable spelling habits. The one time he
was commenting on a story about disabling the finger server on UNIX
systems, he misspelled finger as fniger. WHOA. The whole Slashdot
community was up in arms over what was percieved as a barely hidden
racial slur. To “stop the fniger server” was taken to mean that blacks
shouldn’t be using Linux!!! What an idiot Rob Malda is, whether or not
the “fniger fiasco” was intentional. 5/5 of all story submissions that
day were trolls, and the signal to noise ratio mutated to 4:1
(troll:legit) for 3 days straight after.


It’s also the second
time

in the space of a few weeks that the Prince has covered trolling. Is a
trend emerging?

11 April 2004

Absolute links


After the n-th person mentioned it to me, I finally changed the
relative links in the RSS feed to absolute ones. If you still can’t
see the images or click the links, drop me a line.

07 April 2004

Perennial-ism


6
April 2004: My biweekly column: “...perennial Prospect apologist Zachary Goldstein…”

7
April 2004: Zachary Goldstein’s letter to the editor: “...Prospect’s
perennial gadfly, Joseph Barillari…”



It boggles the mind to think that some people have the gall to call the Nass “narcissistically self-indulgent.”

06 April 2004

Bestiality at Princeton


The latest
column
is up.

A former eating club officer (who asked that I identify him only as
such) came up with a rather subtle critique:



The “beasts”, who you advance as the unsafe drinkers at
Princeton, seem to be to be a fairly unconvincing straw man to
someonef who has held an officer’s post at one of the clubs. They
seem, from your description, to be unequivocally male, and aggressive
males at that (and even, with a little reading between the lines, it
seems they are probably members of fraternities or sports teams).
They also seem to be approaching their “animalistic” drinking with at
least some knowledge of the consequences, and doing so on a regular
basis. I must admit that in my experience, I have dealt with such
“beasts” to some extent. But I would argue (purely based on personal
anecdotal evidence, but I’m not sure that’s avoidable) that these
“beasts” are NOT the people likely to force this debate to a crisis
by dying of alcohol poisoning. These people generally have a fairly
large support-network of more-or-less similarly minded beasts who
have been through this before and have some knowledge of what to do.
They also, by repetition alone, are fairly likely to realize at least
an approximation of their own limits (perhaps through being McCoshed
or PMC’ed) and are less likely to repeat the stunt (If for no other
reason to avoid serious disciplinary measures). Of course these
beasts are problematic and possibly at least low grade threats to
themselves and others, but I don’t think they should be the focus of
a dialogue with the goal of preventing a death due to alcohol
poisoning (nor, in my experience, are they only athletes or
frat-boys, but that’s another matter). This is not to say that they
shouldn’t be the focus of dialogue (they should).


I must admit that I didn’t consider the distinction between people who
are likely to drink themselves to death and people who vandalize and
befoul the campus. Intuitively, they are disjoint sets. However, even
if I tarred two different groups with the same brush, it does not
follow that only one group should be the focus of attention: both
ought to be.



(I should also note that I wasn’t thinking specifically of men, or
even of fratboys and athletes when I wrote the article — I can think
of many anecdotes of non-men, non-fratboys, and non-athletes getting
drunk to the point where excreting in the wrong place seems like a
good idea.)



If you’re at all interested, I can go into detail about
the demographic which I feel is most likely to die of alcohol
poisoning, but I’ve spent enough time on this for now. I’ll just
leave you with a parting note that I really wish someone would inject
into this debate: When I was first a club officer, I felt that I could
call the proctors to take care of a dangerously intoxicated student
with impunity, and this was borne out by experience. By the end of my
term, the precedent had been set that calling the proctors for a
dangerously intoxicated student could result in charges being brought
against the club officers. This creates a serious dilemma for club
officers who are attempting to deal with a borderline student.
Especially because in most cases said borderline student has a group
of friends who are arguing that they will take him/her home and take
care of him/her. And also because Princeton students don’t react well
to the idea of having these charges on their record. If someone dies
of alcohol poisoning in an eating club, this entirely new dilemma will
most likely be a strong contributing factor.


This is regrettable. I’ve heard that the University’s policy was not
to charge students if they called the proctors for a fellow student
whose life was in danger from overindulgence. But that certainly
doesn’t stop the Borough Police from hounding the intoxicated party
for details when he or she gets to PMC. I’m also hesitant to say that
they shouldn’t press the student for details —- although
professionalism dictates that they ought to, at the very least, wait
until the student has sobered up a bit before interrogating them.



04 April 2004

From the mailing room floor


I just came across a piece of writing from sometime last year. It was
deemed “highly inappropriate” for Tiger Magazine when I sent it to the
mailing list. Fortunately, this website has no such standards.


The Mouthpiece answers your questions about Princeton, part I.



Q: I mobilized hundreds of undergraduates to put up thousands of
posters around the campus advertising our lecture, “The Joys and Toys
of Gay Sex.” But some thoughtless reactionary Limbaugh-listening Nazi
Neanderthals tore them all down! Who was it, so we can send the
Rainbow Squad to their door?
Sincerely, Debra B.



A: Debra, The unposterings you witnessed were not random acts of
homophobia. Nor they motivated by the self-denying same-sex urges of
the members of the campus Greek system, or even by Tory writers.



No, the truth is far more sinister. These teardowns all point to one
sinister organization. There is one group at Princeton who cannot,
absolutely cannot, abide homosexuality. They rue the day when
Princetonians elect not to be fruitful and multiply. They curse when a
Princeton man refers to his “boyfriend” in a non-ironic fashion. When
they see a Princeton woman wearing a pink triangle, they grind their
teeth. And nothing irks them more than watching students flounce
along the campus walkways.



This isn’t the Robert P. George Society, though they’re a close
second.



The individuals responsible for tearing down your posters are the men
and women of Annual Giving. Every Princetonian who gives up breeding
for butt-loving deprives Princeton of their most effective alumni
chokehold, namely the question implicit in every AG letter: “If I send
in the cash, will that improve Junior’s chances?” If “Junior” is
really a washed-up 22-year-old performance actor from upstate New York
who Dave Princeton ’98 met at a circuit party, where do you think the
AG letter’s going? Straight into the wastebasket, where it can
languish beside an empty tube of K-Y.

30 March 2004

OMG!!!1!!!!!!111!!!


According to the
Prince,
someone sent a troll post to
the Class of 1994:

“At first the letter looked very official,” a ’94 alumnus
said, “but as you read [the letter], it devolves, using
nonprofessional syntax and wording and making bizarre
accusations. My first impression was just 'what the hell?’”



This false letter included accusations targeted
at specific members of the Class of 1994, assigning
blame for the mailing of the first letter and
accusing others of having homosexual affairs.


This is a classic trolling technique: write an reasonable-looking
post that degrades into something completely insane.
This
is a great example. So is
this.
(Both are really gross, so don’t read them if you’re easily disgusted.)

23 March 2004

Columnar edifice


Two columns.
One
from early in the month that I forgot to mention
before.
Another
that just came out.

08 March 2004

Just when I thought it could get no worse...


...the Nass redeemed itself!





Another satisfied customer.

01 March 2004

Tycho Brahe, we feel your pain


Jacob Holdt, a Danish self-described vagabond, gave an interminable intriguing
slides-and-narrative presentation in McCosh 50 this
evening. Drawing from his photography during years as a drifter in
the U.S., he aimed to stir up the humanist passions of the audience
by calling attention to the racial injustice and oppression in
modern America.

Such is the official line. The actual presentation was first and
foremost one thing: overlong. Very overlong. Excessively
overlong. Overlong to the extent that after sitting through the first
half and twenty or thirty minutes into the beginning of the second, I
walked to the Dinky station with href=“http://www.princeton.edu/~akazazis”>Alex, chatted with him
until his train left, walked to Frist, had a slice of pizza, chatted
in the computer cluster, walked back to McCosh, and discovered that it
was still going on. The presentation started at 7 p.m.; it was 11:30
p.m. when it finally finished.



The content was a series of slides (shown in pairs, often with
captions overlaid), with a prerecorded voice-over, intercut with
excerpts from taped interviews and with music.



The music was the worst part of all. At far too many points in the
presentation, Holdt would run out of words but not of
pictures. Keeping his frame rate constant (about one image every ten
seconds, with two images displayed at once), he would spend three,
five, perhaps even seven minutes playing a washed-up folk song (my
personal favorite was Whitey on the
Moon
). Everything
in me was screaming Filler! Filler! And it continued in that vein
—- commentary interspersed with interminable musical interludes —-
until Alex and I left. (I came back just before the end.)



The commentary was decent —- no better or worse than I would have
expected from the presentation, considering the group that href=“http://www.princeton.edu/~justice/”>sponsored it. The
sections on race relations, as far as I could tell with my limited
knowledge, were reasonably accurate for their time. Of course, much of
their time was still in the 1970s.



This underscored a crucial flaw of the presentation: the most recently
datable material in the slides was from 1990 —- based on
billboard advertisements in Harlem. Between 1990 and 2004, New York
had the good fortune to be cleaned up by one Rudy Giuliani. I can’t
speak to much of the poverty-related or race-relations-related
material, but I tend to doubt that.



There were a few (rare) items that were absolutely incorrect —- for
instance, the assertion that the U.S. was alone among developed
countries in retaining a death penalty (Japan, South Korea, and
Taiwan, to name a few, are apparently below his development
standards.) And there were many more that were quite suspect:



One, repeated several times, was that there were more black people in
prison than in college. Well, let’s see: according to the Sketchbook
of Criminal Justice Statistics (on
jails and
prisons and
juvie), there were
255,100 blacks in jails, 42,963 in “juvenile residential facilities,”
and 587,300 in prisons in 1999 — for a total of 885,363. The Census
Bureau

indicates that in 1999, 1,998,000 blacks were enrolled in college.



Well, he was only off by a factor of 2.



That wasn’t the only outlandish claim. Others included:




  • Our violence against the third world kills more people each year than did World War 2.

  • 10% of the population of Washington, DC is addicted to drugs



...and so on.



But keep in mind that I was scribbling notes in a darkened
auditorium. Maybe I mis-scribed him. Fortunately, he put some of the
most egregious examples on his href=“http://www.american-pictures.com/english/show/excepts.htm”>web page:




Students in black universities often laugh at the Klan speech in my
show, for they know all too well that their pain and exclusion is not
caused by a few hooded nuts out in the woods, but by us – the great
majority of “good” law-abiding citizens – who are today silently
forcing millions of blacks into ghettoes, isolation, despair – and
finally prisons and death.



In our white guilt from not living up to our own lofty democratic
ideals and Christian values we escape into Bill Cosby shows to cover
up for our ultimate crushing of the black family.



Today more than 70% of black children grow up without a father and one
in ten without either parent – twice as many as when I first came to
America – and three times as many as under slavery.


Let’s
see
. When I got up today, I checked my href=“http://www.nybot.com/reports/dailyVolume/report.asp?reportType=futures”>cotton
futures and noticed that I was going to take quite a hit. As I
showered, I called my trusty overseer, Cyrus, on the speakerphone and
told him that if he didn’t start putting his back into the whippings,
he’d soon find himself on the receiving end. As I dressed, I
fired off an email to the principal of my former href=“http://barillari.org/glenoak-views-webpage/”>high school,
advising him to start quietly discouraging black students from
enrolling. They’d just bring down the test scores, I told him. Later
that morning, I replied to a voicemail from a friend who’s in the
crack-cocaine business. He was curious if I could suggest any new
customer bases for his product, which was rapidly reaching market
saturation. I suggested selling it in majority-Black elementary
schools, an idea he’d never considered, and for which he thanked me
profusely. Sometime that afternoon, I answered a pharmacist friend’s
voicemail, advising him to stop offering the morning-after
pill
to black women, because their
illegitimate children formed the basis of my sharecropping holdings in
Mississippi. It was then that I went to lunch at my favorite
whites-only lunch counter—-



—-or not. I would like to know how what I actually did “today
silently forc[es] millions of blacks into ghettoes, isolation, despair – and finally prisons and death.” Or, for that matter, what my role is
in the “ultimate crushing of the black family.”



His thesis —- as best I can describe it —- was that the racism of
American whites was due to nasty childhood experiences (e.g., racist,
abusive parents) and the degradation of American blacks was the
consequence of an internalized racism that sprung up after the death
of Jim Crow laws. While I am sure that both of these are true to some
extent, I fail to see how they explain everything —- or, for that
matter, what solutions we might devise for them.



But the aim of the talk didn’t seem to be about solutions —- Holdt
presented himself as a modern-day Jacob Riis, providing “shock therapy”
for the limousine-liberal set without any practical suggestions. As I
understand, there’s a “workshop” tomorrow that will provide some
insight into that matter. The last slides encouraged us to attend it,
otherwise, the slide indicated (I kid you not) the material we saw
might make us into more sophisticated racists.



If that’s what it costs me to avoid spending more time on this
presentation, so be it.



17 February 2004

The very latest Prince column...


...is href=“http://www.dailyprincetonian.com/archives/2004/02/17/opinion/9630.shtml”>here.
I’m very sorry.

07 February 2004

The Decline and Fall of the Princeton Empire, Vol. 1


I finally got around to checking the href=“http://www.princeton.edu/~pug”>PUG email account. Besides a
few dozen spams, there were a few pieces of mail from Shelly Jannos,
one of the officials in charge of student activities. It was addressed
to all of the clubs at Princeton. And, lo and behold, I did discover a
club of which I had heard only rumors, and that heretofore I had
thought was just an informal gathering of the deranged:



Princeton has an officially sanctioned anime club.



Old Nassau is href=“http://barillari.org/tiger-pdfs/2002-04-inside.pdf”>shuddering
beneath our feet. She crumbles from the inside.



These are the End Times.



Ia! Ia!

03 February 2004

New! Improved! Prince Column!


In which I discuss href=“http://www.dailyprincetonian.com/archives/2004/02/03/opinion/9463.shtml”>WWS
admissions. (Although, as you will notice, the column isn’t
actually about WWS admissions.)

07 January 2004

Why is my preceptor so bitter?


href=“http://www.dailyprincetonian.com/archives/2004/01/07/opinion/9377.shtml”>Everything
you wanted to know about grad angst but were afraid to ask.

21 December 2003

Life imitates art, again


Exhibit A: The Blessed
Rev. Glenworthy
plans to turn the Whispering Glades cemetery into
a retirement complex, dispensing with the current occupants by
launching their remains into space.

Exhibit B: href=“http://www.spacedaily.com/news/spaceburial-03a.html”>The
President of Columbiad Launch Services Inc. , Mr Richard Graf,
announced today Columbiad’s new line of Starburst Memorial Flight
Services which will provide an affordable and reliable way
commemorating a persons life by launching their ashes into space.



15 December 2003

When psmerge doesn't cut it


Problem: you have a bunch of .ps files that you want to
combine (concatenate) into a single file.

Intuitive solution: Use href=“http://www.cs.virginia.edu/cgi-bin/manpage?section=1&topic=psmerge”>psmerge.
But because psmerge only works if the same program created
all of the .ps files, this isn’t a general solution.



Real solution: I found the solution (for the second time, I’ve
had to do this before) on href=“http://www.stanford.edu/~moonhawk/technical/C1912567120/E1617423044/”>this
site. Instead of psmerge, you use href=“http://www.cs.virginia.edu/cgi-bin/manpage?section=1&topic=gs”>gs,
which produces almost exactly what we want:



gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=output.pdf *.ps


It’s almost what we want because this produces a .pdf file,
not a .ps file. One could change the command to



gs -dBATCH -dNOPAUSE -sDEVICE=pswrite -sOutputFile=output.ps *.ps


...but that makes the output look awful (on the one set of documents
on which I tried it). As does running output.pdf through
pdf2ps.



There’s probably a moral to this story, but I can’t think of it at the
moment.

09 December 2003

What? Implicit proposals don't count?


Yes! Zachary
Goldstein
prolongs my streak: I have yet to publish a column
without someone writing to the Prince shortly after to explain that
I’m wrong.

I’ve also got to thank him for underscoring one of my points: much of
his letter is the exact sort of rhetorical grandstanding that I
discussed in the column. (He even refers to that section.) But that’s
not to say I disapprove of his letter. For instance, it included this
delightful factoid:



Do you know that a Borough police sergeant makes $75,000 a
year, while a New York Police Department officer who served at the
World Trade Center gets about half that?


But I must take issue with part of his letter:



Mr. Barillari offered no example of a system he regards as
“safer.”


Hm, I don’t know. Maybe one in which people didn’t get href=“http://www.dailyprincetonian.com/archives/2003/12/02/news/9243.shtml”>hospitalized
on a href=“http://www.dailyprincetonian.com/archives/2003/02/12/news/7263.shtml”>semi-regular
href=“http://www.dailyprincetonian.com/archives/2002/05/13/news/5170.shtml”>basis.



Mr. Goldstein also observes that



Princeton, unlike other schools, has not had deaths due to binge
drinking, making us comparatively the safest.


It’s not untrue, per se, but club-based binge drinking is at least a
nominal partner in the unfortunate case of href=“http://www.dailyprincetonian.com/archives/2001/11/29/news/3972.shtml”>triple-amputee
B.J. Miller ’93.



Regrettably, Mr. Goldstein missed the point. I can’t fault him for
rhetorical grandstanding (I run a weblog, for heaven’s sake), but I
can fault him for immediately taking the defensive. Needless to say, I
disapprove of the Borough Police’s tactics — especially, the fact
that they href=“http://www.dailyprincetonian.com/archives/2003/12/09/news/9320.shtml”>waited
until just before the Borough Council’s meeting to issue the latest
round of charges. (The Cap and Tower incidents happened in October,
mind you.) But the mere fact that the club system has not killed
anyone (unlike href=“http://web.mit.edu/newsoffice/tt/1998/sep23/da.html”>some we
could href=“http://www.cnn.com/US/9708/27/lsu.drinking/”>mention) does
not immunize it from criticism. I would have less sympathy for href=“http://www.princeton.edu/~speac/wroc.htm”>WROC, for
instance, if I didn’t see the unspeakable filth that the janitors must
clean up. I proposed only that students begin to view getting
piss-drunk as dishonorable —- and if they do, it might cut down on
public befoulings by Prospect revelers.



08 December 2003

I stole an idea from Tiger for my latest column




... and it generated more reader mail than usual. It’s on the href=“http://www.dailyprincetonian.com/archives/2003/12/08/opinion/9309.shtml”>Prince's
website.

06 December 2003

Give your work a Hollywood <i>zing</i>!


The ThinkPad T30’s built-in microphone is crap if you actually care
about things like “high quality” and “low noise” in your sound
recording. But I’ve just discovered a suprisingly cool use for it: if
you turn it on as a pass-thru device (everything observed by the mic
is played through the speakers), wear headphones (to eliminate
feedback), and turn everything up as loud as possible, your typing
will sound like it was enhanced in post-production! It has all the
cheesy, overloud charm of a href=“http://us.imdb.com/title/tt0086567/”>bad eighties computer
movie.

05 December 2003

It must be USG election season


href=“http://www.dailyprincetonian.com/archives/2003/12/05/opinion/9289.shtml”>This
one’s got it all: oblique references to masturbation, allusions to
obscure turn-of-the-century novels that only two people on the campus
have read, asides about disasterous Communist economic plans, and
plenty of good, old-fashioned USG bashing.

03 December 2003

The Alcohol Numbers


The Clubs should really begin to include “non-trivial risk of being
busted by the Boro Police” in their officers’ job descriptions.

This time, the truncheon struck the president of href=“http://www.dailyprincetonian.com/archives/2003/12/02/news/9243.shtml”>Cap
and Gown who was, ironically, the sole undergraduate who gave an
address at the href=“http://www.dailyprincetonian.com/archives/2003/09/22/news/8562.shtml”>Assembly
on Integrity in September. (In all fairness to her, I know nothing
of her role in the incident —- she may not have even been at the
club, much less on duty, that evening.)



ODUS’s alcohol statistics are now germane. Below is a table of
punishments meted out for alcohol-related infractions. DW stands for
Dean’s Warning, and DP stands for the harsher Disciplinary Probation.


































Year DW DP Total
1999 74 38 112
2000 27 27 54
2001 21 56 77
2002 32 76 108


While the numbers peaked in 1999, interestingly, that was primarily
because of the less-serious Dean’s Warnings. Disciplinary Probation
sentences have more than doubled since 2000.

Our control is not slipping!


According to href=“http://www.princeton.edu/odus/Marianne%20Waterbury/”>reports
issued by the the Office of the Dean of Undergraduate Students,
academic violations have been steadily rising nearly tripled over
the last four years.






















Year Academic
Violations
1999 13
2000 19
2001 20
2002 31


Evidently, there’s a problem. But will an href=“http://www.princeton.edu/pr/home/03/0922_integrity/hmcap.html”>assembly
on href=“http://www.dailyprincetonian.com/archives/2003/09/22/news/8562.shtml”>integrity
put a stop to it?



[Update: It’s 13, not 11, in 1999.]

21 November 2003

Followup to Bush and Progressivism


David Marcovitz ’06 href=“http://www.dailyprincetonian.com/archives/2003/11/18/opinion/9136.shtml”>wrote
to the Prince to call my column “irrational.” Yes! I must be doing
something right.

He may have a point about my hand-waving on domestic policy. Domestic
policy might explain why I explain why 60% of Princeton href=“http://www.dailyprincetonian.com/archives/2003/04/04/news/7792.shtml”>supported
the war back in April, but only 28% support the President now. Perhaps
Princeton still supports the war but not the President. (Or perhaps
the replacement of ’03 by ’07 tipped the balance.)



But I’m more curious about Mr. Marcovitz’s own opinions. His letter,
in part, read:



The new status quo has become the daily slaughter of our
peers in Iraq, international outrage with the United States and eerie
forecasts of spiraling national debt. No, Mr. Barillari, we’re very
uncomfortable with the status quo.


Ironically, in the exact same href=“http://www.dailyprincetonian.com/archives/2003/04/04/news/7792.shtml”>article
in which I found the student poll on the War, we have:



Dave Marcovitz ’06, who described himself as strongly in
support of the war, explained in an email, “I see this as a war of
ideology as much as anything else.” He also expressed his hope
that “the establishment of a successful democracy in Iraq will
occur, and it will serve as a model for democracy in the Arab
world.”


I find it difficult to believe that anyone who was “strongly in
support” of the war to democratize the Middle East would later be
“very uncomfortable” with “international outrage with the United
States.” What is your stance, Mr. Marcovitz?



Update: My href=“http://www.dailyprincetonian.com/archives/2003/11/20/opinion/9162.shtml”>letter
to the Prince.



14 November 2003

New Prince column out


href=“http://www.dailyprincetonian.com/archives/2003/11/14/opinion/9101.shtml”>Survey
says: 7 out of 10 Princetonians prefer more of same. The survey in
question is href=“http://www.dailyprincetonian.com/archives/2003/11/10/page3/#9043”>here.

01 November 2003

Two Birds with One Stone


Princeton’s administration href=“http://www.dailyprincetonian.com/archives/2002/11/13/news/6342.shtml”>fights
binge drinking and is “redoubling” its efforts to increase href=“http://www.princeton.edu/webannounce-cgi/NP_ret_highlight_text.pl?conid=110557&id=22219&archived=Y”>diversity.

href=“http://www.local6.com/education/2597408/detail.html”>Research
shows that doing one of the above is sufficient.

(Thanks, Fark!)

25 October 2003

Department of Ironic Juxtapositions


One of Google’s new services offers ads that match the
content of articles appearing on news websites. Recently, the New York
Post ran an article about a murder in which the victim’s body parts
were packed in a suitcase. Google put a suitcase ad beside the online
version of the Post article. [href=“http://technology.nzoom.com/technology_detail/0,1608,221245-113-380,00.html”>@nzoom]


I suspect that we will be seeing lot of juxtapositions href=”/images/felten-google-ad.png”>like these.

03 October 2003

These guys would clean up at a business plan competition


I just registered for the Computer Science href=“http://www.gre.org/”>GRE. The test is composed of about 70
multiple-choice questions, is machine-scored, and costs $130.

That works out to $1.85 a question.



I simply have to get into this racket.

16 September 2003

2007, You Chose Wisely


James Kirchick of the Yale Daily News href=“http://www.yaledailynews.com/article.asp?AID=23117”>reports
on the conditions at our New Haven counterparts:




Last week I witnessed a striking worker, without any sense of
impunity, walk up to an open window and blow an air horn into a WLH
classroom. A friend recently told me that striking workers peer into
the windows of his classroom in order to make sure that a class is
being taught, and only then do they shout and bang pots and
pans. Union leaders lied to us. They said that we were not the
targets of this strike, but they have made us combatants in their war
against Yale. It is long past time for us to fight back by standing
with the administration and making it clear to John Wilhelm and his
ilk that their political games will not stop us from going to class
and getting our work done.


Princeton hasn’t had a single labor dispute in recent memory. AY
2000-01 and 2001-02 saw the rise and descent-into-obscurity of WROC,
the Workers’ Rights Organizing Committee, a short-lived (their href=“http://www.princeton.edu/~speac/wroc.htm”>website was last
updated two years ago) subsidiary of Students for Progressive
Education and Action. The group made a lot of noise, and cleverly
installed its buttons on half the campus by handing them out on the
corner of Washington and Prospect on a Saturday (or Thursday, possibly
both) evening.



The group demanded, among other things, a “living wage” and an end to
performance evaluations. While I like the idea that everyone at
Princeton should be paid well (well enough to be friendly, that is),
then as now, I’m skeptical of demands that workers shouldn’t be
evaluated. So, apparently, was one of the workers Kirchick interviewed:




Cindy also lamented the very existence of Local 34. She opposed the
creation of the union back in 1984 because it “encourages mediocrity
— You don’t have to work hard because you’re just going to get the
same thing as everyone else.” She added, “If it wasn’t for the union,
I would be getting raises all along — Because of the union I am not
rewarded for the hard work that I do. Yale is not able to pat me on
the back — I think that the union has held me down.”


WROC was a student movement with some worker participation. The union,
as I recall, didn’t play a huge role — probably because they realized
that the University was actually treating its workers well. Princeton
has a history of heading off these problems before they come to a
head. Yale does not.



2007, you made the right choice.

10 September 2003

I swear that this isn't Photoshopped


"href="http://www.princeton.edu/~manna/retreat/fall02/f02retreat.html">Fall
Retreat" apparently means "opportunity for light BDSM" to the href="http://www.princeton.edu/~manna/">Manna Christian
Fellowship.









Exhibit AExhibit B

08 September 2003

The Policeman's Beard is Half-Constructed


Prof. Felten’s Freedom to Tinker href=“http://www.freedom-to-tinker.com/archives/000440.html”>on
computerized essay grading software:

Another possibility … is that there is something simple
— I’ll call it the X-factor — about an essay’s language or structure
that happens to correlate very well with good writing. If this is
true, then a computer program that looks only for the X-factor will
give “accurate” grades that correlate well with the grades assigned by
a human reader who actually understands the essays. [...]
[T]he
game will be up as soon as students and their counselors figure out
what the X-factor is and how to maximize it. Then the SAT-prep
companies will teach students how to crank out X-factor-maximizing
essays, in some horrendous stilted writing style that only a
computerized grader could love.


I’m wondering how the href=“http://barillari.org/blog/academics/princeton/administration/odus/reports.html”>Committee
on Discipline would respond if a student used a computer program
to generate essays designed to earn high marks from essay-grading
software. (I wouldn’t expect Princeton to use software, but if the
University ran out of TAs —- perhaps due to href=“http://barillari.org/blog/issues/immigration/wu_jie.html”>immigration
rulings —- software might become more attractive.)



I could write a program which takes a topic as input. It could visit
JStor, find related papers in a
keyword search, chop out quotes (properly cited, of course),
intersperse them with nonsense sentences drawn from SAT word lists,
transitional operators like “because,” and topic-specific vocabulary
(drawn from the set of words in the papers that occurred a few
standard deviations more often than background vocabulary). I could
then submit the essay a few minutes later, without actually writing a
single word of it. Would this run afoul of the University’s
guidelines on original work?



Unfamiliar with the title? See href=“http://www.robotwisdom.com/ai/racterfaq.html”>this page.

01 September 2003

Photos from Reunions posted


I took these photos at
the end of May, but neglected to post them until now. My notes at the
time:



Shot in the wee hours of the morning (1-2 am) at the second night of
the Fifth Reunion (class of 1998). One couple was kind enough to let
me use their room from which to take the high-altitude shots (though I
did get a bit carried away, and must have been there several minutes
when the wife remarked “I think you’ve got the establishing shots of
the crowd.” I thanked them profusely and left.



This CCD is not the best for low-light work. Even with the
aperture cranked open all the way, it still required unacceptably
long exposure times for me to take good shots without a tripod. [At
the time, I hadn’t discovered the camera’s ISO-adjustment
feature. Unfortunately, one pays a significant price in graininess if
one uses the feature (much greater than the graininess one incurs with
high-ISO chemical film.)]





16 August 2003

Update to Blosxom 2.0; background redesign


This site now runs blosxom
2.0. The calendar and category menu are implemented in 2.0's new
plugin architecture. The layout template is Tropical Blosxom from href="http://blog.semiosphere.info/design/templates/phblox.html">semiosphere.info.
The background photograph is from my href="/photos/wu19151-gal/medium_IMG_0019.JPG.html">archives.



The RSS feed is now 1.0-compliant. If you notice
charset-compatability problems in your RSS client (in other words,
accented characters come out as garbage), please drop me a line.


24 May 2003

Planned downtime update: Sunday, May 25


Barillari.org and \\amory will be down for several hours
today as the server moves to its new location. (Update: I was wrong
about the date. It's tomorrow, the 25th, on which I move out)


09 May 2003

Nuts and Gum: Together at last!


Where by 'nuts,' I mean 'nntp' and by 'gum,' I mean 'rss.' (href="http://www.snpp.com/episodes/1F12.html">Ref.)



Jason Brome implemented a brilliantly simple idea: reading RSS
feeds via NNTP.



For background, RSS is a standard for web site syndication: for a
blog, an RSS feed is a file with the latest entries in it. For a news
site like Slashdot, it contains the latest stories. Programs called
RSS aggregators collect these feeds into a single interface, so
you can see which of your favorite sites have updated without visiting
all of them. NNTP is a protocol for sending href="http://groups.google.com">Usenet news around the Internet. I
use a client called gnus to read
NNTP news and email.



The program, called href="http://www.methodize.org/nntprss/">nntprss, translates the
RSS feeds into Usenet newsgroups, so I can read them with Gnus. It not
only parses the RSS feed of every blog I read (which no aggregator
I've tried before has done successfully), but doesn't tie up emacs for
several seconds while it parses the XML from the RSS feeds (as did
another very cool idea, nnrss.el from the Gnus
distribution. A pity that emacs isn't multithreaded.)



This program simply rocks: I now have one less reason to
ever leave emacs.


29 April 2003

Minor triumphs from inside the bubble


I passed another unannounced href="/images/fire-inspection.jpeg">fire inspection!


10 April 2003

Princeton vs. The World


Princeton: Women get $5,000-$30,000 for href="http://www.dailyprincetonian.com/Content/1999/01/08/news/laset.html">egg
donation (varies with Aryan-ness).



The World: Women addicted to crack cocaine get $200 for href="http://www.plastic.com/article.html;sid=03/04/08/17123370;cmt=137">undergoing
sterilization.



"Princeton vs. The World" might be a trademark of the Daily
Princetonian.

31 March 2003

Discipline, for your amusement


Annual reports from the Discipline Committee, a branch of href="http://www.princeton.edu/odus">The Office of the Dean of
Undergraduate Students:
[2002
| 2001
| 2000
| 1999]




Highlights:


  • "Two students were required to withdraw for one year each for
    defecating in an eating club kitchen."


  • "[S]erious penalties were imposed to students ... who
    impersonated a University official."


  • "Four students received penalties ranging from a dean's warning
    to one year of disciplinary probation for a variety of
    violations, such as ... sending a tasteless message to
    someone."

    If that's a disciplinary violation, I've probably sent
    enough to qualify for jail time.




  • "Two students were put on one year of disciplinary probation,
    one for ... hiding a video camera in a bathroom."




Disclaimer: these are the exceptions to the rule, posted for your
amusement. The vast majority of my colleagues do not do this
sort of thing. As far as I know, at least.


15 March 2003

Rotating JPEGs without losing Exif headers


Update on rotation:
the href="http://gphoto.sourceforge.net/doc/manual/FAQ.html#FAQ-rotate-jpeg">GPhoto2
faq suggests

$ jhead -cmd 'jpegtran -rotate 90 -outfile &o &i' my-pic.jpg


This makes the script a bit simpler.


#!/bin/sh
jhead -cmd 'jpegtran -rotate 90 -outfile &o &i' $1



14 March 2003

Exercises in narcissism


I checked out a href="http://web.canon.jp/Imaging/PSS40/PSS40-e.html">camera from
the New Media Lab at href="http://www.princeton.edu/oit">OIT. As I was taking pictures
of Edwards, Mark Daniels asked if I was on a href="http://www.princeton.edu/~tigermag">Tiger mission. I
answered in the negative, and told him that "I felt this sudden urge
to document my life."



I've placed the raw images (with all of the vertical-frame images
rotated) online in the photos
section. I may post a more heavily-edited gallery in the future; for
the moment, there are some out-of-focus, underexposed, or overexposed
shots included in the collections.



I used a modestly-hacked (to include more navigational links)
version of Fred's Gallery
Generator
(yes, that's the real name of the package), which was
the only web-gallery script I could find that didn't look like
raked-over garbage. (I hate to admit it, but Adobe did a good job with
their gallery-generating software.)



The most irritating issue that came up during the photography
exercise was the question of how to rotate the photos that I took with
the camera held vertically. It would take far too long to load,
rotate, and save each one in the unfortunately-named href="http://www.gimp.org">GNU Image Manipulation Program. href="http://packages.debian.org/stable/graphics/eeyes.html">Eeyes
took three clicks to do each one, but (horrors!) it silently
recompressed the JPEGs when I saved them, throwing away a good deal of
the data.



Much later yesterday evening (actually, very early this morning), I
stumbled upon href="http://packages.debian.org/unstable/graphics/libjpeg-progs.html">jpegtran.
I wrote a short shell-script to rotate the files,


#!/bin/sh
jpegtran -rotate 90 $1 >$1.tmp
jhead -te $1 $1.tmp
mv $1.tmp $1


and bound it to Ctrl-1 in href="http://packages.debian.org/unstable/graphics/gqview.html">GQView.
(GQView lets one bind external editors to keys.) From there, it was
simply a matter of pressing the down arrow and Ctrl-1 or Ctrl-2 (to
activate another script for 270-degree rotations).



The only difficulty with the approach was that jpegtran dropped the
Exif headers. fgg
includes Exif-header information (bits about exposure, flash, etc.) in
the galleries it creates, so I didn't want to leave it
out. Fortunately, it was straightforward to use href="http://packages.debian.org/unstable/graphics/jhead.html">jhead
to copy the headers from the original files.



The galleries are here. The narcissism
I alluded to in the title is here.


10 January 2003

Burn a security hole into your laptop!


Sudhakar (CS 432
TA) gave a general-exam talk on breaking virtual-machine security by
introducing single-bit errors into the VM's memory space (which he did
with high-temperature light bulbs, one of which melted a panel on his
laptop). I was enlightened: now I know why he had been asking about
memory errors on the href="http://treehouse.org.za/cgi-bin/mailman/listinfo/unix">Unix
list.

There is a href="http://www.cs.princeton.edu/~sudhakar/papers/memerr.pdf">paper
on the subject.

09 January 2003

Cold, but not Canada


BoingBoing links to a
blog about life in Antarctica. Like the
interactive fiction game Babel, it's
intriguing, but a bit too short. (Incidentally, don't play IF if you
have looming deadlines.)

Blog Archive