Monday, 8 April 2013

Music by Programmers - Launch Party

Jason Gorman and five of his programming chums have put together an album of original electronic music to raise money for educational programmes at Bletchley Park and The National Museum Of Computing. The charities get every penny of the profits, split 50/50 between them.

The album goes on sale in late April, and Jason's target is to sell 2,000 downloads and raise £10,000. The music industry isn't what it was, and selling music is much harder than it used to be - even for a good cause. Between now and the release date, they're going to need as much help as they can get to spread the word.
Please feel free to publicise their efforts by any means at your disposal.

A special listening party to launch the album on 23rd April is not to be missed. It's going to be small and intimate at a "jolly spiffy pub" near Holborn. Every penny of the £20 ticket price goes directly to Bletchley Park for maths workshops and a programming club at The National Museum Of Computing. And every ticket holder will get a very limited edition CD with bonus tracks!!! Only 100 of these special edition CDs will be produced, so it promises to be a veritable collector's item.

Saturday, 6 April 2013

GCalendar in Joomla: Daylight Savings problem

We recently launched a new Web presence for my German Church using Joomla 2.5. At my suggestion, GCalendar was installed to provide a searchable event calendar and an "upcoming events" module. It all worked splendidly until British Summertime began on 31 March 2013 - and suddenly all calendar events were shown starting an hour early.

We spent days trying to find a way to configure Daylight Savings into the calendar. All it allowed us to do in the global settings was to choose a time zone - of course we had set it to Europe/London - but without an option of respecting Daylight Savings automatically. In despair, I eventually uninstalled the component and reinstalled it. At this point there was a new version (3.0.0) of GCalendar available, so I chose that. In the component control panel there turned out to be an options button at the top right of the screen, which we may simply have missed seeing before. In the options you can set the time zone and once I had done so, suddenly all the times appeared correctly again within the web site. Huge sighs of relief all round.

Could the "Hydrogen Age" be about to dawn?

A team of researchers at Virginia Tech has used bio-engineered enzymes to release high-purity hydrogen from xylose in biomass and waste heat from industrial processes. Sounds too good to be true, but it was not published on 1st April.

Wednesday, 6 February 2013

Free Security Engineering textbook

Ross Anderson of Cambridge has put the second edition of Security Engineering – A Guide to Building Dependable Distributed Systems online as a free download. His explanation: it's the decent thing to do and it actually tends to increase sales of the printed book (borne out by sales of the first edition). Music recording industry, please take note!

Wednesday, 16 January 2013

libharu-2.2.1.tar.gz disappears

Overnight, my project's build suddenly failed. The makefile is supposed to download and rebuild the libharu pdf generation library whenever it creates a clean build. It turned out that the libharu project has moved all its files on to Github and this much-used stable release has not been tagged.

Luckily I found a mirror under the Fedora project's repository - thanks Fedora!

Wednesday, 17 October 2012

Doomed to oblivion: a very promising cure for cancer

Read about research by Professors Justyna Leja and Magnus Essand into a virus that can destroy pancreatic cancer cells without noticeable side effects. Then share their frustration that no company or government is prepared contribute the ridiculously small sum of £2M needed to fund clinical trials. Without these, the treatment will never be licensed for use in humans.

At the time of writing, the campaign to crowdsource the necessary funding has been running for almost two weeks, with a further four to go - but less than 10% of the total has been raised so far. This needs a massive push now! Please alert your friends.

Monday, 30 April 2012

Moving Mail to a New Laptop

My wife was getting fed up with her eMac running slower and slower, plus incompatibility between her MS Office X and the MS Office 2010 in use at her company, so for her birthday she got a Windows 7 laptop. Until the weekend just gone, however, she didn't make much use of it because it was beyond her ability to move her mail account from Entourage to Outlook and to move all her files across. The address book was a particular problem.

Eventually we found ways to achieve almost all these migrations. The document files were the easiest part - local area network connection, turn on Windows sharing on the Mac, just drag the files over (we had to retry a few times because the connection reset while copying long files).

