Spence Green

التكرار يعلم الحمار

I am a graduate student in Computer Science at Stanford University. In addition to computers and languages, my interests include travel, running, and diving.

Archive for the ‘Software’ Category

WordPress, 1and1, and MySQL

without comments

For several months now I have been unable to automatically update WordPress. Then, this afternoon, I found that I could no longer update the site manually. A quick glance at the 2.9.1 release notes revealed the problem:

Requires MySQL 4.1.2 or greater (old requirement was 4.0).

A few searches revealed that many other 1&1 users have encountered the same issue, which I resolved by making two administrative changes:

  1. Ensure that WordPress is running on php5 by adding a line to .htaccess in the WordPress root directory.
  2. Migrate the WordPress database to MySQL 5.0. I followed this set of instructions exactly.

Written by Spence

January 9th, 2010 at 11:49 pm

Posted in Software

Working with Python, Unicode, and Arabic

with 4 comments

When working with non-European languages such as Arabic and Chinese, a practical understanding of Unicode is necessary. My research group uses Java for larger applications, and although Java represents all strings in Unicode, it is often cumbersome to write small Java applications for the various data manipulation tasks that appear while preparing corpora for translation. Therefore, fluency in one of the dynamically-typed scripting languages can be immensely useful in this particular domain. I prefer Python for its intuitive Unicode support and minimalist syntax. This article provides sample Python code for several common use cases that require particular consideration of string encodings. Perl offers analogous capabilities, but Ruby’s Unicode support is somewhat limited as of Ruby 1.9.
Read the rest of this entry »

Written by Spence

December 19th, 2008 at 4:52 pm

Posted in Programming

Programmers and Scientists

without comments

A distinction should be made between Computer Science and computer programming that is more substantial than orthographic convention. Some might stop at the observation that the first is an academic discipline while the other is a vocation, hence the two conventions. Indeed, electricians do not study signal theory, and electrical engineers avoid cable installation. The same cannot be said about our discipline: in school, and at work, we spend most of our time contemplating software. If that is so, then perhaps software quality should be the metric. Does it follow that highly-trained computer scientists should produce better code? In fact, the opposite is almost always true: research software is often disorganized and unstable, more like a bicycle made from sticks and glue than a polished instrument. Software practitioners use this fact to arrive at an equally errant conclusion: a good programmer is a scientist (Jeff Atwood’s recent feature on NP-completeness illustrates this fallacy). For every parry from academia, there is a riposte from industry. In the end, neither man leaves the field unharmed.

Read the rest of this entry »

Written by Spence

November 27th, 2008 at 12:35 am

Posted in Software