Listed on

Programming

Perl on BSD talking to MS-SQL Server

A lot of broadcast monitoring equipment seems to use Microsoft SQL Server as backend for storing alerts and other data. As we use a FreeBSD based monitoring box it proved necessary to find a way of accessing these servers via ODBC. Read More...

Don't forget your keys

Data cleansing is the process of taking the data contained in a data base and correcting the errors in it. It is probably one of the most hated jobs in the industry as it tends to be both tedious and exacting. The final two nails in its coffin is that it is almost never finished and almost never completely correct. All in all a miserable and mostly unsatisfying experience.

One of the secrets to success in data cleansing is in selecting keys i.e. the fields that allow the identification of the record to be updated. Read More...

The Power of Random

A few years ago I spent a great deal of time thinking about parallel programming. One of the counter intuitive things that emerged was that organisation in a massively parallel system can be detrimental to performance. A recent article on LinkedIn by Don P (To Be More Successful, Study Failures) which mentioned under sampling reminded me of one of my key counter intuitive conclusions. Read More...

Python Serving HTTPS with CGI

One of the claims often made about Python is that it is so easy to extend the language and change the behaviour of an object. The classic example of this is turning the standard library http server into an https server. Unfortunately, although there are hundreds of examples on the web about how to do this - made even more numerous by the move to Python 3 - days of testing here failed to get them to work with CGI scripts. Ordinary pages worked fine, but CGI would fail silently. Apparently these same examples worked on PCs.

The problem turned out to be a quite subtle implementation difference between the Mac and Unix handling of CGI processes and the PC approach in the Python library. Read More...

Range Inputs and Events

The range input looked perfect for writing a web interface to control volume levels on a batch of play out boxes. However, the initial choice of the onChange Javascript event turned out to be both naive and unworkable when tested on an iPad under Mobile Safari although it appeared to work well enough for a mouse driven interface. The better solution was to use two events: onMouseUp and onTouchEnd. Read More...

Internationalising PHP Web Control Panels

Cocoa on OS X is Unicode based. This makes working with non-ASCII character sets fairly easy … provided you can encode them in a unicode format. PHP has some facilities for writing UTF-8 character set based files. Read More...

Replacing Cocoa applications with a new instance

Sometimes you need to start a Cocoa application and have it replace a previously running instance of itself. In the case of the application that we are writing it is invoked by the open command line command and we then want it to replace a previously running version of the program. If the application is activated from the GUI we want the default behaviour going to the open application to be preserved. Read More...