Budd: Naf, Yakfat
September 10, 2010 | Filed Under Uncategorized | Leave a Comment
Inspired by this post at sister-hell, I decided to upload two Budd CDs. I ripped from my original CDs to FLAC, a lossless format, which is well supported on Unix, Windows, OSX, etc. Enjoy!
(If you are the original artist and want these files taken down, let me know and I’ll do so as soon as possible.)
Playing Fair – fair trade children’s clothes Australia
July 29, 2010 | Filed Under Uncategorized | 1 Comment
I am pleased to announce the opening of Playing Fair, my partner’s Brisbane-based online store for fair trade children’s clothes. All of the garments are sourced through an importer recognised by the British Association of Fair Trade Shops (BAFTS).
Here’s a small sample of the products that are available:



Playing Fair was developed using 100% open source software, including Python, Satchmo, and runs on an Ubuntu Linux server.
Marquis Who’s Who? Who cares.
July 28, 2010 | Filed Under Uncategorized | Leave a Comment

Well, Fred Marks, I am truly honoured to have come to the attention of your web scraping bot. This is clearly a defining moment in my career, to have been recognised by a vanity publisher, so I will immediately part with some of my money.
Another Intersystems Caché WTF
July 17, 2010 | Filed Under Uncategorized | Leave a Comment
I stumbled across this remark in some documentation for Intersystems Caché ObjectScript.
You use the Lock command to prevent multiple processes from updating the same record at the same time. But it only works by convention: all the code throughout an application that updates a given global must try to Lock the record that is to be updated, and unLock it when finished. If one routine uses Lock, but another doesn’t, nothing prevents the second routine from updating the record while the first routine has it locked.
Evaluate ObjectScript expressions in Intersystems Caché from Python
July 5, 2010 | Filed Under Uncategorized | Leave a Comment
The Python binding for Intersystems Caché only lets you run class methods and does nothing for running ObjectScript routines or evaluating arbitrary commands (like the eval command in Python). Here is a quick hack.
Create a class:
Class aaaCarloTest.TestClass Extends %Persistent [ ClassType = persistent, ProcedureBlock ]
{
ClassMethod myexecute(Command as %String)
{
XECUTE Command
}
}
Now we can eval an ObjectScript command from Python:
import intersys.pythonbind
user="_SYSTEM";
password="SYS";
host = "192.168.100.1";
port = "1972";
url = host+"["+port+"]:USER"
conn = intersys.pythonbind.connection()
conn.connect_now(url, user, password, None)
database = intersys.pythonbind.database(conn)
print database.run_class_method("aaaCarloTest.TestClass","myexecute",['WRITE "Did this work?"'])
For example, running the routine aaaCarlo in the Caché terminal looks like this:
USER>DO foo^aaaCarlo Here we go USER>
Now we can do this from the IPython prompt:
In [10]: database.run_class_method("aaaCarloTest.TestClass","myexecute",['DO foo^aaaCarlo'])
Here we go
In [11]:
Todo: return values.
False dichotomies by name
June 30, 2010 | Filed Under Uncategorized | Leave a Comment
Knuth wrote somewhere that he decided to call his code/LaTeX markup system literate programming because it implied that everyone else was doing illiterate programming, and no one wants to be illiterate. I’m sure that someone else has already made a list, but here goes anyway:
Attachment parenting. Better than chaining your toddler to a wall in your basement.
Literate programming. Anyone for some illiterate programming?
Natural parenting. Red food colouring makes kids happy, right?
Structured programming. Let’s use goto statements everywhere!
Anyone know some more examples?
“What’s the most important thing you learned from science?”
June 30, 2010 | Filed Under Uncategorized | Leave a Comment
A while ago I read a post about semi-alternative careers for scientists. One comment stood out:
(On July 16, 2009, I asked for volunteers with science degrees and non-academic jobs who would be willing to be interviewed about their careers paths, with the goal of providing young scientists with more information about career options beyond the pursuit of a tenure-track faculty job that is too often assumed as a default. This post is one of those interviews, giving the responses of Alric, a veterinary pathologist at a drug company)
1) What is your non-academic job?
I am toxicologic veterinary pathologist and work at a contract research organization. We use animal models to evaluate the possible toxicity of drugs in development by pharmaceutical or biotech companies. The main goal is to determine if, and at what dose level, a drug is safe.
…
8 ) What’s the most important thing you learned from science?
That reality is independent of our wishful thinking or what bring us comfort. Let the data take you to the most probable conclusion even if you don’t like it or appears to not be beneficial. In the end you’ll be better off.
The last paragraph is spot on. I wish more people thought in that way.
Best screenrc
June 30, 2010 | Filed Under Uncategorized | Leave a Comment
A mashup of nice options that I’ve accumulated over time. The status line is rather long but selecting it and copy ‘n’ paste should work.
# Ctrl-right square bracket doesn't seem to clash with anything:
escape ^]]
# Nice status at the bottom of the screen, permanently shown:
hardstatus alwayslastline '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]'
# Use Ctrl-left arrow and Ctrl-right arrow to cycle through windows.
bindkey ^[[1;5D prev
bindkey ^[[1;5C next
Recovery of data from a RAID 5 disk
June 18, 2010 | Filed Under Uncategorized | Leave a Comment
At work I replaced a single drive in a HP DL380 RAID 5 array. The drive was only giving SMART 1720 errors (imminent failure) and HP wanted the drive back due to warranty conditions, so the question came up of erasing any data on the drive.
I got conflicting advice – some people said that you would definitely be able to read data off the drive, and other people said that because it was part of a RAID 5 array, it was impossible to reconstruct the array, so the drive could be sent back with no worries. I decided to test how much data could be read from a single drive from a three disk RAID 5 array.
Details of the server: HP DL380, Smart Array P400 controller. The RAID 5 array was configured with two logical volumes.
Details of the drive:
72GB 2.5" Serial Attached SCSI (SAS) SFF Single Port Hot-Plug 15K HDD Option Part# 431935-B21 Spare Part# 432321-001 Assembly Part# 431930-002 Model# DH072ABAA6
Due to physical access issues the drive was taken out of the server and installed in a standard desktop PC running Windows XP with a Promise FastTrak TX2650 SAS controller card. After installing the TX2650 drivers the SAS drive was recognised as a standard hard drive using JBOD, so it immediately appeared as a logical drive in Windows XP. Here’s the card and drive (fortunately the TX2650 comes with all the cables that you need):

I ran PhotoRec directly on the SAS drive:

After about two hours PhotoRec finished:

Those recovered files total about 8Gb (the original RAID 5 array contained about 50Gb of data). From our perspective, the best hit is searching for a certain prefix “PATNOK” that we use in files for daily demographics imports:

Each of those 1443 files contains at least one set of patient details (name, address, Medicare number, date of birth, phone number, next of kin, next of kin contact details).
That’s a clear example of sensitive data coming off a single drive from a RAID 5 array.
The success rate for larger files was pretty low, I suspect due to the fact that data is striped on a RAID 5 disk.
cu instead of minicom
June 6, 2010 | Filed Under Uncategorized | Leave a Comment
To connect to a SheevaPlug serial USB console, plug it in, and then use this one liner:
cu -s 115200 -l /dev/ttyUSB0
Quicker than messing around with minicom and setting the device in a profile, etc. Thanks to Wilfred on the computingplugs wiki.