To migrate the mail messages, we decided to use Thunderbird instead of Outlook (this PC doesn't connect to a corporate Exchange server). Drag each folder from Entourage to a Finder folder or the desktop. This exports the messages in the form of a .mbox file. Rename to remove the extension and copy them to Thunderbird's Mail folder in the current profile.

The mail addresses turned out to be rather a tougher proposition. You can export each address card to a .vcf file, but Thunderbird found no useful information in them. It dawned on me later that this might be a line-ending issue - we could have run mac2unix and then unix2dos before importing. But by then we had solved the problem in a different way.

Entourage allows you to drag address cards to the Mac's native address book application. This was synchronized with Plaxo using my wife's account. Plaxo supports export of the address book in LDIF format, which Thunderbird was able to import without problems. If you can't use this route, you can also export the entire Mac address book in a single operation to .vcf (or possibly even to LDIF). I suggest adjusting the line endings to Windows conventions before attempting to import to Thunderbird.

Then it turned out that the vast majority of e-mail addresses that she needed were not in either address book. Entourage just maintains a cache of recently used addresses and we could find no way to export all of these into any sort of useful file format. To the rescue came Adam Haeder with a simple shell script to extract plausible e-mail addresses from mbox files. I was able to adapt it for use under Cygwin and enhance it a bit to cope with non-US addresses and escaped newlines and spaces. The resulting tab-delimited file was suitable for import to Thunderbird.

 #!/bin/bash  
   
 # This script will parse an mbox file, displaying all of the From: email addresses, removing ones that  
 # are from postmaster, mail admins, etc  
   
 FILE=$1  
   
 if [ ! -r $FILE ]; then  
  if [ -r /var/spool/mail/$FILE ]; then  
  FILE="/var/spool/mail/$FILE"  
  else  
  echo "Sorry! Neither $FILE nor /var/spool/mail/$FILE exists, or I can't read them"  
  exit  
  fi  
 fi  
   
 # Using cat to read the input means you can run this over many mbox files simultaneously  
 # dos2unix and mac2unix standardise line endings to LF only  
 # First sed script joins lines that have been split with a "=" at line end  
 # grep isolates lines starting with "From:" and egrep -vi rejects all non-human addresses  
 # Next grep discards any lines that contain no email address (@)  
 # The next sed script turns =20 into spaces and discards trailing spaces and "From:"  
 # The next converts [mailto:x@y.z] to <x@y.z> form  
 # Any bare SMTP addresses are converted to "x@y.z <x@y.z>"  
 # Any SMTP addresses with no friendly name but in "<>" delimiters are converted similarly  
 # Finally the "<>" delimiters are removed and replaced with a tab separator  
 # Result is sorted uniquely (ignore case & leading blanks) and converted to DOS line endings  
 cat $FILE | dos2unix.exe | mac2unix.exe |\  
 sed '/=$/{N;s/=\n//}' |\  
 grep "^From:" | egrep -vi \  
 "(postoffice|\  
 postman|\  
 administrator|\  
 bounce|\  
 MAILER-DAEMON|\  
 postmaster|\  
 Mail Administrator|\  
 Auto-reply|\  
 out of office|\  
 Mail Delivery System|\  
 Email Engine|\  
 Mail Delivery Subsystem|\  
 Mail.Administrator|\  
 non.deliverable)" |\  
 grep '@' |\  
 sed 's/=20/ /g;s/\s*$//;s/^From:\s*//' |\  
 sed 's/\[mailto:\(.*\)\]/<\1>/g;s/"//g' |\  
 sed '/^[^<]*$/s/^\(.*\)$/\1 <\1>/' |\  
 sed 's/^<\(.*\)>$/\1 <\1>/' |\  
 sed 's/^\(.*\S\)\s*<\(.*\)>/\1\t\2/' |\  
 sort -ubf | unix2dos.exe