Wednesday, June 27, 2007

Implicit Associations

Dear lazyweb,

I have a need for software that implements the Implicit Association Test, but I can't find any Free software that fits the bill. So I suppose I will have to write it myself. I am looking for recommendations for which language to use. My criteria are these:

  1. I am an amateur coder. I have coded in C, C++, Perl, PHP, Java, Javascript and (ugh!) Visual Basic. I am willing to learn a new language for this project (thinking about Python). However my skillz are somewhat basic, and I have never written a GUI application, which this would have to be.
  2. The software needs to be cross-platform (GNU/Linux and Windows XP at least)
  3. The functionality I need is as follows: It should display images and text to the user, and record the response latency, i.e. the time between when (a) the image/text is displayed and (b) the user hits a specific key in response. Timing to the millisecond level is needed.
Any and all suggestions will be gratefully received.

Thanks in advance,



Jim said...

You want a GUI for the user, so choose a GUI toolkit early on. TK is crossplatform & easy, but ugly. I'd choose it :-)

Then a language underneath; something good at prototyping - you're not asking it to do much. For fun, TCL works well with TK - but so does perl, python and ruby - all worth using.

Anonymous said...

You may also want to look into wxPython:
- cross-platform code, with underlying native widgets (uses GTK on Linux, Win32 widgets on Windows, support for OS X with native widgets too)
- Python interface

Rob said...

PyGTK sounds like an obvious choice although you might do smoe research to find out if Firefox & IE events & timers are precise enough for your purposes.

Megabyte405 said...

I'd say Python with PyGTK (first choice, esp. with some unix experience), then maybe [going along with rob here] JavaScript on a web page if your application is simple enough and the precision is suitable. Either would probably work fine, and both should be portable (Python may be more portable than HTML/JavaScript, esp. if you need IE + Firefox + Opera + Safari support...)

Anonymous said...

QT/C++ best cross platform platform

Stuart Langridge said...

To my mind, if you've worked with JavaScript, then a web page is probably the easiest way to do this. JavaScript can do your required timing granularity, it's easier to make it cross-platform, and it's easier for people to use (no installation, just go to a URL).

Anonymous said...

i've coded in Perl, Python, Java, Javascript, and (some) VB. of these, i'd say the easiest way to get a GUI going is PyGTK with libglade, hands down.

Perl is executable line noise to me, no matter how much i work at my coding style, it just never gets clean. Java is verbosity squared, mated to redundancy cubed; it's "clean", but so wordy that cleanliness no longer matters.

VB is, well, VB. designing a GUI in it is easy enough, but goddess help you if you ever have to root around in the generated code.

web pages are simple to do, provided you pick a good templating toolkit and javascript/AJAX library, but the programming model imposed on you has fundamental limitations you can't get around without writing too much infrastructure code. you can emulate a traditional GUI with enough AJAX, but doing all the plumbing gets too distracting from the task of solving your actual problem. plus i've never seen a good debugging solution for Javascript, to be honest; i always feel like i'm coding blind working with it.

with Glade, you build the glade XML file to describe the GUI, then in PyGTK you just load it up and run with it. simple, straightforward. Python is OO enough to interface well with a GUI toolkit, the PyGTK bindings are nice and mature, and you don't get the verbosity of Java either.

wosi said...

I would recommend to go the pyGTK way. In combination with Glade, you can get startet with GUIs really quickly and as for my experience it is quite easy to learn.