I’ve done some Apache Ant build file hacking today and that made me recall that the original author of Ant, James Duncan Davidson, actually regretted using XML as the file format.
Mysteriously missing from today’s world wide web, but fortunately captured by the Wayback Machine, the blog entry Ant and XML is worth reading. The entry is concluded like this:
Or maybe I should have just written a simple tree based text format that captured just what was needed to express a project and no more and which would avoid the temptation for people to want to build a Turing complete scripting environment out of Ant build files.
Both of these approaches would have meant more work for me at the time, but the result might have been better for the tens of thousands of people who use and edit Ant build files every day.
Hindsight is always 20/20.
The “real scripting language” part sounds just like Ruby’s build program Rake and “a simple tree based text format” sounds very much like YAML, a format well worth considering for hierarchical data structures.
The old battery for my IBM/Lenovo ThinkPad T60p went from bad to useless this autumn but it wasn’t until yesterday that I ordered a new 9-cell battery (7.8 Ah) directly from IBM Sweden where the 9-cell battery actually was cheaper than a 6-cell battery (5.2Ah) . I first looked at well-stocked reseller Dustin but after discovering that either battery was cheaper at IBM, even including shipping costs, I simply ordered and smiled.
Update 2007-12-13 The battery arrived already today!
$ cat /proc/acpi/battery/BAT0/info
design capacity: 84240 mWh
last full capacity: 84240 mWh
battery technology: rechargeable
design voltage: 10800 mV
design capacity warning: 4212 mWh
design capacity low: 200 mWh
capacity granularity 1: 1 mWh
capacity granularity 2: 1 mWh
model number: 92P1133
serial number: 1146
battery type: LION
OEM info: Panasonic
As a follow-up to my post about MySQL support for UTF-8 in PHP, here is the very same information for Ruby on Rails. In Rails it is a simple configuration entry in config/database.yml. I use the development configuration as an example:
UTF-8 is obviously configured with the encoding setting. Don’t forget to update the test and production databases too!
Originally published in Swedish in my Folkmun.se Blog, a handy tip to make sure that you are reading and writing UTF-8 when connecting to a MySQL database:
mysql_query("SET NAMES utf8");
mysql_query("SET CHARACTER SET utf8")
This is my new English-language blog about various software development topics that catch my interest. I’m quite sure that for example Android, Ruby on Rails and agile software development will be mentioned.