GNU PSPP on OSX Yosemite

I have a project I’m working on that requires the use of a data analysis tool like IBM’s SPSS but at about six thousand dollars per year, it’s a little out of reach. There is an open source project, fortunately, that provides all the functionality I need for a lot less.

PSPP is, according to the project website:

“…designed as a Free replacement for SPSS. That is to say, it behaves as experienced SPSS users would expect, and their system files and syntax files can be used in PSPP with little or no modification, and will produce similar results (the actual numbers should be identical). The number of variables and cases is limited only by the computer architecture.”

There are a number of ways of getting PSPP depending on your operating system: I am a Mac OSX user running 10.10.5 Yosemite so installed it using MacPorts. As this is a brand new machine I’m installing it on, I needed to install MacPorts first: download and run the install package from the download page, update and then run the install (you need super user privilege):

$ sudo port selfupdate
$ sudo port install pspp

This will give you a working PSPP from the command line. If you want to use the graphical user interface over PSPP, known as PSPPIRE, you’ll need to update your X11 DISPLAY driver by downloading and installing XQuartz which is a community produced X-window server assisted but not supported by Apple. Once you’ve installed Quartz, you’ll need to log out and in again to update the DISPLAY environment. Once this is done you can launch the GUI version of PSPP from the command line:

$ sudo psppire

This allows you to work with your SPSS data sets and command files almost without modification.

Last.fm scrobbler v2 doesn’t work

lastfmThis morning, I finally gave up trying to sort out the scrobbling problem I’ve been having since December. The current Last.fm scrobbler, version 2, is just not functioning, so I’ve reverted to version 1.5, losing 4 months’ scrobbles in the process. Not impressed. Why can’t anybody write software that works any more?

The problem has been that although the Last.fm app on my OSX device seems to work, reporting scrobbles normally, these seem to get stuck in cache. In the app, these tracks show as “cached” and do not appear on my last.fm profile.

Long story short, if you’re a Mac user having trouble with last.fm not scrobbling your tracks, delete the last.fm scrobbler, empty the trash and download the older version 1.5 here (dmg).

Adobe Lightroom 5.7 Crash

Adobe has recently released an update for its Lightroom 5 photo management system which on OSX Yosemite does not work. The application crashes. I’ve gone through all the usual precious time-wasting permutations including completely uninstalling, clearing trash and reinstalling, even re-downloading from Amazon (where I bought it from a couple of months ago). The problem seems to be Adobe, like everyone else, is developing code for the majority market, i.e. the Microsoft Slaves.

A lot of Mac users, me included, operate with the flexibility of case-sensitive drives and here lies the problem. Adobe’s sloppy coders have assumed that all systems are case insensitive. The error log gives a clue:

Library not loaded: @executable_path/../Frameworks/asneu.framework/versions/a/asneu

This library is actually located in the application folder in:

/Content/Frameworks/asneu.framework/Versions/A/asneu

Changing the path to match that expected by the application (V becomes v, A becomes a) allows it to run OK. I’m not aware of any other case-sensitivity issues with LR5.7 – it seems to work just fine.

Tip: if you’re a LR user, the 500px plugin makes publishing to your favourite photo showcase easy.

 

Mavericks OSX 10.9 Update php fix

I updated to OSX 10.9 Mavericks this week, and as with all updates, it broke PHP. I run a local MAMP server for development purposes and it all works OK except that you have to re-enable PHP in the apache configuration file. I found a useful guide over at coolestguidesontheplanet.com which included these steps:

Open a terminal window and edit the httpd.conf file:

sudo nano /etc/apache2/httpd.conf

Uncomment this line:

LoadModule php5_module libexec/apache2/libphp5.so

Write out and save the file, then restart apache:

sudo apachectl restart

… and Robert’s your Mother’s Brother.

Pro Git and more MX DNS

Continuing the summer of code into the early autumn, I have been developing, enhancing and debugging the new server. New and migrated sites are stable and responding well within the resource limits I’ve chosen of 10GB disk, 50GB traffic (although we’re close to whacking this one) and 256/512 MB RAM/Swap space. Uptime has been 100% for over 60 days now.

Within the suite of services running on the server are database, web server, CGI, mail, stats and monitoring. What is not, is the DNS service, which I have learned to keep in a different place, with the registrar. Setting up reverse DNS for the mail service to work correctly is important: I discovered that one client had been having difficulties receiving mail from just one of his friends. This was because the MX DNS entry for his domain pointed to an IP address which some service providers will reject as it doesn’t comply with the RFC. Changing it to the host domain of the server’s IP, however, stopped all mail getting through to the client. This was finally resolved by pointing the MX record for the domain to the domain itself:

example.com. A     192.0.2.1
@            MX 10 example.com.

If you want to know how the Internet works, by the way, a really good place to start is the Internet Engineering Task Force (IETF). They have a good introduction here. Many internet standards are defined in RFC documents.

Other services on the server operate as database-driven php suites such as the WordPress CMS, Moodle, LimeSurvey or phpBB. All of these are subject to modifications, code hacks and tweaks to make them work to the needs of the site owner. Whilst the Parallels Plesk Panel allows install-at-a-click for many application suites, I prefer to manage the installation and customisation of these myself. Until now, I had used the download-unzip-upload over FTP method but I’m going to try using the more elegant command-line facility offered by Git. I’m getting started by using their excellent online documentation. This should allow me a much faster update route and potentially a way to be a better contributor to open source than the consumer I have been.